Add ctrl-click rename to most lists in Blender UI and templates/examples.
[blender.git] / release / scripts / startup / bl_ui / properties_material.py
index 344074c5893c620aa20cd88d06035a63c6fb8456..d48c4957e6e686e213e354f9daacabb6267fe804 100644 (file)
@@ -77,7 +77,10 @@ class MATERIAL_UL_matslots(UIList):
         slot = item
         ma = slot.material
         if self.layout_type in {'DEFAULT', 'COMPACT'}:
-            layout.label(text=ma.name if ma else "", translate=False, icon_value=icon)
+            if ma:
+                layout.prop(ma, "name", text="", emboss=False, icon_value=icon)
+            else:
+                layout.label(text="", icon_value=icon)
             if ma and not context.scene.render.use_shading_nodes:
                 manode = ma.active_node_material
                 if manode: