Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_clip.py
| Show First 20 Lines • Show All 247 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| layout.prop(sc, "mode", text="") | layout.prop(sc, "mode", text="") | ||||
| if sc.mode == 'TRACKING': | if sc.mode == 'TRACKING': | ||||
| layout.prop(sc, "view", text="") | layout.prop(sc, "view", text="") | ||||
| self._draw_tracking(context) | self._draw_tracking(context) | ||||
| else: | else: | ||||
| self._draw_masking(context) | self._draw_masking(context) | ||||
| # Gizmo toggle & popover. | |||||
| row = layout.row(align=True) | |||||
| row.prop(sc, "show_gizmo", icon='GIZMO', text="") | |||||
| sub = row.row(align=True) | |||||
| sub.active = sc.show_gizmo | |||||
| sub.popover(panel="CLIP_PT_gizmo_display", text="") | |||||
| class CLIP_MT_tracking_editor_menus(Menu): | class CLIP_MT_tracking_editor_menus(Menu): | ||||
| bl_idname = "CLIP_MT_tracking_editor_menus" | bl_idname = "CLIP_MT_tracking_editor_menus" | ||||
| bl_label = "" | bl_label = "" | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| sc = context.space_data | sc = context.space_data | ||||
| ▲ Show 20 Lines • Show All 1,628 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| pie.operator("clip.view_all", text="Frame All Fit").fit_view = True | pie.operator("clip.view_all", text="Frame All Fit").fit_view = True | ||||
| if sc.view == 'GRAPH': | if sc.view == 'GRAPH': | ||||
| pie.operator_context = 'INVOKE_REGION_PREVIEW' | pie.operator_context = 'INVOKE_REGION_PREVIEW' | ||||
| pie.operator("clip.graph_view_all") | pie.operator("clip.graph_view_all") | ||||
| pie.separator() | pie.separator() | ||||
| pie.operator("clip.graph_center_current_frame") | pie.operator("clip.graph_center_current_frame") | ||||
| class CLIP_PT_gizmo_display(Panel): | |||||
| bl_space_type = 'CLIP_EDITOR' | |||||
| bl_region_type = 'HEADER' | |||||
| bl_label = "Gizmos" | |||||
| bl_ui_units_x = 8 | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| view = context.space_data | |||||
| col = layout.column() | |||||
| col.label(text="Viewport Gizmos") | |||||
| col.separator() | |||||
| col.active = view.show_gizmo | |||||
| colsub = col.column() | |||||
| colsub.prop(view, "show_gizmo_navigate", text="Navigate") | |||||
| classes = ( | classes = ( | ||||
| CLIP_UL_tracking_objects, | CLIP_UL_tracking_objects, | ||||
| CLIP_HT_header, | CLIP_HT_header, | ||||
| CLIP_PT_display, | CLIP_PT_display, | ||||
| CLIP_PT_clip_display, | CLIP_PT_clip_display, | ||||
| CLIP_PT_marker_display, | CLIP_PT_marker_display, | ||||
| CLIP_MT_tracking_editor_menus, | CLIP_MT_tracking_editor_menus, | ||||
| ▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | classes = ( | ||||
| CLIP_MT_stabilize_2d_context_menu, | CLIP_MT_stabilize_2d_context_menu, | ||||
| CLIP_MT_stabilize_2d_rotation_context_menu, | CLIP_MT_stabilize_2d_rotation_context_menu, | ||||
| CLIP_MT_pivot_pie, | CLIP_MT_pivot_pie, | ||||
| CLIP_MT_marker_pie, | CLIP_MT_marker_pie, | ||||
| CLIP_MT_tracking_pie, | CLIP_MT_tracking_pie, | ||||
| CLIP_MT_reconstruction_pie, | CLIP_MT_reconstruction_pie, | ||||
| CLIP_MT_solving_pie, | CLIP_MT_solving_pie, | ||||
| CLIP_MT_view_pie, | CLIP_MT_view_pie, | ||||
| CLIP_PT_gizmo_display, | |||||
| ) | ) | ||||
| if __name__ == "__main__": # only for live edit. | if __name__ == "__main__": # only for live edit. | ||||
| from bpy.utils import register_class | from bpy.utils import register_class | ||||
| for cls in classes: | for cls in classes: | ||||
| register_class(cls) | register_class(cls) | ||||