[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31530] trunk/blender/source/blender/ editors/armature/poselib.c: Patch #22855: Replace existing pose in poselib: put frame+name in properties, not only frame
Joshua Leung
aligorith at gmail.com
Mon Aug 23 12:46:31 CEST 2010
Revision: 31530
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31530
Author: aligorith
Date: 2010-08-23 12:46:31 +0200 (Mon, 23 Aug 2010)
Log Message:
-----------
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".
Modified Paths:
--------------
trunk/blender/source/blender/editors/armature/poselib.c
Modified: trunk/blender/source/blender/editors/armature/poselib.c
===================================================================
--- trunk/blender/source/blender/editors/armature/poselib.c 2010-08-23 06:56:08 UTC (rev 31529)
+++ trunk/blender/source/blender/editors/armature/poselib.c 2010-08-23 10:46:31 UTC (rev 31530)
@@ -278,8 +278,16 @@
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)
More information about the Bf-blender-cvs
mailing list