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>2005-12-18 23:57:04 +0300
committerTon Roosendaal <ton@blender.org>2005-12-18 23:57:04 +0300
commit2986d03e773f5905eb3a94f93231c21af13b9cf8 (patch)
treeca77ee466fa1c95c55cab32613ba85dbe8f2de14
parent0c76f64554465ebeb341bb8e098b065e47b45816 (diff)
Orange: Made dashed parent-offset lines option for drawing Poses.
Was too ugly! :)
-rw-r--r--source/blender/makesdna/DNA_armature_types.h1
-rw-r--r--source/blender/src/buttons_editing.c20
-rw-r--r--source/blender/src/drawarmature.c3
3 files changed, 14 insertions, 10 deletions
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
index 809ff15e46d..6abd3e4d74a 100644
--- a/source/blender/makesdna/DNA_armature_types.h
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -95,6 +95,7 @@ typedef struct bArmature {
#define ARM_DONT_USE 0x080
#define ARM_MIRROR_EDIT 0x100
#define ARM_AUTO_IK 0x200
+#define ARM_NO_PARLINES 0x400
/* armature->drawtype */
#define ARM_OCTA 0
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c
index f186c286aab..269a2b7c066 100644
--- a/source/blender/src/buttons_editing.c
+++ b/source/blender/src/buttons_editing.c
@@ -2789,18 +2789,20 @@ 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,80,20, &arm->flag, 0, 0, 0, 0, "Draw bone axes");
- uiDefButBitI(block, TOG, ARM_DRAWNAMES, REDRAWVIEW3D, "Draw Names", 90,80,80,20, &arm->flag, 0, 0, 0, 0, "Draw bone names");
- uiDefButS(block, NUM, REDRAWVIEW3D, "Ghost: ", 170,80,80,20, &arm->ghostep, 0.0f, 30.0f, 0, 0, "Draw Ghosts around current frame, for current Action");
- uiDefButS(block, NUM, REDRAWVIEW3D, "Step: ", 250,80,60,20, &arm->ghostsize, 1.0f, 20.0f, 0, 0, "How many frames between Ghost instances");
+ 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_PARLINES, REDRAWVIEW3D, "Draw Offset", 210,80,100,20, &arm->flag, 0, 0, 0, 0, "Draw offsets to parent bones with dashed line");
+
+ 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");
uiBlockEndAlign(block);
- uiDefBut(block, LABEL, 0, "Deform Options", 10,60,150,20, 0, 0, 0, 0, 0, "");
+ uiDefBut(block, LABEL, 0, "Deform Options", 10,40,150,20, 0, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
- uiDefButBitS(block, TOG, ARM_DEF_VGROUP, B_ARM_RECALCDATA, "Vertex Groups", 10, 40,150,20, &arm->deformflag, 0, 0, 0, 0, "Enable VertexGroups defining deform (not for Modifiers)");
- uiDefButBitS(block, TOG, ARM_DEF_ENVELOPE, B_ARM_RECALCDATA, "Envelopes", 160,40,150,20, &arm->deformflag, 0, 0, 0, 0, "Enable Bone Envelopes defining deform (not for Modifiers)");
- uiDefButBitI(block, TOG, ARM_RESTPOS, B_ARM_RECALCDATA,"Rest Position", 10,20,150,20, &arm->flag, 0, 0, 0, 0, "Show armature rest position, no posing possible");
- uiDefButBitI(block, TOG, ARM_DELAYDEFORM, REDRAWVIEW3D, "Delay Deform", 160,20,150,20, &arm->flag, 0, 0, 0, 0, "Don't deform children when manipulating bones in pose mode");
+ uiDefButBitS(block, TOG, ARM_DEF_VGROUP, B_ARM_RECALCDATA, "Vertex Groups", 10, 20,150,20, &arm->deformflag, 0, 0, 0, 0, "Enable VertexGroups defining deform (not for Modifiers)");
+ uiDefButBitS(block, TOG, ARM_DEF_ENVELOPE, B_ARM_RECALCDATA, "Envelopes", 160,20,150,20, &arm->deformflag, 0, 0, 0, 0, "Enable Bone Envelopes defining deform (not for Modifiers)");
+ uiDefButBitI(block, TOG, ARM_RESTPOS, B_ARM_RECALCDATA,"Rest Position", 10,0,150,20, &arm->flag, 0, 0, 0, 0, "Show armature rest position, no posing possible");
+ uiDefButBitI(block, TOG, ARM_DELAYDEFORM, REDRAWVIEW3D, "Delay Deform", 160,0,150,20, &arm->flag, 0, 0, 0, 0, "Don't deform children when manipulating bones in pose mode");
}
diff --git a/source/blender/src/drawarmature.c b/source/blender/src/drawarmature.c
index 3843eedebcd..865797c183d 100644
--- a/source/blender/src/drawarmature.c
+++ b/source/blender/src/drawarmature.c
@@ -1327,6 +1327,7 @@ static void draw_pose_channels(Base *base, int dt)
/* hacky... prevent outline select from drawing dashed helplines */
glGetFloatv(GL_LINE_WIDTH, &tmp);
if(tmp > 1.1) do_dashed= 0;
+ if(arm->flag & ARM_NO_PARLINES) do_dashed= 0;
/* precalc inverse matrix for drawing screen aligned */
if(arm->drawtype==ARM_ENVELOPE) {
@@ -1416,7 +1417,7 @@ static void draw_pose_channels(Base *base, int dt)
if(bone && !(bone->flag & BONE_HIDDEN_P)) {
if(bone->layer & arm->layer) {
if (do_dashed && bone->parent) {
- // Draw a line from our root to the parent's tip
+ /* Draw a line from our root to the parent's tip */
if(!(bone->flag & BONE_CONNECTED) ){
if (arm->flag & ARM_POSEMODE) {
glLoadName (index & 0xFFFF); // object tag, for bordersel optim