Add ctrl-click rename to most lists in Blender UI and templates/examples.
[blender.git] / release / scripts / startup / bl_ui / properties_texture.py
index 023b3a138485c9e6865c39655dc87d39811b2cdc..c03ea1c5422a4de1dcf0ca9481732bcffdfe40e0 100644 (file)
@@ -63,7 +63,10 @@ class TEXTURE_UL_texslots(UIList):
         slot = item
         tex = slot.texture if slot else None
         if self.layout_type in {'DEFAULT', 'COMPACT'}:
-            layout.label(text=tex.name if tex else "", translate=False, icon_value=icon)
+            if tex:
+                layout.prop(tex, "name", text="", emboss=False, icon_value=icon)
+            else:
+                layout.label(text="", icon_value=icon)
             if tex and isinstance(item, bpy.types.MaterialTextureSlot):
                 layout.prop(ma, "use_textures", text="", index=index)
         elif self.layout_type in {'GRID'}: