[Bf-blender-cvs] [d457da7fa61] vfx-clip-ui-update: UI: Tracking: Solve panel to Sidebar

Aaron Carlisle noreply at git.blender.org
Wed Jan 6 05:06:37 CET 2021


Commit: d457da7fa611fd73ce1b2c6bcb8c57b1ccba99ab
Author: Aaron Carlisle
Date:   Tue Jan 5 19:27:07 2021 -0500
Branches: vfx-clip-ui-update
https://developer.blender.org/rBd457da7fa611fd73ce1b2c6bcb8c57b1ccba99ab

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

===================================================================

M	release/scripts/startup/bl_ui/space_clip.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index f17e09c3234..52f0c238546 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -530,36 +530,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")
@@ -937,6 +910,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'
@@ -1753,6 +1768,7 @@ classes = (
     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,



More information about the Bf-blender-cvs mailing list