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>2016-08-19 13:21:13 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-08-19 13:21:13 +0300
commit793900d46c4caa695074bbaf9c467c0b0659f5cd (patch)
tree226b5f545b7b50610a13256a5d00de6fd1b08620 /release
parent5f7611a8f14e177b4d2d2391ebc4725eafdf4073 (diff)
2D stabilization: Make interface more compact
Joins some things to the same row and uses aligned columns to get minimum use of vertical space. Probably still some tweaks required, but getting there :)
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py67
1 files changed, 35 insertions, 32 deletions
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index 7dfa0693d20..8d581e84e25 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -916,7 +916,11 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel):
layout.prop(stab, "anchor_frame")
- layout.prop(stab, "use_stabilize_rotation")
+ row = layout.row(align=True)
+ row.prop(stab, "use_stabilize_rotation", text="Rotation", toggle=True)
+ sub = row.row(align=True)
+ sub.active = stab.use_stabilize_rotation
+ sub.prop(stab, "use_stabilize_scale", text="Scale", toggle=True)
box = layout.box()
row = box.row(align=True)
@@ -938,47 +942,46 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel):
sub.menu('CLIP_MT_stabilize_2d_specials', text="",
icon='DOWNARROW_HLT')
- col = box.column()
- col.active = stab.use_stabilize_rotation
- col.label(text="Tracks For Rotation / Scale")
- row = col.row()
- row.template_list("UI_UL_list", "stabilization_rotation_tracks", stab, "rotation_tracks",
- stab, "active_rotation_track_index", rows=2)
+ # Usually we don't hide things from iterface, but here every pixel of
+ # vertical space is precious.
+ if stab.use_stabilize_rotation:
+ box.label(text="Tracks For Rotation / Scale")
+ row = box.row()
+ row.template_list("UI_UL_list", "stabilization_rotation_tracks",
+ stab, "rotation_tracks",
+ stab, "active_rotation_track_index", rows=2)
- sub = row.column(align=True)
+ sub = row.column(align=True)
- sub.operator("clip.stabilize_2d_rotation_add", icon='ZOOMIN', text="")
- sub.operator("clip.stabilize_2d_rotation_remove", icon='ZOOMOUT', text="")
+ sub.operator("clip.stabilize_2d_rotation_add", icon='ZOOMIN', text="")
+ sub.operator("clip.stabilize_2d_rotation_remove", icon='ZOOMOUT', text="")
- sub.menu('CLIP_MT_stabilize_2d_rotation_specials', text="",
- icon='DOWNARROW_HLT')
+ sub.menu('CLIP_MT_stabilize_2d_rotation_specials', text="",
+ icon='DOWNARROW_HLT')
row = layout.row()
row.active = stab.use_stabilize_rotation
- row.prop(stab, "use_stabilize_scale")
- if stab.use_autoscale:
- row = layout.row(align=True)
- row.prop(stab, "use_autoscale")
- row.prop(stab, "scale_max", text="Max")
- else:
- layout.prop(stab, "use_autoscale")
+ row.prop(stab, "use_autoscale")
+ sub = row.row()
+ sub.active = stab.use_autoscale
+ sub.prop(stab, "scale_max", text="Max")
- layout.separator()
- layout.label(text="Expected Position")
- layout.prop(stab, "target_position", text="")
- layout.prop(stab, "target_rotation")
+ col = layout.column(align=True)
+ row = col.row(align=True)
+ # Hrm, how to make it more obvious label?
+ row.prop(stab, "target_position", text="")
+ col.prop(stab, "target_rotation")
if stab.use_autoscale:
- layout.label(text="Auto Scale Factor: %5.3f" % (1.0 / stab.target_zoom))
+ col.label(text="Auto Scale Factor: %5.3f" % (1.0 / stab.target_zoom))
else:
- layout.prop(stab, "target_zoom")
+ col.prop(stab, "target_zoom")
- layout.separator()
- layout.prop(stab, "influence_location")
-
- col = layout.column()
- col.active = stab.use_stabilize_rotation
- col.prop(stab, "influence_rotation")
- col.prop(stab, "influence_scale")
+ col = layout.column(align=True)
+ col.prop(stab, "influence_location")
+ sub = col.column(align=True)
+ sub.active = stab.use_stabilize_rotation
+ sub.prop(stab, "influence_rotation")
+ sub.prop(stab, "influence_scale")
layout.prop(stab, "filter_type")