Age | Commit message (Collapse) | Author |
|
This commit makes it so curve path parent solving accepts an explicit
arguments for both time and curve speed flag, making it so we don't
have to mock around with scene's frame.
One unfortunate issue still is that if the instancing object is used
for something else, we might be running into a threading conflict.
Possible solution would be to create a temp copy of an object, but
then it will be an issue of preventing drivers from modifying other
datablocks.
At least the original issue is fixed now, and things behave same as
in older Blender version. Additionally, the global variable which
was defining curve speed flag behavior is gone now!
|
|
There were at least three copies of those:
- OB_RECALC* family of flags, which are rudiment of an old
dependency graph system.
- PSYS_RECALC* which were used by old dependency graph system
as a separate set since the graph itself did not handle
particle systems.
- DEG_TAG_* which was used to tag IDs.
Now there is a single set, which defines what can be tagged
and queried for an update. It also has some aggregate flags
to make queries simpler.
Lets once and for all solve the madness of those flags, stick
to a single set, which will not overlap with anything or require
any extra conversion.
Technically, shouldn't be measurable user difference, but some
of the agregate flags for few dependency graph components did
change.
Fixes T58632: Particle don't update rotation settings
|
|
Another case of a value that needs to be written back to non-COW copy.
|
|
|
|
Computing the shape of a B-Bone is a quite expensive operation, and
there are multiple constraints that can access this information in
a variety of useful ways. This means computing the shape once per
bone and saving it is good for performance.
Since the shape may depend on the position of up to two other bones,
often in a "cyclic" manner, this computation has to be a separate
node with its own dependencies.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D3975
|
|
|
|
|
|
The constraint is supposed to automatically initialize the rest
length when it is first evaluated, so now that evaluation is done
on a separate copy it also has to copy the value to the master
instance - or newly created constraints will be broken.
Since this is supposed to happen once at constraint creation,
implementing as a search for now instead of adding new fields.
|
|
|
|
|
|
|
|
|
|
The Nearest Surface Point shrink method, while fast, is neither
smooth nor continuous: as the source point moves, the projected
point can both stop and jump. This causes distortions in the
deformation of the shrinkwrap modifier, and the motion of an
animated object with a shrinkwrap constraint.
This patch implements a new mode, which, instead of using the simple
nearest point search, iteratively solves an equation for each triangle
to find a point which has its interpolated normal point to or from the
original vertex. Non-manifold boundary edges are treated as infinitely
thin cylinders that cast normals in all perpendicular directions.
Since this is useful for the constraint, and having multiple
objects with constraints targeting the same guide mesh is a quite
reasonable use case, rather than calculating the mesh boundary edge
data over and over again, it is precomputed and cached in the mesh.
Reviewers: mont29
Differential Revision: https://developer.blender.org/D3836
|
|
The main use one can imagine for this is adding tweak controls to
parts of a model that are already deformed by multiple other major
bones. It is natural to expect such locations to deform as if the
tweaks aren't there by default; however currently there is no easy
way to make a bone follow multiple other bones.
This adds a new constraint that implements the math behind the Armature
modifier, with support for explicit weights, bone envelopes, and dual
quaternion blending. It can also access bones from multiple armatures
at the same time (mainly because it's easier to code it that way.)
This also fixes dquat_to_mat4, which wasn't used anywhere before.
Differential Revision: https://developer.blender.org/D3664
|
|
|
|
- Constraints must not use mesh_get_eval_final as it isn't thread-safe.
- Depsgraph should keep lastDataMask when re-running COW.
|
|
- Use smooth normals to displace in Above Surface mode.
- Add an option to align an axis to the normal in the constraint.
I've seen people request the alignment feature, and it seems useful.
For the actual aligning I use the damped track logic.
In order to conveniently keep mesh data needed for normal
computation together, a new data structure is introduced.
Reviewers: mont29
Differential Revision: https://developer.blender.org/D3762
|
|
Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D3802
|
|
|
|
Allow raycasting in two directions and culling front or back faces.
Also implement a new Invert Cull option in both constraint and
modifier that can be used to aim for faces aligned with the project
axis direction when raycasting both ways.
Reviewers: mont29
Differential Revision: https://developer.blender.org/D3737
|
|
In addition to the original map to surface and Keep Above Surface,
add modes that only affect vertices that are inside or outside
the object. This is inspired by the Limit Distance constraint,
and can be useful for crude collision detection in rigs.
The inside/outside test works based on face normals and may not be
completely reliable near 90 degree or sharper angles in the target.
Reviewers: campbellbarton, mont29
Differential Revision: https://developer.blender.org/D3717
|
|
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
Not sure why but MSVC is complaining for some of those.
In particular for the struct in BKE_subdiv_ccg.h. Those were the ones
crashing here..
|
|
|
|
Currently constraints can only read the location along the
spline. This obviously limits opportunities for complex bone
interactions in rigs.
This patch exposes access to rotation and scale as well in
Copy Transforms. However, due to the way how things work,
this data cannot be smoothly interpolated, and abruptly
changes when switching to the next segment.
Reviewers: aligorith
Differential Revision: https://developer.blender.org/D3545
|
|
Scale is a multiplicative quantity, so adding it doesn't make sense.
However, for backward compatibility reasons, and in case somebody
actually desires the old additive behavior, the old way remains as
an option.
Without this change the only way to properly combine scale is via
parenting or the complicated Transformation constraint.
The new mode is turned on by a flag for file compatibility, but the
RNA option is reversed so that the new behavior feels more default.
Reviewers: aligorith
Differential Revision: https://developer.blender.org/D3558
|
|
Also, fix missing cleanup of Object.runtime when copying Object
datablocks!
|
|
|
|
Damped Track by specification attempts to arrive at the desired
direction via the shortest rotation. However with opposite vectors
there are infinitely many valid 180 degree rotations. Currently
it gives up and does nothing.
I think that it would be more reasonable to resolve the ambiguity
arbitrarily, so that Damped Track won't have a weird dead zone.
To make it more predictable I use a local axis.
In addition, the singularity area vicinity has some floating
point precision problems that result in significant jitter.
This applies workarounds for two causes of instability.
Differential Revision: https://developer.blender.org/D3530
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Strip unindented comment blocks - mainly headers to avoid conflicts.
|
|
Time should alwaus come from depsgraph, not scene.
|
|
DEG_get_ctime()
|
|
Differential Revision: https://developer.blender.org/D3438
|
|
|
|
This member currently doubles the value of `ray->radius` or is not even used.
|
|
|
|
|
|
bvhtree_from_mesh_get`.
The value of epsilon was never used to create this bvhtree because whenever we activate this constraint, a bvhtree with parameter epsilon 0.0 was created and cached.
|
|
|
|
This will allow greater control of the bvhtrees that are obtained, and helps identify problems.
It is also an additional step to unify the functions.
|
|
editing of inserted items in collections.
Now insertable collection items have a flag to say they are 'local' (and
hence can be freely edited).
|
|
|
|
|