Camera tracking: made some options more easy to understand

- Changed some names so now people who aren't really familiar with
  motion tracking can understand what they exactly means
- Also cleaned up and rephraded some descriptions
- Changed behavior of operator which creates empty for 2d tracks:
  now it operates on all selected tracks rather than active track only
- Added checkbox to enable/disable rotation stabilization
This commit is contained in:
2011-11-15 12:20:58 +00:00
parent 355710f414
commit 3d724d8df5
13 changed files with 166 additions and 71 deletions

View File

@@ -24,27 +24,27 @@ from bpy.types import Operator
from bpy_extras.io_utils import unpack_list
def CLIP_track_view_selected(sc, track):
if track.select_anchor:
return True
if sc.show_marker_pattern and track.select_pattern:
return True
if sc.show_marker_search and track.select_search:
return True
return False
class CLIP_OT_track_to_empty(Operator):
"""Create an Empty object which will be copying movement of active track"""
bl_idname = "clip.track_to_empty"
bl_label = "2D Track to Empty"
bl_label = "Link Empty to Track"
bl_options = {'UNDO', 'REGISTER'}
@classmethod
def poll(cls, context):
if context.space_data.type != 'CLIP_EDITOR':
return False
def _link_track(self, context, track):
sc = context.space_data
clip = sc.clip
return clip and clip.tracking.tracks.active
def execute(self, context):
sc = context.space_data
clip = sc.clip
track = clip.tracking.tracks.active
constraint = None
ob = None
@@ -65,6 +65,14 @@ class CLIP_OT_track_to_empty(Operator):
constraint.track = track.name
constraint.use_3d_position = False
def execute(self, context):
sc = context.space_data
clip = sc.clip
for track in clip.tracking.tracks:
if CLIP_track_view_selected(sc, track):
self._link_track(context, track)
return {'FINISHED'}
@@ -179,7 +187,7 @@ class CLIP_OT_delete_proxy(Operator):
class CLIP_OT_set_viewport_background(Operator):
"""Set current movie clip as a camera background in 3D viewport"""
"""Set current movie clip as a camera background in 3D viewport (works only when a 3D viewport is visible)"""
bl_idname = "clip.set_viewport_background"
bl_label = "Set as Background"