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
|
This commit frees list ui items from their dependencies to Panel, and hence from all the limitations this implied (mostly, the "only one list per panel" one).
It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels!
This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore!
To make all this work, other changes were also necessary:
* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.
* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.
* UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.
* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
Note: not sure whether we should add that one to all UILayout's prop funcs?
Note: will update addons using template list asap.
2012-12-28 09:20:16 +00:00
|
|
|
from bpy.types import Panel, Header, Menu, UIList
|
2013-02-10 10:29:38 +00:00
|
|
|
from bpy.app.translations import pgettext_iface as iface_
|
2014-02-13 17:49:26 +00:00
|
|
|
from bl_ui.properties_grease_pencil_common import GreasePencilPanel
|
This commit frees list ui items from their dependencies to Panel, and hence from all the limitations this implied (mostly, the "only one list per panel" one).
It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels!
This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore!
To make all this work, other changes were also necessary:
* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.
* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.
* UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.
* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
Note: not sure whether we should add that one to all UILayout's prop funcs?
Note: will update addons using template list asap.
2012-12-28 09:20:16 +00:00
|
|
|
|
2014-02-22 00:14:15 +00:00
|
|
|
|
This commit frees list ui items from their dependencies to Panel, and hence from all the limitations this implied (mostly, the "only one list per panel" one).
It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels!
This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore!
To make all this work, other changes were also necessary:
* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.
* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.
* UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.
* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
Note: not sure whether we should add that one to all UILayout's prop funcs?
Note: will update addons using template list asap.
2012-12-28 09:20:16 +00:00
|
|
|
class CLIP_UL_tracking_objects(UIList):
|
2013-01-15 23:15:32 +00:00
|
|
|
def draw_item(self, context, layout, data, item, icon,
|
|
|
|
active_data, active_propname, index):
|
2012-12-28 10:45:59 +00:00
|
|
|
# assert(isinstance(item, bpy.types.MovieTrackingObject)
|
This commit frees list ui items from their dependencies to Panel, and hence from all the limitations this implied (mostly, the "only one list per panel" one).
It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels!
This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore!
To make all this work, other changes were also necessary:
* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.
* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.
* UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.
* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
Note: not sure whether we should add that one to all UILayout's prop funcs?
Note: will update addons using template list asap.
2012-12-28 09:20:16 +00:00
|
|
|
tobj = item
|
|
|
|
if self.layout_type in {'DEFAULT', 'COMPACT'}:
|
2013-11-23 19:37:23 +00:00
|
|
|
layout.prop(tobj, "name", text="", emboss=False,
|
|
|
|
icon='CAMERA_DATA' if tobj.is_camera
|
|
|
|
else 'OBJECT_DATA')
|
This commit frees list ui items from their dependencies to Panel, and hence from all the limitations this implied (mostly, the "only one list per panel" one).
It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels!
This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore!
To make all this work, other changes were also necessary:
* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.
* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.
* UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.
* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
Note: not sure whether we should add that one to all UILayout's prop funcs?
Note: will update addons using template list asap.
2012-12-28 09:20:16 +00:00
|
|
|
elif self.layout_type in {'GRID'}:
|
|
|
|
layout.alignment = 'CENTER'
|
2013-02-10 08:54:10 +00:00
|
|
|
layout.label(text="",
|
|
|
|
icon='CAMERA_DATA' if tobj.is_camera
|
|
|
|
else 'OBJECT_DATA')
|
2012-07-25 13:44:07 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
class CLIP_HT_header(Header):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
|
2012-06-08 07:55:15 +00:00
|
|
|
def _draw_tracking(self, context):
|
2011-11-07 12:55:18 +00:00
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.template_header()
|
|
|
|
|
2014-01-27 07:38:53 +00:00
|
|
|
CLIP_MT_tracking_editor_menus.draw_collapsible(context, layout)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-06-08 07:55:15 +00:00
|
|
|
row = layout.row()
|
2012-06-19 22:17:19 +00:00
|
|
|
row.template_ID(sc, "clip", open="clip.open")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
if clip:
|
2012-06-08 07:55:15 +00:00
|
|
|
tracking = clip.tracking
|
|
|
|
active_object = tracking.objects.active
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
if sc.view == 'CLIP':
|
|
|
|
layout.prop(sc, "mode", text="")
|
2012-06-08 07:55:15 +00:00
|
|
|
layout.prop(sc, "view", text="", expand=True)
|
2014-02-07 14:26:43 +00:00
|
|
|
layout.prop(sc, "pivot_point", text="", icon_only=True)
|
2012-06-04 16:42:58 +00:00
|
|
|
|
2012-06-08 07:55:15 +00:00
|
|
|
r = active_object.reconstruction
|
2012-06-04 16:42:58 +00:00
|
|
|
|
2012-06-08 07:55:15 +00:00
|
|
|
if r.is_valid and sc.view == 'CLIP':
|
2012-06-12 17:11:00 +00:00
|
|
|
layout.label(text="Solve error: %.4f" %
|
2012-06-08 07:55:15 +00:00
|
|
|
(r.average_error))
|
2012-06-04 16:42:58 +00:00
|
|
|
elif sc.view == 'GRAPH':
|
2012-06-08 07:55:15 +00:00
|
|
|
layout.prop(sc, "view", text="", expand=True)
|
|
|
|
|
2012-06-12 17:11:16 +00:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(sc, "show_graph_only_selected", text="")
|
|
|
|
row.prop(sc, "show_graph_hidden", text="")
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
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',
|
2012-06-08 07:55:15 +00:00
|
|
|
text="Filters")
|
2011-11-15 12:20:58 +00:00
|
|
|
|
2013-08-23 20:41:21 +00:00
|
|
|
sub = row.row(align=True)
|
2011-11-15 12:20:58 +00:00
|
|
|
sub.active = clip.tracking.reconstruction.is_valid
|
|
|
|
sub.prop(sc, "show_graph_frames", icon='SEQUENCE', text="")
|
|
|
|
|
2013-10-13 20:26:29 +00:00
|
|
|
row.prop(sc, "show_graph_tracks_motion", icon='IPO', text="")
|
|
|
|
row.prop(sc, "show_graph_tracks_error", icon='ANIM', text="")
|
2011-11-07 12:55:18 +00:00
|
|
|
else:
|
2011-11-16 13:39:58 +00:00
|
|
|
row.prop(sc, "show_filters", icon='DISCLOSURE_TRI_RIGHT',
|
2012-06-08 07:55:15 +00:00
|
|
|
text="Filters")
|
|
|
|
elif sc.view == 'DOPESHEET':
|
2012-06-12 17:10:24 +00:00
|
|
|
dopesheet = tracking.dopesheet
|
2012-06-08 07:55:15 +00:00
|
|
|
layout.prop(sc, "view", text="", expand=True)
|
|
|
|
|
2012-06-12 17:10:47 +00:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(dopesheet, "show_only_selected", text="")
|
|
|
|
row.prop(dopesheet, "show_hidden", text="")
|
|
|
|
|
2012-06-12 17:11:00 +00:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(dopesheet, "sort_method", text="")
|
2012-06-19 22:17:19 +00:00
|
|
|
row.prop(dopesheet, "use_invert_sort",
|
|
|
|
text="Invert", toggle=True)
|
2012-06-08 07:55:15 +00:00
|
|
|
else:
|
|
|
|
layout.prop(sc, "view", text="", expand=True)
|
|
|
|
|
|
|
|
def _draw_masking(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
toolsettings = context.tool_settings
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.template_header()
|
|
|
|
|
2014-01-27 07:38:53 +00:00
|
|
|
CLIP_MT_masking_editor_menus.draw_collapsible(context, layout)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
row = layout.row()
|
2012-06-19 22:17:19 +00:00
|
|
|
row.template_ID(sc, "clip", open="clip.open")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2014-02-17 06:58:50 +00:00
|
|
|
if clip:
|
2014-03-20 10:08:42 +00:00
|
|
|
layout.prop(sc, "mode", text="")
|
|
|
|
|
2014-02-17 06:58:50 +00:00
|
|
|
row = layout.row()
|
|
|
|
row.template_ID(sc, "mask", new="mask.new")
|
2011-12-05 18:57:17 +00:00
|
|
|
|
2014-02-17 06:58:50 +00:00
|
|
|
layout.prop(sc, "pivot_point", text="", icon_only=True)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2014-02-17 06:58:50 +00:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(toolsettings, "use_proportional_edit_mask",
|
2014-02-18 21:02:59 +00:00
|
|
|
text="", icon_only=True)
|
2014-02-17 06:58:50 +00:00
|
|
|
if toolsettings.use_proportional_edit_mask:
|
|
|
|
row.prop(toolsettings, "proportional_edit_falloff",
|
|
|
|
text="", icon_only=True)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-06-08 07:55:15 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sc = context.space_data
|
|
|
|
|
2014-02-11 10:11:56 +00:00
|
|
|
if sc.mode in {'TRACKING'}:
|
2012-06-08 07:55:15 +00:00
|
|
|
self._draw_tracking(context)
|
|
|
|
else:
|
|
|
|
self._draw_masking(context)
|
2012-05-03 19:28:41 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
layout.template_running_jobs()
|
|
|
|
|
|
|
|
|
2014-01-27 07:38:53 +00:00
|
|
|
class CLIP_MT_tracking_editor_menus(Menu):
|
|
|
|
bl_idname = "CLIP_MT_tracking_editor_menus"
|
|
|
|
bl_label = ""
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
self.draw_menus(self.layout, context)
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def draw_menus(layout, context):
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
|
|
|
layout.menu("CLIP_MT_view")
|
|
|
|
|
|
|
|
if sc.view == 'CLIP':
|
|
|
|
if clip:
|
|
|
|
layout.menu("CLIP_MT_select")
|
|
|
|
layout.menu("CLIP_MT_clip")
|
|
|
|
layout.menu("CLIP_MT_track")
|
|
|
|
layout.menu("CLIP_MT_reconstruction")
|
|
|
|
else:
|
|
|
|
layout.menu("CLIP_MT_clip")
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_masking_editor_menus(Menu):
|
|
|
|
|
|
|
|
bl_idname = "CLIP_MT_masking_editor_menus"
|
|
|
|
bl_label = ""
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
self.draw_menus(self.layout, context)
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def draw_menus(layout, context):
|
2014-01-27 09:10:08 +00:00
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
2014-01-27 07:38:53 +00:00
|
|
|
|
|
|
|
layout.menu("CLIP_MT_view")
|
|
|
|
|
|
|
|
if clip:
|
|
|
|
layout.menu("MASK_MT_select")
|
|
|
|
layout.menu("CLIP_MT_clip") # XXX - remove?
|
|
|
|
layout.menu("MASK_MT_mask")
|
|
|
|
else:
|
|
|
|
layout.menu("CLIP_MT_clip") # XXX - remove?
|
|
|
|
|
|
|
|
|
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'
|
|
|
|
|
2012-05-15 18:50:51 +00:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
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
|
|
|
|
|
2014-02-11 10:11:56 +00:00
|
|
|
return clip and sc.view == 'CLIP'
|
2012-04-30 16:19:20 +00:00
|
|
|
|
|
|
|
|
2014-02-07 14:26:43 +00:00
|
|
|
class CLIP_PT_tools_clip(Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
bl_label = "Clip"
|
|
|
|
bl_translation_context = bpy.app.translations.contexts.id_movieclip
|
|
|
|
bl_category = "Track"
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
|
|
|
return clip and sc.view == 'CLIP' and sc.mode != 'MASK'
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
col = layout.column(align=True)
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.operator("clip.prefetch", text="Prefetch")
|
|
|
|
row.operator("clip.reload", text="Reload")
|
|
|
|
col.operator("clip.set_scene_frames")
|
|
|
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
bl_label = "Marker"
|
2014-02-07 14:26:43 +00:00
|
|
|
bl_category = "Track"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
2012-07-29 10:03:46 +00:00
|
|
|
layout = self.layout
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2011-11-28 13:26:46 +00:00
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
col = layout.column(align=True)
|
2014-02-07 14:26:43 +00:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.operator("clip.add_marker_at_click", text="Add")
|
|
|
|
row.operator("clip.delete_track", text="Delete")
|
2011-11-07 12:55:18 +00:00
|
|
|
col.operator("clip.detect_features")
|
|
|
|
|
2011-11-28 13:26:46 +00:00
|
|
|
|
2014-02-07 14:26:43 +00:00
|
|
|
class CLIP_PT_tracking_settings(CLIP_PT_tracking_panel, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
bl_label = "Tracking Settings"
|
|
|
|
bl_category = "Track"
|
2011-11-28 13:26:46 +00:00
|
|
|
|
2014-02-07 14:26:43 +00:00
|
|
|
def draw(self, context):
|
2011-11-28 13:26:46 +00:00
|
|
|
|
2014-02-07 14:26:43 +00:00
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
settings = clip.tracking.settings
|
|
|
|
layout = self.layout
|
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
label = CLIP_MT_tracking_settings_presets.bl_label
|
|
|
|
row.menu('CLIP_MT_tracking_settings_presets', text=label)
|
|
|
|
row.operator("clip.tracking_settings_preset_add",
|
|
|
|
text="", icon='ZOOMIN')
|
|
|
|
row.operator("clip.tracking_settings_preset_add",
|
|
|
|
text="", icon='ZOOMOUT').remove_active = True
|
2012-01-26 15:33:16 +00:00
|
|
|
|
2014-02-07 14:26:43 +00:00
|
|
|
row = col.row(align=True)
|
|
|
|
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
|
|
|
|
2014-02-07 14:26:43 +00:00
|
|
|
col.separator()
|
2011-11-28 13:26:46 +00:00
|
|
|
|
2014-02-07 14:26:43 +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
|
|
|
|
2014-02-07 14:26:43 +00:00
|
|
|
col.prop(settings, "default_motion_model")
|
|
|
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.label(text="Match:")
|
|
|
|
row.prop(settings, "default_pattern_match", text="")
|
|
|
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(settings, "use_default_brute")
|
|
|
|
row.prop(settings, "use_default_normalization")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
col.operator("clip.track_settings_as_default",
|
|
|
|
text="Copy From Active Track")
|
|
|
|
|
|
|
|
box = layout.box()
|
|
|
|
row = box.row(align=True)
|
|
|
|
row.prop(settings, "show_default_expanded", text="", emboss=False)
|
|
|
|
row.label(text="Extra Settings")
|
|
|
|
|
|
|
|
if settings.show_default_expanded:
|
|
|
|
col = box.column()
|
|
|
|
row = col.row()
|
|
|
|
row.prop(settings, "use_default_mask")
|
2011-11-28 13:26:46 +00:00
|
|
|
|
2011-11-28 17:10:32 +00:00
|
|
|
sub = col.column(align=True)
|
2014-02-07 14:26:43 +00:00
|
|
|
sub.prop(settings, "default_correlation_min")
|
2011-11-28 17:10:32 +00:00
|
|
|
sub.prop(settings, "default_frames_limit")
|
|
|
|
sub.prop(settings, "default_margin")
|
2011-11-28 13:26:46 +00:00
|
|
|
|
2014-02-19 12:42:32 +00:00
|
|
|
col = box.column()
|
|
|
|
col.prop(settings, "default_weight")
|
|
|
|
|
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"
|
2014-02-07 14:26:43 +00:00
|
|
|
bl_category = "Track"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
2014-02-07 14:26:43 +00:00
|
|
|
row.label(text="Track:")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-01-17 17:27:18 +00:00
|
|
|
props = row.operator("clip.track_markers", text="", icon='FRAME_PREV')
|
|
|
|
props.backwards = True
|
2012-06-11 04:34:59 +00:00
|
|
|
props.sequence = False
|
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
|
2012-06-11 04:34:59 +00:00
|
|
|
props = row.operator("clip.track_markers", text="", icon='FRAME_NEXT')
|
|
|
|
props.backwards = False
|
|
|
|
props.sequence = False
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2014-02-07 14:26:43 +00:00
|
|
|
col = layout.column(align=True)
|
2013-05-12 16:04:14 +00:00
|
|
|
row = col.row(align=True)
|
2014-02-07 14:26:43 +00:00
|
|
|
row.label(text="Clear:")
|
|
|
|
row.scale_x = 2.0
|
|
|
|
|
2014-03-19 14:32:44 +00:00
|
|
|
props = row.operator("clip.clear_track_path", text="", icon='BACK')
|
2014-02-07 14:26:43 +00:00
|
|
|
props.action = 'UPTO'
|
|
|
|
|
2014-03-19 14:32:44 +00:00
|
|
|
props = row.operator("clip.clear_track_path", text="", icon='FORWARD')
|
2014-02-07 14:26:43 +00:00
|
|
|
props.action = 'REMAINED'
|
2013-05-12 16:04:14 +00:00
|
|
|
|
2013-08-19 11:24:35 +00:00
|
|
|
col = layout.column()
|
|
|
|
row = col.row(align=True)
|
2014-02-07 14:26:43 +00:00
|
|
|
row.label(text="Refine:")
|
|
|
|
row.scale_x = 2.0
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2014-03-19 14:32:44 +00:00
|
|
|
props = row.operator("clip.refine_markers", text="", icon='LOOP_BACK')
|
2014-02-07 14:26:43 +00:00
|
|
|
props.backwards = True
|
|
|
|
|
2014-03-19 14:32:44 +00:00
|
|
|
props = row.operator("clip.refine_markers", text="", icon='LOOP_FORWARDS')
|
2014-02-07 14:26:43 +00:00
|
|
|
props.backwards = False
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.label(text="Merge:")
|
|
|
|
row.operator("clip.join_tracks", text="Join Tracks")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
Merge plane track feature from tomato branch
This commit includes all the changes made for plane tracker
in tomato branch.
Movie clip editor changes:
- Artist might create a plane track out of multiple point
tracks which belongs to the same track (minimum amount of
point tracks is 4, maximum is not actually limited).
When new plane track is added, it's getting "tracked"
across all point tracks, which makes it stick to the same
plane point tracks belong to.
- After plane track was added, it need to be manually adjusted
in a way it covers feature one might to mask/replace.
General transform tools (G, R, S) or sliding corners with
a mouse could be sued for this. Plane corner which
corresponds to left bottom image corner has got X/Y axis
on it (red is for X axis, green for Y).
- Re-adjusting plane corners makes plane to be "re-tracked"
for the frames sequence between current frame and next
and previous keyframes.
- Kayframes might be removed from the plane, using Shit-X
(Marker Delete) operator. However, currently manual
re-adjustment or "re-track" trigger is needed.
Compositor changes:
- Added new node called Plane Track Deform.
- User selects which plane track to use (for this he need
to select movie clip datablock, object and track names).
- Node gets an image input, which need to be warped into
the plane.
- Node outputs:
* Input image warped into the plane.
* Plane, rasterized to a mask.
Masking changes:
- Mask points might be parented to a plane track, which
makes this point deforming in a way as if it belongs
to the tracked plane.
Some video tutorials are available:
- Coder video: http://www.youtube.com/watch?v=vISEwqNHqe4
- Artist video: https://vimeo.com/71727578
This is mine and Keir's holiday code project :)
2013-08-16 09:46:30 +00:00
|
|
|
class CLIP_PT_tools_plane_tracking(CLIP_PT_tracking_panel, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
bl_label = "Plane Track"
|
2013-08-23 09:40:42 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2014-02-07 14:26:43 +00:00
|
|
|
bl_category = "Solve"
|
Merge plane track feature from tomato branch
This commit includes all the changes made for plane tracker
in tomato branch.
Movie clip editor changes:
- Artist might create a plane track out of multiple point
tracks which belongs to the same track (minimum amount of
point tracks is 4, maximum is not actually limited).
When new plane track is added, it's getting "tracked"
across all point tracks, which makes it stick to the same
plane point tracks belong to.
- After plane track was added, it need to be manually adjusted
in a way it covers feature one might to mask/replace.
General transform tools (G, R, S) or sliding corners with
a mouse could be sued for this. Plane corner which
corresponds to left bottom image corner has got X/Y axis
on it (red is for X axis, green for Y).
- Re-adjusting plane corners makes plane to be "re-tracked"
for the frames sequence between current frame and next
and previous keyframes.
- Kayframes might be removed from the plane, using Shit-X
(Marker Delete) operator. However, currently manual
re-adjustment or "re-track" trigger is needed.
Compositor changes:
- Added new node called Plane Track Deform.
- User selects which plane track to use (for this he need
to select movie clip datablock, object and track names).
- Node gets an image input, which need to be warped into
the plane.
- Node outputs:
* Input image warped into the plane.
* Plane, rasterized to a mask.
Masking changes:
- Mask points might be parented to a plane track, which
makes this point deforming in a way as if it belongs
to the tracked plane.
Some video tutorials are available:
- Coder video: http://www.youtube.com/watch?v=vISEwqNHqe4
- Artist video: https://vimeo.com/71727578
This is mine and Keir's holiday code project :)
2013-08-16 09:46:30 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.operator("clip.create_plane_track")
|
|
|
|
|
|
|
|
|
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"
|
2014-02-07 14:26:43 +00:00
|
|
|
bl_category = "Solve"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
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
|
|
|
|
2012-04-14 12:02:47 +00:00
|
|
|
col = layout.column()
|
2014-02-07 14:26:43 +00:00
|
|
|
row = col.row()
|
|
|
|
row.prop(settings, "use_tripod_solver", text="Tripod")
|
|
|
|
row.prop(settings, "use_keyframe_selection", text="Keyframe")
|
2012-04-14 12:02:47 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
col = layout.column(align=True)
|
2013-06-27 03:05:19 +00:00
|
|
|
col.active = (not settings.use_tripod_solver and
|
|
|
|
not settings.use_keyframe_selection)
|
2012-10-09 10:33:18 +00:00
|
|
|
col.prop(tracking_object, "keyframe_a")
|
|
|
|
col.prop(tracking_object, "keyframe_b")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
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)
|
2013-02-28 14:24:42 +00:00
|
|
|
col.active = tracking_object.is_camera
|
2014-02-07 14:26:43 +00:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.label(text="Refine:")
|
|
|
|
row.prop(settings, "refine_intrinsics", text="")
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.scale_y = 2.0
|
|
|
|
|
|
|
|
col.operator("clip.solve_camera",
|
|
|
|
text="Solve Camera Motion" if tracking_object.is_camera
|
|
|
|
else "Solve Object Motion")
|
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
|
|
|
|
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"
|
2014-02-07 14:26:43 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
bl_category = "Solve"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
clip = context.space_data.clip
|
|
|
|
settings = clip.tracking.settings
|
|
|
|
|
|
|
|
layout.operator("clip.clean_tracks")
|
|
|
|
|
2012-06-19 22:17:19 +00:00
|
|
|
layout.prop(settings, "clean_frames", text="Frames")
|
|
|
|
layout.prop(settings, "clean_error", text="Error")
|
|
|
|
layout.prop(settings, "clean_action", text="")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
2014-02-07 14:26:43 +00:00
|
|
|
class CLIP_PT_tools_geometry(CLIP_PT_tracking_panel, Panel):
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
bl_label = "Geometry"
|
2014-02-07 14:26:43 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
bl_category = "Solve"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
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")
|
|
|
|
|
|
|
|
|
2014-02-07 14:26:43 +00:00
|
|
|
class CLIP_PT_tools_orientation(CLIP_PT_tracking_panel, Panel):
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
bl_label = "Orientation"
|
2014-02-07 14:26:43 +00:00
|
|
|
bl_category = "Solve"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
sc = context.space_data
|
|
|
|
layout = self.layout
|
|
|
|
settings = sc.clip.tracking.settings
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2013-08-23 20:41:21 +00:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.operator("clip.set_plane", text="Floor").plane = 'FLOOR'
|
|
|
|
row.operator("clip.set_plane", text="Wall").plane = 'WALL'
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
col.operator("clip.set_origin")
|
|
|
|
|
2013-08-23 20:41:21 +00:00
|
|
|
row = col.row(align=True)
|
2011-11-07 12:55:18 +00:00
|
|
|
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()
|
2013-06-27 03:05:19 +00:00
|
|
|
row = col.row(align=True)
|
2013-05-09 16:38:55 +00:00
|
|
|
row.operator("clip.set_scale")
|
|
|
|
row.operator("clip.apply_solution_scale", text="Apply Scale")
|
2013-08-23 20:41:21 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
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_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()
|
2013-01-15 23:15:32 +00:00
|
|
|
row.template_list("CLIP_UL_tracking_objects", "", tracking, "objects",
|
2013-10-13 23:24:37 +00:00
|
|
|
tracking, "active_object_index", rows=1)
|
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="")
|
|
|
|
|
|
|
|
|
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
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
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)
|
2013-08-23 20:41:21 +00:00
|
|
|
sub = row.row(align=True)
|
2011-12-04 12:58:31 +00:00
|
|
|
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()
|
|
|
|
|
2013-08-23 20:41:21 +00:00
|
|
|
row.prop(act_track, "use_grayscale_preview", text="B/W", toggle=True)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-06-12 11:13:53 +00:00
|
|
|
row.separator()
|
2013-08-23 20:41:21 +00:00
|
|
|
row.prop(act_track, "use_alpha_preview",
|
2012-06-19 22:17:19 +00:00
|
|
|
text="", toggle=True, icon='IMAGE_ALPHA')
|
2012-06-12 11:13:53 +00:00
|
|
|
|
2014-02-07 14:26:43 +00:00
|
|
|
layout.prop(act_track, "weight")
|
|
|
|
|
|
|
|
if act_track.has_bundle:
|
|
|
|
label_text = "Average Error: %.4f" % (act_track.average_error)
|
|
|
|
layout.label(text=label_text)
|
|
|
|
|
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')
|
2013-08-23 20:41:21 +00:00
|
|
|
row.operator("clip.track_color_preset_add",
|
|
|
|
text="", icon='ZOOMOUT').remove_active = True
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(act_track, "use_custom_color")
|
|
|
|
if act_track.use_custom_color:
|
|
|
|
row.prop(act_track, "color", text="")
|
|
|
|
|
Merge plane track feature from tomato branch
This commit includes all the changes made for plane tracker
in tomato branch.
Movie clip editor changes:
- Artist might create a plane track out of multiple point
tracks which belongs to the same track (minimum amount of
point tracks is 4, maximum is not actually limited).
When new plane track is added, it's getting "tracked"
across all point tracks, which makes it stick to the same
plane point tracks belong to.
- After plane track was added, it need to be manually adjusted
in a way it covers feature one might to mask/replace.
General transform tools (G, R, S) or sliding corners with
a mouse could be sued for this. Plane corner which
corresponds to left bottom image corner has got X/Y axis
on it (red is for X axis, green for Y).
- Re-adjusting plane corners makes plane to be "re-tracked"
for the frames sequence between current frame and next
and previous keyframes.
- Kayframes might be removed from the plane, using Shit-X
(Marker Delete) operator. However, currently manual
re-adjustment or "re-track" trigger is needed.
Compositor changes:
- Added new node called Plane Track Deform.
- User selects which plane track to use (for this he need
to select movie clip datablock, object and track names).
- Node gets an image input, which need to be warped into
the plane.
- Node outputs:
* Input image warped into the plane.
* Plane, rasterized to a mask.
Masking changes:
- Mask points might be parented to a plane track, which
makes this point deforming in a way as if it belongs
to the tracked plane.
Some video tutorials are available:
- Coder video: http://www.youtube.com/watch?v=vISEwqNHqe4
- Artist video: https://vimeo.com/71727578
This is mine and Keir's holiday code project :)
2013-08-16 09:46:30 +00:00
|
|
|
|
|
|
|
class CLIP_PT_plane_track(CLIP_PT_tracking_panel, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
bl_label = "Plane Track"
|
2013-08-23 09:40:42 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
Merge plane track feature from tomato branch
This commit includes all the changes made for plane tracker
in tomato branch.
Movie clip editor changes:
- Artist might create a plane track out of multiple point
tracks which belongs to the same track (minimum amount of
point tracks is 4, maximum is not actually limited).
When new plane track is added, it's getting "tracked"
across all point tracks, which makes it stick to the same
plane point tracks belong to.
- After plane track was added, it need to be manually adjusted
in a way it covers feature one might to mask/replace.
General transform tools (G, R, S) or sliding corners with
a mouse could be sued for this. Plane corner which
corresponds to left bottom image corner has got X/Y axis
on it (red is for X axis, green for Y).
- Re-adjusting plane corners makes plane to be "re-tracked"
for the frames sequence between current frame and next
and previous keyframes.
- Kayframes might be removed from the plane, using Shit-X
(Marker Delete) operator. However, currently manual
re-adjustment or "re-track" trigger is needed.
Compositor changes:
- Added new node called Plane Track Deform.
- User selects which plane track to use (for this he need
to select movie clip datablock, object and track names).
- Node gets an image input, which need to be warped into
the plane.
- Node outputs:
* Input image warped into the plane.
* Plane, rasterized to a mask.
Masking changes:
- Mask points might be parented to a plane track, which
makes this point deforming in a way as if it belongs
to the tracked plane.
Some video tutorials are available:
- Coder video: http://www.youtube.com/watch?v=vISEwqNHqe4
- Artist video: https://vimeo.com/71727578
This is mine and Keir's holiday code project :)
2013-08-16 09:46:30 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
clip = context.space_data.clip
|
|
|
|
active_track = clip.tracking.plane_tracks.active
|
|
|
|
|
|
|
|
if not active_track:
|
|
|
|
layout.active = False
|
|
|
|
layout.label(text="No active plane track")
|
|
|
|
return
|
|
|
|
|
|
|
|
layout.prop(active_track, "name")
|
2013-09-10 12:46:18 +00:00
|
|
|
layout.prop(active_track, "use_auto_keying")
|
2013-11-29 17:26:57 +00:00
|
|
|
layout.prop(active_track, "image")
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.active = active_track.image is not None
|
|
|
|
row.prop(active_track, "image_opacity", text="Opacity")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
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
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2012-03-30 10:37:20 +00:00
|
|
|
clip = context.space_data.clip
|
|
|
|
settings = clip.tracking.settings
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
active = clip.tracking.tracks.active
|
|
|
|
if active:
|
Planar tracking support for motion tracking
===========================================
Major list of changes done in tomato branch:
- Add a planar tracking implementation to libmv
This adds a new planar tracking implementation to libmv. The
tracker is based on Ceres[1], the new nonlinear minimizer that
myself and Sameer released from Google as open source. Since
the motion model is more involved, the interface is
different than the RegionTracker interface used previously
in Blender.
The start of a C API in libmv-capi.{cpp,h} is also included.
- Migrate from pat_{min,max} for markers to 4 corners representation
Convert markers in the movie clip editor / 2D tracker from using
pat_min and pat_max notation to using the a more general, 4-corner
representation.
There is still considerable porting work to do; in particular
sliding from preview widget does not work correct for rotated
markers.
All other areas should be ported to new representation:
* Added support of sliding individual corners. LMB slide + Ctrl
would scale the whole pattern
* S would scale the whole marker, S-S would scale pattern only
* Added support of marker's rotation which is currently rotates
only patterns around their centers or all markers around median,
Rotation or other non-translation/scaling transformation of search
area doesn't make sense.
* Track Preview widget would display transformed pattern which
libmv actually operates with.
- "Efficient Second-order Minimization" for the planar tracker
This implements the "Efficient Second-order Minimization"
scheme, as supported by the existing translation tracker.
This increases the amount of per-iteration work, but
decreases the number of iterations required to converge and
also increases the size of the basin of attraction for the
optimization.
- Remove the use of the legacy RegionTracker API from Blender,
and replaces it with the new TrackRegion API. This also
adds several features to the planar tracker in libmv:
* Do a brute-force initialization of tracking similar to "Hybrid"
mode in the stable release, but using all floats. This is slower
but more accurate. It is still necessary to evaluate if the
performance loss is worth it. In particular, this change is
necessary to support high bit depth imagery.
* Add support for masks over the search window. This is a step
towards supporting user-defined tracker masks. The tracker masks
will make it easy for users to make a mask for e.g. a ball.
Not exposed into interface yet/
* Add Pearson product moment correlation coefficient checking (aka
"Correlation" in the UI. This causes tracking failure if the
tracked patch is not linearly related to the template.
* Add support for warping a few points in addition to the supplied
points. This is useful because the tracking code deliberately
does not expose the underlying warp representation. Instead,
warps are specified in an aparametric way via the correspondences.
- Replace the old style tracker configuration panel with the
new planar tracking panel. From a users perspective, this means:
* The old "tracking algorithm" picker is gone. There is only 1
algorithm now. We may revisit this later, but I would much
prefer to have only 1 algorithm. So far no optimization work
has been done so the speed is not there yet.
* There is now a dropdown to select the motion model. Choices:
* Translation
* Translation, rotation
* Translation, scale
* Translation, rotation, scale
* Affine
* Perspective
* The old "Hybrid" mode is gone; instead there is a toggle to
enable or disable translation-only tracker initialization. This
is the equivalent of the hyrbid mode before, but rewritten to work
with the new planar tracking modes.
* The pyramid levels setting is gone. At a future date, the planar
tracker will decide to use pyramids or not automatically. The
pyramid setting was ultimately a mistake; with the brute force
initialization it is unnecessary.
- Add light-normalized tracking
Added the ability to normalize patterns by their average value while
tracking, to make them invariant to global illumination changes.
Additional details could be found at wiki page [2]
[1] http://code.google.com/p/ceres-solver
[2] http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Motion_Tracker
2012-06-10 15:28:19 +00:00
|
|
|
col.prop(active, "motion_model")
|
2012-03-30 10:37:20 +00:00
|
|
|
col.prop(active, "pattern_match", text="Match")
|
2014-02-07 14:26:43 +00:00
|
|
|
col = layout.column()
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(active, "use_brute")
|
|
|
|
row.prop(active, "use_normalization")
|
|
|
|
|
|
|
|
box = layout.box()
|
|
|
|
row = box.row(align=True)
|
|
|
|
row.prop(settings, "show_extra_expanded", text="", emboss=False)
|
|
|
|
row.label(text="Extra Settings")
|
|
|
|
|
|
|
|
if settings.show_extra_expanded:
|
|
|
|
col = box.column()
|
|
|
|
row = col.row()
|
|
|
|
row.prop(active, "use_mask")
|
2012-03-30 10:37:20 +00:00
|
|
|
|
2014-02-07 14:26:43 +00:00
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.prop(active, "correlation_min")
|
|
|
|
sub.prop(active, "frames_limit")
|
|
|
|
sub.prop(active, "margin")
|
|
|
|
sub.separator()
|
|
|
|
sub.prop(settings, "speed")
|
2012-03-30 10:37:20 +00:00
|
|
|
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
class CLIP_PT_tracking_camera(Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
2014-02-07 14:26:43 +00:00
|
|
|
bl_label = "Camera"
|
2011-11-07 12:55:18 +00:00
|
|
|
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
|
|
|
|
|
2014-02-11 10:11:56 +00:00
|
|
|
return sc.mode in {'TRACKING'} 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')
|
2013-08-23 20:41:21 +00:00
|
|
|
row.operator("clip.camera_preset_add", text="",
|
|
|
|
icon='ZOOMOUT').remove_active = True
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
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")
|
|
|
|
|
2014-02-07 14:26:43 +00:00
|
|
|
|
|
|
|
class CLIP_PT_tracking_lens(Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
bl_label = "Lens"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
if CLIP_PT_clip_view_panel.poll(context):
|
|
|
|
sc = context.space_data
|
|
|
|
|
2014-02-11 10:11:56 +00:00
|
|
|
return sc.mode in {'TRACKING'} and sc.clip
|
2014-02-07 14:26:43 +00:00
|
|
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
sub = row.split(percentage=0.65, align=True)
|
|
|
|
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="")
|
|
|
|
|
2014-02-20 13:41:05 +00:00
|
|
|
col = layout.column()
|
2011-12-06 18:39:16 +00:00
|
|
|
col.label(text="Lens Distortion:")
|
2014-02-20 13:41:05 +00:00
|
|
|
camera = clip.tracking.camera
|
|
|
|
col.prop(camera, "distortion_model", text="")
|
|
|
|
if camera.distortion_model == 'POLYNOMIAL':
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(camera, "k1")
|
|
|
|
col.prop(camera, "k2")
|
|
|
|
col.prop(camera, "k3")
|
|
|
|
elif camera.distortion_model == 'DIVISION':
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(camera, "division_k1")
|
|
|
|
col.prop(camera, "division_k2")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
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)
|
2014-02-07 14:26:43 +00:00
|
|
|
|
2013-08-23 20:41:21 +00:00
|
|
|
sub = row.row(align=True)
|
2012-01-15 13:31:58 +00:00
|
|
|
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()
|
2013-08-23 20:41:21 +00:00
|
|
|
row.prop(sc, "use_grayscale_preview", text="B/W", toggle=True)
|
2014-02-07 14:26:43 +00:00
|
|
|
row.separator()
|
2014-03-19 14:32:44 +00:00
|
|
|
row.prop(sc, "use_mute_footage", text="", icon='VISIBLE_IPO_ON', toggle=True)
|
2012-01-15 13:31:58 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
col = layout.column(align=True)
|
2014-02-07 14:26:43 +00:00
|
|
|
col.prop(sc.clip_user, "use_render_undistorted", text="Render Undistorted")
|
|
|
|
col.prop(sc, "lock_selection", text="Lock to Selection")
|
|
|
|
col.prop(sc, "show_stable", text="Display Stabilization")
|
2012-02-05 13:43:58 +00:00
|
|
|
if sc.view == 'GRAPH':
|
|
|
|
col.prop(sc, "lock_time_cursor")
|
2014-02-07 14:26:43 +00:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(sc, "show_grid", text="Grid")
|
|
|
|
row.prop(sc, "use_manual_calibration", text="Calibration")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
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-06-04 16:42:58 +00:00
|
|
|
|
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"
|
|
|
|
|
2012-06-04 16:42:58 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
sc = context.space_data
|
|
|
|
|
2012-07-25 13:44:07 +00:00
|
|
|
return sc.mode != 'MASK'
|
2012-06-04 16:42:58 +00:00
|
|
|
|
2012-02-05 13:43:58 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
sc = context.space_data
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2013-08-23 20:41:21 +00:00
|
|
|
row = col.row(align=True)
|
2012-02-05 13:43:58 +00:00
|
|
|
row.prop(sc, "show_marker_pattern", text="Pattern")
|
|
|
|
row.prop(sc, "show_marker_search", text="Search")
|
|
|
|
|
2013-08-23 20:41:21 +00:00
|
|
|
row = col.row(align=True)
|
2012-02-05 13:43:58 +00:00
|
|
|
row.active = sc.show_track_path
|
2014-02-07 14:26:43 +00:00
|
|
|
row.prop(sc, "show_track_path", text="Path")
|
2012-02-05 13:43:58 +00:00
|
|
|
row.prop(sc, "path_length", text="Length")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2014-02-07 14:26:43 +00:00
|
|
|
col = layout.column(align=True)
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(sc, "show_disabled", "Disabled")
|
|
|
|
row.prop(sc, "show_names", text="Info")
|
|
|
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
if sc.mode != 'MASK':
|
|
|
|
row.prop(sc, "show_bundles", text="3D Markers")
|
|
|
|
row.prop(sc, "show_tiny_markers", text="Thin")
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2014-02-11 10:11:56 +00:00
|
|
|
class CLIP_PT_marker(CLIP_PT_tracking_panel, Panel):
|
|
|
|
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_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"
|
2014-02-11 10:11:56 +00:00
|
|
|
bl_category = "Stabilization"
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
2014-02-11 10:11:56 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
if CLIP_PT_clip_view_panel.poll(context):
|
|
|
|
sc = context.space_data
|
|
|
|
|
|
|
|
return sc.mode in {'TRACKING'} and sc.clip
|
|
|
|
|
|
|
|
return False
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
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()
|
2013-02-18 13:30:40 +00:00
|
|
|
row.template_list("UI_UL_list", "stabilization_tracks", stab, "tracks",
|
2013-10-13 23:24:37 +00:00
|
|
|
stab, "active_track_index", rows=2)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
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_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
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
2012-10-01 11:26:52 +00:00
|
|
|
col = layout.column()
|
|
|
|
col.active = clip.use_proxy
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-10-01 11:26:52 +00:00
|
|
|
col.label(text="Build Original:")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-10-01 11:26:52 +00:00
|
|
|
row = col.row(align=True)
|
2012-02-01 18:08:37 +00:00
|
|
|
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-10-01 11:26:52 +00:00
|
|
|
col.label(text="Build Undistorted:")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-10-01 11:26:52 +00:00
|
|
|
row = col.row(align=True)
|
2012-02-01 18:08:37 +00:00
|
|
|
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
|
|
|
|
2012-10-01 11:26:52 +00:00
|
|
|
col.prop(clip.proxy, "quality")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-10-01 11:26:52 +00:00
|
|
|
col.prop(clip, "use_proxy_custom_directory")
|
2011-11-07 12:55:18 +00:00
|
|
|
if clip.use_proxy_custom_directory:
|
2012-10-01 11:26:52 +00:00
|
|
|
col.prop(clip.proxy, "directory")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-10-01 11:26:52 +00:00
|
|
|
col.operator("clip.rebuild_proxy", text="Build Proxy")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
if clip.source == 'MOVIE':
|
2012-10-01 11:26:52 +00:00
|
|
|
col2 = col.column()
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-10-01 11:26:52 +00:00
|
|
|
col2.label(text="Use timecode index:")
|
|
|
|
col2.prop(clip.proxy, "timecode", text="")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-10-01 11:26:52 +00:00
|
|
|
col2 = col.column()
|
|
|
|
col2.label(text="Proxy render size:")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
col.prop(sc.clip_user, "proxy_render_size", text="")
|
2012-10-01 11:26:52 +00:00
|
|
|
|
2014-02-07 14:26:43 +00:00
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Mask (similar code in space_image.py, keep in sync)
|
|
|
|
|
|
|
|
|
|
|
|
from bl_ui.properties_mask_common import (MASK_PT_mask,
|
|
|
|
MASK_PT_layers,
|
|
|
|
MASK_PT_spline,
|
|
|
|
MASK_PT_point,
|
|
|
|
MASK_PT_display,
|
|
|
|
MASK_PT_tools,
|
|
|
|
MASK_PT_transforms,
|
|
|
|
MASK_PT_add)
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_mask_layers(MASK_PT_layers, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_mask_display(MASK_PT_display, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_active_mask_spline(MASK_PT_spline, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_active_mask_point(MASK_PT_point, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_mask(MASK_PT_mask, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_tools_mask_add(MASK_PT_add, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_tools_mask_transforms(MASK_PT_transforms, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_tools_mask(MASK_PT_tools, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
|
|
|
|
# --- end mask ---
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
2014-02-13 17:49:26 +00:00
|
|
|
class CLIP_PT_tools_grease_pencil(GreasePencilPanel, Panel):
|
2014-02-11 10:11:56 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
bl_category = "Grease Pencil"
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2012-06-05 18:38:09 +00:00
|
|
|
col = layout.column()
|
|
|
|
col.template_movieclip(sc, "clip", compact=True)
|
2012-08-04 10:47:31 +00:00
|
|
|
col.prop(clip, "frame_start")
|
2012-06-12 21:25:23 +00:00
|
|
|
col.prop(clip, "frame_offset")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-06-04 16:42:58 +00:00
|
|
|
|
2013-04-22 11:19:12 +00:00
|
|
|
class CLIP_PT_footage_info(CLIP_PT_clip_view_panel, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
bl_label = "Footage Information"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sc = context.space_data
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.template_movieclip_information(sc, "clip", sc.clip_user)
|
|
|
|
|
|
|
|
|
2014-02-07 14:26:43 +00:00
|
|
|
class CLIP_PT_tools_scenesetup(Panel):
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
2014-02-07 14:26:43 +00:00
|
|
|
bl_label = "Scene Setup"
|
2013-03-15 15:13:34 +00:00
|
|
|
bl_translation_context = bpy.app.translations.contexts.id_movieclip
|
2014-02-07 14:26:43 +00:00
|
|
|
bl_category = "Solve"
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
|
|
|
return clip and sc.view == 'CLIP' and sc.mode != 'MASK'
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
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-07-29 12:07:06 +00:00
|
|
|
|
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
|
|
|
|
2013-02-10 10:29:38 +00:00
|
|
|
text = iface_("Zoom %d:%d")
|
2012-05-02 17:33:48 +00:00
|
|
|
for a, b in ratios:
|
2013-02-10 10:29:38 +00:00
|
|
|
layout.operator("clip.view_zoom_ratio",
|
|
|
|
text=text % (a, b),
|
|
|
|
translate=False).ratio = a / b
|
2012-05-02 17:33:48 +00:00
|
|
|
else:
|
2012-10-09 10:33:24 +00:00
|
|
|
if sc.view == 'GRAPH':
|
|
|
|
layout.operator_context = 'INVOKE_REGION_PREVIEW'
|
|
|
|
layout.operator("clip.graph_center_current_frame")
|
|
|
|
layout.operator("clip.graph_view_all")
|
|
|
|
layout.operator_context = 'INVOKE_DEFAULT'
|
|
|
|
|
2012-05-02 17:33:48 +00:00
|
|
|
layout.prop(sc, "show_seconds")
|
2014-05-01 04:49:47 +00:00
|
|
|
layout.prop(sc, "show_locked_time")
|
2012-05-02 17:33:48 +00:00
|
|
|
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"
|
2013-03-15 15:13:34 +00:00
|
|
|
bl_translation_context = bpy.app.translations.contexts.id_movieclip
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
|
|
|
layout.operator("clip.open")
|
|
|
|
|
|
|
|
if clip:
|
2013-04-04 09:50:38 +00:00
|
|
|
layout.operator("clip.prefetch")
|
2011-11-07 12:55:18 +00:00
|
|
|
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()
|
2013-08-23 20:41:21 +00:00
|
|
|
layout.operator("clip.clear_track_path",
|
|
|
|
text="Clear After").action = 'REMAINED'
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2013-08-23 20:41:21 +00:00
|
|
|
layout.operator("clip.clear_track_path",
|
|
|
|
text="Clear Before").action = 'UPTO'
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2013-08-23 20:41:21 +00:00
|
|
|
layout.operator("clip.clear_track_path",
|
|
|
|
text="Clear Track Path").action = 'ALL'
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
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()
|
2013-08-23 20:41:21 +00:00
|
|
|
layout.operator("clip.track_markers",
|
|
|
|
text="Track Frame Backwards").backwards = True
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
props = layout.operator("clip.track_markers", text="Track Backwards")
|
|
|
|
props.backwards = True
|
|
|
|
props.sequence = True
|
|
|
|
|
2013-08-23 20:41:21 +00:00
|
|
|
layout.operator("clip.track_markers",
|
|
|
|
text="Track Forwards").sequence = True
|
2011-11-07 12:55:18 +00:00
|
|
|
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")
|
2013-08-23 20:41:21 +00:00
|
|
|
layout.operator("clip.set_plane", text="Set Floor").plane = 'FLOOR'
|
|
|
|
layout.operator("clip.set_plane", text="Set Wall").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")
|
|
|
|
|
2013-08-23 20:41:21 +00:00
|
|
|
layout.operator("clip.hide_tracks",
|
|
|
|
text="Hide Unselected").unselected = True
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2012-07-25 13:44:07 +00:00
|
|
|
layout.operator("clip.select_border")
|
|
|
|
layout.operator("clip.select_circle")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-07-25 13:44:07 +00:00
|
|
|
layout.separator()
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-07-25 13:44:07 +00:00
|
|
|
layout.operator("clip.select_all"
|
|
|
|
).action = 'TOGGLE'
|
|
|
|
layout.operator("clip.select_all",
|
|
|
|
text="Inverse").action = 'INVERT'
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-07-25 13:44:07 +00:00
|
|
|
layout.menu("CLIP_MT_select_grouped")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2013-08-23 20:41:21 +00:00
|
|
|
layout.operator("clip.disable_markers",
|
|
|
|
text="Enable Markers").action = 'ENABLE'
|
2012-01-17 17:27:18 +00:00
|
|
|
|
2013-08-23 20:41:21 +00:00
|
|
|
layout.operator("clip.disable_markers",
|
|
|
|
text="Disable markers").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()
|
2013-08-23 20:41:21 +00:00
|
|
|
layout.operator("clip.lock_tracks", text="Lock Tracks").action = 'LOCK'
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2013-08-23 20:41:21 +00:00
|
|
|
layout.operator("clip.lock_tracks",
|
|
|
|
text="Unlock Tracks").action = 'UNLOCK'
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2012-06-19 22:17:19 +00:00
|
|
|
layout.operator("clip.track_copy_color", icon='COPY_ID')
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_stabilize_2d_specials(Menu):
|
|
|
|
bl_label = "Track Color Specials"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2012-06-19 22:17:19 +00:00
|
|
|
layout.operator("clip.stabilize_2d_select")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-07-25 13:44:07 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
if __name__ == "__main__": # only for live edit.
|
|
|
|
bpy.utils.register_module(__name__)
|