Merge branch 'master' into blender2.8
[blender.git] / release / scripts / startup / bl_operators / clip.py
index d0e551597333f88e91b520fe7e14975030a50809..ea68641f68b09eddf8d3cd0f27a73c148820c50a 100644 (file)
@@ -210,7 +210,7 @@ class CLIP_OT_set_active_clip(bpy.types.Operator):
     @classmethod
     def poll(cls, context):
         space = context.space_data
-        return space.type == 'CLIP_EDITOR'
+        return space.type == 'CLIP_EDITOR' and space.clip
 
     def execute(self, context):
         clip = context.space_data.clip
@@ -254,6 +254,11 @@ class CLIP_OT_track_to_empty(Operator):
         constraint.object = tracking_object.name
         constraint.camera = CLIP_camera_for_clip(context, clip)
 
+    @classmethod
+    def poll(cls, context):
+        space = context.space_data
+        return space.type == 'CLIP_EDITOR' and space.clip
+
     def execute(self, context):
         sc = context.space_data
         clip = sc.clip