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:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-08-14 12:46:00 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-08-14 12:46:00 +0300
commitf0c2f4fa916cd0060dceac60183b95033e409578 (patch)
tree42598b1ba654d0b4909a53f44a18a5ca5256a25b
parenta850235a44207d856644cab38a1155a85d90337a (diff)
Tracking: Fix missing checks in operator poll functions
Reported by Vuk Gardašević (lijenstina) in IRC, thanks!
-rw-r--r--release/scripts/startup/bl_operators/clip.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_operators/clip.py b/release/scripts/startup/bl_operators/clip.py
index d8ef9e1f3ef..f63b0495d02 100644
--- a/release/scripts/startup/bl_operators/clip.py
+++ b/release/scripts/startup/bl_operators/clip.py
@@ -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