[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37596] branches/soc-2011-tomato: Camera tracking integration

Sergey Sharybin g.ulairi at gmail.com
Fri Jun 17 16:47:22 CEST 2011


Revision: 37596
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37596
Author:   nazgul
Date:     2011-06-17 14:47:22 +0000 (Fri, 17 Jun 2011)
Log Message:
-----------
Camera tracking integration
===========================

Refactored interface of movie clip editor:
- Remove all "modal" things like active tool and mode.
  They aren't so useful as I thought when was starting
  implementation of UI.
- Toolbar (T-panel) now contains tools only, no options/properties there.
- All properties are moved to properties panel (N-panel).

Modified Paths:
--------------
    branches/soc-2011-tomato/release/datafiles/blenderbuttons
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
    branches/soc-2011-tomato/source/blender/editors/datafiles/blenderbuttons.c
    branches/soc-2011-tomato/source/blender/editors/include/UI_icons.h
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_buttons.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_draw.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_header.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_intern.h
    branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/tracking_ops.c
    branches/soc-2011-tomato/source/blender/makesdna/DNA_scene_types.h
    branches/soc-2011-tomato/source/blender/makesdna/DNA_space_types.h
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_movieclip.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_space.c

Modified: branches/soc-2011-tomato/release/datafiles/blenderbuttons
===================================================================
(Binary files differ)

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	2011-06-17 14:47:04 UTC (rev 37595)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py	2011-06-17 14:47:22 UTC (rev 37596)
@@ -37,172 +37,73 @@
             sub.menu("CLIP_MT_view")
             sub.menu("CLIP_MT_clip")
 
-            if clip and sc.mode == 'TRACKING':
+            if clip:
                 sub.menu("CLIP_MT_select")
                 sub.menu("CLIP_MT_edit")
 
         layout.template_ID(sc, "clip")
 
-        if clip:
-            layout.prop(sc, "mode", text="")
 
-
 class CLIP_PT_tools(bpy.types.Panel):
     bl_space_type = 'CLIP_EDITOR'
     bl_region_type = 'TOOLS'
     bl_label = "Tools"
 
-    @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
         clip = context.space_data.clip
 
         if clip:
-            ts = context.tool_settings
-            col = layout.column()
-            col.prop(ts.movieclip, "tool", expand=True)
+            col = layout.column(align=True)
 
+            col.label(text="Transform:")
+            col.operator("transform.translate")
+            col.operator("transform.resize")
 
-class CLIP_PT_footage(bpy.types.Panel):
-    bl_space_type = 'CLIP_EDITOR'
-    bl_region_type = 'TOOLS'
-    bl_label = "Footage Settings"
+            col.label(text="Marker:")
+            col.operator("clip.add_marker_move")
+            col.operator("clip.delete")
 
-    @classmethod
-    def poll(cls, context):
-        sc = context.space_data
-        clip = sc.clip
-        ts = context.tool_settings
-        tool = ts.movieclip.tool
-
-        if sc.mode == 'TRACKING':
-            return clip and tool == 'FOOTAGE'
-
-        return True
-
-    def draw(self, context):
-        layout = self.layout
-
-        sc = context.space_data
-        clip = sc.clip
-
-        if clip:
-            layout.template_movieclip(sc, "clip", sc.clip_user, compact=True)
+            col = layout.column(align=True)
+            col.label(text="2D tracking:")
+            col.operator("clip.track_markers")
+            col.operator("clip.track_markers", text="Track Backwards").backwards=True
+            col.operator("clip.clear_track_path")
         else:
-            layout.operator("clip.open", icon='FILESEL')
+          layout.operator('clip.open')
 
 
-class CLIP_PT_tracking_camera(bpy.types.Panel):
+class CLIP_PT_marker_preview(bpy.types.Panel):
     bl_space_type = 'CLIP_EDITOR'
-    bl_region_type = 'TOOLS'
-    bl_label = "Camera Data"
+    bl_region_type = 'UI'
+    bl_label = "Marker Preview"
 
     @classmethod
     def poll(cls, context):
         sc = context.space_data
         clip = sc.clip
-        ts = context.tool_settings
-        tool = ts.movieclip.tool
 
-        return (sc.mode == 'TRACKING' and clip and tool == 'CAMERA')
+        return clip and clip.tracking.act_track
 
     def draw(self, context):
         layout = self.layout
-
         sc = context.space_data
-        clip = sc.clip
-
-        layout.prop(clip.tracking.camera, "focal_length")
-
-
-class CLIP_PT_tracking_marker_tools(bpy.types.Panel):
-    bl_space_type = 'CLIP_EDITOR'
-    bl_region_type = 'TOOLS'
-    bl_label = "Marker Tools"
-
-    @classmethod
-    def poll(cls, context):
-        sc = context.space_data
-        clip = sc.clip
-        ts = context.tool_settings
-        tool = ts.movieclip.tool
-
-        return (sc.mode == 'TRACKING' and clip and tool == 'MARKER')
-
-    def draw(self, context):
-        layout = self.layout
         clip = context.space_data.clip
 
-        layout.operator("clip.add_marker_move", icon='ZOOMIN')
-        layout.operator("clip.delete", icon='X')
-
-
-class CLIP_PT_tracking_marker(bpy.types.Panel):
-    bl_space_type = 'CLIP_EDITOR'
-    bl_region_type = 'TOOLS'
-    bl_label = "Marker"
-
-    @classmethod
-    def poll(cls, context):
-        sc = context.space_data
-        clip = sc.clip
-        ts = context.tool_settings
-        tool = ts.movieclip.tool
-
-        return (sc.mode == 'TRACKING' and clip and \
-            tool != 'NONE' and clip.tracking.act_track)
-
-    def draw(self, context):
-        layout = self.layout
-        sc = context.space_data
-        clip = context.space_data.clip
-
         layout.template_marker(clip.tracking, "act_track", sc.clip_user, clip)
 
 
-class CLIP_PT_track(bpy.types.Panel):
-    bl_space_type = 'CLIP_EDITOR'
-    bl_region_type = 'TOOLS'
-    bl_label = "Track Tools"
-
-    @classmethod
-    def poll(cls, context):
-        sc = context.space_data
-        clip = sc.clip
-        ts = context.tool_settings
-        tool = ts.movieclip.tool
-
-        return (sc.mode == 'TRACKING' and clip and tool == 'TRACK')
-
-    def draw(self, context):
-        layout = self.layout
-        clip = context.space_data.clip
-
-        layout.operator("clip.track_markers", icon='PLAY')
-        layout.operator("clip.track_markers", text="Track Backwards", icon='PLAY_REVERSE').backwards=True
-        layout.operator("clip.clear_track_path", icon='X')
-
-
 class CLIP_PT_track_settings(bpy.types.Panel):
     bl_space_type = 'CLIP_EDITOR'
-    bl_region_type = 'TOOLS'
+    bl_region_type = 'UI'
     bl_label = "Tracking Settings"
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
         sc = context.space_data
-        clip = sc.clip
-        ts = context.tool_settings
-        tool = ts.movieclip.tool
 
-        return (sc.mode == 'TRACKING' and clip and tool == 'TRACK')
+        return sc.clip
 
     def draw(self, context):
         layout = self.layout
@@ -217,19 +118,33 @@
             text="Reset To Defaults")
 
 
-class CLIP_PT_display(bpy.types.Panel):
+class CLIP_PT_tracking_camera(bpy.types.Panel):
     bl_space_type = 'CLIP_EDITOR'
-    bl_region_type = 'TOOLS'
-    bl_label = "Display"
+    bl_region_type = 'UI'
+    bl_label = "Camera Data"
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
         sc = context.space_data
+
+        return sc.clip
+
+    def draw(self, context):
+        layout = self.layout
+
+        sc = context.space_data
         clip = sc.clip
 
-        return sc.mode == 'TRACKING' and clip
+        layout.prop(clip.tracking.camera, "focal_length")
 
+
+class CLIP_PT_display(bpy.types.Panel):
+    bl_space_type = 'CLIP_EDITOR'
+    bl_region_type = 'UI'
+    bl_label = "Display"
+    bl_options = {'DEFAULT_CLOSED'}
+
     def draw(self, context):
         layout = self.layout
         sc = context.space_data
@@ -246,7 +161,7 @@
 
 class CLIP_PT_debug(bpy.types.Panel):
     bl_space_type = 'CLIP_EDITOR'
-    bl_region_type = 'TOOLS'
+    bl_region_type = 'UI'
     bl_label = "Debug"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -258,13 +173,37 @@
         layout.prop(sc, "show_tiny_markers")
 
 
+class CLIP_PT_footage(bpy.types.Panel):
+    bl_space_type = 'CLIP_EDITOR'
+    bl_region_type = 'UI'
+    bl_label = "Footage Settings"
+    bl_options = {'DEFAULT_CLOSED'}
+
+    @classmethod
+    def poll(cls, context):
+        sc = context.space_data
+
+        return sc.clip
+
+    def draw(self, context):
+        layout = self.layout
+
+        sc = context.space_data
+        clip = sc.clip
+
+        if clip:
+            layout.template_movieclip(sc, "clip", sc.clip_user, compact=True)
+        else:
+            layout.operator("clip.open", icon='FILESEL')
+
+
 class CLIP_MT_view(bpy.types.Menu):
     bl_label = "View"
 
     def draw(self, context):
         layout = self.layout
 
-        # layout.operator("clip.properties", icon='MENU_PANEL')
+        layout.operator("clip.properties", icon='MENU_PANEL')
         layout.operator("clip.tools", icon='MENU_PANEL')
         layout.separator()
 

Modified: branches/soc-2011-tomato/source/blender/editors/datafiles/blenderbuttons.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/datafiles/blenderbuttons.c	2011-06-17 14:47:04 UTC (rev 37595)
+++ branches/soc-2011-tomato/source/blender/editors/datafiles/blenderbuttons.c	2011-06-17 14:47:22 UTC (rev 37596)
@@ -1,6606 +1,6603 @@
 /* DataToC output of file <blenderbuttons> */
 
-int datatoc_blenderbuttons_size= 211186;
+int datatoc_blenderbuttons_size= 211084;
 char datatoc_blenderbuttons[]= {
-137, 80, 78, 71, 13, 10, 26, 10,  0,  0,  0, 13, 73, 72, 68, 82,  0,  0,
-  2, 90,  0,  0,  2,128,  8,  6,  0,  0,  0, 68,254,214,163,  0,  0, 10, 79,105, 67, 67, 80, 80,104,111,116,111,115,104,111,112,
- 32, 73, 67, 67, 32,112,114,111,102,105,108,101,  0,  0,120,218,157, 83,103, 84, 83,233, 22, 61,247,222,244, 66, 75,136,128,148,
- 75,111, 82, 21,  8, 32, 82, 66,139,128, 20,145, 38, 42, 33,  9, 16, 74,136, 33,161,217, 21, 81,193, 17, 69, 69,  4, 27,200,160,
-136,  3,142,142,128,140, 21, 81, 44, 12,138, 10,216,  7,228, 33,162,142,131,163,136,138,202,251,225,123,163,107,214,188,247,230,
-205,254,181,215, 62,231,172,243,157,179,207,  7,192,  8, 12,150, 72, 51, 81, 53,128, 12,169, 66, 30, 17,224,131,199,196,198,225,
-228, 46, 64,129, 10, 36,112,  0, 16,  8,179,100, 33,115,253, 35,  1,  0,248,126, 60, 60, 43, 34,192,  7,190,  0,  1,120,211, 11,
-  8,  0,192, 77,155,192, 48, 28,135,255, 15,234, 66,153, 92,  1,128,132,  1,192,116,145, 56, 75,  8,128, 20,  0, 64,122,142, 66,
-166,  0, 64, 70,  1,128,157,152, 38, 83,  0,160,  4,  0, 96,203, 99, 98,227,  0, 80, 45,  0, 96, 39,127,230,211,  0,128,157,248,
-153,123,  1,  0, 91,148, 33, 21,  1,160,145,  0, 32, 19,101,136, 68,  0,104, 59,  0,172,207, 86,138, 69,  0, 88, 48,  0, 20,102,
- 75,196, 57,  0,216, 45,  0, 48, 73, 87,102, 72,  0,176,183,  0,192,206, 16, 11,178,  0,  8, 12,  0, 48, 81,136,133, 41,  0,  4,
-123,  0, 96,200, 35, 35,120,  0,132,153,  0, 20, 70,242, 87, 60,241, 43,174, 16,231, 42,  0,  0,120,153,178, 60,185, 36, 57, 69,
-129, 91,  8, 45,113,  7, 87, 87, 46, 30, 40,206, 73, 23, 43, 20, 54, 97,  2, 97,154, 64, 46,194,121,153, 25, 50,129, 52, 15,224,
-243,204,  0,  0,160,145, 21, 17,224,131,243,253,120,206, 14,174,206,206, 54,142,182, 14, 95, 45,234,191,  6,255, 34, 98, 98,227,

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list