Currently we have some old code from shader/compositor/texture nodes
that stores runtime data during and after evaluation on the node tree
itself. This is meant to be avoided, since the node tree is just meant
to be evaluation _instructions_.
Pull Request: https://projects.blender.org/blender/blender/pulls/118056
When deleting all the segments the active index is generally 0. Adding a
new segment increments the active index, which pushes it out of range.
The code should not expect active index to be inside the current range.
Pull Request: https://projects.blender.org/blender/blender/pulls/118143
Fixed duplicate nodes when converting texture scale/bias and
channel names on material import. This required extending
the node caching to handle cases where a USD shader is converted
to multiple Blender nodes.
Pull Request: https://projects.blender.org/blender/blender/pulls/118002
The GPU compositor Displace node produces NaN pixels if connected to the
Image node. That's because the Displace node access the MIP levels of
the texture produces by the Image node, but those levels were never
initialized, so fix this by completing the levels.
The issue was caused by Cycles doing dependency tracking on its
side, relying on the fact that view layer needs to be tagged as
modified when its properties change.
This was not the case when custom property on the a view layer is
modified via a driver.
Now the dependency graph will tag IDs which generic properties did
change as ID_RECALC_PARAMETERS, giving it a chance to render engines
to react to it.
Since this is quite generic code which might have unforeseen side
effects the change is not targeted to the current release branch.
Note that this chaneg does not fix the #103140, as the issue there
is use of RNA path to another data-block, without the node tree
registering relation to that data-block.
Pull Request: https://projects.blender.org/blender/blender/pulls/118134
Move BLI_convexhull_aabb_fit_points_2d to a public function to be able
to compare compare fitting one convex hull with a simple reference
method.
One test is disabled as it exposes an error in convex hull calculation
which needs further investigation.
The result of cross_poly_v2 was flipped compared with cross_tri_v2 &
cross_poly_v3 (with the Z values zeroed).
Ensure cross_poly_v2/3, cross_tri_v2/3 return compatible results and
updating the doc-strings noting that a negative Z is for clock-wise
polygons.
This adds two new constructors to `IndexMask`:
* `from_repeating(mask_to_repeat, repetitions, stride, initial_offset, memory)`:
It allows repeating an existing index mask with a stride.
* `from_every_nth(n, indices_num, initial_offset, memory)`: Creates an index
mask like `{0, 2, 4, 6, ...}`.
`from_every_nth` is implemented in terms of `from_repeating` which is optimized
to handle this case (and other cases) very efficiently.
Pull Request: https://projects.blender.org/blender/blender/pulls/118084
The iterations through the rows and columns where flipped.
This would cause invalid memory to be accessed and an assertion
error in debug mode.
Note: This is only fixing an error with non-square matrix printing
and has no effect on square matrices.
Pull Request: https://projects.blender.org/blender/blender/pulls/118076
When calculating the width of strings for the tooltip window size, enum
labels were measured using the string from the text_suffix field but
length from the text field. Introduced with std::string changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/118064
An allocated char pointer was reassigned without being freed.
Fix by replacing the error-prone combination of C strings and
std::string with a complete conversion to std::string. Also change
the logic a bit to allow moving the path string in some cases
instead of copying it.
Pull Request: https://projects.blender.org/blender/blender/pulls/118046