2011-11-07 12:55:18 +00:00
|
|
|
# ##### BEGIN GPL LICENSE BLOCK #####
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
#
|
|
|
|
# ##### END GPL LICENSE BLOCK #####
|
|
|
|
|
2011-12-31 02:40:33 +00:00
|
|
|
# <pep8-80 compliant>
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
import bpy
|
|
|
|
from bpy.types import Panel, Header, Menu
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_HT_header(Header):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.template_header()
|
|
|
|
|
|
|
|
if context.area.show_menus:
|
|
|
|
sub = row.row(align=True)
|
|
|
|
sub.menu("CLIP_MT_view")
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
if sc.view == 'CLIP':
|
|
|
|
if clip:
|
|
|
|
sub.menu("CLIP_MT_select")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
sub.menu("CLIP_MT_clip")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
sub.menu("CLIP_MT_track")
|
|
|
|
sub.menu("CLIP_MT_reconstruction")
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
layout.prop(sc, "view", text="", expand=True)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
if clip:
|
|
|
|
if sc.view == 'CLIP':
|
|
|
|
layout.prop(sc, "mode", text="")
|
2011-11-07 12:55:18 +00:00
|
|
|
if sc.view == 'GRAPH':
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
|
|
|
if sc.show_filters:
|
2011-11-16 13:39:58 +00:00
|
|
|
row.prop(sc, "show_filters", icon='DISCLOSURE_TRI_DOWN',
|
|
|
|
text="Filters")
|
2011-11-15 12:20:58 +00:00
|
|
|
|
|
|
|
sub = row.column()
|
|
|
|
sub.active = clip.tracking.reconstruction.is_valid
|
|
|
|
sub.prop(sc, "show_graph_frames", icon='SEQUENCE', text="")
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
row.prop(sc, "show_graph_tracks", icon='ANIM', text="")
|
|
|
|
else:
|
2011-11-16 13:39:58 +00:00
|
|
|
row.prop(sc, "show_filters", icon='DISCLOSURE_TRI_RIGHT',
|
|
|
|
text="Filters")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.template_ID(sc, "clip", open='clip.open')
|
|
|
|
|
|
|
|
if clip:
|
2011-12-05 18:57:17 +00:00
|
|
|
tracking = clip.tracking
|
|
|
|
active = tracking.objects.active
|
|
|
|
|
|
|
|
if active and not active.is_camera:
|
|
|
|
r = active.reconstruction
|
|
|
|
else:
|
|
|
|
r = tracking.reconstruction
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
if r.is_valid and sc.view == 'CLIP':
|
2011-11-07 12:55:18 +00:00
|
|
|
layout.label(text="Average solve error: %.4f" %
|
|
|
|
(r.average_error))
|
|
|
|
|
2012-05-03 19:28:41 +00:00
|
|
|
if sc.view == 'DOPESHEET':
|
|
|
|
layout.label(text="Sort by:")
|
|
|
|
layout.prop(sc, "dopesheet_sort_order", text="")
|
|
|
|
layout.prop(sc, "invert_dopesheet_sort", text="Invert")
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
layout.template_running_jobs()
|
|
|
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_clip_view_panel:
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
|
|
|
return clip and sc.view == 'CLIP'
|
|
|
|
|
|
|
|
class CLIP_PT_tracking_panel:
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
|
|
|
return clip and sc.mode == 'TRACKING' and sc.view == 'CLIP'
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_reconstruction_panel:
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
return clip and sc.mode == 'RECONSTRUCTION' and sc.view == 'CLIP'
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_distortion_panel:
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
|
|
|
return clip and sc.mode == 'DISTORTION' and sc.view == 'CLIP'
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
bl_label = "Marker"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
2011-11-28 13:26:46 +00:00
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
settings = clip.tracking.settings
|
2011-11-07 12:55:18 +00:00
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.operator("clip.add_marker_move")
|
|
|
|
col.operator("clip.detect_features")
|
|
|
|
col.operator("clip.delete_track")
|
|
|
|
|
2011-11-28 13:26:46 +00:00
|
|
|
box = layout.box()
|
|
|
|
row = box.row(align=True)
|
|
|
|
row.prop(settings, "show_default_expanded", text="", emboss=False)
|
2011-11-28 16:10:50 +00:00
|
|
|
row.label(text="Tracking Settings")
|
2011-11-28 13:26:46 +00:00
|
|
|
|
|
|
|
if settings.show_default_expanded:
|
|
|
|
col = box.column()
|
|
|
|
row = col.row(align=True)
|
2012-01-18 06:11:56 +00:00
|
|
|
label = CLIP_MT_tracking_settings_presets.bl_label
|
2011-11-28 13:26:46 +00:00
|
|
|
row.menu('CLIP_MT_tracking_settings_presets', text=label)
|
|
|
|
row.operator("clip.tracking_settings_preset_add",
|
|
|
|
text="", icon='ZOOMIN')
|
2011-12-06 09:23:35 +00:00
|
|
|
props = row.operator("clip.tracking_settings_preset_add",
|
2011-11-28 13:26:46 +00:00
|
|
|
text="", icon='ZOOMOUT')
|
|
|
|
props.remove_active = True
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
2012-01-26 15:33:16 +00:00
|
|
|
row = col.row(align=True)
|
2012-02-04 11:10:41 +00:00
|
|
|
row.prop(settings, "use_default_red_channel",
|
|
|
|
text="R", toggle=True)
|
|
|
|
row.prop(settings, "use_default_green_channel",
|
|
|
|
text="G", toggle=True)
|
|
|
|
row.prop(settings, "use_default_blue_channel",
|
|
|
|
text="B", toggle=True)
|
2012-01-26 15:33:16 +00:00
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
2011-11-28 17:10:32 +00:00
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.prop(settings, "default_pattern_size")
|
|
|
|
sub.prop(settings, "default_search_size")
|
2011-11-28 13:26:46 +00:00
|
|
|
|
|
|
|
col.label(text="Tracker:")
|
|
|
|
col.prop(settings, "default_tracker", text="")
|
|
|
|
|
|
|
|
if settings.default_tracker == 'KLT':
|
|
|
|
col.prop(settings, "default_pyramid_levels")
|
2011-12-04 14:08:58 +00:00
|
|
|
col.prop(settings, "default_correlation_min")
|
2011-11-28 13:26:46 +00:00
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
2011-11-28 17:10:32 +00:00
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.prop(settings, "default_frames_limit")
|
|
|
|
sub.prop(settings, "default_margin")
|
2011-11-28 13:26:46 +00:00
|
|
|
|
|
|
|
col.label(text="Match:")
|
|
|
|
col.prop(settings, "default_pattern_match", text="")
|
|
|
|
|
2012-01-26 15:04:25 +00:00
|
|
|
col.separator()
|
2012-02-04 11:10:41 +00:00
|
|
|
col.operator('clip.track_settings_as_default',
|
|
|
|
text="Copy From Active Track")
|
2012-01-26 15:04:25 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_tools_tracking(CLIP_PT_tracking_panel, Panel):
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
bl_label = "Track"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
2012-01-17 17:27:18 +00:00
|
|
|
props = row.operator("clip.track_markers", text="", icon='FRAME_PREV')
|
|
|
|
props.backwards = True
|
2011-11-07 12:55:18 +00:00
|
|
|
props = row.operator("clip.track_markers", text="",
|
2012-01-14 06:30:27 +00:00
|
|
|
icon='PLAY_REVERSE')
|
2011-11-07 12:55:18 +00:00
|
|
|
props.backwards = True
|
|
|
|
props.sequence = True
|
2012-01-17 17:27:18 +00:00
|
|
|
props = row.operator("clip.track_markers", text="", icon='PLAY')
|
2012-01-25 13:37:11 +00:00
|
|
|
props.backwards = False
|
2012-01-17 17:27:18 +00:00
|
|
|
props.sequence = True
|
2011-11-07 12:55:18 +00:00
|
|
|
row.operator("clip.track_markers", text="", icon='FRAME_NEXT')
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2012-01-17 17:27:18 +00:00
|
|
|
props = col.operator("clip.clear_track_path", text="Clear After")
|
|
|
|
props.action = 'REMAINED'
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-01-17 17:27:18 +00:00
|
|
|
props = col.operator("clip.clear_track_path", text="Clear Before")
|
|
|
|
props.action = 'UPTO'
|
2012-01-14 06:30:27 +00:00
|
|
|
col.operator("clip.clear_track_path", text="Clear").action = 'ALL'
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2011-11-15 12:20:58 +00:00
|
|
|
layout.operator("clip.join_tracks", text="Join")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_tools_solve(CLIP_PT_tracking_panel, Panel):
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
2011-11-15 12:20:58 +00:00
|
|
|
bl_label = "Solve"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
clip = context.space_data.clip
|
2011-12-05 19:31:21 +00:00
|
|
|
tracking = clip.tracking
|
|
|
|
settings = tracking.settings
|
|
|
|
tracking_object = tracking.objects.active
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2011-12-05 19:31:21 +00:00
|
|
|
|
2011-12-31 02:40:33 +00:00
|
|
|
col.operator("clip.solve_camera",
|
|
|
|
text="Camera Motion" if tracking_object.is_camera
|
|
|
|
else "Object Motion")
|
2011-11-07 12:55:18 +00:00
|
|
|
col.operator("clip.clear_solution")
|
|
|
|
|
2012-04-14 12:02:47 +00:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(settings, "use_tripod_solver")
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
col = layout.column(align=True)
|
2012-04-14 12:02:47 +00:00
|
|
|
col.active = not settings.use_tripod_solver
|
2011-11-07 12:55:18 +00:00
|
|
|
col.prop(settings, "keyframe_a")
|
|
|
|
col.prop(settings, "keyframe_b")
|
|
|
|
|
Assorted camera tracker improvements
- Add support for refining the camera's intrinsic parameters
during a solve. Currently, refining supports only the following
combinations of intrinsic parameters:
f
f, cx, cy
f, cx, cy, k1, k2
f, k1
f, k1, k2
This is not the same as autocalibration, since the user must
still make a reasonable initial guess about the focal length and
other parameters, whereas true autocalibration would eliminate
the need for the user specify intrinsic parameters at all.
However, the solver works well with only rough guesses for the
focal length, so perhaps full autocalibation is not that
important.
Adding support for the last two combinations, (f, k1) and (f,
k1, k2) required changes to the library libmv depends on for
bundle adjustment, SSBA. These changes should get ported
upstream not just to libmv but to SSBA as well.
- Improved the region of convergence for bundle adjustment by
increasing the number of Levenberg-Marquardt iterations from 50
to 500. This way, the solver is able to crawl out of the bad
local minima it gets stuck in when changing from, for example,
bundling k1 and k2 to just k1 and resetting k2 to 0.
- Add several new region tracker implementations. A region tracker
is a libmv concept, which refers to tracking a template image
pattern through frames. The impact to end users is that tracking
should "just work better". I am reserving a more detailed
writeup, and maybe a paper, for later.
- Other libmv tweaks, such as detecting that a tracker is headed
outside of the image bounds.
This includes several changes made directly to the libmv extern
code rather expecting to get those changes through normal libmv
channels, because I, the libmv BDFL, decided it was faster to work
on libmv directly in Blender, then later reverse-port the libmv
changes from Blender back into libmv trunk. The interesting part
is that I added a full Levenberg-Marquardt loop to the region
tracking code, which should lead to a more stable solutions. I
also added a hacky implementation of "Efficient Second-Order
Minimization" for tracking, which works nicely. A more detailed
quantitative evaluation will follow.
Original patch by Keir, cleaned a bit by myself.
2011-11-14 06:41:23 +00:00
|
|
|
col = layout.column(align=True)
|
2012-04-28 14:54:45 +00:00
|
|
|
col.active = tracking_object.is_camera and not settings.use_tripod_solver
|
Assorted camera tracker improvements
- Add support for refining the camera's intrinsic parameters
during a solve. Currently, refining supports only the following
combinations of intrinsic parameters:
f
f, cx, cy
f, cx, cy, k1, k2
f, k1
f, k1, k2
This is not the same as autocalibration, since the user must
still make a reasonable initial guess about the focal length and
other parameters, whereas true autocalibration would eliminate
the need for the user specify intrinsic parameters at all.
However, the solver works well with only rough guesses for the
focal length, so perhaps full autocalibation is not that
important.
Adding support for the last two combinations, (f, k1) and (f,
k1, k2) required changes to the library libmv depends on for
bundle adjustment, SSBA. These changes should get ported
upstream not just to libmv but to SSBA as well.
- Improved the region of convergence for bundle adjustment by
increasing the number of Levenberg-Marquardt iterations from 50
to 500. This way, the solver is able to crawl out of the bad
local minima it gets stuck in when changing from, for example,
bundling k1 and k2 to just k1 and resetting k2 to 0.
- Add several new region tracker implementations. A region tracker
is a libmv concept, which refers to tracking a template image
pattern through frames. The impact to end users is that tracking
should "just work better". I am reserving a more detailed
writeup, and maybe a paper, for later.
- Other libmv tweaks, such as detecting that a tracker is headed
outside of the image bounds.
This includes several changes made directly to the libmv extern
code rather expecting to get those changes through normal libmv
channels, because I, the libmv BDFL, decided it was faster to work
on libmv directly in Blender, then later reverse-port the libmv
changes from Blender back into libmv trunk. The interesting part
is that I added a full Levenberg-Marquardt loop to the region
tracking code, which should lead to a more stable solutions. I
also added a hacky implementation of "Efficient Second-Order
Minimization" for tracking, which works nicely. A more detailed
quantitative evaluation will follow.
Original patch by Keir, cleaned a bit by myself.
2011-11-14 06:41:23 +00:00
|
|
|
col.label(text="Refine:")
|
|
|
|
col.prop(settings, "refine_intrinsics", text="")
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_tools_cleanup(CLIP_PT_tracking_panel, Panel):
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
bl_label = "Clean up"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
clip = context.space_data.clip
|
|
|
|
settings = clip.tracking.settings
|
|
|
|
|
|
|
|
layout.operator("clip.clean_tracks")
|
|
|
|
|
|
|
|
layout.prop(settings, 'clean_frames', text="Frames")
|
|
|
|
layout.prop(settings, 'clean_error', text="Error")
|
|
|
|
layout.prop(settings, 'clean_action', text="")
|
|
|
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_tools_geometry(CLIP_PT_reconstruction_panel, Panel):
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
bl_label = "Geometry"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2011-11-21 17:05:27 +00:00
|
|
|
layout.operator("clip.bundles_to_mesh")
|
2011-11-07 12:55:18 +00:00
|
|
|
layout.operator("clip.track_to_empty")
|
|
|
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_tools_orientation(CLIP_PT_reconstruction_panel, Panel):
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
bl_label = "Orientation"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
sc = context.space_data
|
|
|
|
layout = self.layout
|
|
|
|
settings = sc.clip.tracking.settings
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2012-03-06 12:27:42 +00:00
|
|
|
row = col.row()
|
|
|
|
props = row.operator("clip.set_plane", text="Floor")
|
|
|
|
props.plane = 'FLOOR'
|
|
|
|
props = row.operator("clip.set_plane", text="Wall")
|
|
|
|
props.plane = 'WALL'
|
2011-11-07 12:55:18 +00:00
|
|
|
col.operator("clip.set_origin")
|
|
|
|
|
|
|
|
row = col.row()
|
|
|
|
row.operator("clip.set_axis", text="Set X Axis").axis = 'X'
|
|
|
|
row.operator("clip.set_axis", text="Set Y Axis").axis = 'Y'
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.operator("clip.set_scale")
|
|
|
|
col.prop(settings, "distance")
|
|
|
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_tools_object(CLIP_PT_reconstruction_panel, Panel):
|
2011-12-19 15:12:33 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
bl_label = "Object"
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2012-04-30 16:19:20 +00:00
|
|
|
if CLIP_PT_reconstruction_panel.poll(context):
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
2011-12-19 15:12:33 +00:00
|
|
|
|
|
|
|
tracking_object = clip.tracking.objects.active
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2011-12-19 15:12:33 +00:00
|
|
|
return not tracking_object.is_camera
|
|
|
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
def draw(self, context):
|
2012-01-05 16:04:25 +00:00
|
|
|
layout = self.layout
|
2012-01-06 21:25:28 +00:00
|
|
|
|
2011-12-19 15:12:33 +00:00
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
tracking_object = clip.tracking.objects.active
|
|
|
|
settings = sc.clip.tracking.settings
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
col.prop(tracking_object, "scale")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col.operator("clip.set_solution_scale", text="Set Scale")
|
|
|
|
col.prop(settings, "object_distance")
|
|
|
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_tools_grease_pencil(CLIP_PT_distortion_panel, Panel):
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
bl_label = "Grease Pencil"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.operator("gpencil.draw", text="Draw").mode = 'DRAW'
|
|
|
|
row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT'
|
|
|
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.operator("gpencil.draw", text="Poly").mode = 'DRAW_POLY'
|
|
|
|
row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
|
|
|
|
|
|
|
|
row = col.row()
|
|
|
|
row.prop(context.tool_settings, "use_grease_pencil_sessions")
|
|
|
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_objects(CLIP_PT_clip_view_panel, Panel):
|
2011-12-05 18:57:17 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
bl_label = "Objects"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2012-01-17 17:27:18 +00:00
|
|
|
|
2011-12-05 18:57:17 +00:00
|
|
|
sc = context.space_data
|
2012-01-05 16:04:25 +00:00
|
|
|
tracking = sc.clip.tracking
|
2011-12-05 18:57:17 +00:00
|
|
|
|
|
|
|
row = layout.row()
|
2011-12-31 02:40:33 +00:00
|
|
|
row.template_list(tracking, "objects",
|
|
|
|
tracking, "active_object_index", rows=3)
|
2011-12-05 18:57:17 +00:00
|
|
|
|
|
|
|
sub = row.column(align=True)
|
|
|
|
|
|
|
|
sub.operator("clip.tracking_object_new", icon='ZOOMIN', text="")
|
|
|
|
sub.operator("clip.tracking_object_remove", icon='ZOOMOUT', text="")
|
|
|
|
|
|
|
|
active = tracking.objects.active
|
|
|
|
if active:
|
|
|
|
layout.prop(active, "name")
|
|
|
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_track(CLIP_PT_tracking_panel, Panel):
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
bl_label = "Track"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
sc = context.space_data
|
|
|
|
clip = context.space_data.clip
|
|
|
|
act_track = clip.tracking.tracks.active
|
|
|
|
|
|
|
|
if not act_track:
|
|
|
|
layout.active = False
|
|
|
|
layout.label(text="No active track")
|
|
|
|
return
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(act_track, "name", text="")
|
|
|
|
|
|
|
|
sub = row.row(align=True)
|
|
|
|
|
|
|
|
sub.template_marker(sc, "clip", sc.clip_user, act_track, True)
|
|
|
|
|
|
|
|
icon = 'LOCKED' if act_track.lock else 'UNLOCKED'
|
|
|
|
sub.prop(act_track, "lock", text="", icon=icon)
|
|
|
|
|
|
|
|
layout.template_track(sc, "scopes")
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
2011-12-04 12:58:31 +00:00
|
|
|
sub = row.row()
|
|
|
|
sub.prop(act_track, "use_red_channel", text="R", toggle=True)
|
|
|
|
sub.prop(act_track, "use_green_channel", text="G", toggle=True)
|
|
|
|
sub.prop(act_track, "use_blue_channel", text="B", toggle=True)
|
|
|
|
|
|
|
|
row.separator()
|
|
|
|
|
|
|
|
sub = row.row()
|
2011-12-04 13:58:40 +00:00
|
|
|
sub.prop(act_track, "use_grayscale_preview", text="B/W", toggle=True)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
label = bpy.types.CLIP_MT_track_color_presets.bl_label
|
|
|
|
row.menu('CLIP_MT_track_color_presets', text=label)
|
2011-11-08 01:32:34 +00:00
|
|
|
row.menu('CLIP_MT_track_color_specials', text="", icon='DOWNARROW_HLT')
|
|
|
|
row.operator("clip.track_color_preset_add", text="", icon='ZOOMIN')
|
2011-11-07 12:55:18 +00:00
|
|
|
props = row.operator("clip.track_color_preset_add",
|
2011-11-08 01:32:34 +00:00
|
|
|
text="", icon='ZOOMOUT')
|
2011-11-07 12:55:18 +00:00
|
|
|
props.remove_active = True
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(act_track, "use_custom_color")
|
|
|
|
if act_track.use_custom_color:
|
|
|
|
row.prop(act_track, "color", text="")
|
|
|
|
|
|
|
|
if act_track.has_bundle:
|
|
|
|
label_text = "Average Error: %.4f" % (act_track.average_error)
|
|
|
|
layout.label(text=label_text)
|
|
|
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_track_settings(CLIP_PT_tracking_panel, Panel):
|
2012-03-30 10:37:20 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
bl_label = "Tracking Settings"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
clip = context.space_data.clip
|
|
|
|
settings = clip.tracking.settings
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
active = clip.tracking.tracks.active
|
|
|
|
if active:
|
|
|
|
col.prop(active, "tracker")
|
|
|
|
|
|
|
|
if active.tracker == 'KLT':
|
|
|
|
col.prop(active, "pyramid_levels")
|
|
|
|
col.prop(active, "correlation_min")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
col.prop(active, "frames_limit")
|
|
|
|
col.prop(active, "margin")
|
|
|
|
col.prop(active, "pattern_match", text="Match")
|
|
|
|
|
|
|
|
col.prop(settings, "speed")
|
|
|
|
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
class CLIP_PT_tracking_camera(Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
bl_label = "Camera Data"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2012-04-30 16:19:20 +00:00
|
|
|
if CLIP_PT_clip_view_panel.poll(context):
|
|
|
|
sc = context.space_data
|
|
|
|
|
|
|
|
return sc.mode in {'TRACKING', 'DISTORTION'} and sc.clip
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
return False
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
label = bpy.types.CLIP_MT_camera_presets.bl_label
|
|
|
|
row.menu('CLIP_MT_camera_presets', text=label)
|
2011-11-08 01:32:34 +00:00
|
|
|
row.operator("clip.camera_preset_add", text="", icon='ZOOMIN')
|
2012-01-17 17:27:18 +00:00
|
|
|
props = row.operator("clip.camera_preset_add", text="", icon='ZOOMOUT')
|
|
|
|
props.remove_active = True
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
sub = row.split(percentage=0.65)
|
|
|
|
if clip.tracking.camera.units == 'MILLIMETERS':
|
|
|
|
sub.prop(clip.tracking.camera, "focal_length")
|
|
|
|
else:
|
|
|
|
sub.prop(clip.tracking.camera, "focal_length_pixels")
|
|
|
|
sub.prop(clip.tracking.camera, "units", text="")
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.label(text="Sensor:")
|
|
|
|
col.prop(clip.tracking.camera, "sensor_width", text="Width")
|
|
|
|
col.prop(clip.tracking.camera, "pixel_aspect")
|
|
|
|
|
|
|
|
col = layout.column()
|
2011-11-14 06:41:42 +00:00
|
|
|
col.label(text="Optical Center:")
|
2011-11-07 12:55:18 +00:00
|
|
|
row = col.row()
|
|
|
|
row.prop(clip.tracking.camera, "principal", text="")
|
|
|
|
col.operator("clip.set_center_principal", text="Center")
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2011-12-06 18:39:16 +00:00
|
|
|
col.label(text="Lens Distortion:")
|
2011-11-07 12:55:18 +00:00
|
|
|
col.prop(clip.tracking.camera, "k1")
|
|
|
|
col.prop(clip.tracking.camera, "k2")
|
|
|
|
col.prop(clip.tracking.camera, "k3")
|
|
|
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_display(CLIP_PT_clip_view_panel, Panel):
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
bl_label = "Display"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
sc = context.space_data
|
|
|
|
|
2012-01-15 13:31:58 +00:00
|
|
|
row = layout.row(align=True)
|
|
|
|
sub = row.row()
|
|
|
|
sub.prop(sc, "show_red_channel", text="R", toggle=True)
|
|
|
|
sub.prop(sc, "show_green_channel", text="G", toggle=True)
|
|
|
|
sub.prop(sc, "show_blue_channel", text="B", toggle=True)
|
|
|
|
|
|
|
|
row.separator()
|
|
|
|
|
|
|
|
sub = row.row()
|
|
|
|
sub.prop(sc, "use_grayscale_preview", text="B/W", toggle=True)
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
col = layout.column(align=True)
|
|
|
|
|
|
|
|
col.prop(sc, "show_disabled", "Disabled Tracks")
|
2012-02-05 13:43:58 +00:00
|
|
|
col.prop(sc, "show_names", text="Names and Status")
|
2011-11-21 17:05:27 +00:00
|
|
|
col.prop(sc, "show_bundles", text="3D Markers")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-02-05 13:43:58 +00:00
|
|
|
col.prop(sc, "use_mute_footage", text="Mute Footage")
|
|
|
|
col.prop(sc, "lock_selection")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-02-05 13:43:58 +00:00
|
|
|
if sc.view == 'GRAPH':
|
|
|
|
col.prop(sc, "lock_time_cursor")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
if sc.mode == 'DISTORTION':
|
|
|
|
col.prop(sc, "show_grid", text="Grid")
|
|
|
|
col.prop(sc, "use_manual_calibration")
|
|
|
|
elif sc.mode == 'RECONSTRUCTION':
|
|
|
|
col.prop(sc, "show_stable", text="Stable")
|
|
|
|
|
|
|
|
clip = sc.clip
|
|
|
|
if clip:
|
2011-11-15 12:20:58 +00:00
|
|
|
col.label(text="Display Aspect Ratio:")
|
2012-02-05 13:43:58 +00:00
|
|
|
row = col.row()
|
|
|
|
row.prop(clip, "display_aspect", text="")
|
|
|
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_marker_display(CLIP_PT_clip_view_panel, Panel):
|
2012-02-05 13:43:58 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
bl_label = "Marker Display"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
sc = context.space_data
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
|
|
|
|
row = col.row()
|
|
|
|
row.prop(sc, "show_marker_pattern", text="Pattern")
|
|
|
|
row.prop(sc, "show_marker_search", text="Search")
|
|
|
|
|
|
|
|
col.prop(sc, "show_tiny_markers", text="Thin Markers")
|
|
|
|
col.prop(sc, "show_track_path", text="Path")
|
|
|
|
|
|
|
|
row = col.row()
|
|
|
|
row.active = sc.show_track_path
|
|
|
|
row.prop(sc, "path_length", text="Length")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel):
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
bl_label = "2D Stabilization"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
2011-11-20 00:32:39 +00:00
|
|
|
stab = context.space_data.clip.tracking.stabilization
|
2011-11-24 19:36:12 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
self.layout.prop(stab, "use_2d_stabilization", text="")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2011-11-20 00:32:39 +00:00
|
|
|
|
|
|
|
tracking = context.space_data.clip.tracking
|
2011-11-07 12:55:18 +00:00
|
|
|
stab = tracking.stabilization
|
|
|
|
|
|
|
|
layout.active = stab.use_2d_stabilization
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.template_list(stab, "tracks", stab, "active_track_index", rows=3)
|
|
|
|
|
|
|
|
sub = row.column(align=True)
|
|
|
|
|
|
|
|
sub.operator("clip.stabilize_2d_add", icon='ZOOMIN', text="")
|
|
|
|
sub.operator("clip.stabilize_2d_remove", icon='ZOOMOUT', text="")
|
|
|
|
|
|
|
|
sub.menu('CLIP_MT_stabilize_2d_specials', text="",
|
2011-11-08 01:32:34 +00:00
|
|
|
icon='DOWNARROW_HLT')
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
layout.prop(stab, "influence_location")
|
|
|
|
|
|
|
|
layout.prop(stab, "use_autoscale")
|
|
|
|
col = layout.column()
|
|
|
|
col.active = stab.use_autoscale
|
|
|
|
col.prop(stab, "scale_max")
|
|
|
|
col.prop(stab, "influence_scale")
|
|
|
|
|
2011-11-15 12:20:58 +00:00
|
|
|
layout.prop(stab, "use_stabilize_rotation")
|
|
|
|
col = layout.column()
|
|
|
|
col.active = stab.use_stabilize_rotation
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2011-11-15 12:20:58 +00:00
|
|
|
row = col.row(align=True)
|
2011-11-07 12:55:18 +00:00
|
|
|
row.prop_search(stab, "rotation_track", tracking, "tracks", text="")
|
|
|
|
row.operator("clip.stabilize_2d_set_rotation", text="", icon='ZOOMIN')
|
|
|
|
|
2011-11-15 12:20:58 +00:00
|
|
|
row = col.row()
|
2011-11-07 12:55:18 +00:00
|
|
|
row.active = stab.rotation_track is not None
|
|
|
|
row.prop(stab, "influence_rotation")
|
|
|
|
|
2012-02-16 15:03:37 +00:00
|
|
|
layout.prop(stab, "filter_type")
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_marker(CLIP_PT_tracking_panel, Panel):
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
bl_label = "Marker"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
sc = context.space_data
|
|
|
|
clip = context.space_data.clip
|
|
|
|
act_track = clip.tracking.tracks.active
|
|
|
|
|
|
|
|
if act_track:
|
|
|
|
layout.template_marker(sc, "clip", sc.clip_user, act_track, False)
|
|
|
|
else:
|
|
|
|
layout.active = False
|
|
|
|
layout.label(text="No active track")
|
|
|
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_proxy(CLIP_PT_clip_view_panel, Panel):
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
bl_label = "Proxy / Timecode"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
sc = context.space_data
|
|
|
|
|
|
|
|
self.layout.prop(sc.clip, "use_proxy", text="")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
|
|
|
layout.active = clip.use_proxy
|
|
|
|
|
2012-02-01 18:08:37 +00:00
|
|
|
layout.label(text="Build Original:")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-02-01 18:08:37 +00:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(clip.proxy, "build_25", toggle=True)
|
|
|
|
row.prop(clip.proxy, "build_50", toggle=True)
|
|
|
|
row.prop(clip.proxy, "build_75", toggle=True)
|
|
|
|
row.prop(clip.proxy, "build_100", toggle=True)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-02-01 18:08:37 +00:00
|
|
|
layout.label(text="Build Undistorted:")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-02-01 18:08:37 +00:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(clip.proxy, "build_undistorted_25", toggle=True)
|
|
|
|
row.prop(clip.proxy, "build_undistorted_50", toggle=True)
|
|
|
|
row.prop(clip.proxy, "build_undistorted_75", toggle=True)
|
|
|
|
row.prop(clip.proxy, "build_undistorted_100", toggle=True)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
layout.prop(clip.proxy, "quality")
|
|
|
|
|
|
|
|
layout.prop(clip, 'use_proxy_custom_directory')
|
|
|
|
if clip.use_proxy_custom_directory:
|
|
|
|
layout.prop(clip.proxy, "directory")
|
|
|
|
|
2012-02-01 18:08:37 +00:00
|
|
|
layout.operator("clip.rebuild_proxy", text="Build Proxy")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
if clip.source == 'MOVIE':
|
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
col.label(text="Use timecode index:")
|
|
|
|
col.prop(clip.proxy, "timecode", text="")
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.label(text="Proxy render size:")
|
|
|
|
|
|
|
|
col.prop(sc.clip_user, "proxy_render_size", text="")
|
|
|
|
col.prop(sc.clip_user, "use_render_undistorted")
|
|
|
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_footage(CLIP_PT_clip_view_panel, Panel):
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
bl_label = "Footage Settings"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
|
|
|
if clip:
|
|
|
|
layout.template_movieclip(sc, "clip", compact=True)
|
|
|
|
else:
|
|
|
|
layout.operator("clip.open", icon='FILESEL')
|
|
|
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_tools_clip(CLIP_PT_clip_view_panel, Panel):
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
bl_label = "Clip"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator("clip.set_viewport_background")
|
2011-11-23 17:30:47 +00:00
|
|
|
layout.operator("clip.setup_tracking_scene")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_view(Menu):
|
|
|
|
bl_label = "View"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2012-04-29 12:32:26 +00:00
|
|
|
sc = context.space_data
|
|
|
|
|
2012-05-02 17:33:48 +00:00
|
|
|
if sc.view == 'CLIP':
|
|
|
|
layout.operator("clip.properties", icon='MENU_PANEL')
|
|
|
|
layout.operator("clip.tools", icon='MENU_PANEL')
|
|
|
|
layout.separator()
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-05-02 17:33:48 +00:00
|
|
|
layout.operator("clip.view_selected")
|
|
|
|
layout.operator("clip.view_all")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-05-02 17:33:48 +00:00
|
|
|
layout.separator()
|
|
|
|
layout.operator("clip.view_zoom_in")
|
|
|
|
layout.operator("clip.view_zoom_out")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-05-02 17:33:48 +00:00
|
|
|
layout.separator()
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-05-02 17:33:48 +00:00
|
|
|
ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-05-02 17:33:48 +00:00
|
|
|
for a, b in ratios:
|
|
|
|
text = "Zoom %d:%d" % (a, b)
|
|
|
|
layout.operator("clip.view_zoom_ratio", text=text).ratio = a / b
|
|
|
|
else:
|
|
|
|
layout.prop(sc, "show_seconds")
|
|
|
|
layout.separator()
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
layout.operator("screen.area_dupli")
|
|
|
|
layout.operator("screen.screen_full_area")
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_clip(Menu):
|
|
|
|
bl_label = "Clip"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
|
|
|
layout.operator("clip.open")
|
|
|
|
|
|
|
|
if clip:
|
|
|
|
layout.operator("clip.reload")
|
|
|
|
layout.menu("CLIP_MT_proxy")
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_proxy(Menu):
|
|
|
|
bl_label = "Proxy"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator("clip.rebuild_proxy")
|
|
|
|
layout.operator("clip.delete_proxy")
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_track(Menu):
|
|
|
|
bl_label = "Track"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator("clip.clear_solution")
|
|
|
|
layout.operator("clip.solve_camera")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
props = layout.operator("clip.clear_track_path", text="Clear After")
|
|
|
|
props.action = 'REMAINED'
|
|
|
|
|
|
|
|
props = layout.operator("clip.clear_track_path", text="Clear Before")
|
|
|
|
props.action = 'UPTO'
|
|
|
|
|
2011-11-16 13:39:58 +00:00
|
|
|
props = layout.operator("clip.clear_track_path",
|
|
|
|
text="Clear Track Path")
|
2011-11-07 12:55:18 +00:00
|
|
|
props.action = 'ALL'
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
layout.operator("clip.join_tracks")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
layout.operator("clip.clean_tracks")
|
|
|
|
|
2012-01-09 20:18:48 +00:00
|
|
|
layout.separator()
|
|
|
|
layout.operator("clip.copy_tracks")
|
|
|
|
layout.operator("clip.paste_tracks")
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
layout.separator()
|
|
|
|
props = layout.operator("clip.track_markers",
|
|
|
|
text="Track Frame Backwards")
|
|
|
|
props.backwards = True
|
|
|
|
|
|
|
|
props = layout.operator("clip.track_markers", text="Track Backwards")
|
|
|
|
props.backwards = True
|
|
|
|
props.sequence = True
|
|
|
|
|
|
|
|
props = layout.operator("clip.track_markers", text="Track Forwards")
|
|
|
|
props.sequence = True
|
|
|
|
layout.operator("clip.track_markers", text="Track Frame Forwards")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
layout.operator("clip.delete_track")
|
|
|
|
layout.operator("clip.delete_marker")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
layout.operator("clip.add_marker_move")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
layout.menu("CLIP_MT_track_visibility")
|
|
|
|
layout.menu("CLIP_MT_track_transform")
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_reconstruction(Menu):
|
|
|
|
bl_label = "Reconstruction"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator("clip.set_origin")
|
2012-04-07 15:20:20 +00:00
|
|
|
props = layout.operator("clip.set_plane", text="Set Floor")
|
|
|
|
props.plane = 'FLOOR'
|
|
|
|
props = layout.operator("clip.set_plane", text="Set Wall")
|
|
|
|
props.plane = 'WALL'
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2011-11-08 06:10:04 +00:00
|
|
|
layout.operator("clip.set_axis", text="Set X Axis").axis = "X"
|
|
|
|
layout.operator("clip.set_axis", text="Set Y Axis").axis = "Y"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
layout.operator("clip.set_scale")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.operator("clip.track_to_empty")
|
2011-11-29 17:26:48 +00:00
|
|
|
layout.operator("clip.bundles_to_mesh")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_track_visibility(Menu):
|
|
|
|
bl_label = "Show/Hide"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator("clip.hide_tracks_clear", text="Show Hidden")
|
|
|
|
layout.operator("clip.hide_tracks", text="Hide Selected")
|
|
|
|
|
|
|
|
props = layout.operator("clip.hide_tracks", text="Hide Unselected")
|
|
|
|
props.unselected = True
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_track_transform(Menu):
|
|
|
|
bl_label = "Transform"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator("transform.translate")
|
|
|
|
layout.operator("transform.resize")
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_select(Menu):
|
|
|
|
bl_label = "Select"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator("clip.select_border")
|
|
|
|
layout.operator("clip.select_circle")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
2012-03-18 20:10:58 +00:00
|
|
|
layout.operator("clip.select_all").action = 'TOGGLE'
|
2011-11-07 12:55:18 +00:00
|
|
|
layout.operator("clip.select_all", text="Inverse").action = 'INVERT'
|
|
|
|
|
|
|
|
layout.menu("CLIP_MT_select_grouped")
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_select_grouped(Menu):
|
|
|
|
bl_label = "Select Grouped"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator_enum("clip.select_grouped", "group")
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_tracking_specials(Menu):
|
|
|
|
bl_label = "Specials"
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
return context.space_data.clip
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2012-01-17 17:27:18 +00:00
|
|
|
props = layout.operator("clip.disable_markers",
|
|
|
|
text="Enable Markers")
|
|
|
|
props.action = 'ENABLE'
|
|
|
|
|
|
|
|
props = layout.operator("clip.disable_markers", text="Disable markers")
|
|
|
|
props.action = 'DISABLE'
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
layout.operator("clip.set_origin")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
layout.operator("clip.hide_tracks")
|
|
|
|
layout.operator("clip.hide_tracks_clear", text="Show Tracks")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
props = layout.operator("clip.lock_tracks", text="Lock Tracks")
|
|
|
|
props.action = 'LOCK'
|
|
|
|
|
|
|
|
props = layout.operator("clip.lock_tracks", text="Unlock Tracks")
|
|
|
|
props.action = 'UNLOCK'
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_camera_presets(Menu):
|
2011-11-15 12:20:58 +00:00
|
|
|
"""Predefined tracking camera intrinsics"""
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_label = "Camera Presets"
|
|
|
|
preset_subdir = "tracking_camera"
|
|
|
|
preset_operator = "script.execute_preset"
|
2012-01-18 06:11:56 +00:00
|
|
|
draw = Menu.draw_preset
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_track_color_presets(Menu):
|
2011-11-15 12:20:58 +00:00
|
|
|
"""Predefined track color"""
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_label = "Color Presets"
|
|
|
|
preset_subdir = "tracking_track_color"
|
|
|
|
preset_operator = "script.execute_preset"
|
2012-01-18 06:11:56 +00:00
|
|
|
draw = Menu.draw_preset
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
2011-11-28 13:26:46 +00:00
|
|
|
class CLIP_MT_tracking_settings_presets(Menu):
|
|
|
|
"""Predefined tracking settings"""
|
|
|
|
bl_label = "Tracking Presets"
|
|
|
|
preset_subdir = "tracking_settings"
|
|
|
|
preset_operator = "script.execute_preset"
|
2012-01-18 06:11:56 +00:00
|
|
|
draw = Menu.draw_preset
|
2011-11-28 13:26:46 +00:00
|
|
|
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
class CLIP_MT_track_color_specials(Menu):
|
|
|
|
bl_label = "Track Color Specials"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator('clip.track_copy_color', icon='COPY_ID')
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_stabilize_2d_specials(Menu):
|
|
|
|
bl_label = "Track Color Specials"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator('clip.stabilize_2d_select')
|
|
|
|
|
|
|
|
if __name__ == "__main__": # only for live edit.
|
|
|
|
bpy.utils.register_module(__name__)
|