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>2011-11-20 15:44:32 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-11-20 15:44:32 +0400
commit57e75591b698bc9f51d3ac4482c07e7ad5e6553a (patch)
tree1ba1ba56b33e53be9e53116ebe4d8917dd2df986 /release
parentdde84e32915d2f3c2cea85a2d9116c237e3c4b0d (diff)
Tweaks in convert tracking constraint to f-curves operator.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_operators/clip.py22
1 files changed, 14 insertions, 8 deletions
diff --git a/release/scripts/startup/bl_operators/clip.py b/release/scripts/startup/bl_operators/clip.py
index 6c2256dc08b..59c4f88251d 100644
--- a/release/scripts/startup/bl_operators/clip.py
+++ b/release/scripts/startup/bl_operators/clip.py
@@ -259,14 +259,10 @@ object's movement caused by this constraint"""
con = x
if not con:
- return
-
- if con.type == 'FOLLOW_TRACK' and con.use_3d_position:
- mat = ob.matrix_world.copy()
- ob.constraints.remove(con)
- ob.matrix_world = mat
+ self.report({'ERROR'},
+ "Motion Tracking constraint to be converted not found")
- return
+ return {'CANCELLED'}
# Get clip used for parenting
if con.use_active_clip:
@@ -275,7 +271,17 @@ object's movement caused by this constraint"""
clip = con.clip
if not clip:
- return
+ self.report({'ERROR'},
+ "Movie clip to use tracking data from isn't set")
+
+ return {'CANCELLED'}
+
+ if con.type == 'FOLLOW_TRACK' and con.use_3d_position:
+ mat = ob.matrix_world.copy()
+ ob.constraints.remove(con)
+ ob.matrix_world = mat
+
+ return {'FINISHED'}
# Find start and end frames
for track in clip.tracking.tracks: