diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-08-23 14:46:31 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-08-23 14:46:31 +0400 |
commit | 1a067c668c07d47ff6baaf8e05a931dad66ac615 (patch) | |
tree | 4327094086cdc1254dd0c2f797a76faf06aa3588 /source/blender/editors | |
parent | 8d1ea3a09bbe79ba4f201d40b7e4d00137ddf285 (diff) |
Patch #22855: Replace existing pose in poselib: put frame+name in properties, not only frame
Submitted by: Torsten Rupp (rupp)
Thanks Torsten for the patch. Previously, replacing poses would name them all "Pose".
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/armature/poselib.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index b0b5aedaa70..f490158424c 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -278,8 +278,16 @@ static void poselib_add_menu_invoke__replacemenu (bContext *C, uiLayout *layout, uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); /* add each marker to this menu */ - for (marker= act->markers.first; marker; marker= marker->next) - uiItemIntO(layout, marker->name, ICON_ARMATURE_DATA, "POSELIB_OT_pose_add", "frame", marker->frame); + 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); + + RNA_int_set(&props_ptr, "frame", marker->frame); + RNA_string_set(&props_ptr, "name", marker->name); + } } static int poselib_add_menu_invoke (bContext *C, wmOperator *op, wmEvent *evt) |