[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32458] trunk/blender/source/blender: bugfix [#22161] Drawing of custom shapes in bones
Campbell Barton
ideasman42 at gmail.com
Thu Oct 14 02:33:39 CEST 2010
Revision: 32458
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32458
Author: campbellbarton
Date: 2010-10-14 02:33:39 +0200 (Thu, 14 Oct 2010)
Log Message:
-----------
bugfix [#22161] Drawing of custom shapes in bones
Modified Paths:
--------------
trunk/blender/source/blender/blenloader/intern/readfile.c
trunk/blender/source/blender/editors/space_view3d/drawarmature.c
Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c 2010-10-13 23:46:42 UTC (rev 32457)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c 2010-10-14 00:33:39 UTC (rev 32458)
@@ -1384,8 +1384,8 @@
/* ************ READ ID Properties *************** */
-void IDP_DirectLinkProperty(IDProperty *prop, int switch_endian, FileData *fd);
-void IDP_LibLinkProperty(IDProperty *prop, int switch_endian, FileData *fd);
+static void IDP_DirectLinkProperty(IDProperty *prop, int switch_endian, FileData *fd);
+static void IDP_LibLinkProperty(IDProperty *prop, int switch_endian, FileData *fd);
static void IDP_DirectLinkIDPArray(IDProperty *prop, int switch_endian, FileData *fd)
{
Modified: trunk/blender/source/blender/editors/space_view3d/drawarmature.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawarmature.c 2010-10-13 23:46:42 UTC (rev 32457)
+++ trunk/blender/source/blender/editors/space_view3d/drawarmature.c 2010-10-14 00:33:39 UTC (rev 32458)
@@ -1565,7 +1565,7 @@
}
/* assumes object is Armature with pose */
-static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt)
+static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt, short ghost)
{
RegionView3D *rv3d= ar->regiondata;
Object *ob= base->object;
@@ -1706,9 +1706,11 @@
}
/* prepare colors */
- if (arm->flag & ARM_POSEMODE)
+ if(ghost) {
+ /* 13 October 2009, Disabled this to make ghosting show the right colors (Aligorith) */
+ }
+ else if (arm->flag & ARM_POSEMODE)
set_pchan_colorset(ob, pchan);
-#if 0 // XXX - 13 October 2009, Disabled this to make ghosting show the right colors (Aligorith)
else {
if ((scene->basact)==base) {
if (base->flag & (SELECT+BA_WAS_SEL)) UI_ThemeColor(TH_ACTIVE);
@@ -1719,7 +1721,6 @@
else UI_ThemeColor(TH_WIRE);
}
}
-#endif
/* catch exception for bone with hidden parent */
flag= bone->flag;
@@ -2211,7 +2212,7 @@
BKE_animsys_evaluate_animdata(&ob->id, adt, (float)CFRA, ADT_RECALC_ALL);
where_is_pose(scene, ob);
- draw_pose_bones(scene, v3d, ar, base, OB_WIRE);
+ draw_pose_bones(scene, v3d, ar, base, OB_WIRE, TRUE);
}
glDisable(GL_BLEND);
if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
@@ -2290,7 +2291,7 @@
BKE_animsys_evaluate_animdata(&ob->id, adt, (float)CFRA, ADT_RECALC_ALL);
where_is_pose(scene, ob);
- draw_pose_bones(scene, v3d, ar, base, OB_WIRE);
+ draw_pose_bones(scene, v3d, ar, base, OB_WIRE, TRUE);
}
glDisable(GL_BLEND);
if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
@@ -2360,7 +2361,7 @@
if (CFRA != cfrao) {
BKE_animsys_evaluate_animdata(&ob->id, adt, (float)CFRA, ADT_RECALC_ALL);
where_is_pose(scene, ob);
- draw_pose_bones(scene, v3d, ar, base, OB_WIRE);
+ draw_pose_bones(scene, v3d, ar, base, OB_WIRE, TRUE);
}
}
@@ -2375,7 +2376,7 @@
if (CFRA != cfrao) {
BKE_animsys_evaluate_animdata(&ob->id, adt, (float)CFRA, ADT_RECALC_ALL);
where_is_pose(scene, ob);
- draw_pose_bones(scene, v3d, ar, base, OB_WIRE);
+ draw_pose_bones(scene, v3d, ar, base, OB_WIRE, TRUE);
}
}
}
@@ -2409,7 +2410,7 @@
/* we use color for solid lighting */
glColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR);
glEnable(GL_COLOR_MATERIAL);
- glColor3ub(0,0,0); // clear spec
+ glColor3ub(255,0,255); // clear spec
glDisable(GL_COLOR_MATERIAL);
glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
@@ -2458,7 +2459,7 @@
}
}
}
- draw_pose_bones(scene, v3d, ar, base, dt);
+ draw_pose_bones(scene, v3d, ar, base, dt, FALSE);
arm->flag &= ~ARM_POSEMODE;
if(ob->mode & OB_MODE_POSE)
More information about the Bf-blender-cvs
mailing list