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:
authorTon Roosendaal <ton@blender.org>2006-11-01 17:29:06 +0300
committerTon Roosendaal <ton@blender.org>2006-11-01 17:29:06 +0300
commitf5fc880a41d990a337df6e0c2e6743a54da043fd (patch)
treedd265233fd3e76ce89b221b69223524a7696ab16
parentb96179d6898444beac24bcaed86514cc87164247 (diff)
Plumiferos request: Added button in Armature options panel to set custom
bone drawing on/off. Is default on.
-rw-r--r--source/blender/include/BIF_editarmature.h1
-rw-r--r--source/blender/makesdna/DNA_armature_types.h2
-rw-r--r--source/blender/src/buttons_editing.c5
-rw-r--r--source/blender/src/drawarmature.c4
4 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/include/BIF_editarmature.h b/source/blender/include/BIF_editarmature.h
index 7766accdab6..62cb7c2e749 100644
--- a/source/blender/include/BIF_editarmature.h
+++ b/source/blender/include/BIF_editarmature.h
@@ -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);
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
index f2080c60cef..0b59173afa7 100644
--- a/source/blender/makesdna/DNA_armature_types.h
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -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
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c
index ce6730454be..12284ff9294 100644
--- a/source/blender/src/buttons_editing.c
+++ b/source/blender/src/buttons_editing.c
@@ -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");
diff --git a/source/blender/src/drawarmature.c b/source/blender/src/drawarmature.c
index 083125442af..4f554530675 100644
--- a/source/blender/src/drawarmature.c
+++ b/source/blender/src/drawarmature.c
@@ -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);
}