diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-11-23 23:37:23 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-11-23 23:54:32 +0400 |
commit | 4c52e737df39e538d3b41a232035a4a1e240505d (patch) | |
tree | 3381fcad45e1749524289cc10f597af5419fafc8 /release/scripts/startup/bl_ui | |
parent | 500934690791acca431782c1e59f8f4671c0e03e (diff) |
Add ctrl-click rename to most lists in Blender UI and templates/examples.
Notes:
* Did not touch to addons, that's up to the authors. ;)
* Did not removed any "name" field below lists. We might want to do this in some cases (less UI clutter), but probably not always, so will let maintainers of the related areas decide here.
Diffstat (limited to 'release/scripts/startup/bl_ui')
10 files changed, 19 insertions, 12 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index 0ec22323092..87f745dc4a1 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -80,7 +80,7 @@ class MESH_UL_shape_keys(UIList): key_block = item if self.layout_type in {'DEFAULT', 'COMPACT'}: split = layout.split(0.66, False) - split.label(text=item.name, translate=False, icon_value=icon) + split.prop(key_block, "name", text="", emboss=False, icon_value=icon) row = split.row(align=True) if key_block.mute or (obj.mode == 'EDIT' and not (obj.use_shape_key_edit_mode and obj.type == 'MESH')): row.active = False @@ -98,7 +98,7 @@ class MESH_UL_uvmaps_vcols(UIList): def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): # assert(isinstance(item, (bpy.types.MeshTexturePolyLayer, bpy.types.MeshLoopColorLayer)) if self.layout_type in {'DEFAULT', 'COMPACT'}: - layout.label(text=item.name, translate=False, icon_value=icon) + layout.prop(item, "name", text="", emboss=False, icon_value=icon) icon = 'RESTRICT_RENDER_OFF' if item.active_render else 'RESTRICT_RENDER_ON' layout.prop(item, "active_render", text="", icon=icon, emboss=False) elif self.layout_type in {'GRID'}: diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py index a57567ae79e..607e4cc521e 100644 --- a/release/scripts/startup/bl_ui/properties_freestyle.py +++ b/release/scripts/startup/bl_ui/properties_freestyle.py @@ -97,7 +97,7 @@ class RENDERLAYER_UL_linesets(UIList): def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): lineset = item if self.layout_type in {'DEFAULT', 'COMPACT'}: - layout.label(lineset.name, icon_value=icon) + layout.prop(lineset, "name", text="", emboss=False, icon_value=icon) layout.prop(lineset, "show_render", text="", index=index) elif self.layout_type in {'GRID'}: layout.alignment = 'CENTER' diff --git a/release/scripts/startup/bl_ui/properties_mask_common.py b/release/scripts/startup/bl_ui/properties_mask_common.py index 203e5078ee4..b6f3cf93531 100644 --- a/release/scripts/startup/bl_ui/properties_mask_common.py +++ b/release/scripts/startup/bl_ui/properties_mask_common.py @@ -31,7 +31,7 @@ class MASK_UL_layers(UIList): # assert(isinstance(item, bpy.types.MaskLayer) mask = item if self.layout_type in {'DEFAULT', 'COMPACT'}: - layout.label(text=mask.name, translate=False, icon_value=icon) + layout.prop(mask, "name", text="", emboss=False, icon_value=icon) row = layout.row(align=True) row.prop(mask, "hide", text="", emboss=False) row.prop(mask, "hide_select", text="", emboss=False) diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index 344074c5893..d48c4957e6e 100644 --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@ -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: diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py index f0c7a532414..898e385ce3d 100644 --- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py +++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py @@ -33,7 +33,7 @@ class PHYSICS_UL_dynapaint_surfaces(UIList): if self.layout_type in {'DEFAULT', 'COMPACT'}: row = layout.row(align=True) row.label(text="", icon_value=icon) - row.label(text=surf.name, translate=False, icon_value=sticon) + row.prop(surf, "name", text="", emboss=False, icon_value=sticon) row = layout.row(align=True) if surf.use_color_preview: row.prop(surf, "show_preview", text="", emboss=False, diff --git a/release/scripts/startup/bl_ui/properties_render_layer.py b/release/scripts/startup/bl_ui/properties_render_layer.py index dcc4508f086..6a44feeaac6 100644 --- a/release/scripts/startup/bl_ui/properties_render_layer.py +++ b/release/scripts/startup/bl_ui/properties_render_layer.py @@ -38,7 +38,7 @@ class RENDERLAYER_UL_renderlayers(UIList): # assert(isinstance(item, bpy.types.SceneRenderLayer) layer = item if self.layout_type in {'DEFAULT', 'COMPACT'}: - layout.label(layer.name, icon_value=icon, translate=False) + layout.prop(layer, "name", text="", icon_value=icon, emboss=False) layout.prop(layer, "use", text="", index=index) elif self.layout_type in {'GRID'}: layout.alignment = 'CENTER' diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index 91a5abd0ad0..34143c77998 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -33,6 +33,7 @@ class SCENE_UL_keying_set_paths(UIList): kspath = item icon = layout.enum_item_icon(kspath, "id_type", kspath.id_type) if self.layout_type in {'DEFAULT', 'COMPACT'}: + # Do not make this one editable in uiList for now... layout.label(text=kspath.data_path, translate=False, icon_value=icon) elif self.layout_type in {'GRID'}: layout.alignment = 'CENTER' diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index 023b3a13848..c03ea1c5422 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -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'}: diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 3db8697a457..19f1563c4fb 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -29,9 +29,9 @@ class CLIP_UL_tracking_objects(UIList): # assert(isinstance(item, bpy.types.MovieTrackingObject) tobj = item if self.layout_type in {'DEFAULT', 'COMPACT'}: - layout.label(text=tobj.name, translate=False, - icon='CAMERA_DATA' if tobj.is_camera - else 'OBJECT_DATA') + layout.prop(tobj, "name", text="", emboss=False, + icon='CAMERA_DATA' if tobj.is_camera + else 'OBJECT_DATA') elif self.layout_type in {'GRID'}: layout.alignment = 'CENTER' layout.label(text="", diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 46234b638eb..9750d7bac0d 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -410,7 +410,7 @@ class NODE_UL_interface_sockets(bpy.types.UIList): if not socket.is_output: row.template_node_socket(color) - row.label(text=socket.name, icon_value=icon) + row.prop(socket, "name", text="", emboss=False, icon_value=icon) # outputs get icon on the right if socket.is_output: |