Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_clip.py
| # SPDX-License-Identifier: GPL-2.0-or-later | # SPDX-License-Identifier: GPL-2.0-or-later | ||||
| import bpy | import bpy | ||||
| from bpy.types import Panel, Header, Menu, UIList | from bpy.types import Panel, Header, Menu, UIList | ||||
| from bpy.app.translations import pgettext_iface as iface_ | from bpy.app.translations import ( | ||||
| pgettext_iface as iface_, | |||||
| contexts as i18n_contexts, | |||||
| ) | |||||
| from bl_ui.utils import PresetPanel | from bl_ui.utils import PresetPanel | ||||
| from bl_ui.properties_grease_pencil_common import ( | from bl_ui.properties_grease_pencil_common import ( | ||||
| AnnotationDrawingToolsPanel, | AnnotationDrawingToolsPanel, | ||||
| AnnotationDataPanel, | AnnotationDataPanel, | ||||
| ) | ) | ||||
| class CLIP_UL_tracking_objects(UIList): | class CLIP_UL_tracking_objects(UIList): | ||||
| ▲ Show 20 Lines • Show All 1,732 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| prop = pie.operator("wm.context_set_enum", text="Match Keyframe", icon='KEYFRAME') | prop = pie.operator("wm.context_set_enum", text="Match Keyframe", icon='KEYFRAME') | ||||
| prop.data_path = "space_data.clip.tracking.tracks.active.pattern_match" | prop.data_path = "space_data.clip.tracking.tracks.active.pattern_match" | ||||
| prop.value = 'PREV_FRAME' | prop.value = 'PREV_FRAME' | ||||
| class CLIP_MT_tracking_pie(Menu): | class CLIP_MT_tracking_pie(Menu): | ||||
| # Tracking Operators | # Tracking Operators | ||||
| bl_label = "Tracking" | bl_label = "Tracking" | ||||
| bl_translation_context = i18n_contexts.id_movieclip | |||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| space = context.space_data | space = context.space_data | ||||
| return space.mode == 'TRACKING' and space.clip | return space.mode == 'TRACKING' and space.clip | ||||
| def draw(self, _context): | def draw(self, _context): | ||||
| layout = self.layout | layout = self.layout | ||||
| ▲ Show 20 Lines • Show All 210 Lines • Show Last 20 Lines | |||||