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-17 04:29:39 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-17 04:29:39 +0400
commitc8df3db370bcd827d13181fd69a6ff99b7b2412b (patch)
treedfe8cd0c11486dc9f411ad396f19cc16b71e4af4 /release
parent6891c57e4c4b2389bd496b9b2af4404447cc840f (diff)
show a title in menus triggered by WM_OT_context_menu_enum, also show an icon when available.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_operators/wm.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 6c418902433..9a2328dcddc 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -505,6 +505,10 @@ class WM_MT_context_menu_enum(Menu):
return {'PASS_THROUGH'}
base_path, prop_string = data_path.rsplit(".", 1)
value_base = context_path_validate(context, base_path)
+ prop = value_base.bl_rna.properties[prop_string]
+
+ layout = self.layout
+ layout.label(prop.name, icon=prop.icon)
col = self.layout.column()
col.prop(value_base, prop_string, expand=True)