diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-22 22:04:35 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-22 22:04:35 +0400 |
commit | 4966982a5aa7715e6bd67dcef1babdf8ca3d02e9 (patch) | |
tree | cf96f67b83f89336e3fe2f64aa58345dca818430 /source/blender/editors/armature | |
parent | 0198df7956125180d5b9c50638a0778a3236d88f (diff) | |
parent | df51fd74cf826c42a90212082abb27e99484257a (diff) |
svn merge ^/trunk/blender -r43564:43609
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r-- | source/blender/editors/armature/editarmature.c | 18 | ||||
-rw-r--r-- | source/blender/editors/armature/editarmature_retarget.c | 2 | ||||
-rw-r--r-- | source/blender/editors/armature/poselib.c | 10 |
3 files changed, 16 insertions, 14 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 11f07e3051e..e16063b50c6 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -5356,7 +5356,7 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n } } } - + /* See if an object is parented to this armature */ if (ob->parent && (ob->parent->data == arm)) { if (ob->partype==PARBONE) { @@ -5385,17 +5385,15 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n } } } - - /* Fix animation data attached to this object */ - // TODO: should we be using the database wide version instead (since drivers may break) - if (ob->adt) { - /* posechannels only... */ - BKE_animdata_fix_paths_rename(&ob->id, ob->adt, "pose.bones", oldname, newname, 0, 0, 1); - } } - + + /* Fix all animdata that may refer to this bone - we can't just do the ones attached to objects, since + * other ID-blocks may have drivers referring to this bone [#29822] + */ + BKE_all_animdata_fix_paths_rename("pose.bones", oldname, newname); + + /* correct view locking */ { - /* correct view locking */ bScreen *screen; for(screen= G.main->screen.first; screen; screen= screen->id.next) { ScrArea *sa; diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index 9ec27b69835..a8978a0bbde 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -450,7 +450,7 @@ static void renameTemplateBone(char *name, char *template_name, ListBase *editbo { int i, j; - for (i = 0, j = 0; template_name[i] != '\0' && i < (MAXBONENAME-1) && j < (MAXBONENAME-1); i++) + for (i = 0, j = 0; i < (MAXBONENAME-1) && j < (MAXBONENAME-1) && template_name[i] != '\0'; i++) { if (template_name[i] == '&') { diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index dcddde207f0..eb49f16584b 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -376,6 +376,10 @@ static void poselib_add_menu_invoke__replacemenu (bContext *C, uiLayout *layout, bAction *act= ob->poselib; /* never NULL */ TimeMarker *marker; + wmOperatorType *ot = WM_operatortype_find("POSELIB_OT_pose_add", 1); + + BLI_assert(ot != NULL); + /* set the operator execution context correctly */ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); @@ -383,9 +387,9 @@ static void poselib_add_menu_invoke__replacemenu (bContext *C, uiLayout *layout, for (marker= act->markers.first; marker; marker= marker->next) { PointerRNA props_ptr; - props_ptr = uiItemFullO(layout, "POSELIB_OT_pose_add", - marker->name, ICON_ARMATURE_DATA, NULL, - WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); + props_ptr = uiItemFullO_ptr(layout, ot, + marker->name, ICON_ARMATURE_DATA, NULL, + WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_int_set(&props_ptr, "frame", marker->frame); RNA_string_set(&props_ptr, "name", marker->name); |