Blender Git Commits

Blender Git commits from all branches.

Page: 504 / 2888

March 3, 2021, 17:15 (GMT)
Fix (unreported) Outliner missing updates copying IDs via python

Steps to reproduce:
- switch to Scripting workspace
- execute bpy.data.meshes['Cube'].copy()
- Outliner will not show the new mesh immediately

Now just send appropriate notifier.

Differential Revision: https://developer.blender.org/D10584
March 3, 2021, 17:15 (GMT)
Cleanup: make format
March 3, 2021, 17:15 (GMT)
Cleanup: clang tidy

Warning: else-after-return/break
March 3, 2021, 17:15 (GMT)
Cleanup: clang tidy

Can use const parameter.
March 3, 2021, 17:15 (GMT)
Cleanup: clang tidy

Warnings:
* readability-inconsistent-declaration-parameter-name
* readability-redundant-smartptr-get
March 3, 2021, 17:15 (GMT)
Cleanup: Make node_composite_cryptomatte CPP.

Core API of cryptomatte is also CPP.
March 3, 2021, 17:15 (GMT)
Cleanup: use zero_v3 to clear colors.
March 3, 2021, 17:15 (GMT)
Fix compiler issues introduced in recent commit.

{73af762e9cd595ea708647c02c7e74752d844e80}
March 3, 2021, 17:15 (GMT)
EEVEE: Add ensure_valid_reflection to glossy closures

This is ported from Cycles and fixes issues with bump/normal mapping
giving weird reflections/lighting.

Fixes T81070 Specular light should be limited to normal pointing toward the camera
Fixes T78501 Normal mapping making specular artifact
March 3, 2021, 17:15 (GMT)
EEVEE: SSR: Check reflection ray against geometric normal

This improve self intersection prevention. Also reduce the bias
that was making a lot of rays not being shoot at grazing angles.
March 3, 2021, 17:15 (GMT)
EEVEE: SSS: Fix light leaking bewteen object at different depths

The SSS shader in Eevee has the following drawbacks (elaborated in {T79933}):

1. Glowing
2. Ringing. On low SSS jittering it is rendered a bunch of sharp lines
3. Overall blurriness due to the nature of the effect
4. Shadows near occlusions as in T65849
5. Too much SSS near the edge and on highly-tilted surfaces

{F9438636}
{F9427302}

In the original shader code there was a depth correction factor, as far as I can understand for fixing light bleeding from one object to another. But it was scaled incorrectly. I modified its scale to depend on SSS scale*radius and made it independent from the scene scale. The scale parameter (`-4`) is chosen so that it makes tilted surfaces to have visually the same SSS radius as straight surfaces (surfaces with normal pointed directly to the camera).

This depth correction factor alone fixes all the problems except for ringing (pt. 2). Because of float-point precision errors and irradiance interpolation some samples near the border of an object might leak light, causing sparkly or dashed (because of aliasing) patterns around the highlights. Switching from `texture()` to `texelFetch()` fixes this problem and makes textures on renders visually sharper.

An alternative solution would be to detect object borders and somehow prevent samples from crossing it. This can be done by:
1. Adding an `object_id` texture. I think it requires much more code changing and makes the shader more complicated. Again, `object_id` is not interpolatable.
2. Watch gradient of depth and discard samples if the gradient is too big. This solution depends on scene scale and requires more texture lookups. Since SSS is usually a minor effect, it probably doesn't require that level of accuracy.

I haven't notice it in practice, but I assume it can make visible SSS radius slightly off (up to 0.5 px in screen space, which is negligible). It is completely mitigated with render sampling.

Reviewed By: Cl�ment Foucault
Differential Revision: https://developer.blender.org/D9740
March 3, 2021, 17:15 (GMT)
EEVEE: Avoid old files with too many volume shadow sample being too slow

This clamp the volumetric shadow samples to the actual old max to avoid
problematic slowdown after the bugfix rB3a29c19b2bff.
March 3, 2021, 17:15 (GMT)
Geometry Nodes: show "Show Texture in texture tab" button

This enables the quick access button [to show the relevant Texture in
the Properties Editor] for textures used in geometry nodes.

This goes in line to what we do for other textures:
- modifier textures have this button
- particle textures have this button
- brush textures will soon have it, too (see D9813)

When outside of the Properties Editor, the button will always show (if a
texture is actually assigned), but will be inactive if no suiting
Properties Editor to show the texture in can be found.

Note this also changes the behavior to not show the button if _no_
texture is assigned (as in: we are still showing the "New" button).
Previously it was always there (e.g. for modifier textures), even if it
would take us to an empty texture tab. (Sure, we could add a texture
there then, but imho it makes more sense to just start showing it once a
texture is already there)

For this to work with geometry nodes, the following chages were done:
- implement foreachTexLink for geonode modifiers
- new buttons_texture_user_node_property_add() that stores prop as well
as node
- also use NODE_ACTIVE_TEXTURE flag in geometry nodetrees

notes:
- this still uses the first suiting (as in: pinning does not interfere)
Properties Editor it finds, this should (maybe?) find the _closest_
Property Editor instead (see related feedback in D9813).
- this will already show the button for brush textures as well
(disabled), but there is another mandatory change in an upcomming commit
to make it work there as well (see D9813)

ref. T85278

Maniphest Tasks: T85278

Differential Revision: https://developer.blender.org/D10293
March 3, 2021, 17:15 (GMT)
VSE: Refactor VSE strip loading code

Isolate RNA and operator logic from functions that create strips.
- Operator specific code was removed from `SeqLoadInfo` structure and
`SEQ_add_*` functions.
- Strip loading code was removed from RNA and operator functions.
- `SEQ_add_*` API was unified to work on `SeqLoadData` struct.
Only exception is image strip, which require files to be loaded
separately to strip creation itself. This is not ideal, but I think
it's acceptable.
- Some functions and variables were refactored so the code reads
better.

There are minor functional changes (coincidental bugfixes):
- Operator errors are reported per-strip. Previously they were not
reported at all?
- `new_sound()` RNA API function now create sound with length of 1
if source file does not exist. Previously it created strip with
length of 0.
- Replace selection operator property wasn't working correctly.
Fixed in this patch.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D9760
March 3, 2021, 17:15 (GMT)
FFmpeg: Improve scrubbing performance

Applying negative offset to seek position before scanning doesnn't have
any effect. This change results in 1.5x faster seeking (random frame,
average value) in sample file with 30 frame GOP length.

If I am not mistaken, B frames can have pts that can be less than
pts of I frame that must be decoded. Even in this case though, B frame
packet will be stored after that I frame.

In addition, preseek value is de facto hardcoded so seeking would fail
if it could. This can be hard to spot though.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D10529
March 3, 2021, 17:15 (GMT)
Fix T85970: Incorrect scaling of meta strips

This is same issue as fixed by d85789255320, but I forgot to check meta
strips. Meta strip output is always in render size.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D10560
March 3, 2021, 17:15 (GMT)
Fix T85981, part II: bone's custom shape disappear on undo in some cases.

Nicely hidden bug in pose read library code, it was using the library
from the wrong ID as reference to relink the custom shape object pointer
(pose is data from Object, not Armature).
March 3, 2021, 17:15 (GMT)
VSE: Refactor meta operators

Move low level logic to module code and versioning logic to versioning code.

Metas strip position was handled in diffrent way compared to other strips.
This was introduced in c8b0d25794be as bugfix for T28158.
I disagree with such design. Meta strips should be handled in same way as
any other strips.

I have tested this change and haven't found any problems.
No problems after checking T28158 as well.
There should be no functional changes on user level.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D9972
March 3, 2021, 17:15 (GMT)
EEVEE: Depth of field: Do not shrink highlights when using overblur

This fixes the issue of bokeh size being smaller when using overblur.

The additional overblur needs to be centered on the outer radius.
March 3, 2021, 17:15 (GMT)
Fix T86172: check if attribute is actually accessible

The crash happened when the density in the Point Distribute node was
above zero but so small, that no point was generated. In this case, there
was a point cloud component, but the point cloud was empty, making some
attributes unavailable.

One could also make more attributes available in this case, but that can
be done separately if necessary.
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021