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:
authorAaron Carlisle <carlisle.b3d@gmail.com>2021-01-06 06:49:20 +0300
committerAaron Carlisle <carlisle.b3d@gmail.com>2021-01-06 06:49:20 +0300
commit5a267dc1bb0bfa2c2a466924b3520cb3f50581bd (patch)
treedf9de2127764dd125ff46e5a696a3dcfb512de94
parent5424b4821d28c4ea42b4f195869de1e1620e6889 (diff)
Update to master
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py185
1 files changed, 107 insertions, 78 deletions
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index 35fd7333cf4..10db09cd1e6 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -387,7 +387,7 @@ class CLIP_PT_tracking_settings(CLIP_PT_tracking_panel, Panel):
bl_category = "Track"
def draw_header_preset(self, _context):
- CLIP_PT_tracking_settings_presets.draw_panel_header(self.layout)
+ CLIP_PT_track_defaults_presets.draw_panel_header(self.layout)
def draw(self, context):
layout = self.layout
@@ -426,30 +426,6 @@ class CLIP_PT_tracking_settings(CLIP_PT_tracking_panel, Panel):
text="Copy from Active Track")
-class CLIP_PT_tracking_settings_extras(CLIP_PT_tracking_panel, Panel):
- bl_label = "Tracking Settings Extra"
- bl_parent_id = "CLIP_PT_tracking_settings"
- bl_space_type = 'CLIP_EDITOR'
- bl_region_type = 'TOOLS'
- bl_options = {'DEFAULT_CLOSED'}
-
- def draw(self, context):
- layout = self.layout
- layout.use_property_split = True
- layout.use_property_decorate = False
-
- sc = context.space_data
- clip = sc.clip
- settings = clip.tracking.settings
-
- col = layout.column()
- col.prop(settings, "default_weight")
- col = layout.column(align=True)
- col.prop(settings, "default_correlation_min")
- col.prop(settings, "default_margin")
- col.prop(settings, "use_default_mask")
-
-
class CLIP_PT_tools_tracking(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
@@ -745,8 +721,18 @@ class CLIP_PT_track(CLIP_PT_tracking_panel, Panel):
row.prop(act_track, "use_alpha_preview",
text="", toggle=True, icon='IMAGE_ALPHA')
- layout.prop(act_track, "weight")
- layout.prop(act_track, "weight_stab")
+ col = layout.column()
+ col.prop(act_track, "weight")
+ col.prop(act_track, "weight_stab")
+
+ col = layout.column()
+ col.prop(act_track, "motion_model")
+ col.prop(act_track, "pattern_match", text="Match")
+
+ col.separator()
+
+ col.prop(act_track, "use_brute")
+ col.prop(act_track, "use_normalization")
if act_track.has_bundle:
label_text = "Average Error: %.2f px" % (act_track.average_error)
@@ -764,95 +750,139 @@ class CLIP_PT_track(CLIP_PT_tracking_panel, Panel):
row.prop(act_track, "color", text="")
-class CLIP_PT_plane_track(CLIP_PT_tracking_panel, Panel):
+class CLIP_PT_track_extras(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_category = "Track"
- bl_label = "Plane Track"
+ bl_label = "Extra Settings"
+ bl_parent_id = 'CLIP_PT_track'
bl_options = {'DEFAULT_CLOSED'}
+ @classmethod
+ def poll(cls, context):
+ clip = context.space_data.clip
+
+ return clip.tracking.tracks.active
+
def draw(self, context):
layout = self.layout
layout.use_property_split = True
- layout.use_property_decorate = False # No animation.
+ layout.use_property_decorate = False
clip = context.space_data.clip
- active_track = clip.tracking.plane_tracks.active
-
- if not active_track:
- layout.active = False
- layout.label(text="No active plane track")
- return
+ active = clip.tracking.tracks.active
+ settings = clip.tracking.settings
- layout.prop(active_track, "name")
- layout.prop(active_track, "use_auto_keying")
- layout.template_ID(
- active_track, "image", new="image.new", open="image.open")
+ col = layout.column(align=True)
+ col.prop(active, "correlation_min")
+ col.prop(active, "margin")
- row = layout.row()
- row.active = active_track.image is not None
- row.prop(active_track, "image_opacity", text="Opacity")
+ col = layout.column()
+ col.prop(active, "use_mask")
+ col.prop(active, "frames_limit")
+ col.prop(settings, "speed")
-class CLIP_PT_track_settings(CLIP_PT_tracking_panel, Panel):
+class CLIP_PT_track_defaults(CLIP_PT_tracking_panel, Panel):
+ bl_label = "Default Track Settings"
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_category = "Track"
- bl_label = "Tracking Settings"
bl_options = {'DEFAULT_CLOSED'}
+ def draw_header_preset(self, _context):
+ CLIP_PT_track_defaults_presets.draw_panel_header(self.layout)
+
def draw(self, context):
layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
- clip = context.space_data.clip
- active = clip.tracking.tracks.active
+ sc = context.space_data
+ clip = sc.clip
+ settings = clip.tracking.settings
- if not active:
- layout.active = False
- layout.label(text="No active track")
- return
+ col = layout.column(align=True)
+ col.prop(settings, "default_pattern_size")
+ col.prop(settings, "default_search_size")
+
+ col.separator()
+
+ col.prop(settings, "default_motion_model")
+ col.prop(settings, "default_pattern_match", text="Match")
+
+ col.prop(settings, "use_default_brute")
+ col.prop(settings, "use_default_normalization")
col = layout.column()
- col.prop(active, "motion_model")
- col.prop(active, "pattern_match", text="Match")
- col.prop(active, "use_brute")
- col.prop(active, "use_normalization")
+ row = col.row(align=True)
+ row.use_property_split = False
+ 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)
+
+ col.separator()
+ col.operator("clip.track_settings_as_default",
+ text="Copy from Active Track")
-class CLIP_PT_track_settings_extras(CLIP_PT_tracking_panel, Panel):
+class CLIP_PT_track_defaults_extra(CLIP_PT_tracking_panel, Panel):
+ bl_label = "Extra Settings"
+ bl_parent_id = "CLIP_PT_track_defaults"
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_category = "Track"
- bl_label = "Tracking Settings Extras"
- bl_parent_id = 'CLIP_PT_track_settings'
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- clip = context.space_data.clip
-
- return clip.tracking.tracks.active
-
def draw(self, context):
layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
- clip = context.space_data.clip
- active = clip.tracking.tracks.active
+ sc = context.space_data
+ clip = sc.clip
settings = clip.tracking.settings
+ col = layout.column()
+ col.prop(settings, "default_weight")
col = layout.column(align=True)
- col.prop(active, "correlation_min")
- col.prop(active, "margin")
+ col.prop(settings, "default_correlation_min")
+ col.prop(settings, "default_margin")
+ col.prop(settings, "use_default_mask")
- col = layout.column()
- col.prop(active, "use_mask")
- col.prop(active, "frames_limit")
- col.prop(settings, "speed")
+
+class CLIP_PT_plane_track(CLIP_PT_tracking_panel, Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'UI'
+ bl_category = "Track"
+ bl_label = "Plane Track"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False # No animation.
+
+ clip = context.space_data.clip
+ active_track = clip.tracking.plane_tracks.active
+
+ if not active_track:
+ layout.active = False
+ layout.label(text="No active plane track")
+ return
+
+ layout.prop(active_track, "name")
+ layout.prop(active_track, "use_auto_keying")
+ layout.template_ID(
+ active_track, "image", new="image.new", open="image.open")
+
+ row = layout.row()
+ row.active = active_track.image is not None
+ row.prop(active_track, "image_opacity", text="Opacity")
class CLIP_PT_tracking_camera(Panel):
@@ -1549,7 +1579,7 @@ class CLIP_PT_track_color_presets(PresetPanel, Panel):
preset_add_operator = "clip.track_color_preset_add"
-class CLIP_PT_tracking_settings_presets(PresetPanel, Panel):
+class CLIP_PT_track_defaults_presets(PresetPanel, Panel):
"""Predefined tracking settings"""
bl_label = "Tracking Presets"
preset_subdir = "tracking_settings"
@@ -1750,10 +1780,11 @@ classes = (
CLIP_MT_tracking_editor_menus,
CLIP_MT_masking_editor_menus,
CLIP_PT_track,
+ CLIP_PT_track_extras,
+ CLIP_PT_track_defaults,
+ CLIP_PT_track_defaults_extra,
CLIP_PT_tools_clip,
CLIP_PT_tools_marker,
- CLIP_PT_tracking_settings,
- CLIP_PT_tracking_settings_extras,
CLIP_PT_tools_tracking,
CLIP_PT_tools_plane_tracking,
CLIP_PT_tools_solve,
@@ -1763,8 +1794,6 @@ classes = (
CLIP_PT_tools_object,
CLIP_PT_objects,
CLIP_PT_plane_track,
- CLIP_PT_track_settings,
- CLIP_PT_track_settings_extras,
CLIP_PT_tracking_camera,
CLIP_PT_tracking_lens,
CLIP_PT_marker,
@@ -1793,7 +1822,7 @@ classes = (
CLIP_MT_tracking_context_menu,
CLIP_PT_camera_presets,
CLIP_PT_track_color_presets,
- CLIP_PT_tracking_settings_presets,
+ CLIP_PT_track_defaults_presets,
CLIP_MT_stabilize_2d_context_menu,
CLIP_MT_stabilize_2d_rotation_context_menu,
CLIP_MT_pivot_pie,