105537 Commits

Author SHA1 Message Date
Campbell Barton
e3a76feeef Fix PyAPI doc generation error in 43369ca80e62aa80b951823d1c78abef58852014
Files without doc-strings were not included.
2021-05-17 18:02:56 +10:00
Clément Foucault
610c0ecc3b Fix T88204 EEVEE: Animated world light doesnt work during render
This was a bug uncovered by rB50782df42586.

Previously, the lightcache was always discarded between redraw and forced
to be updated again.

Now we check for update inside the render loop making it compatible with
accumulation motion blur and long exposure.
2021-05-15 18:29:14 +02:00
Clément Foucault
5d97e293c3 EEVEE: Depth of Field: Fix tile artifacts in mixed focus regions
This was caused by the slight focus gather not being wide enough
for small radii. Now the cast to int will properly round the radius to
the nearest integer.

This is related to T86244 Black Artefacts in EEVEE on Transparent BSDF
2021-05-15 17:52:09 +02:00
Clément Foucault
45d3303ae4 Fix T85845 EEVEE: Depth Of Field: Artifacts with slight out of focus
This was caused by the bokeh LUT being sampled outside the valid range.
But `texelFetch` is only valid if the sample actually exists. This lead to
undefined behavior.

The fix is to increase `DOF_MAX_SLIGHT_FOCUS_RADIUS` (which just offsets the
LUT along the X=Y axis) to avoid any sample outside the defined range.
2021-05-15 17:52:09 +02:00
Philipp Oeser
f432b5ccf5 RigidBodies: Clarify usage of the custom density in the calculate mass
operator

This is only used when the preset is set to 'Custom', make that clear in
the tooltip and disable editing the value if another preset is used.

Issue came up in T88155.

Maniphest Tasks: T88155

Differential Revision: https://developer.blender.org/D11210
2021-05-15 02:53:42 +02:00
Philipp Oeser
4707c86179 Fix T88188: Keyframing Vertex Mass in Cloth Simulation doesn't have any
effect

The way it is now, `ClothVertex->mass` is setup once for the clothObject
and then reused if it already exists [so does not change across frames/
steps] which happens in`cloth_from_object` / `do_init_cloth`, where
`SIM_cloth_solver_init` / `SIM_mass_spring_set_vertex_mass` are called
and set up masses in `Implicit_Data`.

Seems possible to update `ClothVertex->mass` every step in
`do_step_cloth`, however it seems more involved to update the masses in
`Implicit_Data` there as well. The masses from `Implicit_Data` are
accessed in many places, so it would be mandatory to have these masses
kept up-to-date (and even then it is unclear if the solver was designed
to work with these animated or if there are assumptions about this being
stable across the sim).

So propose to remove the (broken/not implemented) animation capabilities
on the property instead.

Maniphest Tasks: T88188

Differential Revision: https://developer.blender.org/D11225
2021-05-15 02:32:43 +02:00
Philipp Oeser
baf7f78f9f Fix T87715: Eevee: Holdout options not available in Outliner Collection context menu
Collection holdouts are now supported by eevee.

Maniphest Tasks: T87715

Differential Revision: https://developer.blender.org/D11233
2021-05-15 01:55:30 +02:00
Philipp Oeser
d4a36c7ad5 Fix T88234: Crash with Eevee when shader displacement socket connection is muted
In {rB266cd7bb82ce}, support for muting links was added. It might be
debatable if we define a shader as "having" displacement even if the link
is muted, but after said commit, shader_has_displacement() would return
true but still leave the returned node as NULL.

Now also return false if the link is muted (otherwise the caller would
need to additionally check the returned node as well.)

Maniphest Tasks: T88234

Differential Revision: https://developer.blender.org/D11256
2021-05-14 18:16:35 +02:00
Philipp Oeser
c3e13d5a2b GPencil: fix separate points/strokes freezing with empty selection
Code would still create an object (without setting up materials), code
for removing unused material slots would then freeze.

Now return/cancel early in case of empty selection.

This came up in T88269 [which is still not fully fixed, transforming
curve edit points clear their GP_STROKE_SELECT flag which now results in
the early exit, should be looked at separately]

Maniphest Tasks: T88269

Differential Revision: https://developer.blender.org/D11252
2021-05-14 17:16:05 +02:00
YimingWu
d19d79c5a6 LineArt: Custom UI for adding GP object.
This allows extra options (in-front and stroke order) to be shown when adding line art kind of grease pencil object.

Reviewed by: Antonio Vazquez (antoniov)

Diff: https://developer.blender.org/D11130
2021-05-14 22:40:47 +08:00
Pratik Borhade
16bcf7dc8e Fix T87417: crash when evaluating geo nodes without window manager
Differential Revision: https://developer.blender.org/D11240
2021-05-14 13:43:30 +02:00
Campbell Barton
3c09beb3b1 Fix memory leak in IDPropertyGroup.pop()
When popping ID-property groups/arrays,
ID-property was removed but not freed.

Now the value is converted to a native Python type and freed.
2021-05-14 19:25:29 +10:00
Kévin Dietrich
fce795415a Fix T87929: Cycles, missing update when visibility is modified
This issue originates from a missing BVH packing for visibility data
when it is modified.

To fix this, this adds update flags to the managers to carry the
modified visibility information from the Objects' modified flag to the
GeometryManager.

Another set of flags is added to determine which data need to be packed:
geometry, vertices, or visibility. Those flags are then used when
packing the primivites.

Reviewed By: brecht

Maniphest Tasks: T87929

Differential Revision: https://developer.blender.org/D11219
2021-05-14 02:40:43 +02:00
Fabian Schempp
37570a7317 Fix T87360 Multi input links aren't placed correctly when created with python
link->multi_input_socket_index, which is used to calculate the links
position on the multi-input socket, was not set.
Now it is set to the sockets current link count.

Review: Jacques Lucke (JacquesLucke)
Differential Revision: https://developer.blender.org/D11082
2021-05-13 23:05:38 +02:00
Richard Antalik
5368859a66 VSE: Fix disk cache potentially overwriting blend file
When disk cache path is same as blend file path, with Unix-like systems
blend file can be overwritten by disk cache directory.
This was caused by `BLI_delete(path, false, true)` when path points to
file. On Windows this would result in error message and file would not
be deleted. On Linux, file is deleted and then overwritten with cache
directory.

To further minimize chance of removing blend file, append disk cache
path with `_seq_cache` suffix.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D11217
2021-05-12 20:18:45 +02:00
Richard Antalik
7bccdfd8d2 Fix T88194: Animation player displays washed out colors
Byte images used `ibuf->float_colorspace` as source colorspace.
This was oversight - `ibuf->rect_colorspace` should be used as source
colorspace.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D11223
2021-05-12 20:18:45 +02:00
Richard Antalik
41c0c79e31 VSE: Fix meta strip boundary can not be changed
In e1f3996d740c, logic for changing metastrip start and end frame based
on contained strips was removed. This was done intentionally and
incorrect functionality wasn't noticed as drawing code reflected
seemingly correct state.

Original code was mostly correct, because meta strip doesn't store its
internal start and end points. This code was restored with minor
modifications so function `SEQ_time_update_sequence()` is fully self
contained as it is used not only by transform operator.

In addition, drawing glitches that happen when meta content is outside
of meta boundaries were fixed. These glitches were not caused by
e1f3996d740c.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D11215
2021-05-12 20:18:45 +02:00
Clément Foucault
d4783e019e Fix T87851 EEVEE: Performance regression with baked lighting & transparency
This was caused by the drivers not optimizing the shader enough to remove
the samplers and data used by closure eval. Removing the lighting loops
from the depth shader fixes the perf regression.
2021-05-12 17:20:08 +02:00
Siddhartha Jejurkar
c1f7f18a8e Fix T81247: Constrain selected UVs to correct UDIM
With Constrain to Image Bounds selected, UVs will be constrained to the
correct/closest UDIM if the image is tiled.
UVs will be constrained to the 0-1 UV space if the image is not tiled.
This will override the present behavior of always constraining selected
UVs to the 0-1 UV space (UDIM 1001).

Reviewed By: campbellbarton

Ref D11202
2021-05-13 00:12:56 +10:00
Campbell Barton
79b7c46eec Fix: IC keymap V-key view pie doesn't work in Weight Paint mode
Remove the V key for switching to vertex mode in Weight Paint mode
as it caused a key-conflict.

Ref D11192
2021-05-12 22:19:47 +10:00
Charlie Jolly
47dd23694c Fix incorrect labels for math node wrap function
Found in T88151, labels are swapped. Vector math node is not affected.
2021-05-12 11:15:56 +01:00
Sergey Sharybin
7e823969b5 Fix non-finite tangent in Cycles with missing UV map
Was causing calculation issues later on in the kernel.

This change catches the most obvious case: missing attribute. The old
code was trying to set tangent to 0, but because it was transformed as
a normal it got converted to non-finite value. This change makes it so
that no transform is involved and 0 is written directly to the SVM
stack.

To cover all cases it will require using safe_normalize() in this node
and in the normal transform function. This is more involved change from
performance point of view, would be nice to verify whether we really want
to go this route.

I've left asserts in the BSDF allocation functions. Don't have strong
connection to them, but think they are handy and are not different from
having an assert in the path radiance checks.

Differential Revision: https://developer.blender.org/D11235
2021-05-12 10:06:11 +02:00
Sergey Sharybin
7f34363633 Cycles X: Fix possible use of uninitialized ShaderClosure
It is possible that BSDF allocation will advance pointer in the
allocation "pool" but will return null pointer if the weight is
too small.

One artist-measurable issue this change fixes is random issues
with denoising: normal pass for denoising could have accessed
non-initialized normal of a closure.

Differential Revision: https://developer.blender.org/D11230
2021-05-12 09:41:02 +02:00
Pablo Dobarro
0e3475a0ec Fix wrong loop count in Sculpt Expand code
Introduced when refactoring the function in
8815e3e3303933e2cc662f15fc9d11ca68a47d16
2021-05-11 23:31:43 +02:00
Chris Eveleigh
e637149166 Fix T72791: Cycles wrong results when mixing multiple random walk BSSRDFs
Take into account the closure sample weight for the throughput.

Differential Revision: https://developer.blender.org/D10936
2021-05-11 22:24:51 +02:00
Brecht Van Lommel
0830458bcc Fix T88093: persistent data and particle object instancing not working 2021-05-11 22:19:44 +02:00
Brecht Van Lommel
15b180b240 Fix T88099: error with persistent data and motion blur 2021-05-11 14:24:36 +02:00
Antonio Vazquez
a63d6a97f0 Fix T88160: GPencil Remove B key to create Blank Keyframe in Drawing mode
Now, we have the new `I` menu for that. The `B`keymap  was part of the old code.
2021-05-11 10:24:37 +02:00
Campbell Barton
cc7691797c Cleanup: remove unused BPy_IDProperty struct member 2021-05-11 12:30:06 +10:00
Campbell Barton
9801735b67 Fix T88190: Freed memory use when iterating over id-properties
The id-property iterator referenced a PyObject pointer without
increasing it's user count - allowing for errors if the value
goes out of scope during iteration.
2021-05-11 12:20:06 +10:00
Campbell Barton
5aee4ba143 Fix memory leak in Python IDproperty iterator
Looping over IDProperty keys or calling iteritems leaked memory.

Error in original Python idproperty support from
8768707610fbc1cea2bde069cdfd6d3f3e2fc522
2021-05-11 11:15:49 +10:00
Pablo Dobarro
ce62d65094 Fix T82155: Fade inactive geometry overlay not working with instanced geometry
This enables the overlay for instanced geometry.

After this change, objects that are an instance of the current active
object (which are also being modified in the current active mode) won't
fade, which is different from the previous behavior.

Reviewed By: fclem

Maniphest Tasks: T82155

Differential Revision: https://developer.blender.org/D9362
2021-05-11 00:16:28 +02:00
Pablo Dobarro
8815e3e330 Fix T88060: Expand freezing when deleting a Face Set with multiple loose parts
When checking if the mesh has only one Face Set only the current active
component for expand needs to be checked. Otherwhise other components
that won't be modified by Expand that contain other IDs will be taken
into account, making the Face Set deletion go into an infinite loop.

Reviewed By: JacquesLucke

Maniphest Tasks: T88060

Differential Revision: https://developer.blender.org/D11169
2021-05-10 19:19:52 +02:00
Jeroen Bakker
e76b43efcf Fix T88180: Enable HQ normal workaround for RX 580X cards.
This needs to be backported to 2.83.
2021-05-10 16:49:26 +02:00
Pratik Borhade
1b0890ccda Fix T54339: Shapekey Max value doesn't clamp existing value
Update the "current value" of the Shape Key blend amount when value is
not within the min/max range. New function `rna_ShapeKey_update_minmax`
used to update and clamp the current value.

Reviewed By: mano-wii, lichtwerk, #animation_rigging, sybren

Maniphest Tasks: T54339

Differential Revision: https://developer.blender.org/D11071
2021-05-10 15:53:37 +02:00
Jeroen Bakker
6cd4bb9435 Fix T87764: Mem-leak during viewport rendering.
When a scene uses cryptomatte the viewport rendering would lead to a
memory leak. The reason was that all image renders (viewport+final)
activated cryptomatte. But is only used for final rendering.

This patch only activates cryptomatte when doing final rendering.
2021-05-10 13:33:34 +02:00
Alexander Gavrilov
caf92a647f Animation: move Cycle-Aware Keying to the Keying popover.
The Cycle-Aware Keying option was added in 2.8 and is used
to allow keyframing over cyclic F-Curves without disturbing
the cycle (e.g. overwriting an end keyframe updates both ends).

This effect is not limited to auto keyframing and is applied
to any key insertion, but when the popovers were rearranged
it was put in the Auto-Keyframing related one for some reason.

This is misleading, especially since because of that the
option is incorrectly greyed out when auto keyframing is
disabled, so move it to the generic Keyframing popover.

Differential Revision: https://developer.blender.org/D11213
2021-05-10 14:16:16 +03:00
Philipp Oeser
78316ac50e Fix T88145: Dynamic Paint initial color using vertex color not working as expected
Mistake in {rBe48c4d73d378}.

Was using the vertex index as a lookup for the loop color (instead of
the loop index).
(Issue was not present in original D1429 btw).

Maniphest Tasks: T88145

Differential Revision: https://developer.blender.org/D11212
2021-05-10 11:53:44 +02:00
Pablo Vazquez
3c7b80ae2c GPencil: Sort Line Art modifier alphabetically 2021-05-09 01:52:00 +02:00
Pablo Vazquez
1325e95ad5 GPencil: Name Scene Line Art objects "Line Art"
Matching Object and Collection line art type objects.
2021-05-09 01:51:43 +02:00
Campbell Barton
a9eea6d9dc Fix PlayAnim cache size increasing when playing multiple animations
Error in 0499dbc5c16fe6b276da81d65cade4f5da92a308
2021-05-08 16:10:07 +10:00
Campbell Barton
5ec6bcd474 Fix PlayAnim X/Y flipping
This functionality was missed in recent GLSL drawing update
fd3e44492e7606a741a6d2c42b31687598c7d09a.
2021-05-08 14:32:03 +10:00
Sebastian Parborg
9cdf11676e Fix: No sound is exported with ffmpeg 4.4
We were not assigning the amount of sound channels to the output frames.
Newer ffmpeg releases has sanity checks in place and doesn't fall back
to two channels anymore.
2021-05-07 16:51:28 +02:00
Bastien Montagne
8241678e6e LibOverride: more tweaking to handling of obsolete overrides during resync.
this is a followup to rB2bd85d9cc623, we cannot forcefully delete
obsolete overrides of object data (meshes etc.), as this implies also
deleting their user object, which might still be a perfectly valid
override, albeit in conflict regarding its obdata ID pointer...
2021-05-07 16:07:37 +02:00
Dalai Felinto
d0c63a2abe Cleanup: make format (clang-format) 2021-05-07 15:41:42 +02:00
Bastien Montagne
2bd85d9cc6 LibOverride: Fix many 'obsolete' overrides not being properly deleted.
Code detecting overrides which reference linked data is missing was
actually missing many cases, leading to too much garbage data being kept
around after resync process.
2021-05-07 12:52:34 +02:00
Campbell Barton
3ee49c8711 Fix PlayAnim issue with images gradually loading into cache
Instead of only drawing images on first start, load them into cache.

This resolves a logical problem when images don't load fast enough,
where the animation would load some frames each time until all images
loaded into cache.

In practice this could play back with severe frame skipping many times
times before all images were loaded making playback smooth.

Part of a fix for T81751.
2021-05-07 18:15:14 +10:00
Campbell Barton
8cd0ac8223 Cleanup: move frame caching into functions 2021-05-07 18:15:14 +10:00
Campbell Barton
5052ab7558 Cleanup: extract image loading into it's own function 2021-05-07 18:15:09 +10:00
Campbell Barton
ac2941fb15 Fix use of imbuf that was never valid in animation player
Resizing the window would always draw the image with an empty imbuf.
2021-05-07 18:13:23 +10:00