Age | Commit message (Collapse) | Author |
|
Custom driver functions need access to the dependency graph that is
triggering the evaluation of the driver. This patch passes the
dependency graph pointer through all the animation-related calls.
Instead of passing the evaluation time to functions, the code now passes
an `AnimationEvalContext` pointer:
```
typedef struct AnimationEvalContext {
struct Depsgraph *const depsgraph;
const float eval_time;
} AnimationEvalContext;
```
These structs are read-only, meaning that the code cannot change the
evaluation time. Note that the `depsgraph` pointer itself is const, but
it points to a non-const depsgraph.
FCurves and Drivers can be evaluated at a different time than the
current scene time, for example when evaluating NLA strips. This means
that, even though the current time is stored in the dependency graph, we
need an explicit evaluation time.
There are two functions that allow creation of `AnimationEvalContext`
objects:
- `BKE_animsys_eval_context_construct(Depsgraph *depsgraph, float
eval_time)`, which creates a new context object from scratch, and
- `BKE_animsys_eval_context_construct_at(AnimationEvalContext
*anim_eval_context, float eval_time)`, which can be used to create a
`AnimationEvalContext` with the same depsgraph, but at a different
time. This makes it possible to later add fields without changing any
of the code that just want to change the eval time.
This also provides a fix for T75553, although it does require a change
to the custom driver function. The driver should call
`custom_function(depsgraph)`, and the function should use that depsgraph
instead of information from `bpy.context`.
Reviewed By: brecht, sergey
Differential Revision: https://developer.blender.org/D8047
|
|
And better identify what is bool and what is flag in the
proportional edit properties.
|
|
|
|
the menu
|
|
|
|
|
|
|
|
used
Caused by {rBa6a9a12e8f32}
Other relevant commits:
rBb8ca806b7798e2f8dd6effca8f0d081b3cd8c23f
rBde530a95dc7b482dc22c933b9b8b2a98c79b5663
The issue is caused by some leftover BONE_TRANSFORM_MIRROR flags on a
bone from previous runs (file in the report had the flag still on
forearm.R).
With these false leftover flags still set, `pose_grab_with_ik()` cannot
work correctly. Culprit commit above removed the early clearing of this
flag on all bones, this should be restored [this happened in
`count_set_pose_transflags()`].
This should only be done in the beginning of the transform process, so
now still clear the flags early in 'createTransPose()' [but dont restore
this in 'count_set_pose_transflags()' -- this will be called from
special_aftertrans_update again, so placing the clearance here only
complicates things (autokeyframe_pose() still needs to work as well)...]
Maniphest Tasks: T75810
Differential Revision: https://developer.blender.org/D7527
|
|
count_set_pose_transflags --> transform_convert_pose_transflags_update
count_bone_select --> armature_bone_transflags_update_recursive
Also don't mix `BONE_TRANSFORM_MIRROR` with `BONE_TRANSFORM` in
transflag. (This was a mess introduced in rBde530a95dc7b).
|
|
|
|
Needed to use a temporary pchan iterator to make sure that we keep track
of the selected bone.
|
|
Fixed a coding mistake when adding temp IK chains with Auto-IK.
We need to use the data from the new temporary constraint.
|
|
|
|
as FakeIK for FK posing)
The issue was that the deps graph relation builder assumed that all
bones that had a IK constraint on them would be evaluated. However for
targetless IK bones, only the active bone would receive updates and the
others would be skipped (as those would be treated as if the IK
constraint was disabled).
I didn't see an easy way to solve this from the depsgraph side of
things.
Instead I came up with a solution that I feel is quite strait forward
and reflects what is actually supposed to happen under the hood.
Now all targetless IK constraints are treated as disabled and will not
be added to any relations in the depsgraph.
Instead, a temporary IK constraint will be created when the bone in
question is transformed. This is basically activating "Auto IK" for the
bone while transforming.
Reviewed By: Sergey, Brecht
Differential Revision: http://developer.blender.org/D7378
|
|
Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.
Differential Revision: https://developer.blender.org/D7320
|
|
These headers are not needed right away, but will be in the upcoming
commit.
|
|
This was caused by the removal of some `BONE_TRANSFORM_MIRROR` flag
handling in rBde530a95dc7b482dc22c933b9b8b2a98c79b5663. I simply
restored those lines that caused this issue.
|
|
|
|
Fix T69572
TODO: support `Relative-Mirror` as well.
Maniphest Tasks: T69572
Differential Revision: https://developer.blender.org/D5862
|
|
Part of T68836
`transform conversions.c` is a file that is getting too big (almost 10,000 lines).
So it's a good idea to split it into smaller files.
differential revision: https://developer.blender.org/D5677
|