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.
This commit is contained in:
@@ -1050,17 +1050,26 @@ static void get_ipo_context(short blocktype, ID **from, Ipo **ipo, char *actname
|
||||
}
|
||||
|
||||
/* 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user