Make both importers work the same way: first building an array
of the new offsets, then comparing the offsets to check if the
topology changed. Previously the USD importer incorrectly
compared curve offsets to USD point counts.
Also:
- Don't unnecessarily set the resolution to the incorrect default.
The default for the curves system is 12. But it's unnecessary to
fill the attribute to the default value anyway.
- Use some helper methods to iterate over all curves.
- Use float literal instead of integer.
- Use cast and `copy_from` for positions copy
- Pass Span by value
Pull Request: https://projects.blender.org/blender/blender/pulls/118829
This rewrites the Alembic and USD data importers to work with and
output GeometrySets instead of Meshes.
The main motivation for this change is to be able to import properly
point clouds, which are currently imported as Meshes, and curves
data, which suffer from a lot of issues due to limitations of
legacy curves structures (fixed by the new curves data-block) and are
also converted to Meshes. Further, for Curves, it will allow importing
arbitrary attributes.
This patch was primarily meant for Alembic, but changes to USD import
were necessary as they share the same modifier.
For Alembic:
There should be no behavioral changes for Meshes
Curves are imported as the new Curves object type
Points are imported as PointClouds
For USD:
There should be no behavioral changes for Meshes
Curves are imported as the new Curves object type
Note that the current USD importer does not support loading PointClouds,
so this patch does not add support for it.
For both Alembic and USD, knots arrays are not read anymore, as the new
Curves object does not expose the ability to set them. Improvements can
be made in the future if and when example assets are provided.
This fixes at least the following:
#58704: Animated Alembic curves don't update on render
#112308: Curves have offset animations (alembic / USD)
#118261: wrong motion blur from usd in cycles and reverting to the first
frame when disabeling motion blur
Co-authored-by: Jesse Yurkovich <jesse.y@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/115623
String attributes are not handled correctly (or at all) by geometry nodes
currently because their storage is very inefficient and will likely have to
change in the future anyway. Elsewhere processing string attributes was
explicitly disabled. That was missing in these cases.
Pull Request: https://projects.blender.org/blender/blender/pulls/118802
- Use standard (copy & pasted) linear interpolation utility
- Use helper variable for attributes
- Make some other names a bit simpler
- Remove unnecessary variable
Without the extra precision, `fmt::format` rounds the resulting float to one with
fewer significant digits. This is generally nice, but not desired in this specific
case for consistency with the value stored in the socket.
Pull Request: https://projects.blender.org/blender/blender/pulls/118797
Previously, the viewer node would work, but since the simulation output node
was never evaluated, the new simulation state was never stored. Now make
sure that the simulation output node is executed when there is an active viewer
inside the simulation.
Pull Request: https://projects.blender.org/blender/blender/pulls/118804
Currently, we don't support this. Depending on the geometry type, the rotations
are either displayed as black, magenta or there is a crash. Better disable this for
now until we have a proper implementation. It's not quite obvious how rotation
values should be converted to a color, so this also needs some design work.
Pull Request: https://projects.blender.org/blender/blender/pulls/118808
It might be nice to keep the pinning but that's a bit more tricky technically
currently because the pinned node tree is overridden by the tool node tree.
Just disabling pinning solves the main issue right now which is that the
node editor shows the wrong node tree.
Pull Request: https://projects.blender.org/blender/blender/pulls/118811
When `Delete Light Bake` operation was executed, the light bake got deleted,
but visible viewports didn't update and required a tweak to be redrawn.
The reason is that it an event was fired, where the viewport didn't listen to.
This PR fixes this by using the `ND_DRAW` event.
Pull Request: https://projects.blender.org/blender/blender/pulls/118803
This PR adds a new method to BMLog to explicitly make the intent of
searching for an entry clear and adjusts the calling code in `pbvh_bmesh`
to utilize it.
Pull Request: https://projects.blender.org/blender/blender/pulls/118543
When an asset is heavily modified, all production files having
liboverrides of it will still try to link all their known linked
reference IDs, leading to potentially thousands of not-really-useful
warnings about missing IDs in the console.
Now that liboverrides resync cleans up better these left-over data, it's
better to report missing linked data _after_ the liboverride resync
process.
Note that the original place can still report all effectively missing
linked data if needed, but this is now a logging info, so it won't be
displayed anywhere unless explicitely requested.
Pull Request: https://projects.blender.org/blender/blender/pulls/118577
Often when the reference linked data is significantly modified, a lot of
'ghost' linked data remain referenced by liboverrides, even after
resync. This is due to the fact that missing data is ignored (skipped)
during resync process, to avoid potential destruction of data in case
the linked data is actually missing.
However, after all resync has been done, we can consider that missing
linked references and their liboverrides can be safely deleted, if the
later are not user-edited or hierarchy roots.
There are cases where the brush would not have any
`gpencil_settings` allocated.
In this case we could crash in the eraser tool (and also in the draw tool)
This fixes the issue by calling `BKE_brush_init_gpencil_settings`
if the `gpencil_settings` on the brush are `nullptr`.
Nested panels are not supported currently, and this parameter serves no
actual purposes. Only the root panel supports adding child panels and it
is not user-accessible (adding the root panel is done using a nullptr
for the parent).
Pull Request: https://projects.blender.org/blender/blender/pulls/118792
Internal link is not created for a node when it has rotation output
socket. This is because the missing case for `sock_rotation` in
`get_internal_link_type_priority()` which fails to find input_socket
priority in this case.
Pull Request: https://projects.blender.org/blender/blender/pulls/118735