Remove:
- IDPropertyTemplate.matrix_or_vector
Matrix & vector types have been deprecated, this wasn't used.
- IDProperty.saved
This was added preemptively but never used, replace with a pad so as
not to hint at a feature that doesn't exist.
This reverts commit 154d3e95f862fd680879267b03bb050ffa178d05.
This caused crashes in the mouse house and flower shop benchmark files.
A proper solution will be investigated soon.
The default curve type when there is no "curve_type" attribute is
Catmull ROM. In order to avoid allocating an entire array of values
just to set this default type, remove the attribute instead. This will
be less important when we can store attributes as single values.
Also fix a curve utility API comment.
Improve safety and correctness of matrix multiplication by using
temporary storage if one of the inputs is also the output.
No functional changes.
Differential Revision: https://developer.blender.org/D16876
Reviewed By: Campbell Barton, Sergey Sharybin
Since a year and a half ago we've been switching to a new way to
represent what sockets a node should have called "declarations"
that's easier to use, clearer, and more flexible for upcoming
features like dynamic socket counts or generic type sockets.
All builtin nodes with a static set of sockets have switched, but one
missing area has been group nodes and group input/output nodes. These
nodes have **dynamic** declarations which change based on their
properties or the group they're inside of. This patch addresses that,
in preparation for using the same dynamic declaration feature for
simulation nodes.
Generally there shouldn't be user-visible differences, but one benefit
is that user-created socket descriptions are now visible directly in
the node editor for group nodes and group input/output nodes.
The commit contains a few changes:
- Add a node type callback for building dynamic declarations with
different arguments
- Add an `Extend` socket declaration for the "virtual" sockets used
for connecting new links
- A similar `Custom` socket declaration is used for addon-defined socket
- Simplify the node update loop to use the declaration to build update
sockets
- Replace the "group update" functions with the declaration building
- Move the node group input/output link creation to link drag operator
- Make the field status part of group node declarations
(not for group input/output nodes though)
- Some fixes for declarations to make them update and build properly
Differential Revision: https://developer.blender.org/D16850
Under some circumstances (loading autosaves), we end up reading from
files that were saved with the new mesh format (after T95965). When
that happens we should skip the conversion from the old format to
avoid data-loss. This will also give forward compatibility when we
stop saving in the old format completely in 4.0.
Here I mostly just check if the attributes in the new format already
exist. Along with checking for the null status of `Mesh::mvert`, that
should cover the majority of cases.
Fixes T103878
Differential Revision: https://developer.blender.org/D17011
This fixes the UI alignment issues that were introduced by {D12815} with the addition of the boolean custom properties.
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D17012
Previously transforming and translating meshes (used by the object info
and transform geometry nodes) was single threaded. Now use the same
code path as other geometry types which already includes multithreading.
I observed a 5x performance improvement for a 4 million vert mesh on a
Ryzen 7950x.
Trim erronously samples the next to last control point when it should
sample the last control point on the curve. This only happens when
reducing the curve to a single point. These changes should correct
the behavior.
Differential Revision: https://developer.blender.org/D17003
ViewCullingData::corners (vec4) was casted to a BoundingBox (vec3), so the frustum corners were uploaded in the wrong format to the GPU.
Now the ViewCullingData::corners are used directly without casting, since the BoundBox API is not really needed.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D17008
While keeping SSE2, SSE4.1 and AVX2. This does not affect hardware support, it
only slightly reduces performance for some older CPUs.
To reduce maintenance cost and improve compile times.
Differential Revision: https://developer.blender.org/D16978
Separating strokes using "selected points" didn't take into account
that points->time can be 0 and thus created points with negative
values in points->time, which should be an impossibility.
This patch fixes this in BKE_gpencil_stroke_delete_tagged_points.
Also, it makes the build modifier's new drawspeed immune
to (erroneous) negative time values, should they arise in other situations.
Reviewed By: antoniov
Differential Revision: https://developer.blender.org/D17006
Implementation didn't count the string terminator when allocating
memory to store `msl_patch_default`. The string terminator could
be overwritted by other memory adding some undefined behavior.
An alternative fix to [0] which caused an error with ASAN
(freeing an GHOST_ISystem instead of a GHOST_System).
Reported by @Baardaap in chat, I'm unable to reproduce the issue.
Instead of calling the destructor directly, add a private method that
deletes data before raising an exception.
[0]: fd36221930e35efd2c09af8fb91234a510e3b9dc
Use a consistent style for declaring the names of struct members
in their declarations. Note that this convention was already used in
many places but not everywhere.
Remove spaces around the text (matching commented arguments) with
the advantage that the the spell checking utility skips these terms.
Making it possible to extract & validate these comments automatically.
Also use struct names for `bAnimChannelType` & `bConstraintTypeInfo`
which were using brief descriptions.
Meshes spawning particles from faces with with UV's/Vertex-colors but no
faces would crash de-referencing a NULL pointer.
Resolve by adding a check for this case and an assertion if CD_MFACE is
NULL when the mesh has polygons.
Ref D16947
These allow the usage of `atomicMin` and `atomicMax` function with float
values as there is no overload for these types in GLSL.
This also allows signed 0 preservation.
This wasn't really a problem since these are set on first bind or creation.
The test `if (enabled_srgb && srgb_) {` was depending on that variable that
in certain case, might not have been initialized (because of lazy init).
Changes to overlay_shader.cc workaround a bug in GCC-12.2
(likely a duplicate of [0]). As the workaround involved removing
a local variable which most functions already didn't assign,
remove it for all functions.
An alternative is to add (otherwise redundant) parenthesis, e.g.
`&(e_data.sh_data[sh_cfg])`, but this would need to be noted in
code-comments, so opt for removing the intermediate variable.
[0]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106247
As noted in comments, there are a lot of false positives which can't
be conveniently suppressed. Many of these warnings were caused by
`float x, y, z` being passed as `float[3]` using a pointer to `x`.
Call BKE_view_layer_synced_ensure before getting the active object [0]
caused an assertion for tests in debug mode.
[0]: c158dd560e5399d8bfa7386790e7b43c9f91db8e
This makes `GVArrayImpl` and `VArrayImpl` more similar.
Only passing the pointer instead of the span also increases
efficiency a little bit. The downside is that a few asserts had
to be removed as well. However, in practice the same asserts
are in place at a higher level as well (in `VArrayCommon`).
In most cases it is currently not used, so always having it there
causes unnecessary overhead. In my test file that causes
a 2 % performance improvement.
Previously, `ParamsBuilder` lazily allocated an array for an
output when it was unused, but the called multi-function
wanted to access it. Now, whether the multi-function supports
an output to be unused is part of the signature. This way, the
allocation can happen earlier when the parameters are build.
The benefit is that this makes all methods of `MFParams`
thread-safe again, removing the need for a mutex.