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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user