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_
|
2019-03-13 12:41:22 +11:00
|
|
|
from bl_ui.utils import PresetPanel
|
2019-06-11 16:08:32 +10:00
|
|
|
from bl_ui.properties_grease_pencil_common import (
|
2018-08-22 16:59:04 +02:00
|
|
|
AnnotationDrawingToolsPanel,
|
|
|
|
AnnotationDataPanel,
|
2018-07-31 21:06:08 +10: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
|
|
|
|
2014-02-22 11:14:15 +11: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):
|
2019-04-19 07:32:24 +02: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 20:37:23 +01:00
|
|
|
layout.prop(tobj, "name", text="", emboss=False,
|
|
|
|
icon='CAMERA_DATA' if tobj.is_camera
|
|
|
|
else 'OBJECT_DATA')
|
2015-04-14 10:29:11 +10:00
|
|
|
elif self.layout_type == 'GRID':
|
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
|
|
|
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
|
|
|
|
2018-09-27 12:44:51 +02:00
|
|
|
class CLIP_PT_display(Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'HEADER'
|
|
|
|
bl_label = "Clip Display"
|
|
|
|
bl_ui_units_x = 13
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_marker_display(Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'HEADER'
|
|
|
|
bl_label = "Marker Display"
|
|
|
|
bl_parent_id = 'CLIP_PT_display'
|
|
|
|
bl_ui_units_x = 13
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
view = context.space_data
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
|
|
|
col = row.column()
|
|
|
|
col.prop(view, "show_marker_pattern", text="Pattern")
|
|
|
|
col.prop(view, "show_marker_search", text="Search")
|
|
|
|
|
|
|
|
col.active = view.show_track_path
|
|
|
|
col.prop(view, "show_track_path", text="Path")
|
|
|
|
col.prop(view, "path_length", text="Length")
|
|
|
|
|
|
|
|
col = row.column()
|
|
|
|
col.prop(view, "show_disabled", text="Show Disabled")
|
|
|
|
col.prop(view, "show_names", text="Info")
|
|
|
|
|
|
|
|
if view.mode != 'MASK':
|
|
|
|
col.prop(view, "show_bundles", text="3D Markers")
|
2019-06-23 01:56:20 +02:00
|
|
|
col.prop(view, "show_tiny_markers", text="Display Thin")
|
2018-09-27 12:44:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_clip_display(Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'HEADER'
|
|
|
|
bl_label = "Clip Display"
|
|
|
|
bl_parent_id = 'CLIP_PT_display'
|
|
|
|
bl_ui_units_x = 13
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sc = context.space_data
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(sc, "show_red_channel", text="R", toggle=True)
|
|
|
|
row.prop(sc, "show_green_channel", text="G", toggle=True)
|
|
|
|
row.prop(sc, "show_blue_channel", text="B", toggle=True)
|
|
|
|
row.separator()
|
|
|
|
row.prop(sc, "use_grayscale_preview", text="B/W", toggle=True)
|
|
|
|
row.separator()
|
2019-06-22 15:04:46 +10:00
|
|
|
row.prop(sc, "use_mute_footage", text="", icon='HIDE_OFF', toggle=True)
|
2018-09-27 12:44:51 +02:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
col = row.column()
|
|
|
|
col.prop(sc.clip_user, "use_render_undistorted", text="Render Undistorted")
|
|
|
|
col.prop(sc, "lock_selection", text="Lock to Selection")
|
|
|
|
col = row.column()
|
|
|
|
col.prop(sc, "show_stable", text="Show Stable")
|
|
|
|
col.prop(sc, "show_grid", text="Grid")
|
|
|
|
col.prop(sc, "use_manual_calibration", text="Calibration")
|
|
|
|
|
|
|
|
clip = sc.clip
|
|
|
|
if clip:
|
|
|
|
col = layout.column()
|
|
|
|
col.prop(clip, "display_aspect", text="Display Aspect Ratio")
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2018-06-28 08:27:03 +02:00
|
|
|
CLIP_MT_tracking_editor_menus.draw_collapsible(context, layout)
|
|
|
|
|
|
|
|
layout.separator_spacer()
|
|
|
|
|
2012-06-08 07:55:15 +00:00
|
|
|
row = layout.row()
|
2018-09-27 12:44:51 +02:00
|
|
|
if sc.view == 'CLIP':
|
|
|
|
row.template_ID(sc, "clip", open="clip.open")
|
|
|
|
else:
|
|
|
|
row = layout.row(align=True)
|
2018-10-22 19:19:15 +02:00
|
|
|
props = row.operator("clip.refine_markers", text="", icon='TRACKING_REFINE_BACKWARDS')
|
2018-09-27 12:44:51 +02:00
|
|
|
props.backwards = True
|
|
|
|
row.separator()
|
|
|
|
|
2018-10-22 19:19:15 +02:00
|
|
|
props = row.operator("clip.clear_track_path", text="", icon='TRACKING_CLEAR_BACKWARDS')
|
2018-09-27 12:44:51 +02:00
|
|
|
props.action = 'UPTO'
|
|
|
|
row.separator()
|
|
|
|
|
2018-10-22 19:19:15 +02:00
|
|
|
props = row.operator("clip.track_markers", text="", icon='TRACKING_BACKWARDS_SINGLE')
|
2018-09-27 12:44:51 +02:00
|
|
|
props.backwards = True
|
|
|
|
props.sequence = False
|
|
|
|
props = row.operator("clip.track_markers", text="",
|
2018-10-22 19:19:15 +02:00
|
|
|
icon='TRACKING_BACKWARDS')
|
2018-09-27 12:44:51 +02:00
|
|
|
props.backwards = True
|
|
|
|
props.sequence = True
|
2018-10-22 19:19:15 +02:00
|
|
|
props = row.operator("clip.track_markers", text="", icon='TRACKING_FORWARDS')
|
2018-09-27 12:44:51 +02:00
|
|
|
props.backwards = False
|
|
|
|
props.sequence = True
|
2018-10-22 19:19:15 +02:00
|
|
|
props = row.operator("clip.track_markers", text="", icon='TRACKING_FORWARDS_SINGLE')
|
2018-09-27 12:44:51 +02:00
|
|
|
props.backwards = False
|
|
|
|
props.sequence = False
|
|
|
|
row.separator()
|
|
|
|
|
2018-10-22 19:19:15 +02:00
|
|
|
props = row.operator("clip.clear_track_path", text="", icon='TRACKING_CLEAR_FORWARDS')
|
2018-09-27 12:44:51 +02:00
|
|
|
props.action = 'REMAINED'
|
|
|
|
row.separator()
|
|
|
|
|
2018-10-22 19:19:15 +02:00
|
|
|
props = row.operator("clip.refine_markers", text="", icon='TRACKING_REFINE_FORWARDS')
|
2018-09-27 12:44:51 +02:00
|
|
|
props.backwards = False
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2018-06-28 08:27:03 +02:00
|
|
|
layout.separator_spacer()
|
2018-06-11 16:57:35 +02: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':
|
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':
|
2020-07-07 11:09:31 +02:00
|
|
|
layout.label(text="Solve error: %.2f px" %
|
2012-06-08 07:55:15 +00:00
|
|
|
(r.average_error))
|
2018-09-27 12:44:51 +02:00
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(sc, "pivot_point", text="", icon_only=True)
|
|
|
|
row = layout.row(align=True)
|
|
|
|
icon = 'LOCKED' if sc.lock_selection else 'UNLOCKED'
|
|
|
|
row.prop(sc, "lock_selection", icon=icon, text="")
|
|
|
|
row.popover(panel='CLIP_PT_display')
|
|
|
|
|
2012-06-04 16:42:58 +00:00
|
|
|
elif sc.view == 'GRAPH':
|
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)
|
|
|
|
|
2019-05-08 09:10:29 +02:00
|
|
|
sub = row.row(align=True)
|
|
|
|
sub.active = clip.tracking.reconstruction.is_valid
|
|
|
|
sub.prop(sc, "show_graph_frames", icon='SEQUENCE', text="")
|
|
|
|
|
|
|
|
row.prop(sc, "show_graph_tracks_motion", icon='GRAPH', text="")
|
|
|
|
row.prop(sc, "show_graph_tracks_error", icon='ANIM', text="")
|
2018-09-27 12:44:51 +02:00
|
|
|
|
2012-06-08 07:55:15 +00:00
|
|
|
elif sc.view == 'DOPESHEET':
|
2012-06-12 17:10:24 +00:00
|
|
|
dopesheet = tracking.dopesheet
|
2012-06-08 07:55:15 +00:00
|
|
|
|
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
|
|
|
|
|
|
|
def _draw_masking(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2018-12-17 17:20:24 +11:00
|
|
|
tool_settings = context.tool_settings
|
2012-06-08 07:55:15 +00:00
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
2014-01-27 18:38:53 +11:00
|
|
|
CLIP_MT_masking_editor_menus.draw_collapsible(context, layout)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2018-06-28 08:27:03 +02:00
|
|
|
layout.separator_spacer()
|
|
|
|
|
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
|
|
|
|
2018-06-28 08:27:03 +02:00
|
|
|
layout.separator_spacer()
|
|
|
|
|
2014-02-17 12:58:50 +06:00
|
|
|
if clip:
|
2018-06-11 16:57:35 +02:00
|
|
|
|
2014-02-17 12:58:50 +06:00
|
|
|
layout.prop(sc, "pivot_point", text="", icon_only=True)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2014-02-17 12:58:50 +06:00
|
|
|
row = layout.row(align=True)
|
2018-12-17 17:26:47 +11:00
|
|
|
row.prop(tool_settings, "use_proportional_edit_mask", text="", icon_only=True)
|
2018-06-11 16:57:35 +02:00
|
|
|
sub = row.row(align=True)
|
2018-12-17 17:26:47 +11:00
|
|
|
sub.active = tool_settings.use_proportional_edit_mask
|
|
|
|
sub.prop(tool_settings, "proportional_edit_falloff", text="", icon_only=True)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2018-09-27 12:44:51 +02:00
|
|
|
row = layout.row()
|
|
|
|
row.template_ID(sc, "mask", new="mask.new")
|
|
|
|
row.popover(panel='CLIP_PT_mask_display')
|
|
|
|
row = layout.row(align=True)
|
|
|
|
icon = 'LOCKED' if sc.lock_selection else 'UNLOCKED'
|
|
|
|
row.prop(sc, "lock_selection", icon=icon, text="")
|
|
|
|
row.popover(panel='CLIP_PT_display')
|
|
|
|
|
2012-06-08 07:55:15 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sc = context.space_data
|
|
|
|
|
2019-04-21 04:49:19 +10:00
|
|
|
layout.template_header()
|
2018-05-01 18:47:26 +02:00
|
|
|
|
|
|
|
layout.prop(sc, "mode", text="")
|
2015-04-14 10:29:11 +10:00
|
|
|
if sc.mode == 'TRACKING':
|
2018-06-13 15:04:07 +02:00
|
|
|
layout.prop(sc, "view", text="")
|
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
|
|
|
|
2014-01-27 18:38:53 +11:00
|
|
|
class CLIP_MT_tracking_editor_menus(Menu):
|
|
|
|
bl_idname = "CLIP_MT_tracking_editor_menus"
|
|
|
|
bl_label = ""
|
|
|
|
|
|
|
|
def draw(self, context):
|
2018-12-20 12:02:21 +11:00
|
|
|
layout = self.layout
|
2014-01-27 18:38:53 +11:00
|
|
|
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):
|
2018-12-20 12:02:21 +11:00
|
|
|
layout = self.layout
|
2014-01-27 15:10:08 +06:00
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
2014-01-27 18:38:53 +11:00
|
|
|
|
|
|
|
layout.menu("CLIP_MT_view")
|
|
|
|
|
|
|
|
if clip:
|
|
|
|
layout.menu("MASK_MT_select")
|
2021-01-12 14:43:00 -05:00
|
|
|
layout.menu("CLIP_MT_clip")
|
2018-10-22 18:08:19 +11:00
|
|
|
layout.menu("MASK_MT_add")
|
2014-01-27 18:38:53 +11:00
|
|
|
layout.menu("MASK_MT_mask")
|
|
|
|
else:
|
2021-01-12 14:43:00 -05:00
|
|
|
layout.menu("CLIP_MT_clip")
|
2014-01-27 18:38:53 +11:00
|
|
|
|
|
|
|
|
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 16:11:56 +06:00
|
|
|
return clip and sc.view == 'CLIP'
|
2012-04-30 16:19:20 +00:00
|
|
|
|
|
|
|
|
2014-02-07 20:26:43 +06: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'
|
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw(self, _context):
|
2014-02-07 20:26:43 +06:00
|
|
|
layout = self.layout
|
2018-09-27 12:44:51 +02:00
|
|
|
|
2014-02-07 20:26:43 +06:00
|
|
|
col = layout.column(align=True)
|
2018-09-27 12:44:51 +02:00
|
|
|
col.operator("clip.set_scene_frames")
|
2014-02-07 20:26:43 +06:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.operator("clip.prefetch", text="Prefetch")
|
|
|
|
row.operator("clip.reload", text="Reload")
|
|
|
|
|
|
|
|
|
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 20:26:43 +06:00
|
|
|
bl_category = "Track"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-04-19 07:32:24 +02: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-07 12:55:18 +00:00
|
|
|
col = layout.column(align=True)
|
2014-02-07 20:26:43 +06: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 20:26:43 +06: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
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw_header_preset(self, _context):
|
2018-06-20 16:32:31 +02:00
|
|
|
CLIP_PT_tracking_settings_presets.draw_panel_header(self.layout)
|
2018-04-27 13:50:26 +02:00
|
|
|
|
2014-02-07 20:26:43 +06:00
|
|
|
def draw(self, context):
|
2018-09-27 12:44:51 +02:00
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
2011-11-28 13:26:46 +00:00
|
|
|
|
2014-02-07 20:26:43 +06:00
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
settings = clip.tracking.settings
|
2018-09-27 12:44:51 +02:00
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(settings, "default_pattern_size")
|
|
|
|
col.prop(settings, "default_search_size")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col.prop(settings, "default_motion_model")
|
|
|
|
col.prop(settings, "default_pattern_match", text="Match")
|
|
|
|
|
|
|
|
col.prop(settings, "use_default_brute")
|
|
|
|
col.prop(settings, "use_default_normalization")
|
|
|
|
|
2014-02-07 20:26:43 +06:00
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
row = col.row(align=True)
|
2018-09-27 12:44:51 +02:00
|
|
|
row.use_property_split = False
|
2014-02-07 20:26:43 +06: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
|
|
|
|
2014-02-07 20:26:43 +06:00
|
|
|
col.separator()
|
|
|
|
col.operator("clip.track_settings_as_default",
|
2020-10-07 08:04:53 -05:00
|
|
|
text="Copy from Active Track")
|
2014-02-07 20:26:43 +06:00
|
|
|
|
|
|
|
|
2018-09-27 12:44:51 +02:00
|
|
|
class CLIP_PT_tracking_settings_extras(CLIP_PT_tracking_panel, Panel):
|
|
|
|
bl_label = "Tracking Settings Extra"
|
|
|
|
bl_parent_id = "CLIP_PT_tracking_settings"
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
2011-11-28 13:26:46 +00:00
|
|
|
|
2018-09-27 12:44:51 +02:00
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
settings = clip.tracking.settings
|
2011-11-28 13:26:46 +00:00
|
|
|
|
2018-09-27 12:44:51 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(settings, "default_weight")
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(settings, "default_correlation_min")
|
|
|
|
col.prop(settings, "default_margin")
|
|
|
|
col.prop(settings, "use_default_mask")
|
2014-02-19 18:42:32 +06: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"
|
2014-02-07 20:26:43 +06:00
|
|
|
bl_category = "Track"
|
2018-09-27 12:44:51 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw(self, _context):
|
2011-11-07 12:55:18 +00:00
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
2014-02-07 20:26:43 +06:00
|
|
|
row.label(text="Track:")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-06-19 15:05:25 +02:00
|
|
|
props = row.operator("clip.track_markers", text="", icon='TRACKING_BACKWARDS_SINGLE')
|
2012-01-17 17:27:18 +00:00
|
|
|
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="",
|
2019-06-19 15:05:25 +02:00
|
|
|
icon='TRACKING_BACKWARDS')
|
2011-11-07 12:55:18 +00:00
|
|
|
props.backwards = True
|
|
|
|
props.sequence = True
|
2019-06-19 15:05:25 +02:00
|
|
|
props = row.operator("clip.track_markers", text="", icon='TRACKING_FORWARDS')
|
2012-01-25 13:37:11 +00:00
|
|
|
props.backwards = False
|
2012-01-17 17:27:18 +00:00
|
|
|
props.sequence = True
|
2019-06-19 15:05:25 +02:00
|
|
|
props = row.operator("clip.track_markers", text="", icon='TRACKING_FORWARDS_SINGLE')
|
2012-06-11 04:34:59 +00:00
|
|
|
props.backwards = False
|
|
|
|
props.sequence = False
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2014-02-07 20:26:43 +06:00
|
|
|
col = layout.column(align=True)
|
2013-05-12 16:04:14 +00:00
|
|
|
row = col.row(align=True)
|
2014-02-07 20:26:43 +06:00
|
|
|
row.label(text="Clear:")
|
|
|
|
row.scale_x = 2.0
|
|
|
|
|
2019-06-19 15:05:25 +02:00
|
|
|
props = row.operator("clip.clear_track_path", text="", icon='TRACKING_CLEAR_BACKWARDS')
|
2014-02-07 20:26:43 +06:00
|
|
|
props.action = 'UPTO'
|
|
|
|
|
2019-06-19 15:05:25 +02:00
|
|
|
props = row.operator("clip.clear_track_path", text="", icon='TRACKING_CLEAR_FORWARDS')
|
2014-02-07 20:26:43 +06: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 20:26:43 +06:00
|
|
|
row.label(text="Refine:")
|
|
|
|
row.scale_x = 2.0
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-06-19 15:05:25 +02:00
|
|
|
props = row.operator("clip.refine_markers", text="", icon='TRACKING_REFINE_BACKWARDS')
|
2014-02-07 20:26:43 +06:00
|
|
|
props.backwards = True
|
|
|
|
|
2019-06-19 15:05:25 +02:00
|
|
|
props = row.operator("clip.refine_markers", text="", icon='TRACKING_REFINE_FORWARDS')
|
2014-02-07 20:26:43 +06:00
|
|
|
props.backwards = False
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.label(text="Merge:")
|
2019-11-28 11:14:32 +01:00
|
|
|
sub = row.column()
|
|
|
|
sub.operator("clip.join_tracks", text="Join Tracks")
|
|
|
|
sub.operator("clip.average_tracks", text="Average 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 20:26:43 +06: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
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw(self, _context):
|
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
|
|
|
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 20:26:43 +06:00
|
|
|
bl_category = "Solve"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-09-27 12:44:51 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
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
|
2020-10-21 10:53:13 +02:00
|
|
|
camera = clip.tracking.camera
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-04-14 12:02:47 +00:00
|
|
|
col = layout.column()
|
2018-09-27 12:44:51 +02:00
|
|
|
col.prop(settings, "use_tripod_solver", text="Tripod")
|
|
|
|
col = layout.column()
|
|
|
|
col.active = not settings.use_tripod_solver
|
|
|
|
col.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
|
|
|
|
2020-10-20 17:53:12 +02:00
|
|
|
col = layout.column(heading="Refine", align=True)
|
2013-02-28 14:24:42 +00:00
|
|
|
col.active = tracking_object.is_camera
|
2020-10-20 17:53:12 +02:00
|
|
|
col.prop(settings, "refine_intrinsics_focal_length", text="Focal Length")
|
2020-10-21 10:53:13 +02:00
|
|
|
col.prop(settings, "refine_intrinsics_principal_point", text="Optical Center")
|
|
|
|
|
|
|
|
col.prop(settings, "refine_intrinsics_radial_distortion", text="Radial Distortion")
|
|
|
|
|
|
|
|
row = col.row()
|
|
|
|
row.active = (camera.distortion_model == 'BROWN')
|
|
|
|
row.prop(settings, "refine_intrinsics_tangential_distortion", text="Tangential Distortion")
|
2014-02-07 20:26:43 +06:00
|
|
|
|
|
|
|
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'
|
2020-10-24 11:42:17 -07:00
|
|
|
bl_label = "Clean Up"
|
2014-02-07 20:26:43 +06:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
bl_category = "Solve"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-09-27 12:44:51 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
clip = context.space_data.clip
|
|
|
|
settings = clip.tracking.settings
|
|
|
|
|
2018-09-27 12:44:51 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(settings, "clean_frames", text="Frames")
|
|
|
|
col.prop(settings, "clean_error", text="Error")
|
|
|
|
col.prop(settings, "clean_action", text="Type")
|
|
|
|
col.separator()
|
|
|
|
col.operator("clip.clean_tracks")
|
|
|
|
col.operator("clip.filter_tracks")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
2014-02-07 20:26:43 +06: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 20:26:43 +06:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
bl_category = "Solve"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw(self, _context):
|
2011-11-07 12:55:18 +00:00
|
|
|
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 20:26:43 +06: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 20:26:43 +06:00
|
|
|
bl_category = "Solve"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-09-27 12:44:51 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
sc = context.space_data
|
2011-11-07 12:55:18 +00:00
|
|
|
settings = sc.clip.tracking.settings
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2018-09-27 12:44:51 +02:00
|
|
|
|
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()
|
2018-09-27 12:44:51 +02:00
|
|
|
|
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"
|
2015-11-04 20:12:51 +05:00
|
|
|
bl_category = "Solve"
|
2011-12-19 15:12:33 +00:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2018-09-27 12:44:51 +02:00
|
|
|
sc = context.space_data
|
|
|
|
if CLIP_PT_reconstruction_panel.poll(context) and sc.mode == 'TRACKING':
|
2012-04-30 16:19:20 +00:00
|
|
|
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'
|
2018-11-21 22:02:01 +01:00
|
|
|
bl_category = "Track"
|
2011-12-05 18:57:17 +00:00
|
|
|
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)
|
|
|
|
|
2018-10-01 10:45:50 +02:00
|
|
|
sub.operator("clip.tracking_object_new", icon='ADD', text="")
|
|
|
|
sub.operator("clip.tracking_object_remove", icon='REMOVE', text="")
|
2011-12-05 18:57:17 +00:00
|
|
|
|
|
|
|
|
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'
|
2018-11-21 22:02:01 +01:00
|
|
|
bl_category = "Track"
|
2011-11-07 12:55:18 +00:00
|
|
|
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)
|
|
|
|
|
2018-09-26 11:28:37 +02:00
|
|
|
sub.template_marker(sc, "clip", sc.clip_user, act_track, compact=True)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
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()
|
|
|
|
|
2018-09-27 12:44:51 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
|
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 20:26:43 +06:00
|
|
|
layout.prop(act_track, "weight")
|
Rework 2D stabilizator
See this page for motivation and description of concepts:
https://github.com/Ichthyostega/blender/wiki
See this video for UI explanation and demonstration of usage
http://vimeo.com/blenderHack/stabilizerdemo
This proposal attempts to improve usability of Blender's image stabilization
feature for real-world footage esp. with moving and panning camera. It builds
upon the feature tracking to get a measurement of 2D image movement.
- Use a weighted average of movement contributions (instead of a median).
- Allow for rotation compensation and zoom (image scale) compensation.
- Allow to pick a different set of tracks for translation and for
rotation/zoom.
- Treat translation / rotation / zoom contributions systematically in a
similar way.
- Improve handling of partial tracking data with gaps and varying
start / end points.
- Have a user definable anchor frame and interpolate / extrapolate data to
avoid jumping back to "neutral" position when no tracking data is available.
- Support for travelling and panning shots by including an //intended//
position/rotation/zoom ("target position"). The idea is for these parameters
to be //animated// by the user, in order to supply an smooth, intended
camera movement. This way, we can keep the image content roughly in frame
even when moving completely away from the initial view.
A known shortcoming is that the pivot point for rotation compensation is set to
the translation compensated image center. This can produce spurious rotation on
travelling shots, which needs to be compensated manually (by animating the
target rotation parameter). There are several possible ways to address that
problem, yet all of them are considered beyond the scope of this improvement
proposal for now.
Own modifications:
- Restrict line length, it's really handy for split-view editing
- In motion tracking we prefer fully human-readable comments, meaning we
don't use doxygen with it's weird markup and comments are supposed to
start with capital and end with a full stop,
- Add explicit comparison of pointer to NULL.
Reviewers: sergey
Subscribers: kusi, kdawg, forest-house, mardy, Samoth, plasmasolutions, willolis, sebastian_k, hype, enetheru, sunboy, jta, leon_cheung
Maniphest Tasks: T49036
Differential Revision: https://developer.blender.org/D583
2016-08-16 10:32:55 +02:00
|
|
|
layout.prop(act_track, "weight_stab")
|
2014-02-07 20:26:43 +06:00
|
|
|
|
|
|
|
if act_track.has_bundle:
|
2020-07-07 11:09:31 +02:00
|
|
|
label_text = "Average Error: %.2f px" % (act_track.average_error)
|
2014-02-07 20:26:43 +06:00
|
|
|
layout.label(text=label_text)
|
|
|
|
|
2018-09-27 12:44:51 +02:00
|
|
|
layout.use_property_split = False
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
row = layout.row(align=True)
|
2018-09-27 12:44:51 +02:00
|
|
|
row.prop(act_track, "use_custom_color", text="")
|
|
|
|
CLIP_PT_track_color_presets.draw_menu(row, 'Custom Color Presets')
|
|
|
|
row.operator("clip.track_copy_color", icon='COPY_ID', text="")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
if act_track.use_custom_color:
|
2018-09-27 12:44:51 +02:00
|
|
|
row = layout.row()
|
2011-11-07 12:55:18 +00:00
|
|
|
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'
|
2018-11-21 22:02:01 +01:00
|
|
|
bl_category = "Track"
|
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
|
|
|
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
|
2018-09-27 12:44:51 +02:00
|
|
|
layout.use_property_split = True
|
2019-11-01 15:52:12 +01:00
|
|
|
layout.use_property_decorate = False # No animation.
|
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
|
|
|
|
|
|
|
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")
|
2019-11-01 15:52:12 +01:00
|
|
|
layout.template_ID(
|
2019-11-26 16:07:50 +01:00
|
|
|
active_track, "image", new="image.new", open="image.open")
|
2013-11-29 23:26:57 +06:00
|
|
|
|
|
|
|
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'
|
2018-11-21 22:02:01 +01:00
|
|
|
bl_category = "Track"
|
2012-03-30 10:37:20 +00:00
|
|
|
bl_label = "Tracking Settings"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-09-27 12:44:51 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2012-03-30 10:37:20 +00:00
|
|
|
clip = context.space_data.clip
|
2021-01-02 16:09:31 -05:00
|
|
|
active = clip.tracking.tracks.active
|
2012-03-30 10:37:20 +00:00
|
|
|
|
2021-01-02 16:09:31 -05:00
|
|
|
if not active:
|
|
|
|
layout.active = False
|
|
|
|
layout.label(text="No active track")
|
|
|
|
return
|
2012-03-30 10:37:20 +00:00
|
|
|
|
2021-01-02 16:09:31 -05:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(active, "motion_model")
|
|
|
|
col.prop(active, "pattern_match", text="Match")
|
2014-02-07 20:26:43 +06:00
|
|
|
|
2021-01-02 16:09:31 -05:00
|
|
|
col.prop(active, "use_brute")
|
|
|
|
col.prop(active, "use_normalization")
|
2018-09-27 12:44:51 +02:00
|
|
|
|
2014-02-07 20:26:43 +06:00
|
|
|
|
2018-09-27 12:44:51 +02:00
|
|
|
class CLIP_PT_track_settings_extras(CLIP_PT_tracking_panel, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
2018-11-21 22:02:01 +01:00
|
|
|
bl_category = "Track"
|
2018-09-27 12:44:51 +02:00
|
|
|
bl_label = "Tracking Settings Extras"
|
|
|
|
bl_parent_id = 'CLIP_PT_track_settings'
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
2021-01-02 16:09:31 -05:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
clip = context.space_data.clip
|
|
|
|
|
|
|
|
return clip.tracking.tracks.active
|
|
|
|
|
2018-09-27 12:44:51 +02:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
clip = context.space_data.clip
|
|
|
|
active = clip.tracking.tracks.active
|
|
|
|
settings = clip.tracking.settings
|
2012-03-30 10:37:20 +00:00
|
|
|
|
2018-09-27 12:44:51 +02:00
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(active, "correlation_min")
|
|
|
|
col.prop(active, "margin")
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.prop(active, "use_mask")
|
|
|
|
col.prop(active, "frames_limit")
|
|
|
|
col.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'
|
2018-11-21 22:02:01 +01:00
|
|
|
bl_category = "Track"
|
2014-02-07 20:26:43 +06: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
|
|
|
|
|
2015-04-14 10:29:11 +10:00
|
|
|
return sc.mode == '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
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw_header_preset(self, _context):
|
2018-06-20 16:32:31 +02:00
|
|
|
CLIP_PT_camera_presets.draw_panel_header(self.layout)
|
2018-04-27 13:50:26 +02:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-09-27 12:44:51 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2018-09-27 12:44:51 +02:00
|
|
|
col.prop(clip.tracking.camera, "sensor_width", text="Sensor Width")
|
|
|
|
col.prop(clip.tracking.camera, "pixel_aspect", text="Pixel Aspect")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2014-02-07 20:26:43 +06:00
|
|
|
|
|
|
|
class CLIP_PT_tracking_lens(Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
2018-11-21 22:02:01 +01:00
|
|
|
bl_category = "Track"
|
2014-02-07 20:26:43 +06:00
|
|
|
bl_label = "Lens"
|
2020-10-13 14:38:34 -04:00
|
|
|
bl_parent_id = 'CLIP_PT_tracking_camera'
|
2014-02-07 20:26:43 +06:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
if CLIP_PT_clip_view_panel.poll(context):
|
|
|
|
sc = context.space_data
|
|
|
|
|
2015-04-14 10:29:11 +10:00
|
|
|
return sc.mode == 'TRACKING' and sc.clip
|
2014-02-07 20:26:43 +06:00
|
|
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-09-27 12:44:51 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
2014-02-07 20:26:43 +06:00
|
|
|
|
|
|
|
sc = context.space_data
|
|
|
|
clip = sc.clip
|
2018-09-27 12:44:51 +02:00
|
|
|
camera = clip.tracking.camera
|
2014-02-07 20:26:43 +06:00
|
|
|
|
2018-09-27 12:44:51 +02:00
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
if camera.units == 'MILLIMETERS':
|
|
|
|
col.prop(camera, "focal_length")
|
2014-02-07 20:26:43 +06:00
|
|
|
else:
|
2018-09-27 12:44:51 +02:00
|
|
|
col.prop(camera, "focal_length_pixels")
|
|
|
|
col.prop(camera, "units", text="Units")
|
2014-02-07 20:26:43 +06:00
|
|
|
|
2020-10-28 10:39:37 +01:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(clip.tracking.camera, "principal", text="Optical Center")
|
|
|
|
col.operator("clip.set_center_principal", text="Set Center")
|
|
|
|
|
2014-02-20 19:41:05 +06:00
|
|
|
col = layout.column()
|
2018-09-27 12:44:51 +02:00
|
|
|
col.prop(camera, "distortion_model", text="Lens Distortion")
|
2014-02-20 19:41:05 +06:00
|
|
|
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")
|
2020-04-20 17:33:03 +02:00
|
|
|
elif camera.distortion_model == 'NUKE':
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(camera, "nuke_k1")
|
|
|
|
col.prop(camera, "nuke_k2")
|
2020-10-01 14:23:29 +02:00
|
|
|
elif camera.distortion_model == 'BROWN':
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(camera, "brown_k1")
|
|
|
|
col.prop(camera, "brown_k2")
|
|
|
|
col.prop(camera, "brown_k3")
|
|
|
|
col.prop(camera, "brown_k4")
|
|
|
|
col.separator()
|
|
|
|
col.prop(camera, "brown_p1")
|
|
|
|
col.prop(camera, "brown_p2")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
2014-02-11 16:11:56 +06:00
|
|
|
class CLIP_PT_marker(CLIP_PT_tracking_panel, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
2018-11-21 22:02:01 +01:00
|
|
|
bl_category = "Track"
|
2014-02-11 16:11:56 +06:00
|
|
|
bl_label = "Marker"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-09-27 12:44:51 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
2014-02-11 16:11:56 +06:00
|
|
|
sc = context.space_data
|
|
|
|
clip = context.space_data.clip
|
|
|
|
act_track = clip.tracking.tracks.active
|
|
|
|
|
|
|
|
if act_track:
|
2018-09-27 12:44:51 +02:00
|
|
|
layout.template_marker(sc, "clip", sc.clip_user, act_track, compact=False)
|
2014-02-11 16:11:56 +06:00
|
|
|
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 16:11:56 +06:00
|
|
|
bl_category = "Stabilization"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2014-02-11 16:11:56 +06:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
if CLIP_PT_clip_view_panel.poll(context):
|
|
|
|
sc = context.space_data
|
|
|
|
|
2015-04-14 10:29:11 +10:00
|
|
|
return sc.mode == 'TRACKING' and sc.clip
|
2014-02-11 16:11:56 +06:00
|
|
|
|
|
|
|
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):
|
2018-09-27 12:44:51 +02:00
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
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
|
|
|
|
|
Rework 2D stabilizator
See this page for motivation and description of concepts:
https://github.com/Ichthyostega/blender/wiki
See this video for UI explanation and demonstration of usage
http://vimeo.com/blenderHack/stabilizerdemo
This proposal attempts to improve usability of Blender's image stabilization
feature for real-world footage esp. with moving and panning camera. It builds
upon the feature tracking to get a measurement of 2D image movement.
- Use a weighted average of movement contributions (instead of a median).
- Allow for rotation compensation and zoom (image scale) compensation.
- Allow to pick a different set of tracks for translation and for
rotation/zoom.
- Treat translation / rotation / zoom contributions systematically in a
similar way.
- Improve handling of partial tracking data with gaps and varying
start / end points.
- Have a user definable anchor frame and interpolate / extrapolate data to
avoid jumping back to "neutral" position when no tracking data is available.
- Support for travelling and panning shots by including an //intended//
position/rotation/zoom ("target position"). The idea is for these parameters
to be //animated// by the user, in order to supply an smooth, intended
camera movement. This way, we can keep the image content roughly in frame
even when moving completely away from the initial view.
A known shortcoming is that the pivot point for rotation compensation is set to
the translation compensated image center. This can produce spurious rotation on
travelling shots, which needs to be compensated manually (by animating the
target rotation parameter). There are several possible ways to address that
problem, yet all of them are considered beyond the scope of this improvement
proposal for now.
Own modifications:
- Restrict line length, it's really handy for split-view editing
- In motion tracking we prefer fully human-readable comments, meaning we
don't use doxygen with it's weird markup and comments are supposed to
start with capital and end with a full stop,
- Add explicit comparison of pointer to NULL.
Reviewers: sergey
Subscribers: kusi, kdawg, forest-house, mardy, Samoth, plasmasolutions, willolis, sebastian_k, hype, enetheru, sunboy, jta, leon_cheung
Maniphest Tasks: T49036
Differential Revision: https://developer.blender.org/D583
2016-08-16 10:32:55 +02:00
|
|
|
layout.prop(stab, "anchor_frame")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2016-08-19 12:21:13 +02:00
|
|
|
row = layout.row(align=True)
|
2018-09-27 12:44:51 +02:00
|
|
|
row.prop(stab, "use_stabilize_rotation", text="Rotation")
|
2016-08-19 12:21:13 +02:00
|
|
|
sub = row.row(align=True)
|
|
|
|
sub.active = stab.use_stabilize_rotation
|
2018-09-27 12:44:51 +02:00
|
|
|
sub.prop(stab, "use_stabilize_scale", text="Scale")
|
Rework 2D stabilizator
See this page for motivation and description of concepts:
https://github.com/Ichthyostega/blender/wiki
See this video for UI explanation and demonstration of usage
http://vimeo.com/blenderHack/stabilizerdemo
This proposal attempts to improve usability of Blender's image stabilization
feature for real-world footage esp. with moving and panning camera. It builds
upon the feature tracking to get a measurement of 2D image movement.
- Use a weighted average of movement contributions (instead of a median).
- Allow for rotation compensation and zoom (image scale) compensation.
- Allow to pick a different set of tracks for translation and for
rotation/zoom.
- Treat translation / rotation / zoom contributions systematically in a
similar way.
- Improve handling of partial tracking data with gaps and varying
start / end points.
- Have a user definable anchor frame and interpolate / extrapolate data to
avoid jumping back to "neutral" position when no tracking data is available.
- Support for travelling and panning shots by including an //intended//
position/rotation/zoom ("target position"). The idea is for these parameters
to be //animated// by the user, in order to supply an smooth, intended
camera movement. This way, we can keep the image content roughly in frame
even when moving completely away from the initial view.
A known shortcoming is that the pivot point for rotation compensation is set to
the translation compensated image center. This can produce spurious rotation on
travelling shots, which needs to be compensated manually (by animating the
target rotation parameter). There are several possible ways to address that
problem, yet all of them are considered beyond the scope of this improvement
proposal for now.
Own modifications:
- Restrict line length, it's really handy for split-view editing
- In motion tracking we prefer fully human-readable comments, meaning we
don't use doxygen with it's weird markup and comments are supposed to
start with capital and end with a full stop,
- Add explicit comparison of pointer to NULL.
Reviewers: sergey
Subscribers: kusi, kdawg, forest-house, mardy, Samoth, plasmasolutions, willolis, sebastian_k, hype, enetheru, sunboy, jta, leon_cheung
Maniphest Tasks: T49036
Differential Revision: https://developer.blender.org/D583
2016-08-16 10:32:55 +02:00
|
|
|
|
2016-08-16 14:25:55 +02:00
|
|
|
box = layout.box()
|
|
|
|
row = box.row(align=True)
|
|
|
|
row.prop(stab, "show_tracks_expanded", text="", emboss=False)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2016-08-16 14:25:55 +02:00
|
|
|
if not stab.show_tracks_expanded:
|
2020-10-24 11:42:17 -07:00
|
|
|
row.label(text="Tracks for Stabilization")
|
2016-08-16 14:25:55 +02:00
|
|
|
else:
|
2020-10-24 11:42:17 -07:00
|
|
|
row.label(text="Tracks for Location")
|
2016-08-16 14:25:55 +02:00
|
|
|
row = box.row()
|
|
|
|
row.template_list("UI_UL_list", "stabilization_tracks", stab, "tracks",
|
|
|
|
stab, "active_track_index", rows=2)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2016-08-16 14:25:55 +02:00
|
|
|
sub = row.column(align=True)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2018-10-01 10:45:50 +02:00
|
|
|
sub.operator("clip.stabilize_2d_add", icon='ADD', text="")
|
|
|
|
sub.operator("clip.stabilize_2d_remove", icon='REMOVE', text="")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-03-12 10:59:57 +11:00
|
|
|
sub.menu('CLIP_MT_stabilize_2d_context_menu', text="",
|
2016-08-16 14:25:55 +02:00
|
|
|
icon='DOWNARROW_HLT')
|
Rework 2D stabilizator
See this page for motivation and description of concepts:
https://github.com/Ichthyostega/blender/wiki
See this video for UI explanation and demonstration of usage
http://vimeo.com/blenderHack/stabilizerdemo
This proposal attempts to improve usability of Blender's image stabilization
feature for real-world footage esp. with moving and panning camera. It builds
upon the feature tracking to get a measurement of 2D image movement.
- Use a weighted average of movement contributions (instead of a median).
- Allow for rotation compensation and zoom (image scale) compensation.
- Allow to pick a different set of tracks for translation and for
rotation/zoom.
- Treat translation / rotation / zoom contributions systematically in a
similar way.
- Improve handling of partial tracking data with gaps and varying
start / end points.
- Have a user definable anchor frame and interpolate / extrapolate data to
avoid jumping back to "neutral" position when no tracking data is available.
- Support for travelling and panning shots by including an //intended//
position/rotation/zoom ("target position"). The idea is for these parameters
to be //animated// by the user, in order to supply an smooth, intended
camera movement. This way, we can keep the image content roughly in frame
even when moving completely away from the initial view.
A known shortcoming is that the pivot point for rotation compensation is set to
the translation compensated image center. This can produce spurious rotation on
travelling shots, which needs to be compensated manually (by animating the
target rotation parameter). There are several possible ways to address that
problem, yet all of them are considered beyond the scope of this improvement
proposal for now.
Own modifications:
- Restrict line length, it's really handy for split-view editing
- In motion tracking we prefer fully human-readable comments, meaning we
don't use doxygen with it's weird markup and comments are supposed to
start with capital and end with a full stop,
- Add explicit comparison of pointer to NULL.
Reviewers: sergey
Subscribers: kusi, kdawg, forest-house, mardy, Samoth, plasmasolutions, willolis, sebastian_k, hype, enetheru, sunboy, jta, leon_cheung
Maniphest Tasks: T49036
Differential Revision: https://developer.blender.org/D583
2016-08-16 10:32:55 +02:00
|
|
|
|
2019-07-31 14:25:09 +02:00
|
|
|
# Usually we don't hide things from interface, but here every pixel of
|
2016-08-19 12:21:13 +02:00
|
|
|
# vertical space is precious.
|
|
|
|
if stab.use_stabilize_rotation:
|
2020-10-24 11:42:17 -07:00
|
|
|
box.label(text="Tracks for Rotation/Scale")
|
2016-08-19 12:21:13 +02:00
|
|
|
row = box.row()
|
|
|
|
row.template_list("UI_UL_list", "stabilization_rotation_tracks",
|
|
|
|
stab, "rotation_tracks",
|
|
|
|
stab, "active_rotation_track_index", rows=2)
|
Rework 2D stabilizator
See this page for motivation and description of concepts:
https://github.com/Ichthyostega/blender/wiki
See this video for UI explanation and demonstration of usage
http://vimeo.com/blenderHack/stabilizerdemo
This proposal attempts to improve usability of Blender's image stabilization
feature for real-world footage esp. with moving and panning camera. It builds
upon the feature tracking to get a measurement of 2D image movement.
- Use a weighted average of movement contributions (instead of a median).
- Allow for rotation compensation and zoom (image scale) compensation.
- Allow to pick a different set of tracks for translation and for
rotation/zoom.
- Treat translation / rotation / zoom contributions systematically in a
similar way.
- Improve handling of partial tracking data with gaps and varying
start / end points.
- Have a user definable anchor frame and interpolate / extrapolate data to
avoid jumping back to "neutral" position when no tracking data is available.
- Support for travelling and panning shots by including an //intended//
position/rotation/zoom ("target position"). The idea is for these parameters
to be //animated// by the user, in order to supply an smooth, intended
camera movement. This way, we can keep the image content roughly in frame
even when moving completely away from the initial view.
A known shortcoming is that the pivot point for rotation compensation is set to
the translation compensated image center. This can produce spurious rotation on
travelling shots, which needs to be compensated manually (by animating the
target rotation parameter). There are several possible ways to address that
problem, yet all of them are considered beyond the scope of this improvement
proposal for now.
Own modifications:
- Restrict line length, it's really handy for split-view editing
- In motion tracking we prefer fully human-readable comments, meaning we
don't use doxygen with it's weird markup and comments are supposed to
start with capital and end with a full stop,
- Add explicit comparison of pointer to NULL.
Reviewers: sergey
Subscribers: kusi, kdawg, forest-house, mardy, Samoth, plasmasolutions, willolis, sebastian_k, hype, enetheru, sunboy, jta, leon_cheung
Maniphest Tasks: T49036
Differential Revision: https://developer.blender.org/D583
2016-08-16 10:32:55 +02:00
|
|
|
|
2016-08-19 12:21:13 +02:00
|
|
|
sub = row.column(align=True)
|
Rework 2D stabilizator
See this page for motivation and description of concepts:
https://github.com/Ichthyostega/blender/wiki
See this video for UI explanation and demonstration of usage
http://vimeo.com/blenderHack/stabilizerdemo
This proposal attempts to improve usability of Blender's image stabilization
feature for real-world footage esp. with moving and panning camera. It builds
upon the feature tracking to get a measurement of 2D image movement.
- Use a weighted average of movement contributions (instead of a median).
- Allow for rotation compensation and zoom (image scale) compensation.
- Allow to pick a different set of tracks for translation and for
rotation/zoom.
- Treat translation / rotation / zoom contributions systematically in a
similar way.
- Improve handling of partial tracking data with gaps and varying
start / end points.
- Have a user definable anchor frame and interpolate / extrapolate data to
avoid jumping back to "neutral" position when no tracking data is available.
- Support for travelling and panning shots by including an //intended//
position/rotation/zoom ("target position"). The idea is for these parameters
to be //animated// by the user, in order to supply an smooth, intended
camera movement. This way, we can keep the image content roughly in frame
even when moving completely away from the initial view.
A known shortcoming is that the pivot point for rotation compensation is set to
the translation compensated image center. This can produce spurious rotation on
travelling shots, which needs to be compensated manually (by animating the
target rotation parameter). There are several possible ways to address that
problem, yet all of them are considered beyond the scope of this improvement
proposal for now.
Own modifications:
- Restrict line length, it's really handy for split-view editing
- In motion tracking we prefer fully human-readable comments, meaning we
don't use doxygen with it's weird markup and comments are supposed to
start with capital and end with a full stop,
- Add explicit comparison of pointer to NULL.
Reviewers: sergey
Subscribers: kusi, kdawg, forest-house, mardy, Samoth, plasmasolutions, willolis, sebastian_k, hype, enetheru, sunboy, jta, leon_cheung
Maniphest Tasks: T49036
Differential Revision: https://developer.blender.org/D583
2016-08-16 10:32:55 +02:00
|
|
|
|
2018-10-01 10:45:50 +02:00
|
|
|
sub.operator("clip.stabilize_2d_rotation_add", icon='ADD', text="")
|
|
|
|
sub.operator("clip.stabilize_2d_rotation_remove", icon='REMOVE', text="")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-03-12 10:59:57 +11:00
|
|
|
sub.menu('CLIP_MT_stabilize_2d_rotation_context_menu', text="",
|
2016-08-19 12:21:13 +02:00
|
|
|
icon='DOWNARROW_HLT')
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2018-09-27 12:44:51 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(stab, "use_autoscale")
|
|
|
|
sub = col.row()
|
2016-08-19 12:21:13 +02:00
|
|
|
sub.active = stab.use_autoscale
|
|
|
|
sub.prop(stab, "scale_max", text="Max")
|
Rework 2D stabilizator
See this page for motivation and description of concepts:
https://github.com/Ichthyostega/blender/wiki
See this video for UI explanation and demonstration of usage
http://vimeo.com/blenderHack/stabilizerdemo
This proposal attempts to improve usability of Blender's image stabilization
feature for real-world footage esp. with moving and panning camera. It builds
upon the feature tracking to get a measurement of 2D image movement.
- Use a weighted average of movement contributions (instead of a median).
- Allow for rotation compensation and zoom (image scale) compensation.
- Allow to pick a different set of tracks for translation and for
rotation/zoom.
- Treat translation / rotation / zoom contributions systematically in a
similar way.
- Improve handling of partial tracking data with gaps and varying
start / end points.
- Have a user definable anchor frame and interpolate / extrapolate data to
avoid jumping back to "neutral" position when no tracking data is available.
- Support for travelling and panning shots by including an //intended//
position/rotation/zoom ("target position"). The idea is for these parameters
to be //animated// by the user, in order to supply an smooth, intended
camera movement. This way, we can keep the image content roughly in frame
even when moving completely away from the initial view.
A known shortcoming is that the pivot point for rotation compensation is set to
the translation compensated image center. This can produce spurious rotation on
travelling shots, which needs to be compensated manually (by animating the
target rotation parameter). There are several possible ways to address that
problem, yet all of them are considered beyond the scope of this improvement
proposal for now.
Own modifications:
- Restrict line length, it's really handy for split-view editing
- In motion tracking we prefer fully human-readable comments, meaning we
don't use doxygen with it's weird markup and comments are supposed to
start with capital and end with a full stop,
- Add explicit comparison of pointer to NULL.
Reviewers: sergey
Subscribers: kusi, kdawg, forest-house, mardy, Samoth, plasmasolutions, willolis, sebastian_k, hype, enetheru, sunboy, jta, leon_cheung
Maniphest Tasks: T49036
Differential Revision: https://developer.blender.org/D583
2016-08-16 10:32:55 +02:00
|
|
|
|
2016-08-19 12:21:13 +02:00
|
|
|
col = layout.column(align=True)
|
|
|
|
row = col.row(align=True)
|
2018-09-27 12:44:51 +02:00
|
|
|
row.prop(stab, "target_position", text="Target")
|
2016-08-19 12:21:13 +02:00
|
|
|
col.prop(stab, "target_rotation")
|
2016-08-19 14:33:49 +02:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(stab, "target_scale")
|
|
|
|
row.active = not stab.use_autoscale
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2016-08-19 12:21:13 +02:00
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(stab, "influence_location")
|
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.active = stab.use_stabilize_rotation
|
|
|
|
sub.prop(stab, "influence_rotation")
|
|
|
|
sub.prop(stab, "influence_scale")
|
2016-08-16 14:25:55 +02:00
|
|
|
|
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'
|
2018-11-21 22:02:01 +01:00
|
|
|
bl_category = "Footage"
|
2016-07-15 15:50:42 +10:00
|
|
|
bl_label = "Proxy/Timecode"
|
2011-11-07 12:55:18 +00:00
|
|
|
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
|
|
|
|
2018-09-27 12:44:51 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
col = layout.column()
|
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
|
|
|
|
2018-06-05 16:32:11 +02:00
|
|
|
col.operator(
|
|
|
|
"clip.rebuild_proxy",
|
|
|
|
text="Build Proxy / Timecode" if clip.source == 'MOVIE'
|
|
|
|
else "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()
|
2018-09-27 12:44:51 +02:00
|
|
|
col2.prop(clip.proxy, "timecode", text="Timecode Index")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2018-09-27 12:44:51 +02:00
|
|
|
col.separator()
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2018-09-27 12:44:51 +02:00
|
|
|
col.prop(sc.clip_user, "proxy_render_size", text="Proxy Size")
|
2012-10-01 11:26:52 +00:00
|
|
|
|
2014-02-07 20:26:43 +06:00
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Mask (similar code in space_image.py, keep in sync)
|
|
|
|
|
2019-06-11 16:08:32 +10:00
|
|
|
from bl_ui.properties_mask_common import (
|
2017-10-21 12:41:42 +11:00
|
|
|
MASK_PT_mask,
|
|
|
|
MASK_PT_layers,
|
|
|
|
MASK_PT_spline,
|
|
|
|
MASK_PT_point,
|
|
|
|
MASK_PT_display,
|
|
|
|
MASK_PT_transforms,
|
2019-06-19 15:05:25 +02:00
|
|
|
MASK_PT_tools
|
2017-10-21 12:41:42 +11:00
|
|
|
)
|
2014-02-07 20:26:43 +06:00
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_mask_layers(MASK_PT_layers, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
2018-11-21 22:02:01 +01:00
|
|
|
bl_category = "Mask"
|
2014-02-07 20:26:43 +06:00
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_mask_display(MASK_PT_display, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
2018-09-27 12:44:51 +02:00
|
|
|
bl_region_type = 'HEADER'
|
2018-11-21 22:02:01 +01:00
|
|
|
bl_category = "Mask"
|
2014-02-07 20:26:43 +06:00
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_active_mask_spline(MASK_PT_spline, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
2018-11-21 22:02:01 +01:00
|
|
|
bl_category = "Mask"
|
2014-02-07 20:26:43 +06:00
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_active_mask_point(MASK_PT_point, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
2018-11-21 22:02:01 +01:00
|
|
|
bl_category = "Mask"
|
2014-02-07 20:26:43 +06:00
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_mask(MASK_PT_mask, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
2018-11-21 22:02:01 +01:00
|
|
|
bl_category = "Mask"
|
2014-02-07 20:26:43 +06:00
|
|
|
|
|
|
|
|
|
|
|
class CLIP_PT_tools_mask_transforms(MASK_PT_transforms, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
2018-11-21 22:02:01 +01:00
|
|
|
bl_category = "Mask"
|
2014-02-07 20:26:43 +06:00
|
|
|
|
2019-07-28 17:45:55 +10:00
|
|
|
|
2019-06-19 15:05:25 +02:00
|
|
|
class CLIP_PT_tools_mask_tools(MASK_PT_tools, Panel):
|
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'TOOLS'
|
|
|
|
bl_category = "Mask"
|
2014-02-07 20:26:43 +06:00
|
|
|
|
|
|
|
# --- end mask ---
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
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'
|
2018-11-21 22:02:01 +01:00
|
|
|
bl_category = "Footage"
|
2011-11-07 12:55:18 +00:00
|
|
|
bl_label = "Footage Settings"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-09-27 12:44:51 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
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")
|
2013-04-22 11:19:12 +00:00
|
|
|
col.template_movieclip_information(sc, "clip", sc.clip_user)
|
|
|
|
|
|
|
|
|
2014-02-07 20:26:43 +06: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 20:26:43 +06: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 20:26:43 +06: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
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw(self, _context):
|
2011-11-07 12:55:18 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch)
This merge-commit brings in a number of new features and workflow/UI improvements for
working with Grease Pencil. While these were originally targetted at improving
the workflow for creating 3D storyboards in Blender using the Grease Pencil,
many of these changes should also prove useful in other workflows too.
The main highlights here are:
1) It is now possible to edit Grease Pencil strokes
- Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions
to enter "Stroke Edit Mode". In this mode, many common editing tools will
operate on Grease Pencil stroke points instead.
- Tools implemented include Select, Select All/Border/Circle/Linked/More/Less,
Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete.
- Proportional Editing works when using the transform tools
2) Grease Pencil stroke settings can now be animated
NOTE: Currently drivers don't work, but if time allows, this may still be
added before the release.
3) Strokes can be drawn with "filled" interiors, using a separate set of
colour/opacity settings to the ones used for the lines themselves.
This makes use of OpenGL filled polys, which has the limitation of only
being able to fill convex shapes. Some artifacts may be visible on concave
shapes (e.g. pacman's mouth will be overdrawn)
4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing
has been added which draws strokes as a series of screen-aligned discs.
While this was originally a partial experimental technique at getting better
quality 3D lines, the effects possible using this technique were interesting
enough to warrant making this a dedicated feature. Best results when partial
opacity and large stroke widths are used.
5) Improved Onion Skinning Support
- Different colours can be selected for the before/after ghosts. To do so,
enable the "colour wheel" toggle beside the Onion Skinning toggle, and set
the colours accordingly.
- Different numbers of ghosts can be shown before/after the current frame
6) Grease Pencil datablocks are now attached to the scene by default instead of
the active object.
- For a long time, the object-attachment has proved to be quite problematic
for users to keep track of. Now that this is done at scene level, it is
easier for most users to use.
- An exception for old files (and for any addons which may benefit from object
attachment instead), is that if the active object has a Grease Pencil datablock,
that will be used instead.
- It is not currently possible to choose object-attachment from the UI, but
it is simple to do this from the console instead, by doing:
context.active_object.grease_pencil = bpy.data.grease_pencil["blah"]
7) Various UI Cleanups
- The layers UI has been cleaned up to use a list instead of the nested-panels
design. Apart from saving space, this is also much nicer to look at now.
- The UI code is now all defined in Python. To support this, it has been necessary
to add some new context properties to make it easier to access these settings.
e.g. "gpencil_data" for the datablock
"active_gpencil_layer" and "active_gpencil_frame" for active data,
"editable_gpencil_strokes" for the strokes that can be edited
- The "stroke placement/alignment" settings (previously "Drawing Settings" at the
bottom of the Grease Pencil panel in the Properties Region) is now located in
the toolbar. These were more toolsettings than properties for how GPencil got drawn.
- "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a
suggestion for an earlier discussion on developer.blender.org
- By default, the painting operator will wait for a mouse button to be pressed
before it starts creating the stroke. This is to make it easier to include
this operator in various toolbars/menus/etc. To get it immediately starting
(as when you hold down DKEy to draw), set "wait_for_input" to False.
- GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor
- Toolbar panels have been added to all the other editors which support these.
8) Pie menus for quick-access to tools
A set of experimental pie menus has been included for quick access to many
tools and settings. It is not necessary to use these to get things done,
but they have been designed to help make certain common tasks easier.
- Ctrl-D = The main pie menu. Reveals tools in a context sensitive and
spatially stable manner.
- D Q = "Quick Settings" pie. This allows quick access to the active
layer's settings. Notably, colours, thickness, and turning
onion skinning on/off.
2014-12-01 01:52:06 +13:00
|
|
|
# Grease Pencil properties
|
2019-07-29 12:39:19 +02:00
|
|
|
class CLIP_PT_annotation(AnnotationDataPanel, CLIP_PT_clip_view_panel, Panel):
|
Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch)
This merge-commit brings in a number of new features and workflow/UI improvements for
working with Grease Pencil. While these were originally targetted at improving
the workflow for creating 3D storyboards in Blender using the Grease Pencil,
many of these changes should also prove useful in other workflows too.
The main highlights here are:
1) It is now possible to edit Grease Pencil strokes
- Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions
to enter "Stroke Edit Mode". In this mode, many common editing tools will
operate on Grease Pencil stroke points instead.
- Tools implemented include Select, Select All/Border/Circle/Linked/More/Less,
Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete.
- Proportional Editing works when using the transform tools
2) Grease Pencil stroke settings can now be animated
NOTE: Currently drivers don't work, but if time allows, this may still be
added before the release.
3) Strokes can be drawn with "filled" interiors, using a separate set of
colour/opacity settings to the ones used for the lines themselves.
This makes use of OpenGL filled polys, which has the limitation of only
being able to fill convex shapes. Some artifacts may be visible on concave
shapes (e.g. pacman's mouth will be overdrawn)
4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing
has been added which draws strokes as a series of screen-aligned discs.
While this was originally a partial experimental technique at getting better
quality 3D lines, the effects possible using this technique were interesting
enough to warrant making this a dedicated feature. Best results when partial
opacity and large stroke widths are used.
5) Improved Onion Skinning Support
- Different colours can be selected for the before/after ghosts. To do so,
enable the "colour wheel" toggle beside the Onion Skinning toggle, and set
the colours accordingly.
- Different numbers of ghosts can be shown before/after the current frame
6) Grease Pencil datablocks are now attached to the scene by default instead of
the active object.
- For a long time, the object-attachment has proved to be quite problematic
for users to keep track of. Now that this is done at scene level, it is
easier for most users to use.
- An exception for old files (and for any addons which may benefit from object
attachment instead), is that if the active object has a Grease Pencil datablock,
that will be used instead.
- It is not currently possible to choose object-attachment from the UI, but
it is simple to do this from the console instead, by doing:
context.active_object.grease_pencil = bpy.data.grease_pencil["blah"]
7) Various UI Cleanups
- The layers UI has been cleaned up to use a list instead of the nested-panels
design. Apart from saving space, this is also much nicer to look at now.
- The UI code is now all defined in Python. To support this, it has been necessary
to add some new context properties to make it easier to access these settings.
e.g. "gpencil_data" for the datablock
"active_gpencil_layer" and "active_gpencil_frame" for active data,
"editable_gpencil_strokes" for the strokes that can be edited
- The "stroke placement/alignment" settings (previously "Drawing Settings" at the
bottom of the Grease Pencil panel in the Properties Region) is now located in
the toolbar. These were more toolsettings than properties for how GPencil got drawn.
- "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a
suggestion for an earlier discussion on developer.blender.org
- By default, the painting operator will wait for a mouse button to be pressed
before it starts creating the stroke. This is to make it easier to include
this operator in various toolbars/menus/etc. To get it immediately starting
(as when you hold down DKEy to draw), set "wait_for_input" to False.
- GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor
- Toolbar panels have been added to all the other editors which support these.
8) Pie menus for quick-access to tools
A set of experimental pie menus has been included for quick access to many
tools and settings. It is not necessary to use these to get things done,
but they have been designed to help make certain common tasks easier.
- Ctrl-D = The main pie menu. Reveals tools in a context sensitive and
spatially stable manner.
- D Q = "Quick Settings" pie. This allows quick access to the active
layer's settings. Notably, colours, thickness, and turning
onion skinning on/off.
2014-12-01 01:52:06 +13:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
2018-11-29 11:51:30 +01:00
|
|
|
bl_category = "Annotation"
|
|
|
|
bl_options = set()
|
Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch)
This merge-commit brings in a number of new features and workflow/UI improvements for
working with Grease Pencil. While these were originally targetted at improving
the workflow for creating 3D storyboards in Blender using the Grease Pencil,
many of these changes should also prove useful in other workflows too.
The main highlights here are:
1) It is now possible to edit Grease Pencil strokes
- Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions
to enter "Stroke Edit Mode". In this mode, many common editing tools will
operate on Grease Pencil stroke points instead.
- Tools implemented include Select, Select All/Border/Circle/Linked/More/Less,
Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete.
- Proportional Editing works when using the transform tools
2) Grease Pencil stroke settings can now be animated
NOTE: Currently drivers don't work, but if time allows, this may still be
added before the release.
3) Strokes can be drawn with "filled" interiors, using a separate set of
colour/opacity settings to the ones used for the lines themselves.
This makes use of OpenGL filled polys, which has the limitation of only
being able to fill convex shapes. Some artifacts may be visible on concave
shapes (e.g. pacman's mouth will be overdrawn)
4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing
has been added which draws strokes as a series of screen-aligned discs.
While this was originally a partial experimental technique at getting better
quality 3D lines, the effects possible using this technique were interesting
enough to warrant making this a dedicated feature. Best results when partial
opacity and large stroke widths are used.
5) Improved Onion Skinning Support
- Different colours can be selected for the before/after ghosts. To do so,
enable the "colour wheel" toggle beside the Onion Skinning toggle, and set
the colours accordingly.
- Different numbers of ghosts can be shown before/after the current frame
6) Grease Pencil datablocks are now attached to the scene by default instead of
the active object.
- For a long time, the object-attachment has proved to be quite problematic
for users to keep track of. Now that this is done at scene level, it is
easier for most users to use.
- An exception for old files (and for any addons which may benefit from object
attachment instead), is that if the active object has a Grease Pencil datablock,
that will be used instead.
- It is not currently possible to choose object-attachment from the UI, but
it is simple to do this from the console instead, by doing:
context.active_object.grease_pencil = bpy.data.grease_pencil["blah"]
7) Various UI Cleanups
- The layers UI has been cleaned up to use a list instead of the nested-panels
design. Apart from saving space, this is also much nicer to look at now.
- The UI code is now all defined in Python. To support this, it has been necessary
to add some new context properties to make it easier to access these settings.
e.g. "gpencil_data" for the datablock
"active_gpencil_layer" and "active_gpencil_frame" for active data,
"editable_gpencil_strokes" for the strokes that can be edited
- The "stroke placement/alignment" settings (previously "Drawing Settings" at the
bottom of the Grease Pencil panel in the Properties Region) is now located in
the toolbar. These were more toolsettings than properties for how GPencil got drawn.
- "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a
suggestion for an earlier discussion on developer.blender.org
- By default, the painting operator will wait for a mouse button to be pressed
before it starts creating the stroke. This is to make it easier to include
this operator in various toolbars/menus/etc. To get it immediately starting
(as when you hold down DKEy to draw), set "wait_for_input" to False.
- GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor
- Toolbar panels have been added to all the other editors which support these.
8) Pie menus for quick-access to tools
A set of experimental pie menus has been included for quick access to many
tools and settings. It is not necessary to use these to get things done,
but they have been designed to help make certain common tasks easier.
- Ctrl-D = The main pie menu. Reveals tools in a context sensitive and
spatially stable manner.
- D Q = "Quick Settings" pie. This allows quick access to the active
layer's settings. Notably, colours, thickness, and turning
onion skinning on/off.
2014-12-01 01:52:06 +13:00
|
|
|
|
|
|
|
# NOTE: this is just a wrapper around the generic GP Panel
|
|
|
|
# But, this should only be visible in "clip" view
|
|
|
|
|
|
|
|
|
|
|
|
# Grease Pencil drawing tools
|
2018-08-22 16:59:04 +02:00
|
|
|
class CLIP_PT_tools_grease_pencil_draw(AnnotationDrawingToolsPanel, Panel):
|
Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch)
This merge-commit brings in a number of new features and workflow/UI improvements for
working with Grease Pencil. While these were originally targetted at improving
the workflow for creating 3D storyboards in Blender using the Grease Pencil,
many of these changes should also prove useful in other workflows too.
The main highlights here are:
1) It is now possible to edit Grease Pencil strokes
- Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions
to enter "Stroke Edit Mode". In this mode, many common editing tools will
operate on Grease Pencil stroke points instead.
- Tools implemented include Select, Select All/Border/Circle/Linked/More/Less,
Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete.
- Proportional Editing works when using the transform tools
2) Grease Pencil stroke settings can now be animated
NOTE: Currently drivers don't work, but if time allows, this may still be
added before the release.
3) Strokes can be drawn with "filled" interiors, using a separate set of
colour/opacity settings to the ones used for the lines themselves.
This makes use of OpenGL filled polys, which has the limitation of only
being able to fill convex shapes. Some artifacts may be visible on concave
shapes (e.g. pacman's mouth will be overdrawn)
4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing
has been added which draws strokes as a series of screen-aligned discs.
While this was originally a partial experimental technique at getting better
quality 3D lines, the effects possible using this technique were interesting
enough to warrant making this a dedicated feature. Best results when partial
opacity and large stroke widths are used.
5) Improved Onion Skinning Support
- Different colours can be selected for the before/after ghosts. To do so,
enable the "colour wheel" toggle beside the Onion Skinning toggle, and set
the colours accordingly.
- Different numbers of ghosts can be shown before/after the current frame
6) Grease Pencil datablocks are now attached to the scene by default instead of
the active object.
- For a long time, the object-attachment has proved to be quite problematic
for users to keep track of. Now that this is done at scene level, it is
easier for most users to use.
- An exception for old files (and for any addons which may benefit from object
attachment instead), is that if the active object has a Grease Pencil datablock,
that will be used instead.
- It is not currently possible to choose object-attachment from the UI, but
it is simple to do this from the console instead, by doing:
context.active_object.grease_pencil = bpy.data.grease_pencil["blah"]
7) Various UI Cleanups
- The layers UI has been cleaned up to use a list instead of the nested-panels
design. Apart from saving space, this is also much nicer to look at now.
- The UI code is now all defined in Python. To support this, it has been necessary
to add some new context properties to make it easier to access these settings.
e.g. "gpencil_data" for the datablock
"active_gpencil_layer" and "active_gpencil_frame" for active data,
"editable_gpencil_strokes" for the strokes that can be edited
- The "stroke placement/alignment" settings (previously "Drawing Settings" at the
bottom of the Grease Pencil panel in the Properties Region) is now located in
the toolbar. These were more toolsettings than properties for how GPencil got drawn.
- "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a
suggestion for an earlier discussion on developer.blender.org
- By default, the painting operator will wait for a mouse button to be pressed
before it starts creating the stroke. This is to make it easier to include
this operator in various toolbars/menus/etc. To get it immediately starting
(as when you hold down DKEy to draw), set "wait_for_input" to False.
- GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor
- Toolbar panels have been added to all the other editors which support these.
8) Pie menus for quick-access to tools
A set of experimental pie menus has been included for quick access to many
tools and settings. It is not necessary to use these to get things done,
but they have been designed to help make certain common tasks easier.
- Ctrl-D = The main pie menu. Reveals tools in a context sensitive and
spatially stable manner.
- D Q = "Quick Settings" pie. This allows quick access to the active
layer's settings. Notably, colours, thickness, and turning
onion skinning on/off.
2014-12-01 01:52:06 +13:00
|
|
|
bl_space_type = 'CLIP_EDITOR'
|
2018-07-31 10:22:19 +02:00
|
|
|
bl_region_type = 'TOOLS'
|
Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch)
This merge-commit brings in a number of new features and workflow/UI improvements for
working with Grease Pencil. While these were originally targetted at improving
the workflow for creating 3D storyboards in Blender using the Grease Pencil,
many of these changes should also prove useful in other workflows too.
The main highlights here are:
1) It is now possible to edit Grease Pencil strokes
- Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions
to enter "Stroke Edit Mode". In this mode, many common editing tools will
operate on Grease Pencil stroke points instead.
- Tools implemented include Select, Select All/Border/Circle/Linked/More/Less,
Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete.
- Proportional Editing works when using the transform tools
2) Grease Pencil stroke settings can now be animated
NOTE: Currently drivers don't work, but if time allows, this may still be
added before the release.
3) Strokes can be drawn with "filled" interiors, using a separate set of
colour/opacity settings to the ones used for the lines themselves.
This makes use of OpenGL filled polys, which has the limitation of only
being able to fill convex shapes. Some artifacts may be visible on concave
shapes (e.g. pacman's mouth will be overdrawn)
4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing
has been added which draws strokes as a series of screen-aligned discs.
While this was originally a partial experimental technique at getting better
quality 3D lines, the effects possible using this technique were interesting
enough to warrant making this a dedicated feature. Best results when partial
opacity and large stroke widths are used.
5) Improved Onion Skinning Support
- Different colours can be selected for the before/after ghosts. To do so,
enable the "colour wheel" toggle beside the Onion Skinning toggle, and set
the colours accordingly.
- Different numbers of ghosts can be shown before/after the current frame
6) Grease Pencil datablocks are now attached to the scene by default instead of
the active object.
- For a long time, the object-attachment has proved to be quite problematic
for users to keep track of. Now that this is done at scene level, it is
easier for most users to use.
- An exception for old files (and for any addons which may benefit from object
attachment instead), is that if the active object has a Grease Pencil datablock,
that will be used instead.
- It is not currently possible to choose object-attachment from the UI, but
it is simple to do this from the console instead, by doing:
context.active_object.grease_pencil = bpy.data.grease_pencil["blah"]
7) Various UI Cleanups
- The layers UI has been cleaned up to use a list instead of the nested-panels
design. Apart from saving space, this is also much nicer to look at now.
- The UI code is now all defined in Python. To support this, it has been necessary
to add some new context properties to make it easier to access these settings.
e.g. "gpencil_data" for the datablock
"active_gpencil_layer" and "active_gpencil_frame" for active data,
"editable_gpencil_strokes" for the strokes that can be edited
- The "stroke placement/alignment" settings (previously "Drawing Settings" at the
bottom of the Grease Pencil panel in the Properties Region) is now located in
the toolbar. These were more toolsettings than properties for how GPencil got drawn.
- "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a
suggestion for an earlier discussion on developer.blender.org
- By default, the painting operator will wait for a mouse button to be pressed
before it starts creating the stroke. This is to make it easier to include
this operator in various toolbars/menus/etc. To get it immediately starting
(as when you hold down DKEy to draw), set "wait_for_input" to False.
- GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor
- Toolbar panels have been added to all the other editors which support these.
8) Pie menus for quick-access to tools
A set of experimental pie menus has been included for quick access to many
tools and settings. It is not necessary to use these to get things done,
but they have been designed to help make certain common tasks easier.
- Ctrl-D = The main pie menu. Reveals tools in a context sensitive and
spatially stable manner.
- D Q = "Quick Settings" pie. This allows quick access to the active
layer's settings. Notably, colours, thickness, and turning
onion skinning on/off.
2014-12-01 01:52:06 +13:00
|
|
|
|
|
|
|
|
2019-08-24 00:22:38 +02:00
|
|
|
class CLIP_MT_view_zoom(Menu):
|
|
|
|
bl_label = "Fractional Zoom"
|
|
|
|
|
2019-09-15 05:26:15 +10:00
|
|
|
def draw(self, _context):
|
2019-08-24 00:22:38 +02:00
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
|
|
|
|
|
|
|
|
for i, (a, b) in enumerate(ratios):
|
|
|
|
if i in {3, 4}: # Draw separators around Zoom 1:1.
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.operator(
|
|
|
|
"clip.view_zoom_ratio",
|
2020-07-16 23:50:33 +10:00
|
|
|
text=iface_("Zoom %d:%d") % (a, b),
|
2019-08-24 00:22:38 +02:00
|
|
|
translate=False,
|
|
|
|
).ratio = a / b
|
|
|
|
|
|
|
|
|
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':
|
2019-04-18 12:16:03 +02:00
|
|
|
layout.prop(sc, "show_region_ui")
|
|
|
|
layout.prop(sc, "show_region_toolbar")
|
2019-04-18 13:49:21 +02:00
|
|
|
layout.prop(sc, "show_region_hud")
|
2019-04-18 12:16:03 +02: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
|
|
|
layout.operator("clip.view_selected")
|
|
|
|
layout.operator("clip.view_all")
|
2015-05-15 19:49:00 +02:00
|
|
|
layout.operator("clip.view_all", text="View Fit").fit_view = True
|
2019-10-01 20:19:44 +10:00
|
|
|
layout.operator("clip.view_center_cursor")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-05-02 17:33:48 +00:00
|
|
|
layout.separator()
|
2019-09-10 06:11:52 +10:00
|
|
|
|
2012-05-02 17:33:48 +00:00
|
|
|
layout.operator("clip.view_zoom_in")
|
|
|
|
layout.operator("clip.view_zoom_out")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2015-06-12 15:25:46 +02:00
|
|
|
layout.separator()
|
2019-09-10 06:11:52 +10:00
|
|
|
|
2015-06-12 15:25:46 +02:00
|
|
|
layout.prop(sc, "show_metadata")
|
2019-09-10 06:11:52 +10:00
|
|
|
|
2012-05-02 17:33:48 +00:00
|
|
|
layout.separator()
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-08-24 00:22:38 +02:00
|
|
|
layout.menu("CLIP_MT_view_zoom")
|
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 14:49:47 +10:00
|
|
|
layout.prop(sc, "show_locked_time")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
layout.separator()
|
2018-05-24 18:35:19 +02:00
|
|
|
|
|
|
|
layout.menu("INFO_MT_area")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
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:
|
2021-01-12 14:43:00 -05:00
|
|
|
layout.operator("clip.set_scene_frames")
|
|
|
|
layout.operator("clip.set_center_principal")
|
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")
|
|
|
|
|
2021-01-12 14:43:00 -05:00
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.operator("clip.set_viewport_background")
|
|
|
|
layout.operator("clip.setup_tracking_scene")
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
class CLIP_MT_proxy(Menu):
|
|
|
|
bl_label = "Proxy"
|
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw(self, _context):
|
2011-11-07 12:55:18 +00:00
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator("clip.rebuild_proxy")
|
|
|
|
layout.operator("clip.delete_proxy")
|
|
|
|
|
|
|
|
|
2021-01-12 14:43:00 -05:00
|
|
|
class CLIP_MT_track_transform(Menu):
|
|
|
|
bl_label = "Transform"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw(self, _context):
|
2011-11-07 12:55:18 +00:00
|
|
|
layout = self.layout
|
|
|
|
|
2021-01-12 14:43:00 -05:00
|
|
|
layout.operator("transform.translate")
|
|
|
|
layout.operator("transform.rotate")
|
|
|
|
layout.operator("transform.resize")
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2021-01-12 14:43:00 -05:00
|
|
|
class CLIP_MT_track_motion(Menu):
|
|
|
|
bl_label = "Track Motion"
|
|
|
|
|
|
|
|
def draw(self, _context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
props = layout.operator("clip.track_markers", text="Backwards")
|
|
|
|
props.backwards = True
|
|
|
|
props.sequence = True
|
|
|
|
|
|
|
|
props = layout.operator("clip.track_markers", text="Frame Backwards")
|
|
|
|
props.backwards = True
|
|
|
|
props.sequence = False
|
|
|
|
|
|
|
|
props = layout.operator("clip.track_markers", text="Forwards")
|
|
|
|
props.backwards = False
|
|
|
|
props.sequence = True
|
|
|
|
|
|
|
|
props = layout.operator("clip.track_markers", text="Frame Forwards")
|
|
|
|
props.backwards = False
|
|
|
|
props.sequence = False
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_track_clear(Menu):
|
|
|
|
bl_label = "Clear"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2021-01-12 14:43:00 -05:00
|
|
|
def draw(self, _context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
props = layout.operator("clip.clear_track_path", text="Before")
|
2015-01-29 17:34:05 +01:00
|
|
|
props.clear_active = False
|
|
|
|
props.action = 'UPTO'
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2021-01-12 14:43:00 -05:00
|
|
|
props = layout.operator("clip.clear_track_path", text="After")
|
|
|
|
props.clear_active = False
|
|
|
|
props.action = 'REMAINED'
|
|
|
|
|
|
|
|
props = layout.operator("clip.clear_track_path", text="Track Path")
|
2015-01-29 17:34:05 +01:00
|
|
|
props.clear_active = False
|
|
|
|
props.action = 'ALL'
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
2021-01-12 14:43:00 -05:00
|
|
|
layout.operator("clip.clear_solution", text="Solution")
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_track_refine(Menu):
|
|
|
|
bl_label = "Refine"
|
|
|
|
|
|
|
|
def draw(self, _context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
props = layout.operator("clip.refine_markers", text="Backwards")
|
|
|
|
props.backwards = True
|
|
|
|
|
2021-01-20 10:14:40 +01:00
|
|
|
props = layout.operator("clip.refine_markers", text="Forwards")
|
2021-01-12 14:43:00 -05:00
|
|
|
props.backwards = False
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_track_animation(Menu):
|
|
|
|
bl_label = "Animation"
|
|
|
|
|
|
|
|
def draw(self, _context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator("clip.keyframe_insert")
|
|
|
|
layout.operator("clip.keyframe_delete")
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_track_visibility(Menu):
|
|
|
|
bl_label = "Show/Hide"
|
|
|
|
|
|
|
|
def draw(self, _context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator("clip.hide_tracks_clear")
|
|
|
|
layout.operator("clip.hide_tracks", text="Hide Selected").unselected = False
|
|
|
|
layout.operator("clip.hide_tracks", text="Hide Unselected").unselected = True
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_track_cleanup(Menu):
|
|
|
|
bl_label = "Clean Up"
|
|
|
|
|
|
|
|
def draw(self, _context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
layout.operator("clip.clean_tracks")
|
2021-01-12 14:43:00 -05:00
|
|
|
layout.operator("clip.filter_tracks")
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_track(Menu):
|
|
|
|
bl_label = "Track"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
clip = context.space_data.clip
|
|
|
|
tracking_object = clip.tracking.objects.active
|
|
|
|
|
|
|
|
layout.menu("CLIP_MT_track_transform")
|
|
|
|
layout.menu("CLIP_MT_track_motion")
|
|
|
|
layout.menu("CLIP_MT_track_clear")
|
|
|
|
layout.menu("CLIP_MT_track_refine")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-01-09 20:18:48 +00:00
|
|
|
layout.separator()
|
2021-01-12 14:43:00 -05:00
|
|
|
|
|
|
|
layout.operator("clip.add_marker_move", text="Add Marker")
|
|
|
|
layout.operator("clip.detect_features")
|
|
|
|
layout.operator("clip.create_plane_track")
|
2012-01-09 20:18:48 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
layout.separator()
|
|
|
|
|
2021-01-12 14:43:00 -05:00
|
|
|
layout.operator("clip.solve_camera",
|
|
|
|
text="Solve Camera Motion" if tracking_object.is_camera
|
|
|
|
else "Solve Object Motion")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2021-01-12 14:43:00 -05:00
|
|
|
layout.separator()
|
2015-01-29 17:34:05 +01:00
|
|
|
|
2021-01-12 14:43:00 -05:00
|
|
|
layout.operator("clip.join_tracks")
|
2019-11-28 11:14:32 +01:00
|
|
|
layout.operator("clip.average_tracks")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
layout.separator()
|
2021-01-12 14:43:00 -05:00
|
|
|
|
|
|
|
layout.operator("clip.copy_tracks", icon='COPYDOWN')
|
|
|
|
layout.operator("clip.paste_tracks", icon='PASTEDOWN')
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
layout.separator()
|
2021-01-12 14:43:00 -05:00
|
|
|
|
|
|
|
layout.operator("clip.track_settings_as_default", text="Copy Settings to Defaults")
|
|
|
|
layout.operator("clip.track_settings_to_track", text="Apply Default Settings")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.menu("CLIP_MT_track_animation")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
layout.separator()
|
2021-01-12 14:43:00 -05:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
layout.menu("CLIP_MT_track_visibility")
|
2021-01-12 14:43:00 -05:00
|
|
|
layout.menu("CLIP_MT_track_cleanup")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.operator("clip.delete_track")
|
|
|
|
layout.operator("clip.delete_marker")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_reconstruction(Menu):
|
|
|
|
bl_label = "Reconstruction"
|
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw(self, _context):
|
2011-11-07 12:55:18 +00:00
|
|
|
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
|
|
|
|
2015-03-30 10:44:57 +11: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")
|
2021-01-12 14:43:00 -05:00
|
|
|
layout.operator("clip.apply_solution_scale")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
2021-01-12 14:43:00 -05:00
|
|
|
class CLIP_MT_select_grouped(Menu):
|
|
|
|
bl_label = "Select Grouped"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw(self, _context):
|
2011-11-07 12:55:18 +00:00
|
|
|
layout = self.layout
|
|
|
|
|
2021-01-12 14:43:00 -05:00
|
|
|
layout.operator_enum("clip.select_grouped", "group")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_select(Menu):
|
|
|
|
bl_label = "Select"
|
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw(self, _context):
|
2011-11-07 12:55:18 +00:00
|
|
|
layout = self.layout
|
|
|
|
|
2018-10-05 10:27:04 +10:00
|
|
|
layout.operator("clip.select_box")
|
2012-07-25 13:44:07 +00:00
|
|
|
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
|
|
|
|
2021-01-12 14:43:00 -05: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
|
|
|
|
2021-01-12 14:43:00 -05:00
|
|
|
layout.separator()
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2021-01-12 14:43:00 -05:00
|
|
|
layout.operator("clip.stabilize_2d_select")
|
|
|
|
layout.operator("clip.stabilize_2d_rotation_select")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-07-28 17:45:55 +10:00
|
|
|
|
2019-03-12 10:59:57 +11:00
|
|
|
class CLIP_MT_tracking_context_menu(Menu):
|
2019-06-19 15:05:25 +02:00
|
|
|
bl_label = "Context Menu"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
return context.space_data.clip
|
|
|
|
|
2019-08-05 12:47:55 +10:00
|
|
|
def draw(self, context):
|
2011-11-07 12:55:18 +00:00
|
|
|
layout = self.layout
|
|
|
|
|
2019-08-05 12:47:55 +10:00
|
|
|
mode = context.space_data.mode
|
2012-01-17 17:27:18 +00:00
|
|
|
|
2019-06-19 15:05:25 +02:00
|
|
|
if mode == 'TRACKING':
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-06-19 15:05:25 +02:00
|
|
|
layout.operator("clip.track_settings_to_track")
|
|
|
|
layout.operator("clip.track_settings_as_default")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-06-19 15:05:25 +02:00
|
|
|
layout.separator()
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-06-19 15:05:25 +02:00
|
|
|
layout.operator("clip.track_copy_color")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.operator("clip.copy_tracks", icon='COPYDOWN')
|
|
|
|
layout.operator("clip.paste_tracks", icon='PASTEDOWN')
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.operator("clip.disable_markers",
|
|
|
|
text="Disable Markers").action = 'DISABLE'
|
|
|
|
layout.operator("clip.disable_markers",
|
|
|
|
text="Enable Markers").action = 'ENABLE'
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.operator("clip.hide_tracks")
|
|
|
|
layout.operator("clip.hide_tracks_clear", text="Show Tracks")
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-06-19 15:05:25 +02:00
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.operator("clip.lock_tracks", text="Lock Tracks").action = 'LOCK'
|
|
|
|
layout.operator("clip.lock_tracks",
|
|
|
|
text="Unlock Tracks").action = 'UNLOCK'
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.operator("clip.join_tracks")
|
2019-11-28 11:14:32 +01:00
|
|
|
layout.operator("clip.average_tracks")
|
2019-06-19 15:05:25 +02:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.operator("clip.delete_track")
|
|
|
|
|
|
|
|
elif mode == 'MASK':
|
2019-12-16 16:44:03 +11:00
|
|
|
from .properties_mask_common import draw_mask_context_menu
|
|
|
|
draw_mask_context_menu(layout, context)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-07-28 17:45:55 +10:00
|
|
|
|
2019-03-13 12:41:22 +11:00
|
|
|
class CLIP_PT_camera_presets(PresetPanel, Panel):
|
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"
|
2018-04-27 13:50:26 +02:00
|
|
|
preset_add_operator = "clip.camera_preset_add"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
2019-03-13 12:41:22 +11:00
|
|
|
class CLIP_PT_track_color_presets(PresetPanel, Panel):
|
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"
|
2018-04-27 13:50:26 +02:00
|
|
|
preset_add_operator = "clip.track_color_preset_add"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
2019-03-13 12:41:22 +11:00
|
|
|
class CLIP_PT_tracking_settings_presets(PresetPanel, Panel):
|
2011-11-28 13:26:46 +00:00
|
|
|
"""Predefined tracking settings"""
|
|
|
|
bl_label = "Tracking Presets"
|
|
|
|
preset_subdir = "tracking_settings"
|
|
|
|
preset_operator = "script.execute_preset"
|
2018-04-27 13:50:26 +02:00
|
|
|
preset_add_operator = "clip.tracking_settings_preset_add"
|
2011-11-28 13:26:46 +00:00
|
|
|
|
|
|
|
|
2019-03-12 10:59:57 +11:00
|
|
|
class CLIP_MT_stabilize_2d_context_menu(Menu):
|
Rework 2D stabilizator
See this page for motivation and description of concepts:
https://github.com/Ichthyostega/blender/wiki
See this video for UI explanation and demonstration of usage
http://vimeo.com/blenderHack/stabilizerdemo
This proposal attempts to improve usability of Blender's image stabilization
feature for real-world footage esp. with moving and panning camera. It builds
upon the feature tracking to get a measurement of 2D image movement.
- Use a weighted average of movement contributions (instead of a median).
- Allow for rotation compensation and zoom (image scale) compensation.
- Allow to pick a different set of tracks for translation and for
rotation/zoom.
- Treat translation / rotation / zoom contributions systematically in a
similar way.
- Improve handling of partial tracking data with gaps and varying
start / end points.
- Have a user definable anchor frame and interpolate / extrapolate data to
avoid jumping back to "neutral" position when no tracking data is available.
- Support for travelling and panning shots by including an //intended//
position/rotation/zoom ("target position"). The idea is for these parameters
to be //animated// by the user, in order to supply an smooth, intended
camera movement. This way, we can keep the image content roughly in frame
even when moving completely away from the initial view.
A known shortcoming is that the pivot point for rotation compensation is set to
the translation compensated image center. This can produce spurious rotation on
travelling shots, which needs to be compensated manually (by animating the
target rotation parameter). There are several possible ways to address that
problem, yet all of them are considered beyond the scope of this improvement
proposal for now.
Own modifications:
- Restrict line length, it's really handy for split-view editing
- In motion tracking we prefer fully human-readable comments, meaning we
don't use doxygen with it's weird markup and comments are supposed to
start with capital and end with a full stop,
- Add explicit comparison of pointer to NULL.
Reviewers: sergey
Subscribers: kusi, kdawg, forest-house, mardy, Samoth, plasmasolutions, willolis, sebastian_k, hype, enetheru, sunboy, jta, leon_cheung
Maniphest Tasks: T49036
Differential Revision: https://developer.blender.org/D583
2016-08-16 10:32:55 +02:00
|
|
|
bl_label = "Translation Track Specials"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw(self, _context):
|
2011-11-07 12:55:18 +00:00
|
|
|
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
|
|
|
|
2019-03-12 10:59:57 +11:00
|
|
|
class CLIP_MT_stabilize_2d_rotation_context_menu(Menu):
|
Rework 2D stabilizator
See this page for motivation and description of concepts:
https://github.com/Ichthyostega/blender/wiki
See this video for UI explanation and demonstration of usage
http://vimeo.com/blenderHack/stabilizerdemo
This proposal attempts to improve usability of Blender's image stabilization
feature for real-world footage esp. with moving and panning camera. It builds
upon the feature tracking to get a measurement of 2D image movement.
- Use a weighted average of movement contributions (instead of a median).
- Allow for rotation compensation and zoom (image scale) compensation.
- Allow to pick a different set of tracks for translation and for
rotation/zoom.
- Treat translation / rotation / zoom contributions systematically in a
similar way.
- Improve handling of partial tracking data with gaps and varying
start / end points.
- Have a user definable anchor frame and interpolate / extrapolate data to
avoid jumping back to "neutral" position when no tracking data is available.
- Support for travelling and panning shots by including an //intended//
position/rotation/zoom ("target position"). The idea is for these parameters
to be //animated// by the user, in order to supply an smooth, intended
camera movement. This way, we can keep the image content roughly in frame
even when moving completely away from the initial view.
A known shortcoming is that the pivot point for rotation compensation is set to
the translation compensated image center. This can produce spurious rotation on
travelling shots, which needs to be compensated manually (by animating the
target rotation parameter). There are several possible ways to address that
problem, yet all of them are considered beyond the scope of this improvement
proposal for now.
Own modifications:
- Restrict line length, it's really handy for split-view editing
- In motion tracking we prefer fully human-readable comments, meaning we
don't use doxygen with it's weird markup and comments are supposed to
start with capital and end with a full stop,
- Add explicit comparison of pointer to NULL.
Reviewers: sergey
Subscribers: kusi, kdawg, forest-house, mardy, Samoth, plasmasolutions, willolis, sebastian_k, hype, enetheru, sunboy, jta, leon_cheung
Maniphest Tasks: T49036
Differential Revision: https://developer.blender.org/D583
2016-08-16 10:32:55 +02:00
|
|
|
bl_label = "Rotation Track Specials"
|
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw(self, _context):
|
Rework 2D stabilizator
See this page for motivation and description of concepts:
https://github.com/Ichthyostega/blender/wiki
See this video for UI explanation and demonstration of usage
http://vimeo.com/blenderHack/stabilizerdemo
This proposal attempts to improve usability of Blender's image stabilization
feature for real-world footage esp. with moving and panning camera. It builds
upon the feature tracking to get a measurement of 2D image movement.
- Use a weighted average of movement contributions (instead of a median).
- Allow for rotation compensation and zoom (image scale) compensation.
- Allow to pick a different set of tracks for translation and for
rotation/zoom.
- Treat translation / rotation / zoom contributions systematically in a
similar way.
- Improve handling of partial tracking data with gaps and varying
start / end points.
- Have a user definable anchor frame and interpolate / extrapolate data to
avoid jumping back to "neutral" position when no tracking data is available.
- Support for travelling and panning shots by including an //intended//
position/rotation/zoom ("target position"). The idea is for these parameters
to be //animated// by the user, in order to supply an smooth, intended
camera movement. This way, we can keep the image content roughly in frame
even when moving completely away from the initial view.
A known shortcoming is that the pivot point for rotation compensation is set to
the translation compensated image center. This can produce spurious rotation on
travelling shots, which needs to be compensated manually (by animating the
target rotation parameter). There are several possible ways to address that
problem, yet all of them are considered beyond the scope of this improvement
proposal for now.
Own modifications:
- Restrict line length, it's really handy for split-view editing
- In motion tracking we prefer fully human-readable comments, meaning we
don't use doxygen with it's weird markup and comments are supposed to
start with capital and end with a full stop,
- Add explicit comparison of pointer to NULL.
Reviewers: sergey
Subscribers: kusi, kdawg, forest-house, mardy, Samoth, plasmasolutions, willolis, sebastian_k, hype, enetheru, sunboy, jta, leon_cheung
Maniphest Tasks: T49036
Differential Revision: https://developer.blender.org/D583
2016-08-16 10:32:55 +02:00
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator("clip.stabilize_2d_rotation_select")
|
|
|
|
|
2018-09-27 09:41:18 +10:00
|
|
|
|
2018-09-26 17:32:11 +02:00
|
|
|
class CLIP_MT_pivot_pie(Menu):
|
|
|
|
bl_label = "Pivot Point"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
pie = layout.menu_pie()
|
|
|
|
|
|
|
|
pie.prop_enum(context.space_data, "pivot_point", value='BOUNDING_BOX_CENTER')
|
|
|
|
pie.prop_enum(context.space_data, "pivot_point", value='CURSOR')
|
|
|
|
pie.prop_enum(context.space_data, "pivot_point", value='INDIVIDUAL_ORIGINS')
|
|
|
|
pie.prop_enum(context.space_data, "pivot_point", value='MEDIAN_POINT')
|
|
|
|
|
|
|
|
|
2019-04-25 16:05:47 +02:00
|
|
|
class CLIP_MT_marker_pie(Menu):
|
|
|
|
# Settings for the individual markers
|
|
|
|
bl_label = "Marker Settings"
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
space = context.space_data
|
|
|
|
return space.mode == 'TRACKING' and space.clip
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
clip = context.space_data.clip
|
|
|
|
tracks = getattr(getattr(clip, "tracking", None), "tracks", None)
|
|
|
|
track_active = tracks.active if tracks else None
|
|
|
|
|
|
|
|
layout = self.layout
|
|
|
|
pie = layout.menu_pie()
|
|
|
|
# Use Location Tracking
|
2020-07-02 16:28:45 -04:00
|
|
|
prop = pie.operator("wm.context_set_enum", text="Location")
|
2019-04-25 16:05:47 +02:00
|
|
|
prop.data_path = "space_data.clip.tracking.tracks.active.motion_model"
|
|
|
|
prop.value = "Loc"
|
|
|
|
# Use Affine Tracking
|
|
|
|
prop = pie.operator("wm.context_set_enum", text="Affine")
|
|
|
|
prop.data_path = "space_data.clip.tracking.tracks.active.motion_model"
|
|
|
|
prop.value = "Affine"
|
|
|
|
# Copy Settings From Active To Selected
|
|
|
|
pie.operator("clip.track_settings_to_track", icon='COPYDOWN')
|
|
|
|
# Make Settings Default
|
|
|
|
pie.operator("clip.track_settings_as_default", icon='SETTINGS')
|
|
|
|
if track_active:
|
2019-05-22 00:27:01 +10:00
|
|
|
# Use Normalization
|
2019-04-25 16:05:47 +02:00
|
|
|
pie.prop(track_active, "use_normalization", text="Normalization")
|
2019-05-28 16:22:21 +10:00
|
|
|
# Use Brute Force
|
2019-04-25 16:05:47 +02:00
|
|
|
pie.prop(track_active, "use_brute", text="Use Brute Force")
|
|
|
|
# Match Keyframe
|
|
|
|
prop = pie.operator("wm.context_set_enum", text="Match Previous", icon='KEYFRAME_HLT')
|
|
|
|
prop.data_path = "space_data.clip.tracking.tracks.active.pattern_match"
|
|
|
|
prop.value = 'KEYFRAME'
|
|
|
|
# Match Previous Frame
|
|
|
|
prop = pie.operator("wm.context_set_enum", text="Match Keyframe", icon='KEYFRAME')
|
|
|
|
prop.data_path = "space_data.clip.tracking.tracks.active.pattern_match"
|
|
|
|
prop.value = 'PREV_FRAME'
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_tracking_pie(Menu):
|
|
|
|
# Tracking Operators
|
|
|
|
bl_label = "Tracking"
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
space = context.space_data
|
|
|
|
return space.mode == 'TRACKING' and space.clip
|
|
|
|
|
2019-05-28 16:22:21 +10:00
|
|
|
def draw(self, _context):
|
2019-04-25 16:05:47 +02:00
|
|
|
layout = self.layout
|
2019-05-28 16:22:21 +10:00
|
|
|
|
2019-04-25 16:05:47 +02:00
|
|
|
pie = layout.menu_pie()
|
|
|
|
# Track Backwards
|
|
|
|
prop = pie.operator("clip.track_markers", icon='TRACKING_BACKWARDS')
|
|
|
|
prop.backwards = True
|
|
|
|
prop.sequence = True
|
|
|
|
# Track Forwards
|
|
|
|
prop = pie.operator("clip.track_markers", icon='TRACKING_FORWARDS')
|
|
|
|
prop.backwards = False
|
|
|
|
prop.sequence = True
|
|
|
|
# Disable Marker
|
2019-06-22 15:04:46 +10:00
|
|
|
pie.operator("clip.disable_markers", icon='HIDE_OFF').action = 'TOGGLE'
|
2019-04-25 16:05:47 +02:00
|
|
|
# Detect Features
|
|
|
|
pie.operator("clip.detect_features", icon='ZOOM_SELECTED')
|
|
|
|
# Clear Path Backwards
|
|
|
|
pie.operator("clip.clear_track_path", icon='TRACKING_CLEAR_BACKWARDS').action = 'UPTO'
|
|
|
|
# Clear Path Forwards
|
|
|
|
pie.operator("clip.clear_track_path", icon='TRACKING_CLEAR_FORWARDS').action = 'REMAINED'
|
|
|
|
# Refine Backwards
|
|
|
|
pie.operator("clip.refine_markers", icon='TRACKING_REFINE_BACKWARDS').backwards = True
|
|
|
|
# Refine Forwards
|
|
|
|
pie.operator("clip.refine_markers", icon='TRACKING_REFINE_FORWARDS').backwards = False
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_solving_pie(Menu):
|
|
|
|
# Operators to solve the scene
|
|
|
|
bl_label = "Solving"
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
space = context.space_data
|
|
|
|
return space.mode == 'TRACKING' and space.clip
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
clip = context.space_data.clip
|
|
|
|
settings = getattr(getattr(clip, "tracking", None), "settings", None)
|
|
|
|
|
|
|
|
layout = self.layout
|
|
|
|
pie = layout.menu_pie()
|
|
|
|
# Clear Solution
|
|
|
|
pie.operator("clip.clear_solution", icon='FILE_REFRESH')
|
|
|
|
# Solve Camera
|
|
|
|
pie.operator("clip.solve_camera", text="Solve Camera", icon='OUTLINER_OB_CAMERA')
|
|
|
|
# Use Tripod Solver
|
|
|
|
if settings:
|
|
|
|
pie.prop(settings, "use_tripod_solver", text="Tripod Solver")
|
|
|
|
# create Plane Track
|
|
|
|
pie.operator("clip.create_plane_track", icon='MATPLANE')
|
|
|
|
# Set Keyframe A
|
2019-05-22 00:27:01 +10:00
|
|
|
pie.operator(
|
|
|
|
"clip.set_solver_keyframe",
|
|
|
|
text="Set Keyframe A",
|
|
|
|
icon='KEYFRAME',
|
|
|
|
).keyframe = 'KEYFRAME_A'
|
2019-04-25 16:05:47 +02:00
|
|
|
# Set Keyframe B
|
2019-05-22 00:27:01 +10:00
|
|
|
pie.operator(
|
|
|
|
"clip.set_solver_keyframe",
|
|
|
|
text="Set Keyframe B",
|
|
|
|
icon='KEYFRAME',
|
|
|
|
).keyframe = 'KEYFRAME_B'
|
2019-04-25 16:05:47 +02:00
|
|
|
# Clean Tracks
|
|
|
|
prop = pie.operator("clip.clean_tracks", icon='X')
|
|
|
|
# Filter Tracks
|
|
|
|
pie.operator("clip.filter_tracks", icon='FILTER')
|
|
|
|
prop.frames = 15
|
|
|
|
prop.error = 2
|
|
|
|
|
|
|
|
|
|
|
|
class CLIP_MT_reconstruction_pie(Menu):
|
|
|
|
# Scene Reconstruction
|
|
|
|
bl_label = "Reconstruction"
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
space = context.space_data
|
|
|
|
return space.mode == 'TRACKING' and space.clip
|
|
|
|
|
2019-05-28 16:22:21 +10:00
|
|
|
def draw(self, _context):
|
2019-04-25 16:05:47 +02:00
|
|
|
layout = self.layout
|
|
|
|
pie = layout.menu_pie()
|
|
|
|
# Set Active Clip As Viewport Background
|
|
|
|
pie.operator("clip.set_viewport_background", text="Set Viewport Background", icon='FILE_IMAGE')
|
|
|
|
# Setup Tracking Scene
|
|
|
|
pie.operator("clip.setup_tracking_scene", text="Setup Tracking Scene", icon='SCENE_DATA')
|
|
|
|
# Setup Floor
|
|
|
|
pie.operator("clip.set_plane", text="Set Floor", icon='AXIS_TOP')
|
|
|
|
# Set Origin
|
|
|
|
pie.operator("clip.set_origin", text="Set Origin", icon='OBJECT_ORIGIN')
|
|
|
|
# Set X Axis
|
|
|
|
pie.operator("clip.set_axis", text="Set X Axis", icon='AXIS_FRONT').axis = 'X'
|
|
|
|
# Set Y Axis
|
|
|
|
pie.operator("clip.set_axis", text="Set Y Axis", icon='AXIS_SIDE').axis = 'Y'
|
|
|
|
# Set Scale
|
|
|
|
pie.operator("clip.set_scale", text="Set Scale", icon='ARROW_LEFTRIGHT')
|
|
|
|
# Apply Solution Scale
|
|
|
|
pie.operator("clip.apply_solution_scale", icon='ARROW_LEFTRIGHT')
|
|
|
|
|
|
|
|
|
2017-03-18 20:03:24 +11:00
|
|
|
classes = (
|
2017-03-20 02:34:32 +11:00
|
|
|
CLIP_UL_tracking_objects,
|
2017-03-18 20:03:24 +11:00
|
|
|
CLIP_HT_header,
|
2018-09-27 12:44:51 +02:00
|
|
|
CLIP_PT_display,
|
|
|
|
CLIP_PT_clip_display,
|
|
|
|
CLIP_PT_marker_display,
|
2017-03-18 20:03:24 +11:00
|
|
|
CLIP_MT_tracking_editor_menus,
|
2017-03-20 02:34:32 +11:00
|
|
|
CLIP_MT_masking_editor_menus,
|
|
|
|
CLIP_PT_track,
|
|
|
|
CLIP_PT_tools_clip,
|
|
|
|
CLIP_PT_tools_marker,
|
|
|
|
CLIP_PT_tracking_settings,
|
2018-09-27 12:44:51 +02:00
|
|
|
CLIP_PT_tracking_settings_extras,
|
2017-03-20 02:34:32 +11:00
|
|
|
CLIP_PT_tools_tracking,
|
|
|
|
CLIP_PT_tools_plane_tracking,
|
|
|
|
CLIP_PT_tools_solve,
|
|
|
|
CLIP_PT_tools_cleanup,
|
|
|
|
CLIP_PT_tools_geometry,
|
|
|
|
CLIP_PT_tools_orientation,
|
|
|
|
CLIP_PT_tools_object,
|
|
|
|
CLIP_PT_objects,
|
|
|
|
CLIP_PT_plane_track,
|
|
|
|
CLIP_PT_track_settings,
|
2018-09-27 12:44:51 +02:00
|
|
|
CLIP_PT_track_settings_extras,
|
2017-03-20 02:34:32 +11:00
|
|
|
CLIP_PT_tracking_camera,
|
|
|
|
CLIP_PT_tracking_lens,
|
2017-03-18 20:03:24 +11:00
|
|
|
CLIP_PT_marker,
|
2017-03-20 02:34:32 +11:00
|
|
|
CLIP_PT_proxy,
|
2018-11-29 11:51:30 +01:00
|
|
|
CLIP_PT_footage,
|
|
|
|
CLIP_PT_stabilization,
|
2017-03-18 20:03:24 +11:00
|
|
|
CLIP_PT_mask,
|
|
|
|
CLIP_PT_mask_layers,
|
2017-03-20 02:34:32 +11:00
|
|
|
CLIP_PT_mask_display,
|
|
|
|
CLIP_PT_active_mask_spline,
|
|
|
|
CLIP_PT_active_mask_point,
|
2017-03-18 20:03:24 +11:00
|
|
|
CLIP_PT_tools_mask_transforms,
|
2019-06-19 15:05:25 +02:00
|
|
|
CLIP_PT_tools_mask_tools,
|
2017-03-18 20:03:24 +11:00
|
|
|
CLIP_PT_tools_scenesetup,
|
2019-07-29 12:39:19 +02:00
|
|
|
CLIP_PT_annotation,
|
2017-03-20 02:34:32 +11:00
|
|
|
CLIP_PT_tools_grease_pencil_draw,
|
2019-08-24 00:22:38 +02:00
|
|
|
CLIP_MT_view_zoom,
|
2017-03-20 02:34:32 +11:00
|
|
|
CLIP_MT_view,
|
|
|
|
CLIP_MT_clip,
|
|
|
|
CLIP_MT_proxy,
|
|
|
|
CLIP_MT_reconstruction,
|
2021-01-12 14:43:00 -05:00
|
|
|
CLIP_MT_track,
|
2017-03-20 02:34:32 +11:00
|
|
|
CLIP_MT_track_transform,
|
2021-01-12 14:43:00 -05:00
|
|
|
CLIP_MT_track_motion,
|
|
|
|
CLIP_MT_track_clear,
|
|
|
|
CLIP_MT_track_refine,
|
|
|
|
CLIP_MT_track_animation,
|
|
|
|
CLIP_MT_track_visibility,
|
|
|
|
CLIP_MT_track_cleanup,
|
2017-03-20 02:34:32 +11:00
|
|
|
CLIP_MT_select,
|
|
|
|
CLIP_MT_select_grouped,
|
2019-03-12 10:59:57 +11:00
|
|
|
CLIP_MT_tracking_context_menu,
|
2018-06-20 16:32:31 +02:00
|
|
|
CLIP_PT_camera_presets,
|
|
|
|
CLIP_PT_track_color_presets,
|
|
|
|
CLIP_PT_tracking_settings_presets,
|
2019-03-12 10:59:57 +11:00
|
|
|
CLIP_MT_stabilize_2d_context_menu,
|
|
|
|
CLIP_MT_stabilize_2d_rotation_context_menu,
|
2018-09-26 17:32:11 +02:00
|
|
|
CLIP_MT_pivot_pie,
|
2019-04-25 16:05:47 +02:00
|
|
|
CLIP_MT_marker_pie,
|
|
|
|
CLIP_MT_tracking_pie,
|
|
|
|
CLIP_MT_reconstruction_pie,
|
2019-06-19 15:05:25 +02:00
|
|
|
CLIP_MT_solving_pie,
|
2017-03-18 20:03:24 +11:00
|
|
|
)
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
if __name__ == "__main__": # only for live edit.
|
2017-03-18 20:03:24 +11:00
|
|
|
from bpy.utils import register_class
|
|
|
|
for cls in classes:
|
|
|
|
register_class(cls)
|