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:
Diffstat (limited to 'source/blender/editors/space_view3d/drawarmature.c')
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index 2ff3dcdda29..e35c70048e7 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -119,11 +119,12 @@ static void set_pchan_colorset(Object *ob, bPoseChannel *pchan)
bcolor = &btheme->tarm[(color_index - 1)];
}
else if (color_index == -1) {
- /* use the group's own custom color set */
- bcolor = (grp) ? &grp->cs : NULL;
+ /* use the group's own custom color set (grp is always != NULL here) */
+ bcolor = &grp->cs;
}
- else
+ else {
bcolor = NULL;
+ }
}
/* This function is for brightening/darkening a given color (like UI_ThemeColorShade()) */
@@ -1435,7 +1436,8 @@ static void pchan_draw_IK_root_lines(bPoseChannel *pchan, short only_temp)
if (segcount == data->chainlen || segcount > 255) break; /* 255 is weak */
parchan = parchan->parent;
}
- if (parchan) /* XXX revise the breaking conditions to only stop at the tail? */
+ /* Only draw line in case our chain is more than one bone long! */
+ if (parchan != pchan) /* XXX revise the breaking conditions to only stop at the tail? */
glVertex3fv(parchan->pose_head);
glEnd();