forked from bartvdbraak/blender
Plumiferos request: Added button in Armature options panel to set custom
bone drawing on/off. Is default on.
This commit is contained in:
parent
b96179d689
commit
f5fc880a41
@ -103,6 +103,7 @@ void mouse_armature(void);
|
||||
void remake_editArmature(void);
|
||||
void selectconnected_armature(void);
|
||||
void selectconnected_posearmature(void);
|
||||
void select_bone_parent(void);
|
||||
void unique_editbone_name (char* name);
|
||||
|
||||
void auto_align_armature(void);
|
||||
|
@ -95,6 +95,8 @@ typedef struct bArmature {
|
||||
#define ARM_DONT_USE 0x080
|
||||
#define ARM_MIRROR_EDIT 0x100
|
||||
#define ARM_AUTO_IK 0x200
|
||||
/* made option negative, for backwards compat */
|
||||
#define ARM_NO_CUSTOM 0x400
|
||||
|
||||
/* armature->drawtype */
|
||||
#define ARM_OCTA 0
|
||||
|
@ -3119,8 +3119,9 @@ static void editing_panel_armature_type(Object *ob, bArmature *arm)
|
||||
uiDefButI(block, ROW, REDRAWVIEW3D, "B-Bone", 155, 100,70,20, &arm->drawtype, 0, ARM_B_BONE, 0, 0, "Draw bones as boxes, showing subdivision and b-splines");
|
||||
uiDefButI(block, ROW, REDRAWVIEW3D, "Envelope", 225, 100,85,20, &arm->drawtype, 0, ARM_ENVELOPE, 0, 0, "Draw bones as extruded spheres, showing deformation influence volume");
|
||||
|
||||
uiDefButBitI(block, TOG, ARM_DRAWAXES, REDRAWVIEW3D, "Draw Axes", 10, 80,150,20, &arm->flag, 0, 0, 0, 0, "Draw bone axes");
|
||||
uiDefButBitI(block, TOG, ARM_DRAWNAMES, REDRAWVIEW3D, "Draw Names", 160,80,150,20, &arm->flag, 0, 0, 0, 0, "Draw bone names");
|
||||
uiDefButBitI(block, TOG, ARM_DRAWAXES, REDRAWVIEW3D, "Draw Axes", 10, 80,100,20, &arm->flag, 0, 0, 0, 0, "Draw bone axes");
|
||||
uiDefButBitI(block, TOG, ARM_DRAWNAMES, REDRAWVIEW3D, "Draw Names", 110,80,100,20, &arm->flag, 0, 0, 0, 0, "Draw bone names");
|
||||
uiDefButBitI(block, TOGN, ARM_NO_CUSTOM, REDRAWVIEW3D, "Draw Shapes", 210,80,100,20, &arm->flag, 0, 0, 0, 0, "Draw custom bone shapes");
|
||||
|
||||
uiDefButS(block, NUM, REDRAWVIEW3D, "Ghost: ", 10,60,150,20, &arm->ghostep, 0.0f, 30.0f, 0, 0, "Draw Ghosts around current frame, for current Action");
|
||||
uiDefButS(block, NUM, REDRAWVIEW3D, "Step: ", 160,60,150,20, &arm->ghostsize, 1.0f, 20.0f, 0, 0, "How many frames between Ghost instances");
|
||||
|
@ -1378,7 +1378,7 @@ static void draw_pose_channels(Base *base, int dt)
|
||||
if(bone->parent && (bone->parent->flag & BONE_HIDDEN_P))
|
||||
flag &= ~BONE_CONNECTED;
|
||||
|
||||
if(pchan->custom)
|
||||
if(pchan->custom && !(arm->flag & ARM_NO_CUSTOM))
|
||||
draw_custom_bone(pchan->custom, OB_SOLID, arm->flag, flag, index, bone->length);
|
||||
else if(arm->drawtype==ARM_LINE)
|
||||
; /* nothing in solid */
|
||||
@ -1465,7 +1465,7 @@ static void draw_pose_channels(Base *base, int dt)
|
||||
if(pchan->flag & POSE_STRIDE)
|
||||
constflag |= PCHAN_HAS_STRIDE;
|
||||
|
||||
if(pchan->custom) {
|
||||
if(pchan->custom && !(arm->flag & ARM_NO_CUSTOM)) {
|
||||
if(dt<OB_SOLID)
|
||||
draw_custom_bone(pchan->custom, OB_WIRE, arm->flag, flag, index, bone->length);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user