Adds an optional list of panels to node trees. Each socket can be
assigned a panel. UI panels will be created in the future in the
modifier for these grouped sockets.
Panels are stored as a pointer array in node trees, next to socket
declarations. Each panel has a name, but it does not have to be unique.
In future a panel might also store whether it is visible by default and
similar information.
C API and RNA API are both added. Panels and their socket
assignments are accessible to users through another list in the "Group"
tab of the node editor sidebar.
Sockets in the same panel will remain together even when adding,
removing, or moving sockets or panels, renaming, etc.
A socket can be moved up or down within a panel but each panel
remains a contiguous block. Actual tree views may be created later.
Pull Request: https://projects.blender.org/blender/blender/pulls/108649
Caused by cad897de16
The crash happens because the `SnapData_EditMesh` is removed from the
map but still accessed afterwards.
However, after cad897de16, invalidating an object's unique snap date is
no longer required.
The asset library reference isn't needed anymore for importing assets
since ccc9eef1b9. So it doesn't need to be set in the add menu context,
which simplifies code a bit.
Sometimes the modifier has never been evaluated by an active depsgraph
before it is used for rendering. In this case, the baked data was never
loaded. Now also allow checking for baked data in a non-active depsgraph.
The locking that is in-place already should probably already be enough
to make this thread-safe but maybe that could be made more explicit.
Previously, there were two independent algorithms for analysing how anonymous
attributes are used in a node tree: One that just computed the `aal::RelationsInNode`
for an entire node tree and one that performed a more in depth analysis to
determine how far anonymous attributes should be propagated.
As it turns out, both operations can also be done at the same time and the result
can be cached on the node tree. This reduces the amount of code and allows for
better code reuse.
This simplification is likely only an intermediate step as things will probably have
to be refactored further to support e.g. serial loops (#108896).
With this the simulation cache pointer is copied over to the evaluated modifier.
This allows the original modifier to be removed without breaking the evaluated
modifier, which results in better decoupling. This can avoid issues when a
non-active depsgraph is evaluated in the background while the user is manipulating
the scene.
Also, it is now assumed that the simulation cache is always allocated even if
there is no simulation (similar to run-time data). This simplifies the code.
Pull Request: https://projects.blender.org/blender/blender/pulls/108976
It's possible to customize how the generated graph looks like by
passing in a custom `bNodeTreeToDotOptions`. This allows making
specialized visualizations for specific algorithms.
The face normal was used in local space whereas it is needed as a global
direction (since other vectors here are in worldspace as well --
knife_input_ray_segment() returns worldspace).
Could go into 3.3 LTS.
Pull Request: https://projects.blender.org/blender/blender/pulls/108938
Compute luminance only once per region and per pixel by means of vectorization.
Measured time improvements on intel i9 CPU on a 1920 x 3199 image:
- from 14.7s to 3.9s for full-frame compositor
- from 50.1s to 15.3s for tiled compositor
Pull Request: https://projects.blender.org/blender/blender/pulls/108859
e5ec04d73c changed the way crease vakyes are stored in 4.0.
Add versioning for reading the new files that replaces the new generic
attributes with the old non-generic custom data layers. The code is
paranoid with lots fo checks I expect will typically not be necessary.
Similar to f75af7cbf5
Store subdivision surface creases in two new named float attributes:
- `crease_vert`
- `crease_edge`
This is similar to 2a56403cb0.
The attributes are naming conventions, so their data type and domain
aren't enforced, and may be interpolated when necessary. Editing tools
and the subdivision surface modifier use the hard-coded name. It might
be best if these were edited as generic attributes in the future, but
in the meantime using generic attributes helps.
The attributes are visible in the list, which is how they're now meant
to be removed. They are now interchangeable with any tool that works
with the generic attribute system-- even tools like vertex paint can
affect creases now.
This is a breaking change. Forward compatibility isn't preserved for
versions before 3.6, and the `crease` property in RNA is removed in
favor of making a smaller API surface area with just the attribute API.
`Mesh.vertex_creases` and `Mesh.edge_creases` now just return the
matching attribute if possible, and are now implemented in Python.
New functions `*ensure` and `*remove` also replace the operators to
add and remove the layers for Python.
A few extrude node test files have to be updated because of different
(now generic) attribute interpolation behavior.
Pull Request: https://projects.blender.org/blender/blender/pulls/108089
Interpolation from edge attributes is unsupported, and the data
of the new point attribute was uninitialized. As a fix, just avoid
interpolating edge attributes in the first place.
PyUnicode_AsUTF8AndSize is used when renaming a custom python property,
this method stores the size of the string without including the null
terminator in the size.
Renaming a custom python property now includes the null terminator when
copying the new string name.
Pull Request: https://projects.blender.org/blender/blender/pulls/107983