[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13490] trunk/blender/source/blender/src/ editipo.c: Bugfix #8070: blender crash when assigning driver to bone constraint
Joshua Leung
aligorith at gmail.com
Thu Jan 31 02:49:15 CET 2008
Revision: 13490
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13490
Author: aligorith
Date: 2008-01-31 02:49:15 +0100 (Thu, 31 Jan 2008)
Log Message:
-----------
Bugfix #8070: blender crash when assigning driver to bone constraint
When there were no keyframes for a constraint on a bone, trying to add a driver to the influence curve would fail, as a new curve would be added the some mysterious place. The cause was a missing case, as the code assumed that no user would try to add from IPO-Editor in such a way.
Modified Paths:
--------------
trunk/blender/source/blender/src/editipo.c
Modified: trunk/blender/source/blender/src/editipo.c
===================================================================
--- trunk/blender/source/blender/src/editipo.c 2008-01-30 22:00:12 UTC (rev 13489)
+++ trunk/blender/source/blender/src/editipo.c 2008-01-31 01:49:15 UTC (rev 13490)
@@ -1050,17 +1050,26 @@
}
/* set actname if in posemode */
- if(ob->action) {
- if(ob->flag & OB_POSEMODE) {
+ if (ob->action) {
+ if (ob->flag & OB_POSEMODE) {
bPoseChannel *pchan= get_active_posechannel(ob);
- if(pchan) {
+ if (pchan) {
BLI_strncpy(actname, pchan->name, 32);
BLI_strncpy(bonename, pchan->name, 32);
}
}
- else if(ob->ipoflag & OB_ACTION_OB)
+ else if (ob->ipoflag & OB_ACTION_OB)
strcpy(actname, "Object");
}
+ else {
+ if (ob->flag & OB_POSEMODE) {
+ bPoseChannel *pchan= get_active_posechannel(ob);
+ if (pchan) {
+ BLI_strncpy(actname, pchan->name, 32);
+ BLI_strncpy(bonename, pchan->name, 32);
+ }
+ }
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list