[Bf-extensions-cvs] [bf7d023] master: Fix T42272: UI Layers Managment: UI enhancement.
Bastien Montagne
noreply at git.blender.org
Fri Oct 17 20:34:12 CEST 2014
Commit: bf7d023bea12663d47a9ad8514d7a7a3e55a9ef6
Author: Bastien Montagne
Date: Fri Oct 17 20:32:54 2014 +0200
Branches: master
https://developer.blender.org/rBAbf7d023bea12663d47a9ad8514d7a7a3e55a9ef6
Fix T42272: UI Layers Managment: UI enhancement.
Based on a patch by aditiapratama (Aditia A. Pratama).
===================================================================
M ui_layer_manager.py
===================================================================
diff --git a/ui_layer_manager.py b/ui_layer_manager.py
index 15ff87e..a2e086b 100644
--- a/ui_layer_manager.py
+++ b/ui_layer_manager.py
@@ -423,9 +423,16 @@ class SCENE_PT_namedlayer_layers(bpy.types.Panel):
# layer index
if use_indices:
- row.label(text="%.2d." % (layer_idx + 1))
+ sub = row.row(align=True)
+ sub.alignment = 'LEFT'
+ sub.label(text="%.2d." % (layer_idx + 1))
# visualization
+
+ # Name (use special icon for active layer)
+ icon = 'FILE_TICK' if (getattr(layer_cont, "active_layer", -1) == layer_idx) else 'NONE'
+ row.prop(namedlayer, "name", text="", icon=icon)
+
icon = 'RESTRICT_VIEW_OFF' if layer_cont.layers[layer_idx] else 'RESTRICT_VIEW_ON'
if use_classic:
op = row.operator("scene.namedlayer_toggle_visibility", text="", icon=icon, emboss=True)
@@ -434,10 +441,6 @@ class SCENE_PT_namedlayer_layers(bpy.types.Panel):
else:
row.prop(layer_cont, "layers", index=layer_idx, emboss=True, icon=icon, toggle=True, text="")
- # Name (use special icon for active layer).
- icon = 'FILE_TICK' if (getattr(layer_cont, "active_layer", -1) == layer_idx) else 'NONE'
- row.prop(namedlayer, "name", text="", icon=icon)
-
if use_extra:
use_lock = namedlayer.use_lock
@@ -466,6 +469,10 @@ class SCENE_PT_namedlayer_layers(bpy.types.Panel):
op.layer_idx = layer_idx
op.use_wire = not use_wire
+ if not is_layer_used:
+ if not (layer_idx + 1) % 5:
+ col.separator()
+
if len(scene.objects) == 0:
layout.label(text="No objects in scene")
More information about the Bf-extensions-cvs
mailing list