Age | Commit message (Collapse) | Author |
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
Also resolve a warning from the previous commit. The next blocker to
using const is `BKE_mesh_wrapper_ensure_mdata`.
|
|
As noted in a comment now, these functions only update a cache, so they
don't change the logical state of the mesh, which is "it will have the
data when necessary." Using a const argument will help const correctness
when accessing an object's evaluated mesh.
|
|
Add a new transformation space choice for bone constraints, which
represent the local transformation of the target bone in the constraint
owner's local space.
The use case for this is transferring the local (i.e. excluding the
effect of parents) motion of one bone to another one, while ignoring
the difference between their rest pose orientations.
The new option replaces the following setup:
* A `child` bone of the `target`, rotated the same as `owner` in rest pose.
* A `sibling` bone of the `target`, positioned same as `child` in rest
pose and using Copy Transforms in World Space from `child`.
* The `owner` bone constraint uses Local Space of `sibling`.
(This analogy applies provided both bones use Local Location)
Differential Revision: https://developer.blender.org/D9493
|
|
This constraint can be naturally viewed as a prototype for a future
4x4 matrix math node (or subset thereof), since its basic semantics
already is matrix assignment. Thus it makes sense to add math options
to this constraint to increase flexibility in the meantime.
This patch adds support for several operations that would be useful:
- An option to remove shear in the incoming target matrix.
Shear is known to cause issues for various mathematical operations,
so an option to remove it at key points is useful.
Constraints based on Euler like Copy Rotation and Limit Rotation
already have always enabled shear removal built in, because their
math doesn't work correctly with shear.
In the future node system shear removal would be a separate node
(and currently Limit Rotation can be used as a Remove Shear constraint).
However removing shear from the result of the target space conversion
before mixing (similar to Copy Rotation) has to be built into
Copy Transforms itself as an option.
- More ways to combine the target and owner matrices.
Similar to multiple Inherit Scale modes for parenting, there are
multiple ways one may want to combine matrices based on context.
This implements 3 variants for each of the Before/After modes
(one of them already existing).
- Full implements regular matrix multiplication as the most basic
option. The downside is the risk of creating shear.
- Aligned emulates the 'anti-shear' Aligned Inherit Scale mode,
and basically uses Full for location, and Split for rotation/scale.
(This choice already existed.)
- Split Channels combines location, rotation and scale separately.
Looking at D7547 there is demand for Split Channels in some cases,
so I think it makes sense to include it in Copy Transforms too, so that
the Mix menu items can be identical for it and the Action constraint.
Differential Revision: https://developer.blender.org/D9469
|
|
Generally the evaluated mesh should not be changed, since that is the
job of the modifier stack. Current code is far from const correct in
that regard. This commit uses a const variable for the reult of
`BKE_object_get_evaluated_mesh` in some cases. The most common
remaining case is retrieving a BVH tree from the mesh.
|
|
|
|
This will be useful when adding a utility to create a BVH tree from a
`CurveEval` for the attribute proximity and attribute transfer nodes.
|
|
4f3ec0110 and 5a64c687dd should have removed the entire conditional to skip
time depedent modifiers, rather than always enable it.
|
|
|
|
|
|
Normals now includes many functions including normal splitting &
custom normal manipulation split this into it's own file
to centralize related functions.
|
|
|
|
This node has two modes: the first mode computes a circle from three
locations and a resolution. The second takes radius and resolution.
The first mode also outputs the center of the computed circle as
a vector.
Differential Revision: https://developer.blender.org/D11650
|
|
The use_deform argument was always passed as zero or one, so the "< 0"
check is no longer necessary.
|
|
The "useDeform" argument was only passed as 1 or 0, so even though
there was an odd "< 0" comparison, it can be passed as a boolean.
|
|
The old code only clamped cyclic curves
|
|
|
|
|
|
Creates a Curve with 1 Bezier Spline from four positions (start,
start handle, end handle, end) and a resolution. The handles are
aligned and mirrored automatically. An "Offset" mode is also included
to allow specifying the handles relative to the control points.
The default settings recreate the existing default Bezier Curve in the
3D viewport add menu.
Differential Revision: https://developer.blender.org/D11648
|
|
This patch is for a node that creates a poly spline from a
3 point quadratic Bezier. Resolution is also specified.
Curve primitives design task: T89220
Differential Revision: https://developer.blender.org/D11649
|
|
This node creates a curve spline and gives control for the number of
rotations, the number of points per rotation, start and end radius,
height, and direction. The "Reverse" input produces a visual change,
it doesn't just change the order of the control points.
Differential Revision: https://developer.blender.org/D11609
|
|
This patch adds a Curve Primitives menu in Geometry nodes with an
initial entry of a star primitive.
The node is a basic star pattern node that outputs a poly spline.
Options control the inner and outer radius, the number of points,
and the twist of the valleys.
Differential Revision: https://developer.blender.org/D11653
|
|
Change snapping behavior to snap strip edges when they are close to snap point.
Default behavior is, that each transformed strip is snapped to any other strip.
Implement snapping controls in sequencer tool settings. These controls include:
- Snapping on/off
- Ability to snap to playhead and strip hold offset points
- Filter snap points by excluding sound or muted strips
- Control snapping distance
Snapping controls are placed in timeline header similar to 3D viewport
Reviewed By: mano-wii
Differential Revision: https://developer.blender.org/D11646
|
|
This is simpler, more consistent, and takes up less space.
|
|
This commit avoids duplicating the deformed control point
list twice by modifying the list in the object curve cache directly.
For curves, the original control point data was duplicated into a
local listbase, deformed, used to create the "bevel list" data, and
then duplicated again for the object-level storage of deformed
control points. Text objects and surface objects had a similar
unnecessary duplication.
|
|
The curve bevel list was freed, and then freed again in a call to the
function that recalulates it. The curve "anim path" data was freed
only to be freed again in its calculation function as well. Also move
the anim_path calculation directly after the bevel list creation to
make its requirements more explicit.
|
|
Surface objects were already handled by an early return in the main
"curve types" function. This commit splits them, renames the funtions
to match (and be more consistent with other names), and sanitizes the
checking of object types.
|
|
|
|
|
|
|
|
Don't call `memcpy` with a null destination (and 0 size).
|
|
Every call to `BKE_displist_make_curveTypes` already checks the object
type beforehand, there is no need to check it again. Also removed an
outdated comment.
|
|
`BKE_displist_make_curveTypes` had a `for_orco` argument that was
always false in calls to the function. Removing it allows the curve
displist and modifier evaluation code to become simpler. There are
some related cleanups in rBdf4299465279 and rB93aecd2b8107.
|
|
Sometimes the current spline list isn't part of the original curve, like
when using the deformed control points, etc. This will be helpful in
the curve modifier stack.
|
|
While the const correctness of `ListBase` is quite limited, it's helpful
to have a way to retrieve the `Nurb` list from curve object data without
casting away const from the curve.
|
|
|
|
Caused by 37458798fa02, was doing a NULL-pointer dereference because it used
the wrong pointer to check if the data-block is linked.
|
|
Weird 'embedded for overrides' flag of embedded IDs (including ShapeKeys
in override context) was not properly cleaned up when making an override
fully local.
Reported by studio, thanks.
@jbakker should be backported to 2.93LTS if possible.
|
|
* Reduce code duplication.
* Give methods more standardized names (e.g. `move_to_initialized` -> `move_assign`).
* Support wrapping arbitrary C++ types, even those that e.g. are not copyable.
|
|
The crash was caused by a mistake in 5f9677fe0c533b008b815d7fee0b56509a414ab7
where the pointers to the custom data layers would be overwritten with the one
for the first layer, as CustomData_duplicate_referenced_layer is only about the
first layer. customData_duplicate_referenced_layer_index should be used instead
to duplicate the right layer.
|
|
This option allow users to see the view layer in context to the
others. It is particularly useful to see which view layers have which
collections enabled, and their render settings (holdout, ...).
This option is off by default.
Differential Revision: https://developer.blender.org/D11708
|
|
|
|
|
|
|
|
Now, the mask layers are copied and later a cleanup is done in order to verify all mask layer exist in destination object. If the layer mask does not exist, it's removed from the list.
This is related to T89234.
|
|
The "copy_data" function for nurbs splines was incorrect,
it always set the destination's knots vector as "not dirty,"
even if the source's was.
|
|
When baking some data, we create a new Mesh with edits and modifiers applied.
However, in some cases (e.g. when there is no modifier), the returned Mesh is
actually referencing the original one and its data layers. When autosmooth is
enabled we also split the Mesh. However, since the new Mesh is referencing the
original one, although `BKE_mesh_split_faces` is creating new vertices and edges,
the reallocation of the custom data layers is preempted because of the
reference, so adding the new vertices and edges overwrites valid data
To fix this we duplicate referenced layers before splitting the faces.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D11703
|
|
This patch adds a left aligned sidebar to the spreadsheet editor. This
Sidebar can be used to navigate the geometry component types and
attribute domains. It also provides a quick overview of domain sizes.
It replaces the two dropdowns in the regions header.
Next step will be to add the domain cycling shortcut
using the CTRL + mouse wheel.
Reviewer: Dalai Felinto (dfelinto), Julian Eisel (Severin),
Hans Goudey (HooglyBoogly).
Differential Revision: https://developer.blender.org/D11046
|
|
* Mark either all or no class methods with override
* Don't use zero sized array since it has a different size in C and C++.
Using a little more memory here is not significant.
* Don't use deprecated mechanism to mark private GSet members in clang
just like we don't for MSVC, it warns even for simple zero initialization.
|