Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-01-22 07:30:07 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-22 07:30:07 +0400
commitb1667911ef88e067817cb1702695a0d1e350dd78 (patch)
tree303dff319b59b89516127c065f9486e4dfd53975 /source/blender/editors/armature
parent6964b5a6c48f2fab19b4ce5a52ba23525a5f05eb (diff)
reduce operator lookups in the UI (could do 4 hash lookups per button).
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/poselib.c10
1 files changed, 7 insertions, 3 deletions
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);