copy icon in the material buttons list view so you can copy the current set of materi...
[blender-staging.git] / release / scripts / ui / buttons_material.py
index dee927415e6b8d5a18d4744e85f3aa36b083b958..03e11e003e20267ff028bcf7314b1025ed8e1b10 100644 (file)
@@ -8,6 +8,8 @@ def active_node_mat(mat):
                mat_node = mat.active_node_material
                if mat_node:
                        return mat_node
+               else:
+                       return mat
 
        return None
 
@@ -57,6 +59,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
                        col = row.column(align=True)
                        col.itemO("object.material_slot_add", icon='ICON_ZOOMIN', text="")
                        col.itemO("object.material_slot_remove", icon='ICON_ZOOMOUT', text="")
+                       col.itemO("object.material_slot_copy", icon='ICON_COPYDOWN', text="")
 
                        if ob.mode == 'EDIT':
                                row = layout.row(align=True)