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:
authorJoshua Leung <aligorith@gmail.com>2009-11-10 02:41:48 +0300
committerJoshua Leung <aligorith@gmail.com>2009-11-10 02:41:48 +0300
commitd0cd641de34c571942d93afa07a8d54bd9d08a43 (patch)
tree46a3fe8aae9d766b4f7dfea5026736f6cc0250e5 /source/blender/editors
parentd34261edab6e6d0c428af96874e9846528c45339 (diff)
Bugfixes for Armatures, SplineIK, and F-Curve RNA:
* Fixed the handling of the 'draw_active' flag for drawing of armatures. This is now cleared from bones in old files (so one bone always got represented as active in the viewport even when others were selected), and the flag is correctly set temporarily when drawing the bones (only one place had been done). * Fixed typo with SplineIK that was making the root bone of the bone chains always be ignored. Similar functionality can come back at some point, but in a more useful form. * Shortened the UI names for the F-Curve colouring modes to increase readability. The old ones were too long to be able to distinguish between entries in the UI.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c31
1 files changed, 24 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index 230bacf4f7f..fca7d6d7a9f 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -1629,10 +1629,11 @@ static void draw_pose_channels(Scene *scene, View3D *v3d, ARegion *ar, Base *bas
flag= bone->flag;
if ( (bone->parent) && (bone->parent->flag & (BONE_HIDDEN_P|BONE_HIDDEN_PG)) )
flag &= ~BONE_CONNECTED;
-
- if(bone==arm->act_bone)
+
+ /* set temporary flag for drawing bone as active */
+ if (bone == arm->act_bone)
flag |= BONE_DRAW_ACTIVE;
-
+
/* set color-set to use */
set_pchan_colorset(ob, pchan);
@@ -1708,6 +1709,10 @@ static void draw_pose_channels(Scene *scene, View3D *v3d, ARegion *ar, Base *bas
flag= bone->flag;
if ((bone->parent) && (bone->parent->flag & (BONE_HIDDEN_P|BONE_HIDDEN_PG)))
flag &= ~BONE_CONNECTED;
+
+ /* set temporary flag for drawing bone as active */
+ if (bone == arm->act_bone)
+ flag |= BONE_DRAW_ACTIVE;
draw_custom_bone(scene, v3d, rv3d, pchan->custom, OB_WIRE, arm->flag, flag, index, bone->length);
@@ -1800,6 +1805,10 @@ static void draw_pose_channels(Scene *scene, View3D *v3d, ARegion *ar, Base *bas
if ((bone->parent) && (bone->parent->flag & (BONE_HIDDEN_P|BONE_HIDDEN_PG)))
flag &= ~BONE_CONNECTED;
+ /* set temporary flag for drawing bone as active */
+ if (bone == arm->act_bone)
+ flag |= BONE_DRAW_ACTIVE;
+
/* extra draw service for pose mode */
constflag= pchan->constflag;
if (pchan->flag & (POSE_ROT|POSE_LOC|POSE_SIZE))
@@ -1875,12 +1884,12 @@ static void draw_pose_channels(Scene *scene, View3D *v3d, ARegion *ar, Base *bas
Mat4CpyMat4(bmat, pchan->pose_mat);
bone_matrix_translate_y(bmat, pchan->bone->length);
glMultMatrixf(bmat);
-
+
/* do cached text draw immediate to include transform */
view3d_cached_text_draw_begin();
drawaxes(pchan->bone->length*0.25f, 0, OB_ARROWS);
view3d_cached_text_draw_end(v3d, ar, 1, bmat);
-
+
glPopMatrix();
}
}
@@ -1959,6 +1968,10 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt)
flag= eBone->flag;
if ( (eBone->parent) && ((eBone->parent->flag & BONE_HIDDEN_A) || (eBone->parent->layer & arm->layer)==0) )
flag &= ~BONE_CONNECTED;
+
+ /* set temporary flag for drawing bone as active */
+ if (eBone == arm->act_edbone)
+ flag |= BONE_DRAW_ACTIVE;
if (arm->drawtype==ARM_ENVELOPE)
draw_sphere_bone(OB_SOLID, arm->flag, flag, 0, index, NULL, eBone);
@@ -1994,6 +2007,10 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt)
flag= eBone->flag;
if ( (eBone->parent) && ((eBone->parent->flag & BONE_HIDDEN_A) || (eBone->parent->layer & arm->layer)==0) )
flag &= ~BONE_CONNECTED;
+
+ /* set temporary flag for drawing bone as active */
+ if (eBone == arm->act_edbone)
+ flag |= BONE_DRAW_ACTIVE;
if (arm->drawtype == ARM_ENVELOPE) {
if (dt < OB_SOLID)
@@ -2063,12 +2080,12 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt)
get_matrix_editbone(eBone, bmat);
bone_matrix_translate_y(bmat, eBone->length);
glMultMatrixf(bmat);
-
+
/* do cached text draw immediate to include transform */
view3d_cached_text_draw_begin();
drawaxes(eBone->length*0.25f, 0, OB_ARROWS);
view3d_cached_text_draw_end(v3d, ar, 1, bmat);
-
+
glPopMatrix();
}