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:
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py23
1 files changed, 16 insertions, 7 deletions
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index a0cf22877d5..35fd7333cf4 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -807,16 +807,19 @@ class CLIP_PT_track_settings(CLIP_PT_tracking_panel, Panel):
layout.use_property_decorate = False
clip = context.space_data.clip
+ active = clip.tracking.tracks.active
- col = layout.column()
+ if not active:
+ layout.active = False
+ layout.label(text="No active track")
+ return
- active = clip.tracking.tracks.active
- if active:
- col.prop(active, "motion_model")
- col.prop(active, "pattern_match", text="Match")
+ 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")
+ col.prop(active, "use_brute")
+ col.prop(active, "use_normalization")
class CLIP_PT_track_settings_extras(CLIP_PT_tracking_panel, Panel):
@@ -827,6 +830,12 @@ class CLIP_PT_track_settings_extras(CLIP_PT_tracking_panel, Panel):
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