[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45628] branches/soc-2011-tomato: Camera tracking: initial commit of dopesheet view for clip editor:
Sergey Sharybin
sergey.vfx at gmail.com
Sat Apr 14 14:03:23 CEST 2012
Revision: 45628
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45628
Author: nazgul
Date: 2012-04-14 12:03:23 +0000 (Sat, 14 Apr 2012)
Log Message:
-----------
Camera tracking: initial commit of dopesheet view for clip editor:
- Changed regions to use the whole main region for such views as
curves and dopesheet. This allows to have own panels with
tools/properties in this areas.
- Active clip is getting synchronized between different clip editor
editors in the same screen, so updating of curve/dopesheet views
happens automatically when one changes current clip in one of this
editors.
- Curves and dopesheet are still using PREVIEW region type instead of
re-using main region.
- To deal with vertical synchronization in dopesheet, re-initialization
of preview region happens.
- Panels in toolbox and properties panels are now separated to rely
on current view mode, some operators and poll functions still need
to be updated.
- Added new screen called "Movie Tracking" where layout is configured to
display timeline, main clip window, curves and dopesheet.
Modified Paths:
--------------
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
branches/soc-2011-tomato/source/blender/editors/datafiles/startup.blend.c
branches/soc-2011-tomato/source/blender/editors/include/ED_clip.h
branches/soc-2011-tomato/source/blender/editors/interface/resources.c
branches/soc-2011-tomato/source/blender/editors/space_clip/CMakeLists.txt
branches/soc-2011-tomato/source/blender/editors/space_clip/clip_buttons.c
branches/soc-2011-tomato/source/blender/editors/space_clip/clip_editor.c
branches/soc-2011-tomato/source/blender/editors/space_clip/clip_graph_draw.c
branches/soc-2011-tomato/source/blender/editors/space_clip/clip_graph_ops.c
branches/soc-2011-tomato/source/blender/editors/space_clip/clip_intern.h
branches/soc-2011-tomato/source/blender/editors/space_clip/clip_ops.c
branches/soc-2011-tomato/source/blender/editors/space_clip/clip_toolbar.c
branches/soc-2011-tomato/source/blender/editors/space_clip/clip_utils.c
branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c
branches/soc-2011-tomato/source/blender/makesdna/DNA_space_types.h
branches/soc-2011-tomato/source/blender/makesdna/DNA_tracking_types.h
branches/soc-2011-tomato/source/blender/makesrna/RNA_access.h
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_space.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_userdef.c
Added Paths:
-----------
branches/soc-2011-tomato/source/blender/editors/space_clip/clip_dopesheet_draw.c
branches/soc-2011-tomato/source/blender/editors/space_clip/clip_dopesheet_ops.c
Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py 2012-04-14 12:03:09 UTC (rev 45627)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py 2012-04-14 12:03:23 UTC (rev 45628)
@@ -38,19 +38,21 @@
sub = row.row(align=True)
sub.menu("CLIP_MT_view")
- if clip:
- sub.menu("CLIP_MT_select")
+ if sc.view == 'CLIP':
+ if clip:
+ sub.menu("CLIP_MT_select")
- sub.menu("CLIP_MT_clip")
+ sub.menu("CLIP_MT_clip")
- if clip:
- sub.menu("CLIP_MT_track")
- sub.menu("CLIP_MT_reconstruction")
+ if clip:
+ sub.menu("CLIP_MT_track")
+ sub.menu("CLIP_MT_reconstruction")
- if clip:
- layout.prop(sc, "mode", text="")
- layout.prop(sc, "view", text="", expand=True)
+ layout.prop(sc, "view", text="", expand=True)
+ if clip:
+ if sc.view == 'CLIP':
+ layout.prop(sc, "mode", text="")
if sc.view == 'GRAPH':
row = layout.row(align=True)
@@ -79,25 +81,57 @@
else:
r = tracking.reconstruction
- if r.is_valid:
+ if r.is_valid and sc.view == 'CLIP':
layout.label(text="Average solve error: %.4f" %
(r.average_error))
layout.template_running_jobs()
-class CLIP_PT_tools_marker(Panel):
- bl_space_type = 'CLIP_EDITOR'
- bl_region_type = 'TOOLS'
- bl_label = "Marker"
+class CLIP_PT_clip_view_panel:
@classmethod
def poll(cls, context):
sc = context.space_data
clip = sc.clip
- return clip and sc.mode == 'TRACKING'
+ return clip and sc.view == 'CLIP'
+class CLIP_PT_tracking_panel:
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ return clip and sc.mode == 'TRACKING' and sc.view == 'CLIP'
+
+
+class CLIP_PT_reconstruction_panel:
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ return clip and sc.mode == 'RECONSTRUCTION' and sc.view == 'CLIP'
+
+
+class CLIP_PT_distortion_panel:
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ return clip and sc.mode == 'DISTORTION' and sc.view == 'CLIP'
+
+
+class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'TOOLS'
+ bl_label = "Marker"
+
def draw(self, context):
sc = context.space_data
clip = sc.clip
@@ -162,18 +196,11 @@
text="Copy From Active Track")
-class CLIP_PT_tools_tracking(Panel):
+class CLIP_PT_tools_tracking(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Track"
- @classmethod
- def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
-
- return clip and sc.mode == 'TRACKING'
-
def draw(self, context):
layout = self.layout
@@ -201,18 +228,11 @@
layout.operator("clip.join_tracks", text="Join")
-class CLIP_PT_tools_solve(Panel):
+class CLIP_PT_tools_solve(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Solve"
- @classmethod
- def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
-
- return clip and sc.mode == 'TRACKING'
-
def draw(self, context):
layout = self.layout
clip = context.space_data.clip
@@ -241,18 +261,11 @@
col.prop(settings, "refine_intrinsics", text="")
-class CLIP_PT_tools_cleanup(Panel):
+class CLIP_PT_tools_cleanup(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Clean up"
- @classmethod
- def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
-
- return clip and sc.mode == 'TRACKING'
-
def draw(self, context):
layout = self.layout
clip = context.space_data.clip
@@ -265,18 +278,11 @@
layout.prop(settings, 'clean_action', text="")
-class CLIP_PT_tools_geometry(Panel):
+class CLIP_PT_tools_geometry(CLIP_PT_reconstruction_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Geometry"
- @classmethod
- def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
-
- return clip and sc.mode == 'RECONSTRUCTION'
-
def draw(self, context):
layout = self.layout
@@ -284,18 +290,11 @@
layout.operator("clip.track_to_empty")
-class CLIP_PT_tools_orientation(Panel):
+class CLIP_PT_tools_orientation(CLIP_PT_reconstruction_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Orientation"
- @classmethod
- def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
-
- return clip and sc.mode == 'RECONSTRUCTION'
-
def draw(self, context):
sc = context.space_data
layout = self.layout
@@ -320,18 +319,19 @@
col.prop(settings, "distance")
-class CLIP_PT_tools_object(Panel):
+class CLIP_PT_tools_object(CLIP_PT_reconstruction_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Object"
@classmethod
def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
+ if CLIP_PT_reconstruction_panel.poll(context):
+ sc = context.space_data
+ clip = sc.clip
- if clip and sc.mode == 'RECONSTRUCTION':
tracking_object = clip.tracking.objects.active
+
return not tracking_object.is_camera
return False
@@ -354,18 +354,11 @@
col.prop(settings, "object_distance")
-class CLIP_PT_tools_grease_pencil(Panel):
+class CLIP_PT_tools_grease_pencil(CLIP_PT_distortion_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Grease Pencil"
- @classmethod
- def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
-
- return clip and sc.mode == 'DISTORTION'
-
def draw(self, context):
layout = self.layout
@@ -383,18 +376,12 @@
row.prop(context.tool_settings, "use_grease_pencil_sessions")
-class CLIP_PT_objects(Panel):
+class CLIP_PT_objects(CLIP_PT_clip_view_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Objects"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- sc = context.space_data
-
- return sc.clip
-
def draw(self, context):
layout = self.layout
@@ -415,18 +402,11 @@
layout.prop(active, "name")
-class CLIP_PT_track(Panel):
+class CLIP_PT_track(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Track"
- @classmethod
- def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
-
- return sc.mode == 'TRACKING' and clip
-
def draw(self, context):
layout = self.layout
sc = context.space_data
@@ -482,18 +462,12 @@
layout.label(text=label_text)
-class CLIP_PT_track_settings(Panel):
+class CLIP_PT_track_settings(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Tracking Settings"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- sc = context.space_data
-
- return sc.mode == 'TRACKING' and sc.clip
-
def draw(self, context):
layout = self.layout
clip = context.space_data.clip
@@ -525,10 +499,13 @@
@classmethod
def poll(cls, context):
- sc = context.space_data
+ if CLIP_PT_clip_view_panel.poll(context):
+ sc = context.space_data
- return sc.mode in {'TRACKING', 'DISTORTION'} and sc.clip
+ return sc.mode in {'TRACKING', 'DISTORTION'} and sc.clip
+ return False
+
def draw(self, context):
layout = self.layout
@@ -568,7 +545,7 @@
col.prop(clip.tracking.camera, "k3")
-class CLIP_PT_display(Panel):
+class CLIP_PT_display(CLIP_PT_clip_view_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Display"
@@ -613,7 +590,7 @@
row.prop(clip, "display_aspect", text="")
-class CLIP_PT_marker_display(Panel):
+class CLIP_PT_marker_display(CLIP_PT_clip_view_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Marker Display"
@@ -636,18 +613,12 @@
row.prop(sc, "path_length", text="Length")
-class CLIP_PT_stabilization(Panel):
+class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "2D Stabilization"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- sc = context.space_data
-
- return sc.mode == 'RECONSTRUCTION' and sc.clip
-
def draw_header(self, context):
stab = context.space_data.clip.tracking.stabilization
@@ -695,19 +666,12 @@
layout.prop(stab, "filter_type")
-class CLIP_PT_marker(Panel):
+class CLIP_PT_marker(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Marker"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
-
- return sc.mode == 'TRACKING' and clip
-
def draw(self, context):
layout = self.layout
sc = context.space_data
@@ -721,18 +685,12 @@
layout.label(text="No active track")
-class CLIP_PT_proxy(Panel):
+class CLIP_PT_proxy(CLIP_PT_clip_view_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Proxy / Timecode"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- sc = context.space_data
-
- return sc.clip
-
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list