Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-07-11 14:37:38 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-07-11 14:37:38 +0400
commit6e6dd576a8a0ad902cc152bcac558659c27671e0 (patch)
tree19c8a1225caccbc7f6594555c6c972b737646048 /release
parent35b6f41f4651992bc6a1726fc3d123f7bc54d32d (diff)
Operator to move mask layers up and down in the list
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py24
1 files changed, 17 insertions, 7 deletions
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index 374588939e2..a590a6cea94 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -677,26 +677,36 @@ class CLIP_PT_mask_layers(Panel):
sc = context.space_data
mask = sc.mask
+ active_layer = mask.layers.active
+
+ rows = 5 if active_layer else 2
row = layout.row()
row.template_list(mask, "layers",
- mask, "active_layer_index", rows=3)
+ mask, "active_layer_index", rows=rows)
sub = row.column(align=True)
sub.operator("mask.layer_new", icon='ZOOMIN', text="")
sub.operator("mask.layer_remove", icon='ZOOMOUT', text="")
- active = mask.layers.active
- if active:
- layout.prop(active, "name")
+ if active_layer:
+ sub.separator()
+
+ props = sub.operator("mask.layer_move", icon='TRIA_UP', text="")
+ props.direction = 'UP'
+
+ props = sub.operator("mask.layer_move", icon='TRIA_DOWN', text="")
+ props.direction = 'DOWN'
+
+ layout.prop(active_layer, "name")
# blending
row = layout.row(align=True)
- row.prop(active, "alpha")
- row.prop(active, "invert", text="", icon='IMAGE_ALPHA')
+ row.prop(active_layer, "alpha")
+ row.prop(active_layer, "invert", text="", icon='IMAGE_ALPHA')
- layout.prop(active, "blend")
+ layout.prop(active_layer, "blend")
class CLIP_PT_active_mask_spline(Panel):