Needed for the simulation zone addition to the add menu search.
Link-drag search isn't supported yet, but a similar change should be
possible there.
Now the search item exposed through the public nodes namespace returns
several items directly, and the "after add function" is just handled as
a sub-case of that for convenience.
Check if the man-page is missing or older than files that generate it
before re-running the generator.
Previously the install target would re-run the man-page generator
every time, even when no other changes to the build were detected.
Use consistent variable names: for example "vert" instead of "mv" and
"edge" instead of "me", etc. Also use helper functions like "edge other
vert" to make the code easier to read.
Some fields reference attributes directly. When the referenced attribute
has the requested type and domain, the captured/stored attribute can
share its array, avoiding the cost of duplication and reducing memory
usage, at least temporarily until either attribute is modified.
This only works when the attribute doesn't need validation and when
the selection input isn't used, since those potentially need to change
values in the arrays.
I saw this save 200MB and 11 ms of copying for a simple grid with
16 million points (creating the grid takes about 60ms).
Pull Request: https://projects.blender.org/blender/blender/pulls/107357
This patch adds address sanitizer support to memory pools.
when ASAN is enabled the following happens:
* 32 byte red zones are inserted between pool elements.
* The BLI_mempool struct itself is marked as a red zone.
* Access to the pool goes through a thread mutex (except when compiling makesdna).
This is very useful for finding bugs in code that uses BMesh.
Pull Request: #104668
This triggered an assert during evaluation, because the group inputs
were first requested and later the set unused, which is not allowed.
The issue was likely introduced in 258678916f.
This PR adds support for `GPU_unpack_row_length_set` to the vulkan
backend.
Texture unpacking is used when uploading a part of a texture from
host memory to device memory.
Pull Request: https://projects.blender.org/blender/blender/pulls/107360
A recent change from [0] added an assert when a string lookup was
performed on a collection item with no name-property,
but silently failed with release builds.
This isn't correct in a couple of ways.
The assert makes it seem like the RNA API needs to be updated when
it's in fact valid to have collection items without a name-property.
It also misleads script authors to silently fail since it implies a
key that exists would return a result.
Raise a TypeError exception when string lookups are attempted on
collections that don't support them.
This change also applies to get() & __contains__().
[0]: 5bb3a3f157
While RMB was canceling, the check for Escape was overridden by the
modal keymap, causing Escape to confirm.
Resolve by:
- Removing Escape binding from the modal keymap, rely on hard coded
check as Escape to cancel is an assumption made in many places.
- Move RMB hard-coded check into the modal keymap since it's non-default
keymaps may use mouse buttons differently.
These operators already check for release events matching the event
that launched them.
Also remove hard-coded model keys (rely on the default key-map).
Linear subdivision or interpolating from a lower multires level gave
spikes at some vertices. Caused by incorrect corner edge indexing.
This was simple to solve by building the old MLoop array on demand
and reverting parts of 16fbadde36.
Currently `Mesh to Volume` creates a volume using
`openvdb::tools::meshToVolume` which is then filled with the specified
density and the class set to Fog Volume. This is wrong because
`meshToVolume` creates a signed distance field by default that needs
to be converted to a Fog Volume with `openvdb::tools::sdfToFogVolume`
to get a proper Fog volume.
Here is the description of what that function does (from OpenVDB):
"The active and negative-valued interior half of the narrow band
becomes a linear ramp from 0 to 1; the inactive interior becomes
active with a constant value of 1; and the exterior, including the
background and the active exterior half of the narrow band, becomes
inactive with a constant value of 0. The interior, though active,
remains sparse."
This means with this commit old files will not look the same.
There is no way to version this as the options for external band width
and not filling the volume is removed (they don't make any sense for a
proper fog volume).
Pull Request: https://projects.blender.org/blender/blender/pulls/107279
This option is true by default, but it can be changed for
any asset library (that may be using Link as import method).
This also fix "Reset to Default Value" for the Import Method
since this was originally not using the defaults.
Pull Request: https://projects.blender.org/blender/blender/pulls/107345
These changes enhance the prim_path_mask USD import option to allow masking on multiple paths.
Changed the prim_path_mask import property to a string of arbitrary size.
Multiple paths may be specified in a list delimited by commas or semicolons.
Reviewed by Bastien and Matt McLin.
Pull Request: https://projects.blender.org/blender/blender/pulls/106974
The code checking whether old liboverrides which have been resynced into
new ones should be deleted was still assuming it was only working on
local liboverrides.
However, since recursive resync was implemented, this is not true
anymore, it can also handle resynced linked liboverrides.
This could have lead to missing deletion of some old linked liboverrides
after resyncing them.
This addresses an issue here at the Blender studio, where a root
collection of a set was removed by mistake from the set library .blend file.
Since all the other linked data (sub collections, actual objects etc.)
of the set were still available, the liboverride resync code went crazy
trying to resync all these scattered pieces of a set, finding new valid
root IDs for the hierarchies, and so on.
So from now on, do not attempt to resync anything that is part of a
liboverride hierarchy which root ID linked reference has gone missing.
`BKE_collection_object_cache_free` can be called from some points in
code (e.g. during ID remapping) where proper parenting relationships
between collections cannot be ensured.
Would be good to check if recursive cache cleanup is actually needed
from these points, it would almost certainly be better and safer to
instead tag parent collections as dirty too, but this will be for
another time.
For now, just add a NULL-check on the parent collection pointer.
This call should be recursive, only freeing cache of immediate parents
of the collection is not enough, the whole parenting chain needs to be
processed.
The function used to be needed for recursing the tree, as the name
indicated. But it has recently been ported to the new tree iterators
so the recursion isn't necessary anymore.
Changes to the internal workings of the VKCommandBuffer:
- Use state engine to track correct usage.
- Switch between render pass/no render pass automatically.
Eventually the command buffer should be rewritten to use custom command
encoding to improve performance.
Pull Request: https://projects.blender.org/blender/blender/pulls/107337
Make sure that function style, reinterpret_cast, and static_cast are
used for all type conversions, without of casting to void *. Some other
related minor changes: add temporal variables, lost space, asserts for
case to avoid type conversions by using `->id` way.
Pull Request: https://projects.blender.org/blender/blender/pulls/107097
This patch refactors the static cache manager to be split into multiple
smaller Cached Resources Containers. This is a non factional change, and
was done to simplify future implementations of cached resources as they
become more elaborate.
In the GPU_SHADER_2D_WIDGET_BASE the deriviates were assumed to be
positive. This is not always the case. In Vulkan this leads to
incorrect rendering of the widgets due to incorrect SDF values.
This change will ensure that the shader make the ratio variable
absolute.
Pull Request: https://projects.blender.org/blender/blender/pulls/107327
e7bea3fb6e disabled this.
I do believe excluding `OB_CURVES_LEGACY` is wrong though. While it
_might_ not have real geometry, it certainly _can_ have real geometry,
so now legacy curves are enabled again in `OB_TYPE_IS_GEOMETRY`.
A more elaborate check for real geo on legacy curves could be set up in
a following commit.
Since `OB_TYPE_IS_GEOMETRY` is also used in depsgraph driver handling,
will seek additional review from more devs.
Pull Request: https://projects.blender.org/blender/blender/pulls/107214
This patch implements the Texture node for the realtime compositor. The
evaluation of the texture is not GPU accelerated, but is cached as a
form of temporary implementation since the Texture node is deprecated
and will be removed in the future. Furthermore, texture node evaluation
is not supported for now.
This patch also introduces the concept of an ID static cache, which
uses the DrawDataList mechanism to invalidate the cache as needed,
consequently, a DrawDataList was added to the Tex ID structure.
An improvement that should be implemented outside of this patch is to
implement support for proxy textures in results to avoid redundant
copies in the execute method of the texture node. This should be
straightforward bit will be implemented in a separate patch.
Pull Request: https://projects.blender.org/blender/blender/pulls/107291
Fixes a warning on GCC 13 about `uint` being used in the declaration and
the proper enum type `eDupli_ID_Flags` being used in the definition for
`BKE_id_copy_for_duplicate`.