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>2013-01-13 20:18:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-13 20:18:35 +0400
commit4f2a65d34c41f3f3704be5f8c1023adaa7a04f2f (patch)
tree62b498371b4947e94b1bd66126a8ce1a8458077f /release
parent4f938bbbfe6e1a5d57e98e60c37c47582d904dc1 (diff)
remove TRANSFORM_OT_snap_type, use WM_OT_context_menu_enum instead.
add Ctrl+Shift+Tab shortcut for selecting snap type to the UV editor too. also added icon drawing to WM_OT_context_menu_enum() so it gets the icons from the enum to draw them in the menu.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_operators/wm.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index a76d8292a1d..b3414805427 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -506,10 +506,10 @@ class WM_MT_context_menu_enum(Menu):
base_path, prop_string = data_path.rsplit(".", 1)
value_base = context_path_validate(context, base_path)
- values = [(i.name, i.identifier) for i in value_base.bl_rna.properties[prop_string].enum_items]
+ values = [(i.name, i.identifier, i.icon) for i in value_base.bl_rna.properties[prop_string].enum_items]
- for name, identifier in values:
- props = self.layout.operator("wm.context_set_enum", text=name)
+ for name, identifier, icon in values:
+ props = self.layout.operator("wm.context_set_enum", text=name, icon=icon)
props.data_path = data_path
props.value = identifier