[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13469] trunk/blender/source/blender/src/ drawarmature.c: Made the line between the start and end of IK-chains for bones display regardless of whether 'Relationship Lines' has been enabled for the view, if the IK-chain was temporarily added for Auto-IK.
Joshua Leung
aligorith at gmail.com
Wed Jan 30 09:31:09 CET 2008
Revision: 13469
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13469
Author: aligorith
Date: 2008-01-30 09:31:07 +0100 (Wed, 30 Jan 2008)
Log Message:
-----------
Made the line between the start and end of IK-chains for bones display regardless of whether 'Relationship Lines' has been enabled for the view, if the IK-chain was temporarily added for Auto-IK. This is so that it is possible to see the length of Auto-IK chains.
Modified Paths:
--------------
trunk/blender/source/blender/src/drawarmature.c
Modified: trunk/blender/source/blender/src/drawarmature.c
===================================================================
--- trunk/blender/source/blender/src/drawarmature.c 2008-01-30 08:10:47 UTC (rev 13468)
+++ trunk/blender/source/blender/src/drawarmature.c 2008-01-30 08:31:07 UTC (rev 13469)
@@ -1290,7 +1290,7 @@
}
-static void pchan_draw_IK_root_lines(bPoseChannel *pchan)
+static void pchan_draw_IK_root_lines(bPoseChannel *pchan, short only_temp)
{
bConstraint *con;
bPoseChannel *parchan;
@@ -1300,6 +1300,10 @@
bKinematicConstraint *data = (bKinematicConstraint*)con->data;
int segcount= 0;
+ /* if only_temp, only draw if it is a temporary ik-chain */
+ if ((only_temp) && !(data->flag & CONSTRAINT_IK_TEMP))
+ continue;
+
setlinestyle(3);
glBegin(GL_LINES);
@@ -1638,9 +1642,11 @@
if ((bone) && !(bone->flag & (BONE_HIDDEN_P|BONE_HIDDEN_PG))) {
if (bone->layer & arm->layer) {
- if (do_dashed && bone->parent) {
- /* Draw a line from our root to the parent's tip */
- if ((bone->flag & BONE_CONNECTED)==0) {
+ if ((do_dashed & 1) && (bone->parent)) {
+ /* Draw a line from our root to the parent's tip
+ * - only if V3D_HIDE_HELPLINES is enabled...
+ */
+ if ( (do_dashed & 2) && ((bone->flag & BONE_CONNECTED)==0) ) {
if (arm->flag & ARM_POSEMODE) {
glLoadName(index & 0xFFFF); // object tag, for bordersel optim
BIF_ThemeColor(TH_WIRE);
@@ -1653,8 +1659,9 @@
setlinestyle(0);
}
- /* Draw a line to IK root bone */
- // TODO: make this draw with do_dashed off (V3D_HIDE_HELPLINES)
+ /* Draw a line to IK root bone
+ * - only if temporary chain (i.e. "autoik")
+ */
if (arm->flag & ARM_POSEMODE) {
if (pchan->constflag & PCHAN_HAS_IK) {
if (bone->flag & BONE_SELECTED) {
@@ -1662,7 +1669,7 @@
else glColor3ub(200, 200, 50); // add theme!
glLoadName(index & 0xFFFF);
- pchan_draw_IK_root_lines(pchan);
+ pchan_draw_IK_root_lines(pchan, !(do_dashed & 2));
}
}
}
More information about the Bf-blender-cvs
mailing list