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>2018-08-05 18:48:05 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2018-10-04 19:55:44 +0300
commit61a24c799b2882c22a43591138a113d7f09be0ed (patch)
treeea85047e68ff64bf7e25329a7e7048f1b9dbfeb1 /source/blender/makesdna/DNA_armature_types.h
parent6932eaa2bcaff0649c82f6b31a205319c966bd15 (diff)
Move B-Bone custom handle settings to Edit mode.
Custom handle settings actually affect the B-Bone rest shape, so they should be changed in Edit mode rather than Pose mode. This is necessary to be able to display the correct rest shape of the bone in Edit Mode. Also, instead of flags, introduce an enum to specify the handle operation modes, so that new ones could be added later. Differential Revision: https://developer.blender.org/D3588
Diffstat (limited to 'source/blender/makesdna/DNA_armature_types.h')
-rw-r--r--source/blender/makesdna/DNA_armature_types.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
index 937caffb71e..141ad7c3ce0 100644
--- a/source/blender/makesdna/DNA_armature_types.h
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -78,8 +78,10 @@ typedef struct Bone {
int layer; /* layers that bone appears on */
short segments; /* for B-bones */
- short pad1;
-
+ char bbone_prev_type; /* Type of next/prev bone handles */
+ char bbone_next_type;
+ struct Bone *bbone_prev; /* Next/prev bones to use as handle references when calculating bbones (optional) */
+ struct Bone *bbone_next;
} Bone;
typedef struct bArmature {
@@ -214,6 +216,13 @@ typedef enum eBone_Flag {
} eBone_Flag;
+/* bone->bbone_prev_type, bbone_next_type */
+typedef enum eBone_BBoneHandleType {
+ BBONE_HANDLE_AUTO = 0, /* Default mode based on parents & children. */
+ BBONE_HANDLE_ABSOLUTE, /* Custom handle in absolute position mode. */
+ BBONE_HANDLE_RELATIVE, /* Custom handle in relative position mode. */
+} eBone_BBoneHandleType;
+
#define MAXBONENAME 64
#endif