Commit Graph

68951 Commits

Author SHA1 Message Date
d731ee4960 Fix T61368: Brush texture preview ignores rotation 2019-03-19 13:07:48 +11:00
d47f827019 Cleanup: unused warning 2019-03-19 08:39:48 +11:00
ce09b93955 Fix T61104 Compositing two scenes with different output scales crashes
Was due to incorrect output size. Use engine->resolution_x/y instead of
computing the size on the fly from the scene specific settings (which are
not overwritten by the rendering scene).
2019-03-18 21:40:04 +01:00
fd63be0610 UI: Use 'Display' instead of 'Draw' for show_particles 2019-03-18 21:33:01 +01:00
a764a3cd1c Units: Use PROP_DISTANCE for emitter_distance 2019-03-18 21:32:02 +01:00
9249e53f92 Scale waveforms & show clipping
Scale waveforms in sound strips by volume.
If any drawn line exceeds value 1 or -1 it is drawn by red color so user can see point, where clipping occurs.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4515
2019-03-18 13:11:33 -07:00
3d1138840c Fix strip text hiding behind scrollers
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4506
2019-03-18 13:11:33 -07:00
a761a93d41 Fix VSE color picker
Fix VSE color picker mouse coords calculation

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4396
2019-03-18 13:11:33 -07:00
9c99292a16 Fix T54117 Movie clip undistorted - proxy not working
Add movieclip fallback render option, for case, when proxies are not enabled or built

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4219
2019-03-18 13:11:32 -07:00
b0752cd7a0 Fix T57590: assert with zero length array buttons. 2019-03-18 19:56:14 +01:00
10d1edbffb Fix T56183: flip matcap not working for workbench as render engine. 2019-03-18 19:26:01 +01:00
b29790a953 Fix T62587: Particle instances Use Count not saved correctly
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4544
2019-03-18 17:53:14 +01:00
8e54ef69c6 Fix T62700: Disconnect hair bug
Need to use evaluated mesh from evaluated modifier data.
2019-03-18 17:50:29 +01:00
ad3d925682 Fix T62636: Overlapping scrollbar in driver editor
Instead of only `ymin` and `ymax`, `ANIM_channel_draw_widgets`
has a rectangle as input now.
This allows the caller to set a custom width for the channel.

Some space types need the extra space for the scrollbar
(drivers, graph), but the other don't have a scrollbar.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4543
2019-03-18 17:28:52 +01:00
8fb0b9aebb Subdiv: Enable topology cache in edit mode
The general idea of this change is to have a runtime data pointer
in the ModifierData, so it can be preserved through copy-on-write
updates by the dependency graph.

This is where subdivision surface modifier can store its topology
cache, so it is not getting trashed on every copy-on-write which
is happening when moving a vertex.

Similar mechanism should be used by multiresolution, dynamic paint
and some other modifiers which cache evaluated data.

This fixes T61746.

Thing to keep in mind, that there are more reports about slow
subdivision surface in the tracker, but that boils down to the
fact that those have a lot of extraordinary vertices, and hence
a lot slower to evaluated topology.
Other thing is, this speeds up oeprations which doesn't change
topology (i.e. moving vertices).

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T61746

Differential Revision: https://developer.blender.org/D4541
2019-03-18 17:11:43 +01:00
91ffd39e77 Fix T62706: Orphan Data : I have now to save a file, close and reopen it, only then I can purge previous deleted meshes.
libquery code has some specific handling for IDs tagged as 'no_main',
among which to never consider them as refcounted/refcounting other IDs.

This is fine, but it also means we have to be careful when moving an ID
from main to out-of-main status, to do all id remapping we need
//before// we tag it as no_main.

That was a bit tedious to track down, we'll have to be careful that all
the corner cases we have to take care of, do not end up in a giant soup
of expections to exceptions, where nobody can find its way anymore...
2019-03-18 16:51:48 +01:00
6490626077 Depsgraph: Store original modifier pointer
Currently not needed that much, but will ease some further
development which is related on preserving runtime modifier
data.
2019-03-18 15:53:18 +01:00
01c5335422 Cleanup: Comments 2019-03-18 15:53:18 +01:00
c5fe6ed96b Fix T62633: Model normals not updating in a modifier stack after a deform modifier.
A deform-only modifier that needs access to normals need a copy of
evaluated mesh with those normals updated, when it is not the first one
in the stack.

That issue had been partially fixed in Object mode a long time ago
(see T23673), but it was still broken for deform-only stacks cases.

And it was also completely missing from the Edit mode code
(`editbmesh_calc_modifiers()` function).
2019-03-18 15:50:12 +01:00
Dalai Felinto
b7255d33da Silence sorted function declaration/const warnings 2019-03-18 14:40:29 +00:00
29039e5c74 Cleanup: remove compare_len_squared utility
There isn't any advantage to this over comparing the squared length.
2019-03-19 00:37:58 +11:00
606f3c74d3 Fix T62643: ID user decrement error, likely related to custom material PointerProperty.
We are in a totally out-of-main context here, so no refcounting of any ID...

Note that this whole 'render preview' area could use some refactor with
modern ID management API, but that would go way beyond a mere bugfix,
and it is not the time to do such things.
2019-03-18 13:57:07 +01:00
2b79f274e3 Fix T61226: Make hair editing (more?) thread safe
This replaces the global `PEData->dist` with a thread local variable
that is passed into the callback functions separately.

There are two new function types which have `Hit` in the name.
Those take the distance to the mouse as an additional parameter.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4538
2019-03-18 13:31:54 +01:00
4d2672ca7f Cleanup: C++ style of structure definition 2019-03-18 12:47:18 +01:00
6d99b2c021 Cleanup: we now have a way to tag 'from' ID pointers in libquery code.
So no need to have custom verbose own detection cases for those guys...
2019-03-18 11:47:54 +01:00
07355ff74b Fix mistake in previous commit. 2019-03-18 11:42:35 +01:00
Miguel Porces
1b06e3378a Fix T62670: insert_link() method not working for ShaderNodeCustomGroup.
Allow Python to override this method.

Differential Revision: https://developer.blender.org/D4537
2019-03-18 11:37:31 +01:00
d0e28721b0 Cleanup: Main id looping: add FOREACH_MAIN_LISTBASE macro.
We don't want to use flow control like `break` statement into the basic
`FOREACH_MAIN_ID` macro, as this is a nested loop.

When refined behavior is needed (like breaking whole iteration, or just
skipping to next ID type), FOREACH_MAIN_LISTBASE and
FOREACH_MAIN_LISTBASE_ID macros should be used instead.

Based on D4382 by @campbellbarton
(Other potential solution, using flow control macros: D4384).
2019-03-18 11:36:50 +01:00
66932a2c81 Add-ons: disable 3ds add-on in all existing preferences.
Silences warning when running with --debug. If/when this add-on is ported,
users that need it can enable it again.
2019-03-18 11:10:28 +01:00
3a8099c45c Cleanup: unused vars in last commit 2019-03-18 20:30:05 +11:00
794aef3f25 Fix T58763: Sample color fails with mirror modifier 2019-03-18 20:16:21 +11:00
1d1e06b376 Cleanup: rename color band to color ramp 2019-03-18 18:26:14 +11:00
b749e43cd3 Fix color ramp eyedropper menu item
This couldn't be accessed because the poll function was checking the
active button.

Add a "color_ramp" context pointer which is set by the menu.

Alternative fix to D3984
2019-03-18 17:50:18 +11:00
8f5ba8e1a1 Cleanup: spaces around operators in DNA headers 2019-03-18 14:23:34 +11:00
317cb1dd65 Cleanup: style, duplicate include 2019-03-18 14:13:06 +11:00
6c0240e84a UI: clarify "Remap Relative" tooltip
Resolves T62612
2019-03-18 13:58:01 +11:00
c7a50d84b6 Fix T62684: Crash transforming w/ snap enabled 2019-03-18 13:42:53 +11:00
e1364b21fa Fix T62685: Rename 'Align' to 'Only Origins'
The RNA name didn't match the name used in the UI,
making the quick favourites menu show this as 'Align'.
2019-03-18 13:30:16 +11:00
9099305771 Cleanup: rename BLI_kdtree vars & args for clarity 2019-03-18 10:25:15 +11:00
4b3aafd44f BLI_kdtree: refactor boids specific logic into callback
Logic to for boids to avoid head-on collisions was in BLI_kdtree.

Move this into a callback which is now defined in boids.c
so the kdtree code can be kept generic.
2019-03-18 09:40:38 +11:00
df96455c55 UI: add light/world settings in shader node editor.
Material was already there. Implementation was changed so it's just a
single line of code to adapt a panel to the node editor.
2019-03-17 21:53:13 +01:00
f79ad42808 GPencil: Cleanup extra lines 2019-03-17 20:04:09 +01:00
6577618d5b GPencil: Changes in Fill and new 3D Cursor View Plane
This commit groups several options that were tested in grease pencil branch:

- Changes to fill algorithms and improves, specially in small areas and stroke corners.
  New options has been added in order to define how the fill is working and internally there are optimizations in detect the small areas in the extremes.

  Kudos to @charlie for coding this fill improvements.

- New 3D cursor view plane option.

  Now it's possible to lock the drawing plane to the 3D cursor and use the 3D cursor orientation. This allows more flexibility when you are drawing and reduce the need to create geometry to draw over surfaces.

- Canvas Grid now can be locked to 3D cursor.
- New option to reproject stroke using 3D cursor.
- Small tweaks and fixes.

Changes reviewed by @pepeland and @mendio
2019-03-17 19:47:56 +01:00
887d052e56 Fix T62570: Append Particles System not working properly.
T62570 and T61796 show that we need two slightly different behaviors in
post-linking collection process:
* For linking, we never want to instantiate indirectly-linked
collections or objects.
* For appending however, since all collections and objects will become
local and hence need instantiation, we want to 'link to scene' all
collections first, better than instantiating the objects in the master
collection opf current scene.
2019-03-17 18:07:13 +01:00
94507a7fa7 Fix T62589: Particle system Instance Collection option fails to set a user for a linked collection.
Forgot to tag properly RNA property in rB439437fa3a44.
2019-03-17 16:02:00 +01:00
0a25cea2cf Fix T62240: Bleed artifacts with degenerate triangles
This makes degenerate triangles be ignored, as they cause artifacts and
don't contribute to the result anyway. There is an extra cost for
all triangles, to check if they are degenerate. Though not ideal, this
seems to be the safest solution at the moment (see code comments).

This commit also changes the clamp value for the bleed len_fact from 5
to 10, to give good corner results with some sharper angles, considering
they will be rounded later.

A lot of the texture paint initialization code could be optimized
by caching the results throughout the session, instead of rerunning it
for each stroke. Stroke initialization is way too expensive at the
moment, and does many redundant computations.
2019-03-17 15:44:41 +01:00
cfd909f184 Fix T62678: Wrong text clipping
There are two issues at play here.
First, BLF_width computed a width that was not wide
enough to actually hold the text.
Second, blf_glyph_calc_rect_test computed an incorrect
rect->xmax when the glyph was moved to the left a bit.
We ignore the overlap on the left, but the right side
should still be adjusted accordingly.
2019-03-17 14:15:26 +01:00
ef66aa2005 GPencil: Cancel all transformations in Draw mode
Actually, when you press G/R/S in Draw mode, the transformations can be done, but this is annoying in draw mode and must be captured an cancel.

This patch capture the transformation and cancel it.

Reviewed by @brecht
2019-03-17 12:20:34 +01:00
e04d5a8106 Fix string size passed into name prefix function 2019-03-17 21:14:43 +11:00
a19e78aa2d Cleanup: redundant layer access 2019-03-17 21:00:56 +11:00