diff options
author | Chris Clyne <lateasusual> | 2020-09-16 16:52:43 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2020-09-16 16:55:22 +0300 |
commit | c9c0f893073300d6898114cfc6cacd563c630750 (patch) | |
tree | 2f7b102728debdddd1b9f968886e90d39ac00c1a /source/blender/makesdna/DNA_constraint_types.h | |
parent | 569e2e6dbac489b4143859cfeb87debf7253eab6 (diff) |
Action Constraint: Add manual time factor input control
Adds an optional slider to the action constraint so that it can be
driven without a constraint target.
This is very helpful for more complex rigging and mechanical rigs, as it
means the action constraint can be controlled with a driver/custom
property directly, currently if we want to use a driver to control it we
must add a "dummy" bone/object inbetween to act as a control.
Reviewed By: Sebastian Parborg, Sybren A. Stüvel, Demeter Dzadik, Julian Eisel
Differential Revision: http://developer.blender.org/D8022
Diffstat (limited to 'source/blender/makesdna/DNA_constraint_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_constraint_types.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index cddc78d7640..92ee3f062a6 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -337,7 +337,8 @@ typedef struct bActionConstraint { float max; int flag; char mix_mode; - char _pad[7]; + char _pad[3]; + float eval_time; /* Only used when flag ACTCON_USE_EVAL_TIME is set. */ struct bAction *act; /** MAX_ID_NAME-2. */ char subtarget[64]; @@ -860,6 +861,8 @@ typedef enum eSameVolume_Mode { typedef enum eActionConstraint_Flags { /* Bones use "object" part of target action, instead of "same bone name" part */ ACTCON_BONE_USE_OBJECT_ACTION = (1 << 0), + /* Ignore the transform of 'tar' and use 'eval_time' instead: */ + ACTCON_USE_EVAL_TIME = (1 << 1), } eActionConstraint_Flags; /* bActionConstraint.mix_mode */ |