Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2021-06-15 13:51:19 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2021-06-18 18:56:04 +0300
commitb6030711a24f154de9c1c7287cf91d3cde3721c8 (patch)
treec40bde218083bb8134a50da182224487fdf4866b /source/blender/makesdna
parent638c16f41010d716a3ee47017eb0155044dd825a (diff)
Armature: add automatic B-Bone Scale toggles.
Currently B-Bone scaling can only be controlled via their properties, thus requiring up to 8 drivers per joint between B-Bones to transfer scaling factors from the handle bone. A Scale Easing option is added to multiply the easing value by the Y scale channels to synchronize them - this produces a natural scaling effect where both the shape of the curve and the scale is affected. In addition, four toggles are added for each handle, which multiply each of the X, Y, Z and Ease values by the matching Local Scale channel of the handle bone, thus replacing trivial drivers. The Scale Easing option has no effect on this process since it's easy to just enable both Length and Ease buttons. Differential Revision: https://developer.blender.org/D9870
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_armature_types.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
index f5574b36602..3d83d0d2f6f 100644
--- a/source/blender/makesdna/DNA_armature_types.h
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -302,8 +302,25 @@ typedef enum eBone_BBoneHandleType {
typedef enum eBone_BBoneFlag {
/** Add the parent Out roll to the In roll. */
BBONE_ADD_PARENT_END_ROLL = (1 << 0),
+ /** Multiply B-Bone easing values with Scale Length. */
+ BBONE_SCALE_EASING = (1 << 1),
} eBone_BBoneFlag;
+/* bone->bbone_prev/next_flag */
+typedef enum eBone_BBoneHandleFlag {
+ /** Use handle bone scaling for scale X. */
+ BBONE_HANDLE_SCALE_X = (1 << 0),
+ /** Use handle bone scaling for scale Y (length). */
+ BBONE_HANDLE_SCALE_Y = (1 << 1),
+ /** Use handle bone scaling for scale Z. */
+ BBONE_HANDLE_SCALE_Z = (1 << 2),
+ /** Use handle bone scaling for easing. */
+ BBONE_HANDLE_SCALE_EASE = (1 << 3),
+ /** Is handle scale required? */
+ BBONE_HANDLE_SCALE_ANY = BBONE_HANDLE_SCALE_X | BBONE_HANDLE_SCALE_Y | BBONE_HANDLE_SCALE_Z |
+ BBONE_HANDLE_SCALE_EASE,
+} eBone_BBoneHandleFlag;
+
#define MAXBONENAME 64
#ifdef __cplusplus