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>2010-01-28 20:31:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-28 20:31:11 +0300
commit6f4a26c9e0e078f3d801f425de70853ea4ee7536 (patch)
treed308b5afee3b6b30ac082a78009e2d9ff14e1e04 /release/scripts/ui
parent883518d78295c05e93af3a2866e0f2eafae5fb15 (diff)
material copy/paste
not enough room for the buttons so adding a menu, icon is ugly probably needs a new icon?.
Diffstat (limited to 'release/scripts/ui')
-rw-r--r--release/scripts/ui/properties_material.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/release/scripts/ui/properties_material.py b/release/scripts/ui/properties_material.py
index be5e98a362f..863e596d701 100644
--- a/release/scripts/ui/properties_material.py
+++ b/release/scripts/ui/properties_material.py
@@ -43,6 +43,17 @@ class MATERIAL_MT_sss_presets(bpy.types.Menu):
draw = bpy.types.Menu.draw_preset
+class MATERIAL_MT_specials(bpy.types.Menu):
+ bl_label = "Material Options"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("object.material_slot_copy", icon='COPY_ID')
+ layout.operator("material.copy", icon='COPYDOWN')
+ layout.operator("material.paste", icon='PASTEDOWN')
+
+
class MaterialButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -92,7 +103,8 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
col = row.column(align=True)
col.operator("object.material_slot_add", icon='ZOOMIN', text="")
col.operator("object.material_slot_remove", icon='ZOOMOUT', text="")
- col.operator("object.material_slot_copy", icon='COPY_ID', text="")
+
+ col.menu("MATERIAL_MT_specials", icon='DOWNARROW_HLT', text="")
if ob.mode == 'EDIT':
row = layout.row(align=True)
@@ -914,6 +926,7 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
col.prop(vol, "depth_cutoff")
bpy.types.register(MATERIAL_MT_sss_presets)
+bpy.types.register(MATERIAL_MT_specials)
bpy.types.register(MATERIAL_PT_volume_density)
bpy.types.register(MATERIAL_PT_volume_shading)