1
1

Compare commits

...

11 Commits

Author SHA1 Message Date
986be2c892 Merge branch 'clip_ui_update' into vfx-clip-ui-update 2021-01-05 22:57:53 -05:00
68d948a4f9 Merge branch 'arcpatch-D9806' into vfx-clip-ui-update 2021-01-05 22:56:20 -05:00
Aaron Carlisle
04549c64ac UI: Tracking: Move Object Scale to objects panel
This moves the scale property from the rather hidden toolbar panel to the sidebar panel.
This also moves the two set scale operators to the same location.
This change is needed to migrate the current toolbar to a new active tool based toolbar

This revision depends on D9805

Differential Revision: https://developer.blender.org/D9806
2021-01-05 22:54:10 -05:00
Aaron Carlisle
41be1d2d8c UI: Tracking: Remove operator options exposed as props
In the movie clip editor, some options of operators are exposed as properties and are shown in the toolbar.
Other areas of Blender do not do this making the movie clip editor break paradigm.
This change is needed to migrate the current toolbar to a new active tool based toolbar

Differential Revision: https://developer.blender.org/D9805
2021-01-05 22:54:10 -05:00
d1377f7ab1 Merge branch 'arcpatch-D9807' into vfx-clip-ui-update 2021-01-05 22:52:24 -05:00
5a267dc1bb Update to master 2021-01-05 22:49:20 -05:00
Aaron Carlisle
d457da7fa6 UI: Tracking: Solve panel to Sidebar
This change moves the Solve panel to Sidebar
I was thinking it might be a good idea to split up the properties,
keyframe settings to Objects, Tripod and intrinsics to camera.
However because they are interlaced I left them together.

This change is needed to migrate the current toolbar to a new active tool based toolbar

Differential Revision: https://developer.blender.org/D9808
2021-01-05 19:27:07 -05:00
ad0c747cc9 Merge branch 'master' into clip_prop_remove 2021-01-05 18:55:04 -05:00
41ff87e8dd Remove missed prop 2020-12-09 22:33:36 -05:00
6b4cf810ac UI: Tracking: Remove operator options exposed as props
In the movie clip editor, some options of operators are exposed as
properties and are shown in the toolbar.
Other areas of Blender do not do this making the movie clip editor break
paradigm.
This change is needed to migrate the current toolbar to a new active
tool based toolbar

Differential Revision: https://developer.blender.org/D9805
2020-12-09 22:05:41 -05:00
0be22cfcaa UI: Update Clip Tracking menus
- Add operators that previously could only be found in panels
- Re order menus to match other menus
- Organize Code

Differential Revision: https://developer.blender.org/D9781
2020-12-08 01:27:03 -05:00
7 changed files with 332 additions and 375 deletions

View File

@@ -303,11 +303,11 @@ class CLIP_MT_masking_editor_menus(Menu):
if clip:
layout.menu("MASK_MT_select")
layout.menu("CLIP_MT_clip") # XXX - remove?
layout.menu("CLIP_MT_clip")
layout.menu("MASK_MT_add")
layout.menu("MASK_MT_mask")
else:
layout.menu("CLIP_MT_clip") # XXX - remove?
layout.menu("CLIP_MT_clip")
class CLIP_PT_clip_view_panel:
@@ -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'
@@ -530,36 +506,9 @@ class CLIP_PT_tools_solve(CLIP_PT_tracking_panel, Panel):
clip = context.space_data.clip
tracking = clip.tracking
settings = tracking.settings
tracking_object = tracking.objects.active
camera = clip.tracking.camera
col = layout.column()
col.prop(settings, "use_tripod_solver", text="Tripod")
col = layout.column()
col.active = not settings.use_tripod_solver
col.prop(settings, "use_keyframe_selection", text="Keyframe")
col = layout.column(align=True)
col.active = (not settings.use_tripod_solver and
not settings.use_keyframe_selection)
col.prop(tracking_object, "keyframe_a")
col.prop(tracking_object, "keyframe_b")
col = layout.column(heading="Refine", align=True)
col.active = tracking_object.is_camera
col.prop(settings, "refine_intrinsics_focal_length", text="Focal Length")
col.prop(settings, "refine_intrinsics_principal_point", text="Optical Center")
col.prop(settings, "refine_intrinsics_radial_distortion", text="Radial Distortion")
row = col.row()
row.active = (camera.distortion_model == 'BROWN')
row.prop(settings, "refine_intrinsics_tangential_distortion", text="Tangential Distortion")
col = layout.column(align=True)
col.scale_y = 2.0
col.operator("clip.solve_camera",
text="Solve Camera Motion" if tracking_object.is_camera
else "Solve Object Motion")
@@ -577,14 +526,7 @@ class CLIP_PT_tools_cleanup(CLIP_PT_tracking_panel, Panel):
layout.use_property_split = True
layout.use_property_decorate = False
clip = context.space_data.clip
settings = clip.tracking.settings
col = layout.column()
col.prop(settings, "clean_frames", text="Frames")
col.prop(settings, "clean_error", text="Error")
col.prop(settings, "clean_action", text="Type")
col.separator()
col.operator("clip.clean_tracks")
col.operator("clip.filter_tracks")
@@ -614,8 +556,8 @@ class CLIP_PT_tools_orientation(CLIP_PT_tracking_panel, Panel):
layout.use_property_split = True
layout.use_property_decorate = False
sc = context.space_data
settings = sc.clip.tracking.settings
clip = context.space_data.clip
tracking_object = clip.tracking.objects.active
col = layout.column(align=True)
@@ -634,47 +576,12 @@ class CLIP_PT_tools_orientation(CLIP_PT_tracking_panel, Panel):
col = layout.column()
row = col.row(align=True)
row.operator("clip.set_scale")
if tracking_object.is_camera:
row.operator("clip.set_scale")
else:
row.operator("clip.set_solution_scale", text="Set Scale")
row.operator("clip.apply_solution_scale", text="Apply Scale")
col.prop(settings, "distance")
class CLIP_PT_tools_object(CLIP_PT_reconstruction_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Object"
bl_category = "Solve"
@classmethod
def poll(cls, context):
sc = context.space_data
if CLIP_PT_reconstruction_panel.poll(context) and sc.mode == 'TRACKING':
clip = sc.clip
tracking_object = clip.tracking.objects.active
return not tracking_object.is_camera
return False
def draw(self, context):
layout = self.layout
sc = context.space_data
clip = sc.clip
tracking_object = clip.tracking.objects.active
settings = sc.clip.tracking.settings
col = layout.column()
col.prop(tracking_object, "scale")
col.separator()
col.operator("clip.set_solution_scale", text="Set Scale")
col.prop(settings, "object_distance")
class CLIP_PT_objects(CLIP_PT_clip_view_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
@@ -685,9 +592,12 @@ class CLIP_PT_objects(CLIP_PT_clip_view_panel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
sc = context.space_data
tracking = sc.clip.tracking
tracking_object = sc.clip.tracking.objects.active
row = layout.row()
row.template_list("CLIP_UL_tracking_objects", "", tracking, "objects",
@@ -698,6 +608,10 @@ class CLIP_PT_objects(CLIP_PT_clip_view_panel, Panel):
sub.operator("clip.tracking_object_new", icon='ADD', text="")
sub.operator("clip.tracking_object_remove", icon='REMOVE', text="")
if not tracking_object.is_camera:
col = layout.row()
row.prop(tracking_object, "scale")
class CLIP_PT_track(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
@@ -745,8 +659,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,6 +688,111 @@ class CLIP_PT_track(CLIP_PT_tracking_panel, Panel):
row.prop(act_track, "color", text="")
class CLIP_PT_track_extras(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_category = "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
clip = context.space_data.clip
active = clip.tracking.tracks.active
settings = clip.tracking.settings
col = layout.column(align=True)
col.prop(active, "correlation_min")
col.prop(active, "margin")
col = layout.column()
col.prop(active, "use_mask")
col.prop(active, "frames_limit")
col.prop(settings, "speed")
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_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
sc = context.space_data
clip = sc.clip
settings = clip.tracking.settings
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()
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_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_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_plane_track(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
@@ -794,67 +823,6 @@ class CLIP_PT_plane_track(CLIP_PT_tracking_panel, Panel):
row.prop(active_track, "image_opacity", text="Opacity")
class CLIP_PT_track_settings(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_category = "Track"
bl_label = "Tracking Settings"
bl_options = {'DEFAULT_CLOSED'}
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
if not active:
layout.active = False
layout.label(text="No active track")
return
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")
class CLIP_PT_track_settings_extras(CLIP_PT_tracking_panel, Panel):
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
settings = clip.tracking.settings
col = layout.column(align=True)
col.prop(active, "correlation_min")
col.prop(active, "margin")
col = layout.column()
col.prop(active, "use_mask")
col.prop(active, "frames_limit")
col.prop(settings, "speed")
class CLIP_PT_tracking_camera(Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
@@ -951,6 +919,48 @@ class CLIP_PT_tracking_lens(Panel):
col.prop(camera, "brown_p2")
class CLIP_PT_tracking_solve(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_category = "Track"
bl_label = "Solve"
bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
clip = context.space_data.clip
tracking = clip.tracking
settings = tracking.settings
tracking_object = tracking.objects.active
camera = clip.tracking.camera
col = layout.column()
col.prop(settings, "use_tripod_solver", text="Tripod")
col = layout.column()
col.active = not settings.use_tripod_solver
col.prop(settings, "use_keyframe_selection", text="Keyframe")
col = layout.column(align=True)
col.active = (not settings.use_tripod_solver and
not settings.use_keyframe_selection)
col.prop(tracking_object, "keyframe_a")
col.prop(tracking_object, "keyframe_b")
col = layout.column(heading="Refine", align=True)
col.active = tracking_object.is_camera
col.prop(settings, "refine_intrinsics_focal_length", text="Focal Length")
col.prop(settings, "refine_intrinsics_principal_point", text="Optical Center")
col.prop(settings, "refine_intrinsics_radial_distortion", text="Radial Distortion")
row = col.row()
row.active = (camera.distortion_model == 'BROWN')
row.prop(settings, "refine_intrinsics_tangential_distortion", text="Tangential Distortion")
class CLIP_PT_marker(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
@@ -1330,10 +1340,17 @@ class CLIP_MT_clip(Menu):
layout.operator("clip.open")
if clip:
layout.operator("clip.set_scene_frames")
layout.operator("clip.set_center_principal")
layout.operator("clip.prefetch")
layout.operator("clip.reload")
layout.menu("CLIP_MT_proxy")
layout.separator()
layout.operator("clip.set_viewport_background")
layout.operator("clip.setup_tracking_scene")
class CLIP_MT_proxy(Menu):
bl_label = "Proxy"
@@ -1345,66 +1362,156 @@ class CLIP_MT_proxy(Menu):
layout.operator("clip.delete_proxy")
class CLIP_MT_track_transform(Menu):
bl_label = "Transform"
def draw(self, _context):
layout = self.layout
layout.operator("transform.translate")
layout.operator("transform.rotate")
layout.operator("transform.resize")
class CLIP_MT_track_motion(Menu):
bl_label = "Track Motion"
def draw(self, _context):
layout = self.layout
props = layout.operator("clip.track_markers", text="Backwards")
props.backwards = True
props.sequence = True
props = layout.operator("clip.track_markers", text="Frame Backwards")
props.backwards = True
props.sequence = False
props = layout.operator("clip.track_markers", text="Forwards")
props.backwards = False
props.sequence = True
props = layout.operator("clip.track_markers", text="Frame Forwards")
props.backwards = False
props.sequence = False
class CLIP_MT_track_clear(Menu):
bl_label = "Clear"
def draw(self, _context):
layout = self.layout
props = layout.operator("clip.clear_track_path", text="Before")
props.clear_active = False
props.action = 'UPTO'
props = layout.operator("clip.clear_track_path", text="After")
props.clear_active = False
props.action = 'REMAINED'
props = layout.operator("clip.clear_track_path", text="Track Path")
props.clear_active = False
props.action = 'ALL'
layout.separator()
layout.operator("clip.clear_solution", text="Solution")
class CLIP_MT_track_refine(Menu):
bl_label = "Refine"
def draw(self, _context):
layout = self.layout
props = layout.operator("clip.refine_markers", text="Backwards")
props.backwards = True
props = layout.operator("clip.refine_markers", text="Fowards")
props.backwards = False
class CLIP_MT_track_animation(Menu):
bl_label = "Animation"
def draw(self, _context):
layout = self.layout
layout.operator("clip.keyframe_insert")
layout.operator("clip.keyframe_delete")
class CLIP_MT_track_visibility(Menu):
bl_label = "Show/Hide"
def draw(self, _context):
layout = self.layout
layout.operator("clip.hide_tracks_clear")
layout.operator("clip.hide_tracks", text="Hide Selected").unselected = False
layout.operator("clip.hide_tracks", text="Hide Unselected").unselected = True
class CLIP_MT_track_cleanup(Menu):
bl_label = "Clean Up"
def draw(self, _context):
layout = self.layout
layout.operator("clip.clean_tracks")
layout.operator("clip.filter_tracks")
class CLIP_MT_track(Menu):
bl_label = "Track"
def draw(self, _context):
layout = self.layout
layout.operator("clip.clear_solution")
layout.operator("clip.solve_camera")
layout.menu("CLIP_MT_track_transform")
layout.menu("CLIP_MT_track_motion")
layout.menu("CLIP_MT_track_clear")
layout.menu("CLIP_MT_track_refine")
layout.separator()
props = layout.operator("clip.clear_track_path", text="Clear After")
props.clear_active = False
props.action = 'REMAINED'
props = layout.operator("clip.clear_track_path", text="Clear Before")
props.clear_active = False
props.action = 'UPTO'
props = layout.operator("clip.clear_track_path", text="Clear Track Path")
props.clear_active = False
props.action = 'ALL'
layout.operator("clip.add_marker_move", text="Add Marker")
layout.operator("clip.detect_features")
layout.operator("clip.create_plane_track")
layout.separator()
layout.operator("clip.solve_camera", text="Solve Camera Motion")
layout.separator()
layout.operator("clip.join_tracks")
layout.separator()
layout.operator("clip.clean_tracks")
layout.operator("clip.copy_tracks", icon='COPYDOWN')
layout.operator("clip.paste_tracks", icon='PASTEDOWN')
layout.separator()
layout.operator("clip.copy_tracks")
layout.operator("clip.paste_tracks")
layout.operator("clip.track_settings_as_default", text="Copy Settings to Defaults")
layout.operator("clip.track_settings_to_track", text="Apply Default Settings")
layout.separator()
props = layout.operator("clip.track_markers", text="Track Frame Backwards")
props.backwards = True
props.sequence = False
props = layout.operator("clip.track_markers", text="Track Backwards")
props.backwards = True
props.sequence = True
props = layout.operator("clip.track_markers", text="Track Forwards")
props.backwards = False
props.sequence = True
props = layout.operator("clip.track_markers", text="Track Frame Forwards")
props.backwards = False
props.sequence = False
layout.menu("CLIP_MT_track_animation")
layout.separator()
layout.menu("CLIP_MT_track_visibility")
layout.menu("CLIP_MT_track_cleanup")
layout.separator()
layout.operator("clip.delete_track")
layout.operator("clip.delete_marker")
layout.separator()
layout.operator("clip.add_marker_move")
layout.separator()
layout.menu("CLIP_MT_track_visibility")
layout.menu("CLIP_MT_track_transform")
class CLIP_MT_reconstruction(Menu):
bl_label = "Reconstruction"
@@ -1420,6 +1527,7 @@ class CLIP_MT_reconstruction(Menu):
layout.operator("clip.set_axis", text="Set Y Axis").axis = 'Y'
layout.operator("clip.set_scale")
layout.operator("clip.apply_solution_scale")
layout.separator()
@@ -1427,25 +1535,13 @@ class CLIP_MT_reconstruction(Menu):
layout.operator("clip.bundles_to_mesh")
class CLIP_MT_track_visibility(Menu):
bl_label = "Show/Hide"
class CLIP_MT_select_grouped(Menu):
bl_label = "Select Grouped"
def draw(self, _context):
layout = self.layout
layout.operator("clip.hide_tracks_clear")
layout.operator("clip.hide_tracks", text="Hide Selected").unselected = False
layout.operator("clip.hide_tracks", text="Hide Unselected").unselected = True
class CLIP_MT_track_transform(Menu):
bl_label = "Transform"
def draw(self, _context):
layout = self.layout
layout.operator("transform.translate")
layout.operator("transform.resize")
layout.operator_enum("clip.select_grouped", "group")
class CLIP_MT_select(Menu):
@@ -1459,21 +1555,15 @@ class CLIP_MT_select(Menu):
layout.separator()
layout.operator("clip.select_all"
).action = 'TOGGLE'
layout.operator("clip.select_all",
text="Inverse").action = 'INVERT'
layout.operator("clip.select_all").action = 'TOGGLE'
layout.operator("clip.select_all", text="Inverse").action = 'INVERT'
layout.menu("CLIP_MT_select_grouped")
layout.separator()
class CLIP_MT_select_grouped(Menu):
bl_label = "Select Grouped"
def draw(self, _context):
layout = self.layout
layout.operator_enum("clip.select_grouped", "group")
layout.operator("clip.stabilize_2d_select")
layout.operator("clip.stabilize_2d_rotation_select")
class CLIP_MT_tracking_context_menu(Menu):
@@ -1549,7 +1639,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"
@@ -1746,27 +1836,25 @@ classes = (
CLIP_PT_display,
CLIP_PT_clip_display,
CLIP_PT_marker_display,
CLIP_MT_track,
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,
CLIP_PT_tools_cleanup,
CLIP_PT_tools_geometry,
CLIP_PT_tools_orientation,
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_tracking_solve,
CLIP_PT_marker,
CLIP_PT_proxy,
CLIP_PT_footage,
@@ -1786,14 +1874,20 @@ classes = (
CLIP_MT_clip,
CLIP_MT_proxy,
CLIP_MT_reconstruction,
CLIP_MT_track_visibility,
CLIP_MT_track,
CLIP_MT_track_transform,
CLIP_MT_track_motion,
CLIP_MT_track_clear,
CLIP_MT_track_refine,
CLIP_MT_track_animation,
CLIP_MT_track_visibility,
CLIP_MT_track_cleanup,
CLIP_MT_select,
CLIP_MT_select_grouped,
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,

View File

@@ -336,8 +336,6 @@ void BKE_tracking_settings_init(MovieTracking *tracking)
tracking->settings.default_search_size = 71;
tracking->settings.default_algorithm_flag |= TRACK_ALGORITHM_FLAG_USE_BRUTE;
tracking->settings.default_weight = 1.0f;
tracking->settings.dist = 1;
tracking->settings.object_distance = 1;
tracking->settings.refine_camera_intrinsics = REFINE_NO_INTRINSICS;
tracking->stabilization.scaleinf = 1.0f;

View File

@@ -948,10 +948,6 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
clip->proxy.build_tc_flag |= IMB_TC_RECORD_RUN_NO_GAPS;
if (!tracking->settings.object_distance) {
tracking->settings.object_distance = 1.0f;
}
if (BLI_listbase_is_empty(&tracking->objects)) {
BKE_tracking_object_add(tracking, "Camera");
}

View File

@@ -1818,26 +1818,6 @@ static int clean_tracks_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
static int clean_tracks_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
if (!RNA_struct_property_is_set(op->ptr, "frames")) {
RNA_int_set(op->ptr, "frames", clip->tracking.settings.clean_frames);
}
if (!RNA_struct_property_is_set(op->ptr, "error")) {
RNA_float_set(op->ptr, "error", clip->tracking.settings.clean_error);
}
if (!RNA_struct_property_is_set(op->ptr, "action")) {
RNA_enum_set(op->ptr, "action", clip->tracking.settings.clean_action);
}
return clean_tracks_exec(C, op);
}
void CLIP_OT_clean_tracks(wmOperatorType *ot)
{
static const EnumPropertyItem actions_items[] = {
@@ -1858,7 +1838,6 @@ void CLIP_OT_clean_tracks(wmOperatorType *ot)
/* api callbacks */
ot->exec = clean_tracks_exec;
ot->invoke = clean_tracks_invoke;
ot->poll = ED_space_clip_tracking_poll;
/* flags */
@@ -1881,7 +1860,7 @@ void CLIP_OT_clean_tracks(wmOperatorType *ot)
0.0f,
FLT_MAX,
"Reprojection Error",
"Effect on tracks which have got larger reprojection error",
"Effect on tracks which have a larger re-projection error",
0.0f,
100.0f);
RNA_def_enum(ot->srna, "action", actions_items, 0, "Action", "Cleanup action to execute");

View File

@@ -700,18 +700,6 @@ static int set_scale_exec(bContext *C, wmOperator *op)
return do_set_scale(C, op, false, false);
}
static int set_scale_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
if (!RNA_struct_property_is_set(op->ptr, "distance")) {
RNA_float_set(op->ptr, "distance", clip->tracking.settings.dist);
}
return set_scale_exec(C, op);
}
void CLIP_OT_set_scale(wmOperatorType *ot)
{
/* identifiers */
@@ -721,7 +709,6 @@ void CLIP_OT_set_scale(wmOperatorType *ot)
/* api callbacks */
ot->exec = set_scale_exec;
ot->invoke = set_scale_invoke;
ot->poll = set_orientation_poll;
/* flags */
@@ -760,18 +747,6 @@ static int set_solution_scale_exec(bContext *C, wmOperator *op)
return do_set_scale(C, op, true, false);
}
static int set_solution_scale_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
if (!RNA_struct_property_is_set(op->ptr, "distance")) {
RNA_float_set(op->ptr, "distance", clip->tracking.settings.object_distance);
}
return set_solution_scale_exec(C, op);
}
void CLIP_OT_set_solution_scale(wmOperatorType *ot)
{
/* identifiers */
@@ -783,7 +758,6 @@ void CLIP_OT_set_solution_scale(wmOperatorType *ot)
/* api callbacks */
ot->exec = set_solution_scale_exec;
ot->invoke = set_solution_scale_invoke;
ot->poll = set_solution_scale_poll;
/* flags */
@@ -822,16 +796,6 @@ static int apply_solution_scale_exec(bContext *C, wmOperator *op)
return do_set_scale(C, op, false, true);
}
static int apply_solution_scale_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
if (!RNA_struct_property_is_set(op->ptr, "distance")) {
RNA_float_set(op->ptr, "distance", clip->tracking.settings.dist);
}
return apply_solution_scale_exec(C, op);
}
void CLIP_OT_apply_solution_scale(wmOperatorType *ot)
{
/* identifiers */
@@ -843,7 +807,6 @@ void CLIP_OT_apply_solution_scale(wmOperatorType *ot)
/* api callbacks */
ot->exec = apply_solution_scale_exec;
ot->invoke = apply_solution_scale_invoke;
ot->poll = apply_solution_scale_poll;
/* flags */

View File

@@ -295,22 +295,7 @@ typedef struct MovieTrackingSettings {
/* which camera intrinsics to refine. uses on the REFINE_* flags */
int refine_camera_intrinsics;
/* ** tool settings ** */
/* set scale */
/** Distance between two bundles used for scene scaling. */
float dist;
/* cleanup */
int clean_frames, clean_action;
float clean_error;
/* set object scale */
/** Distance between two bundles used for object scaling. */
float object_distance;
char _pad3[4];
char _pad3[16];
} MovieTrackingSettings;
typedef struct MovieTrackingStabilization {

View File

@@ -878,17 +878,6 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL},
};
static const EnumPropertyItem cleanup_items[] = {
{TRACKING_CLEAN_SELECT, "SELECT", 0, "Select", "Select unclean tracks"},
{TRACKING_CLEAN_DELETE_TRACK, "DELETE_TRACK", 0, "Delete Track", "Delete unclean tracks"},
{TRACKING_CLEAN_DELETE_SEGMENT,
"DELETE_SEGMENTS",
0,
"Delete Segments",
"Delete unclean segments of tracks"},
{0, NULL, 0, NULL, NULL},
};
srna = RNA_def_struct(brna, "MovieTrackingSettings", NULL);
RNA_def_struct_ui_text(srna, "Movie tracking settings", "Match moving settings");
@@ -941,41 +930,6 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
"Refine Tangential",
"Refine tangential coefficients of distortion model during camera solving");
/* tool settings */
/* distance */
prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_ui_text(
prop, "Distance", "Distance between two bundles used for scene scaling");
/* frames count */
prop = RNA_def_property(srna, "clean_frames", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "clean_frames");
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_ui_text(
prop,
"Tracked Frames",
"Effect on tracks which are tracked less than the specified amount of frames");
/* re-projection error */
prop = RNA_def_property(srna, "clean_error", PROP_FLOAT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_float_sdna(prop, NULL, "clean_error");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_text(
prop, "Reprojection Error", "Effect on tracks which have a larger re-projection error");
/* cleanup action */
prop = RNA_def_property(srna, "clean_action", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "clean_action");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, cleanup_items);
RNA_def_property_ui_text(prop, "Action", "Cleanup action to execute");
/* ** default tracker settings ** */
prop = RNA_def_property(srna, "show_default_expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -1108,18 +1062,6 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
prop = RNA_def_property(srna, "default_weight", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Weight", "Influence of newly created track on a final solution");
/* ** object tracking ** */
/* object distance */
prop = RNA_def_property(srna, "object_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_float_sdna(prop, NULL, "object_distance");
RNA_def_property_ui_text(
prop, "Distance", "Distance between two bundles used for object scaling");
RNA_def_property_range(prop, 0.001, 10000);
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_ui_range(prop, 0.001, 10000.0, 1, 3);
}
static void rna_def_trackingCamera(BlenderRNA *brna)