From c9c0f893073300d6898114cfc6cacd563c630750 Mon Sep 17 00:00:00 2001 From: Chris Clyne Date: Wed, 16 Sep 2020 15:52:43 +0200 Subject: Action Constraint: Add manual time factor input control MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- source/blender/makesdna/DNA_constraint_types.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') 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 */ -- cgit v1.2.3