Age | Commit message (Collapse) | Author |
|
The term `verify` doesn't fit with what this function does
and is sometimes used to check data is valid or to control validity
checking as with `RNA_define_verify_sdna`.
use more common term `ensure`.
|
|
Use the term `ensure` since it makes it clear the data is
not manipulated if it already exists.
|
|
|
|
|
|
|
|
|
|
The value of this variable was incremented, but never used.
|
|
|
|
This patch adds the Randomize options that exist in the Array modifier to the offset modifier.
Currently the patch uses
```
BLI_findindex(&gpf->strokes, gps);
```
to get the index of the current stroke for making each stroke a different seed value. This is how the noise modifier also gets the stroke seed value and it is noted there as well that this method is slow, and should be fixed in the future with another method of getting the stroke index.
Other methods were explored such as using the total number of points of the stroke, but that makes the randomize options incompatible with other modifiers before it such as Multiple Strokes, Array, Build, and Simplify.
{F9591325}
Differential Revision: https://developer.blender.org/D10171
|
|
|
|
Bisect-plane calculation needed to take non-uniform scale into account.
|
|
|
|
|
|
The algorithm that calcualted the direction (inside/outside) of the
polyline was not always returing the correct result. This mean that the
polyline was filled "inside-out".
The fix uses the winding number to calculate the inside and outside.
Reviewed By: antoniov, pepeland
Maniphest Tasks: T87718
Differential Revision: https://developer.blender.org/D11054
|
|
In some cases functions were defined with arguments of different array
lengths in headers vs. implementations. This commit fixes some of the
cases I ran into, but probably not all of them.
|
|
|
|
Differential Revision: https://developer.blender.org/D11107
|
|
|
|
Edit mode could leave pose channels in the object that didn't
have an associated bone.
These are now cleared when freeing edit-mode data.
|
|
This is a first version of an Attribute Transfer node. It only supports two
modes for mapping attributes from one geometry to another for now.
More options are planned for the future.
Ref T87421.
Differential Revision: https://developer.blender.org/D11037
|
|
|
|
Generally, it would be good to not allow this from happening in the
first place but that is quite tricky because an object does not know
which other object instances it. Similar checks might be necessary
in other places, but this fixes the bug already.
Differential Revision: https://developer.blender.org/D11086
|
|
This is a change split from the geometry nodes curves branch. Since
curve object modifier evaluation happens in this file, moving it to C++
will be quite helpful to support the `GeometrySet` type. Other than
that, the code in the branch intends to replace a fair amount of this
file anyway, so I don't plan to do any further cleanup here.
Differential Revision: https://developer.blender.org/D11078
|
|
This allows us to remove a callback from the modifier type info struct.
In the future the these modifiers might just be replaced by nodes
internally anyway, but in the meantime it's nice to unify the handling
of evaluated geometry a bit.
Differential Revision: https://developer.blender.org/D11080
|
|
|
|
This fixes T87666 and T83252.
The boolean modifier and geometry nodes can depend on the geometry
of an entire collection. Before, the modifiers had to manually create relations
to all the objects in the collection. This worked for the most part, but was
cumbersome and did not solve all issues. For example, the modifiers were not
properly updated when objects were added/removed from the referenced collection.
This commit introduces the concept of "collection geometry" in the depsgraph.
The geometry of a collection depends on the transforms and geometry of all
the objects in it. The boolean modifier and geometry nodes can now just depend
on the collection geometry instead of creating all the dependencies themselves.
Differential Revision: https://developer.blender.org/D11053
|
|
|
|
Though to my knowledge we haven't had a report about this yet, this
looks like a clear oversight-- the ids are just more data stored by the
instances component, and should be cleared and copied like other data.
This might have resulted in incorrect random IDs for instances in
renderers in some cases where the component had to be copied.
|
|
|
|
If an object named for example `Suzanne` is converted to Gpencil, a material called `Suzanne_Fill` will be created for the gpencil fill.
When this material already exists, the new material will be called `Suzanne_Fill.001` and the operator will not see that this material is already present the next iteration. This leads to a new material being created for every polygon.
This commit changes the code to search for a material starting with `ObjectName_Fill` instead of being equal to.
Reviewed By: filedescriptor, antoniov
Differential Revision: https://developer.blender.org/D11067
|
|
|
|
This is complex situation. Tagged ID deletion (used to delete several
data-blocks at once) removes IDs to be deleted from Main.
But when we remove deleted IDs' usages of other IDs (using
`BKE_libblock_relink_ex`), some specific post-process is required on
some types, like Collections. Those post-processes would in some cases
rely on data actually being in Main.
That failing condition would lead in existing code on missing processing
the very ID (collection) we were working on, leading to missing removing
some child collection pointers, leading to the crash (later on in
LayerCollection resync process).
For now we go with an optimization & fix that avoids processing all
collections in Main when we actually know which one we are working one
(case of `BKE_libblock_relink_ex`, but not of
`BKE_libblock_remap_locked`).
This is however yet another demonstration of the need to rework that
whole collection/layer resync process, since it is not only extremely
inneficient currently, but it also requires valid Main/ID state way too
deep into the remapping code.
NOTE: This fix may very well not catch/address all possible fail cases
here, dealing with the double parent/child relationships of collections
is challenging...
Issue reported by @eyecandy from the studio, thanks.
|
|
|
|
|
|
|
|
Previously we always had to set attribute values after creating
the attribute. This patch adds an initializer argument to
`attribute_try_create` which can fill it in a few ways, which
are explained in code comments.
This fixes T87597.
Differential Revision: https://developer.blender.org/D11045
|
|
Because we use virtual classes (and for other reasons), we had to do a
small allocation when simply retrieving the data type and domain of an
existing attribute. This happened quite a lot actually-- to determine
these values for result attributes.
This patch adds a simple function to retrieve this meta data without
building the virtual array. This should lower the overhead of every
attribute node, though the difference probably won't be noticible
unless a tree has very many nodes.
Differential Revision: https://developer.blender.org/D11047
|
|
|
|
The `bisect_distance` in the mirror modifier was hard-coded to `0.001`.
This would result in some unexpected behavior like vertices close
to the mirror plane being deleted or merged.
The fix now adds a parameter to the mirror modifier to expose the
bisect distance to the user. The default is set to the previous
hard-coded value to not "change" previous files.
Ref D10201
|
|
This is needed by the upcoming Attribute Transfer node. It changes
its behavior based on what domain the attribute is on.
|
|
|
|
|
|
|
|
Differential Revision: https://developer.blender.org/D11011
|
|
|
|
|
|
|
|
Python scripts can now define the reason it's poll function fails using:
`Operator.poll_message_set(message, ...)`
This supports both regular text as well as delaying message creation
using a callback which should be used in situations where constructing
detailed messages is too much overhead for a poll function.
Ref D11001
|
|
Call this function instead of `CTX_wm_operator_poll_msg_set(C, NULL)`
|
|
|