[Bf-blender-cvs] [8614ed6] master: Add Tabs for Movie Clip Editor
Sergey Sharybin
noreply at git.blender.org
Fri Feb 7 15:28:45 CET 2014
Commit: 8614ed64eddbf62d8e1a1346525398ec305896bd
Author: Sergey Sharybin
Date: Fri Feb 7 20:26:43 2014 +0600
https://developer.blender.org/rB8614ed64eddbf62d8e1a1346525398ec305896bd
Add Tabs for Movie Clip Editor
Based on the patch from Sebastian Koenig, discussed with Jonathan Williamson
https://developer.blender.org/T38172
Also removed redundant modes from clip editor.
Reviewers: brecht, carter2422
Reviewed By: carter2422
CC: sebastian_k, carter2422
Differential Revision: https://developer.blender.org/D293
===================================================================
M release/scripts/startup/bl_ui/properties_mask_common.py
M release/scripts/startup/bl_ui/space_clip.py
M source/blender/blenloader/intern/versioning_260.c
M source/blender/blenloader/intern/versioning_defaults.c
M source/blender/editors/space_clip/clip_draw.c
M source/blender/editors/space_clip/clip_editor.c
M source/blender/editors/space_clip/space_clip.c
M source/blender/makesdna/DNA_space_types.h
M source/blender/makesdna/DNA_tracking_types.h
M source/blender/makesrna/intern/rna_space.c
M source/blender/makesrna/intern/rna_tracking.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_mask_common.py b/release/scripts/startup/bl_ui/properties_mask_common.py
index 5e64129..0efff3b 100644
--- a/release/scripts/startup/bl_ui/properties_mask_common.py
+++ b/release/scripts/startup/bl_ui/properties_mask_common.py
@@ -216,21 +216,24 @@ class MASK_PT_display():
layout = self.layout
space_data = context.space_data
-
- layout.prop(space_data, "mask_draw_type", text="")
- layout.prop(space_data, "show_mask_smooth")
-
- layout.prop(space_data, "show_mask_overlay")
- row = layout.row()
+ col = layout.column(align=True)
+ row = col.row(align=True)
+ row.prop(space_data, "show_mask_smooth", text="Smooth")
+ row.prop(space_data, "mask_draw_type", text="")
+ col = layout.column(align=True)
+ row = col.row(align=True)
+ row.prop(space_data, "show_mask_overlay", text="Overlay")
row.active = space_data.show_mask_overlay
row.prop(space_data, "mask_overlay_mode", text="")
-class MASK_PT_tools():
+class MASK_PT_transforms():
# subclasses must define...
#~ bl_space_type = 'CLIP_EDITOR'
#~ bl_region_type = 'TOOLS'
- bl_label = "Mask Tools"
+ bl_label = "Transforms"
+ bl_category = "Mask"
+ bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
@@ -247,24 +250,63 @@ class MASK_PT_tools():
col.operator("transform.resize", text="Scale")
col.operator("transform.transform", text="Scale Feather").mode = 'MASK_SHRINKFATTEN'
+
+class MASK_PT_tools():
+ # subclasses must define...
+ #~ bl_space_type = 'CLIP_EDITOR'
+ #~ bl_region_type = 'TOOLS'
+ bl_label = "Mask Tools"
+ bl_category = "Mask"
+
+ @classmethod
+ def poll(cls, context):
+ space_data = context.space_data
+ return space_data.mask and space_data.mode == 'MASK'
+
+ def draw(self, context):
+ layout = self.layout
+
col = layout.column(align=True)
col.label(text="Spline:")
col.operator("mask.delete")
col.operator("mask.cyclic_toggle")
col.operator("mask.switch_direction")
col.operator("mask.handle_type_set")
+ col.operator("mask.feather_weight_clear")
col = layout.column(align=True)
col.label(text="Parenting:")
- col.operator("mask.parent_set")
- col.operator("mask.parent_clear")
+ row = col.row(align=True)
+ row.operator("mask.parent_set", text="Parent")
+ row.operator("mask.parent_clear", text="Clear")
col = layout.column(align=True)
col.label(text="Animation:")
- col.operator("mask.shape_key_clear")
- col.operator("mask.shape_key_insert")
- col.operator("mask.shape_key_feather_reset")
- col.operator("mask.shape_key_rekey")
+ row = col.row(align=True)
+ row.operator("mask.shape_key_clear", text="Insert Key")
+ row.operator("mask.shape_key_insert", text="Clear Key")
+ col.operator("mask.shape_key_feather_reset", text="Reset Feather Animation")
+ col.operator("mask.shape_key_rekey", text="Re-Key Shape Points")
+
+
+class MASK_PT_add():
+ # subclasses must define...
+ #~ bl_space_type = 'CLIP_EDITOR'
+ #~ bl_region_type = 'TOOLS'
+ bl_label = "Add"
+ bl_category = "Mask"
+
+ @classmethod
+ def poll(cls, context):
+ space_data = context.space_data
+ return space_data.mode == 'MASK'
+
+ def draw(self, context):
+ layout = self.layout
+
+ col = layout.column(align=True)
+ col.operator("mask.primitive_circle_add", icon="MESH_CIRCLE")
+ col.operator("mask.primitive_square_add", icon="MESH_PLANE")
class MASK_MT_mask(Menu):
@@ -286,10 +328,6 @@ class MASK_MT_mask(Menu):
layout.operator("mask.parent_set")
layout.separator()
- layout.operator("mask.copy_splines")
- layout.operator("mask.paste_splines")
-
- layout.separator()
layout.menu("MASK_MT_visibility")
layout.menu("MASK_MT_transform")
layout.menu("MASK_MT_animation")
@@ -349,6 +387,7 @@ class MASK_MT_select(Menu):
layout.operator("mask.select_all").action = 'TOGGLE'
layout.operator("mask.select_all", text="Inverse").action = 'INVERT'
+ layout.operator("mask.select_linked", text="Select Linked")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index ee6ddc8..8ffd734 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -63,7 +63,7 @@ class CLIP_HT_header(Header):
if sc.view == 'CLIP':
layout.prop(sc, "mode", text="")
layout.prop(sc, "view", text="", expand=True)
- layout.prop(sc, "pivot_point", icon_only=True)
+ layout.prop(sc, "pivot_point", text="", icon_only=True)
r = active_object.reconstruction
@@ -127,14 +127,14 @@ class CLIP_HT_header(Header):
row = layout.row()
row.template_ID(sc, "mask", new="mask.new")
- layout.prop(sc, "pivot_point", icon_only=True)
+ layout.prop(sc, "pivot_point", text="", icon_only=True)
row = layout.row(align=True)
row.prop(toolsettings, "use_proportional_edit_mask",
- icon_only=True)
+ text="", icon_only=True)
if toolsettings.use_proportional_edit_mask:
row.prop(toolsettings, "proportional_edit_falloff",
- icon_only=True)
+ text="", icon_only=True)
def draw(self, context):
layout = self.layout
@@ -226,10 +226,34 @@ class CLIP_PT_reconstruction_panel:
return clip and sc.mode == 'RECONSTRUCTION' and sc.view == 'CLIP'
+class CLIP_PT_tools_clip(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'TOOLS'
+ bl_label = "Clip"
+ bl_translation_context = bpy.app.translations.contexts.id_movieclip
+ bl_category = "Track"
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ return clip and sc.view == 'CLIP' and sc.mode != 'MASK'
+
+ def draw(self, context):
+ layout = self.layout
+ col = layout.column(align=True)
+ row = col.row(align=True)
+ row.operator("clip.prefetch", text="Prefetch")
+ row.operator("clip.reload", text="Reload")
+ col.operator("clip.set_scene_frames")
+
+
class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Marker"
+ bl_category = "Track"
def draw(self, context):
layout = self.layout
@@ -239,71 +263,89 @@ class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel):
settings = clip.tracking.settings
col = layout.column(align=True)
- col.operator("clip.add_marker_at_click", text="Add Marker")
+ row = col.row(align=True)
+ row.operator("clip.add_marker_at_click", text="Add")
+ row.operator("clip.delete_track", text="Delete")
col.operator("clip.detect_features")
- col.operator("clip.delete_track")
- box = layout.box()
- row = box.row(align=True)
- row.prop(settings, "show_default_expanded", text="", emboss=False)
- row.label(text="Tracking Settings")
- if settings.show_default_expanded:
- col = box.column()
- row = col.row(align=True)
- label = CLIP_MT_tracking_settings_presets.bl_label
- row.menu('CLIP_MT_tracking_settings_presets', text=label)
- row.operator("clip.tracking_settings_preset_add",
- text="", icon='ZOOMIN')
- row.operator("clip.tracking_settings_preset_add",
- text="", icon='ZOOMOUT').remove_active = True
+class CLIP_PT_tracking_settings(CLIP_PT_tracking_panel, Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'TOOLS'
+ bl_label = "Tracking Settings"
+ bl_category = "Track"
- col.separator()
+ def draw(self, context):
- row = col.row(align=True)
- row.prop(settings, "use_default_red_channel",
- text="R", toggle=True)
- row.prop(settings, "use_default_green_channel",
- text="G", toggle=True)
- row.prop(settings, "use_default_blue_channel",
- text="B", toggle=True)
+ sc = context.space_data
+ clip = sc.clip
+ settings = clip.tracking.settings
+ layout = self.layout
+ col = layout.column()
+
+ row = col.row(align=True)
+ label = CLIP_MT_tracking_settings_presets.bl_label
+ row.menu('CLIP_MT_tracking_settings_presets', text=label)
+ row.operator("clip.tracking_settings_preset_add",
+ text="", icon='ZOOMIN')
+ row.operator("clip.tracking_settings_preset_add",
+ text="", icon='ZOOMOUT').remove_active = True
- col.separator()
+ row = col.row(align=True)
+ row.prop(settings, "use_default_red_channel",
+ text="R", toggle=True)
+ row.prop(settings, "use_default_green_channel",
+ text="G", toggle=True)
+ row.prop(settings, "use_default_blue_channel",
+ text="B", toggle=True)
- sub = col.column(align=True)
- sub.prop(settings, "default_pattern_size")
- sub.prop(settings, "default_search_size")
+ col.separator()
- col.label(text="Tracker:")
- col.prop(settings, "default_motion_model")
- col.prop(settings, "use_default_brute")
- col.prop(settings, "use_default_normalization")
- col.prop(settings, "use_default_mask")
- col.prop(settings, "default_correlation_min")
+ sub = col.column(align=True)
+ sub.prop(settings, "default_pattern_size")
+ sub.prop(settings, "default_search_size")
-
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list