Fix #32742: Motion path calculation on linked armatures locks up Blender

Issue was happening when linking armature object and making proxy and was
caused by not copying visualization settings in BKE_pose_copy_data.

This lead to deadlocks in motion path drawing code.

After discussion with Campbell decided it is crucial fix since it fixes
bug appearing in really common scenario of using armatures.
This commit is contained in:
Sergey Sharybin
2012-10-03 08:51:05 +00:00
parent 916a58f4e0
commit 98698753b1
2 changed files with 17 additions and 0 deletions

View File

@@ -539,6 +539,7 @@ void BKE_pose_copy_data(bPose **dst, bPose *src, int copycon)
outPose->iksolver = src->iksolver;
outPose->ikdata = NULL;
outPose->ikparam = MEM_dupallocN(src->ikparam);
outPose->avs = src->avs;
for (pchan = outPose->chanbase.first; pchan; pchan = pchan->next) {
/* TODO: rename this argument... */

View File

@@ -8008,6 +8008,22 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
/* correction for files saved in blender version when BKE_pose_copy_data
* didn't copy animation visualization, which lead to deadlocks on motion
* path calculation for proxied armatures, see [#32742]
*/
if (main->versionfile < 264) {
Object *ob;
for (ob = main->object.first; ob; ob = ob->id.next) {
if (ob->pose) {
if (ob->pose->avs.path_step == 0) {
animviz_settings_init(&ob->pose->avs);
}
}
}
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */