Additional icons for face corner, pointcloud points needed for general
usage. Unselected camera, view locked, and view unlocked for #111076.
Changes to mod_mask for #117467. pointcloud_data changed only for
alignment change. Running Update Icons also changed mod_explode.
Pull Request: https://projects.blender.org/blender/blender/pulls/117732
As currently implemented, Blender sometimes incorrectly sets active/render
UV maps during the "realize instances" operation. This also comes into play
if you try to modify the mesh with geonodes: e.g., if you use geonodes to
split a mesh into two pieces, transform one of them, and then "join geometry",
join operation internally performs "realize instances", triggering the same bug.
The root cause is that "realize instances" copies both UV map layers and the
active/render layer index, but it reorders layers during this process, so the index
that was correct in the original mesh is now wrong in the modified mesh.
This patch corrects indexes by explicitly checking layer names.
Pull Request: https://projects.blender.org/blender/blender/pulls/116452
`BKE_image_scale` -- which is only used for the python API -- was
getting the `ImBuf` without providing an `ImageUser`.
This is fine, but always gets the first tile (and the current frame for sequences).
To resolve this, add an optional "frame" & "tile_index" argument so these can be specified explicitly (similar to layer_index and pass_index already used for some other API functions).
Fixes#117539 : Scaling UDIM images via Image.scale() only scales one tile
Pull Request: https://projects.blender.org/blender/blender/pulls/117549
`GLBatch::draw_indirect` has additional overhead compared to
`GLBatch::draw`, and can become a bottleneck in scenes that require
many draw calls (ie. with too many unique meshes).
The performance difference is almost exclusively caused by the
`GL_COMMAND_BARRIER_BIT` barrier that happens on every call.
This PR adds a `GPU_storagebuf_sync_as_indirect_buffer` function that
can be used to place the barrier only once after filling the indirect
buffer content.
This function is a no-op in Vulkan and Metal since they don't need the
barrier.
Pull Request: https://projects.blender.org/blender/blender/pulls/117561
CMake 2.28.2 has a regression that breaks the combination of
precompiled headers and unity builds [1]. Disable unity builds
for this specific cmake version to sidestep the issue.
[1] https://gitlab.kitware.com/cmake/cmake/-/issues/25650
Caused by #113504
The `type` property has been removed from the operator,
but of course that is a breaking change in 4.1.
(e.g. reported here: #117547)
At the time of making the patch,
I wasn't sure how to handle all cases but it turns out its not complicated.
I've added back the property with the following logic.
* Try to get the `KeyingSet` from the `type`.
* `type` defaults to 0 which means the `ANIM_keyingset_get_from_enum_type`
will get it from the scene.
* If the scene doesn't have one, or a valid index isn't passed in the `KeyingSet`
will be a `nullptr` in which case it inserts from the user preferences.
Pull Request: https://projects.blender.org/blender/blender/pulls/117718
Some test cases are not support when used with the OpenGL backend. These
test cases are easier to support when using Vulkan as we do control the
GPU->CPU data conversion logic.
We remove the test cases that aren't working yet for any backend and
skip test cases where OpenGL support is failing.
Added support for static point instancing import.
Added a new USDPointInstancerReader class to import UsdGeomPointInstancer
primitives as Point Clouds with geometry node modifiers that use
Instance on Points geometry nodes to instance collections containing
prototype geometry.
Added logic to the USDStageReader class to traverse the USD stage to
create readers for point instancer prototypes.
Extended USDStageReader::collect_readers() to take arguments to include
undefined prims and to exclude a set of specified prims when traversing
the stage. Allowing traversing undefined prims is necessary because
prototype prims may be specified as "overs" in the USD stage.
Added a USDPrimReader::is_in_instancer_proto_ boolean flag which
identifies readers of prims that are in point instancer prototypes.
The flag simplifies management of collections and is used to
determine whether global transforms should be applied to root objects.
Limitation: point cloud animation is not yet supported.
This partially addresses https://projects.blender.org/blender/blender/issues/96747.
Co-authored-by: Michael Kowalski <makowalski@nvidia.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113107
This removes the "Input" and "Output" part of the default label in the
simulation and repeat zone. The outline already makes it very obvious
which one is the input and which one the output. Simplifying the label
makes the zone look prettier. It might also simplify naming other zones
(like for-each zone) in the future, because the name is shorter.
Pull Request: https://projects.blender.org/blender/blender/pulls/117724
Properly wrap a returned `char *` that could be `nullptr` into an
`std::optional<std::string>`. `std::string` doesn't like `nullptr`.
Another problem was that the wrapped `char *` was actually allocated on
the heap, and not freed after conversion to a `std::string`, causing
memory leaks.
Having an early return makes the precondition check an actual precondition
check. This will make an upcoming change easier to implement.
No functional changes.
Extend the `ID.evaluated_get()` docstring to explain that it does not
trigger a re-evaluation of the data-block.
No functional changes, just expansion of documentation.
This is meant as a replacement for the Rotate Euler node. Overall it
should be more performant, and the clarity given by the separate socket
type should help distinguish its purpose.
The Rotate Euler node is removed from search and the add menu by this
commit. In the future it can be versioned away. That isn't done now to
avoid a breaking API change and to make this commit less risky.
Pull Request: https://projects.blender.org/blender/blender/pulls/116106
Specialization constants tests use points render primitives, but the
shader isn't capable of point rendering. For the test results it doesn't
matter as it only validates the vertex output, but it would trigger an
assert when using Vulkan backend. The vulkan backend is more strict and
currently signals these common errors.
The test uses a none points shader to draw points, which is incorrect
and asserts when using Vulkan. It also didn't test the gpu part of the
pipeline (PassMain).
When using PassMain the order of the resources are expected to be
different as the draw calls are ordered based on the primitive type and
handles.
Pull Request: https://projects.blender.org/blender/blender/pulls/117714
This implements the `stroke_arrange` operator for grease pencil v3.
This behaves the same as `GPENCIL_OT_stroke_arrange` but renamed to `stroke_reorder`.
It should be more clear what the operator does.
Note: This also adds new key binds.
Co-authored-by: Falk David <filedescriptor@noreply.localhost>
Pull Request: https://projects.blender.org/blender/blender/pulls/116682
The simulation input and output node are closely related and also share some code.
That's easier to handle if they are in the same file.
I also extracted out the code to mix geometries.
Pull Request: https://projects.blender.org/blender/blender/pulls/117713
This changes the tooltip for the user preference settings
`Only Insert Needed` and `Only Insert Available`
to better explain what these features are for.
Only Insert Available
Automatic keyframe insertion in available F-Curves
-> Insert Keyframes only for properties that are already animated
Auto-Key Needed
Auto-Keyframe insertion only when keyframe needed
-> Auto-Keying will skip inserting keys that don't affect the animation
Manual Key Needed
Keyframe insertion only when keyframe needed
-> When keying manually, skip inserting keys that don't affect the animation
Pull Request: https://projects.blender.org/blender/blender/pulls/117270
Previously a storage buffer was used to store draw list commands as it
matches already existing APIs. Unfortunately StorageBuffers prefers to
be stored on the GPU device and would reduce the benefit of a dynamic
draw list.
This PR replaces the storage buffer with a regular buffer, which keeps
more control where to store the buffer.
Pull Request: https://projects.blender.org/blender/blender/pulls/117712
This would still overwrite (even though frames existed).
Mistake in 6b9a500a3a.
char "filepath" was already in use/shadowed, instead use "filepath_view" to
correctly glue path/suffix together (as done already a bit below for the
R_TOUCH case).
Pull Request: https://projects.blender.org/blender/blender/pulls/117696
With this patch, materials are kept intact in simulation zones and bake nodes
without any additional user action.
This implements the design proposed in #108410 to support referencing
data-blocks (only materials for now) in the baked data. The task also describes
why this is not a trivial issue. A previous attempt was implemented in #109703
but it didn't work well-enough.
The solution is to have an explicit `name (+ library name) -> data-block`
mapping that is stored in the modifier for each bake node and simulation zone.
The `library name` is necessary for it to be unique within a .blend file. Note
that this refers to the name of the `Library` data-block and not a file path.
The baked data only contains the names of the used data-blocks. When the baked
data is loaded, the correct material data-block is looked up from the mapping.
### Automatic Mapping Generation
The most tricky aspect of this approach is to make it feel mostly automatic.
From the user point-of-view, it should just work. Therefore, we don't want the
user to have to create the mapping manually in the majority of cases. Creating
the mapping automatically is difficult because the data-blocks that should
become part of the mapping are only known during depsgraph evaluation. So we
somehow have to gather the missing data blocks during evaluation and then write
the new mappings back to the original data.
While writing back to original data is something we do in some cases already,
the situation here is different, because we are actually creating new relations
between data-blocks. This also means that we'll have to do user-counting. Since
user counts in data-blocks are *not* atomic, we can't do that from multiple
threads at the same time. Also, under some circumstances, it may be necessary to
trigger depsgraph evaluation again after the write-back because it actually
affects the result.
To solve this, a small new API is added in `DEG_depsgraph_writeback_sync.hh`. It
allows gathering tasks which write back to original data in a synchronous way
which may also require a reevaluation.
### Accessing the Mapping
A new `BakeDataBlockMap` is passed to geometry nodes evaluation by the modifier.
This map allows getting the `ID` pointer that should be used for a specific
data-block name that is stored in baked data. It's also used to gather all the
missing data mappings during evaluation.
### Weak ID References
The baked/cached geometries may have references to other data-blocks (currently
only materials, but in the future also e.g. instanced objects/collections).
However, the pointers of these data-blocks are not stable over time. That is
especially true when storing/loading the data from disk, but also just when
playing back the animation. Therefore, the used data-blocks have to referenced
in a different way at run-time.
This is solved by adding `std::unique_ptr<bake::BakeMaterialsList>` to the
run-time data of various geometry data-blocks. If the data-block is cached over
a longer period of time (such that material pointers can't be used directly), it
stores the material name (+ library name) used by each material slot. When the
geometry is used again, the material pointers are restored using these weak name
references and the `BakeDataBlockMap`.
### Manual Mapping Management
There is a new `Data-Blocks` panel in the bake settings in the node editor
sidebar that allows inspecting and modifying the data-blocks that are used when
baking. The user can change what data-block a specific name is mapped to.
Pull Request: https://projects.blender.org/blender/blender/pulls/117043
When drawing curves or particle hair, the hair is refined using GPU
shaders. See eParticleRefineShaderType. OpenGL since Blender 4.0
always uses compute shaders. Metal since Blender 4.1 always uses
compute shaders. Vulkan will only uses compute shaders.
The transform feedback isn't used and not supported by our vulkan backend.
Transform feedback workaround was a Apple specific solution as they didn't
support transform feedback. Metal didn't use Compute shaders in
EEVEE-Legacy for performance reasons. Since EEVEE-Next/Workbench-Next
Metal uses compute shaders.
Fixes: #117497
Pull Request: https://projects.blender.org/blender/blender/pulls/117507
Add-ons "bl_info" was supported for add-ons which weren't registered,
however the real modules weren't handled causing module_bl_info()
to return dummy values when an extensions add-ons module was passed in.
This caused the minimum Blender version check after enabling an add-on
to do nothing.
Now the "bl_info" from extension modules is ignored and the bl_info
is created on demand from the manifest.
- Add a warning when an extensions meta-data is missing.
- Remove the time-stamps from message that time-stamps have changes
since knowing the exact times isn't helpful.
Appending then removing a draw function caused the is_extended()
method to return true afterwards, resolve by checking if there are
multiple draw functions.
- Rename info to bl_info, to avoid confusion with extensions manifest,
which should eventually be accessible in a similar way.
- Rename module_name to addon_module_name to avoid confusion with
extension repositories name-spaced modules.
- Clarify naming for TOML manifest.