[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38317] branches/soc-2011-salad: Merging r38240 through r38316 from soc-2011-tomato into soc-2011-salad

Sergey Sharybin g.ulairi at gmail.com
Mon Jul 11 20:41:58 CEST 2011


Revision: 38317
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38317
Author:   nazgul
Date:     2011-07-11 18:41:58 +0000 (Mon, 11 Jul 2011)
Log Message:
-----------
Merging r38240 through r38316 from soc-2011-tomato into soc-2011-salad

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38240
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38316

Modified Paths:
--------------
    branches/soc-2011-salad/extern/libmv/libmv-capi.cpp
    branches/soc-2011-salad/extern/libmv/libmv-capi.h
    branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_object_constraint.py
    branches/soc-2011-salad/release/scripts/startup/bl_ui/space_clip.py
    branches/soc-2011-salad/source/blender/blenkernel/BKE_movieclip.h
    branches/soc-2011-salad/source/blender/blenkernel/BKE_tracking.h
    branches/soc-2011-salad/source/blender/blenkernel/intern/anim_sys.c
    branches/soc-2011-salad/source/blender/blenkernel/intern/constraint.c
    branches/soc-2011-salad/source/blender/blenkernel/intern/movieclip.c
    branches/soc-2011-salad/source/blender/blenkernel/intern/tracking.c
    branches/soc-2011-salad/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-salad/source/blender/blenloader/intern/writefile.c
    branches/soc-2011-salad/source/blender/editors/object/object_constraint.c
    branches/soc-2011-salad/source/blender/editors/space_clip/clip_draw.c
    branches/soc-2011-salad/source/blender/editors/space_clip/clip_intern.h
    branches/soc-2011-salad/source/blender/editors/space_clip/space_clip.c
    branches/soc-2011-salad/source/blender/editors/space_clip/tracking_ops.c
    branches/soc-2011-salad/source/blender/makesdna/DNA_constraint_types.h
    branches/soc-2011-salad/source/blender/makesdna/DNA_movieclip_types.h
    branches/soc-2011-salad/source/blender/makesdna/DNA_space_types.h
    branches/soc-2011-salad/source/blender/makesdna/DNA_tracking_types.h
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_constraint.c
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_movieclip.c
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_space.c
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_tracking.c
    branches/soc-2011-salad/source/blenderplayer/CMakeLists.txt

Property Changed:
----------------
    branches/soc-2011-salad/


Property changes on: branches/soc-2011-salad
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38208
/branches/soc-2011-tomato:36831-38239
/trunk/blender:36834-38308
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38208
/branches/soc-2011-tomato:36831-38316
/trunk/blender:36834-38316

Modified: branches/soc-2011-salad/extern/libmv/libmv-capi.cpp
===================================================================
--- branches/soc-2011-salad/extern/libmv/libmv-capi.cpp	2011-07-11 18:18:42 UTC (rev 38316)
+++ branches/soc-2011-salad/extern/libmv/libmv-capi.cpp	2011-07-11 18:41:58 UTC (rev 38317)
@@ -331,7 +331,7 @@
 	return 0;
 }
 
-int libmv_reporojectionCameraForImage(libmv_Reconstruction *reconstruction, int image, float mat[4][4])
+int libmv_reporojectionCameraForImage(libmv_Reconstruction *reconstruction, int image, double mat[4][4])
 {
 	libmv::Camera *camera = ((libmv::Reconstruction *)reconstruction)->CameraForImage(image);
 
@@ -368,3 +368,20 @@
 	delete (libmv::Reconstruction *)reconstruction;
 }
 
+/* ************ utils ************ */
+
+void libmv_applyCameraIntrinsics(double focal_length, double principal_x, double principal_y, double k1, double k2, double k3,
+			double x, double y, double *x1, double *y1)
+{
+	libmv::CameraIntrinsics intrinsics;
+
+	intrinsics.SetFocalLength(focal_length);
+	intrinsics.set_principal_point(principal_x, principal_y);
+	intrinsics.set_radial_distortion(k1, k2, k3);
+
+	if(focal_length) {
+		/* do a lens undistortion if focal length is non-zero only */
+
+		intrinsics.ApplyIntrinsics(x, y, x1, y1);
+	}
+}

Modified: branches/soc-2011-salad/extern/libmv/libmv-capi.h
===================================================================
--- branches/soc-2011-salad/extern/libmv/libmv-capi.h	2011-07-11 18:18:42 UTC (rev 38316)
+++ branches/soc-2011-salad/extern/libmv/libmv-capi.h	2011-07-11 18:41:58 UTC (rev 38317)
@@ -58,9 +58,13 @@
 struct libmv_Reconstruction *libmv_solveReconstruction(struct libmv_Tracks *tracks, int keyframe1, int keyframe2,
 			double focal_length, double principal_x, double principal_y, double k1, double k2, double k3);
 int libmv_reporojectionPointForTrack(struct libmv_Reconstruction *reconstruction, int track, double pos[3]);
-int libmv_reporojectionCameraForImage(struct libmv_Reconstruction *reconstruction, int image, float mat[4][4]);
+int libmv_reporojectionCameraForImage(struct libmv_Reconstruction *reconstruction, int image, double mat[4][4]);
 void libmv_destroyReconstruction(struct libmv_Reconstruction *reconstruction);
 
+/* utils */
+void libmv_applyCameraIntrinsics(double focal_length, double principal_x, double principal_y, double k1, double k2, double k3,
+			double x, double y, double *x1, double *y1);
+
 #ifdef __cplusplus
 }
 #endif

Modified: branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_object_constraint.py
===================================================================
--- branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_object_constraint.py	2011-07-11 18:18:42 UTC (rev 38316)
+++ branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_object_constraint.py	2011-07-11 18:41:58 UTC (rev 38317)
@@ -757,15 +757,22 @@
         col.prop(con, "rotation_range", text="Pivot When")
 
     def FOLLOW_TRACK(self, context, layout, con):
-        layout.prop(con, "clip")
+        layout.prop(con, "use_default_clip")
+
+        if not con.use_default_clip:
+            layout.prop(con, "clip")
+
         layout.prop(con, "track")
 
         row = layout.row()
         row.prop(con, "reference", expand=True)
 
     def CAMERA_SOLVER(self, context, layout, con):
-        layout.prop(con, "clip")
+        layout.prop(con, "use_default_clip")
 
+        if not con.use_default_clip:
+            layout.prop(con, "clip")
+
     def SCRIPT(self, context, layout, con):
         layout.label("Blender 2.5 has no py-constraints")
 

Modified: branches/soc-2011-salad/release/scripts/startup/bl_ui/space_clip.py
===================================================================
--- branches/soc-2011-salad/release/scripts/startup/bl_ui/space_clip.py	2011-07-11 18:18:42 UTC (rev 38316)
+++ branches/soc-2011-salad/release/scripts/startup/bl_ui/space_clip.py	2011-07-11 18:41:58 UTC (rev 38317)
@@ -76,7 +76,7 @@
 
             if clip:
                 sub.menu("CLIP_MT_select")
-                sub.menu("CLIP_MT_edit")
+                sub.menu("CLIP_MT_track")
 
         layout.template_ID(sc, "clip")
 
@@ -108,7 +108,8 @@
 
             op = row.operator("clip.track_markers", text="", icon='FRAME_PREV')
             op.backwards = True
-            op = row.operator("clip.track_markers", text="", icon='PLAY_REVERSE')
+            op = row.operator("clip.track_markers", text="", \
+                 icon='PLAY_REVERSE')
             op.backwards = True
             op.sequence = True
             op = row.operator("clip.track_markers", text="", icon='PLAY')
@@ -116,10 +117,18 @@
             row.operator("clip.track_markers", text="", icon='FRAME_NEXT')
 
             col = layout.column(align=True)
-            col.operator("clip.clear_track_path", text="Clear Remained Path").action = 'REMAINED'
-            col.operator("clip.clear_track_path", text="Clear Path Up To").action = 'UPTO'
-            col.operator("clip.clear_track_path", text="Clear Track Path").action = 'ALL'
+            op = col.operator("clip.clear_track_path", \
+                 text="Clear Remained Path")
+            op.action = 'REMAINED'
 
+            op = col.operator("clip.clear_track_path", text="Clear Path Up To")
+            op.action = 'UPTO'
+
+            op = col.operator("clip.clear_track_path", text="Clear Track Path")
+            op.action = 'ALL'
+
+            layout.operator("clip.apply_follow_track")
+
             col = layout.column(align=True)
             col.label(text="Reconstruction:")
             col.operator("clip.solve_camera")
@@ -152,7 +161,8 @@
 
         layout.prop(act_track, "name")
 
-        layout.template_track(clip.tracking, "active_track", sc.clip_user, clip)
+        layout.template_track(clip.tracking, "active_track", \
+            sc.clip_user, clip)
 
         if act_track:
             row = layout.row()
@@ -210,8 +220,12 @@
         sc = context.space_data
         clip = sc.clip
 
-        layout.prop(clip.tracking.camera, "focal_length")
+        layout.prop(clip.tracking.camera, "sensor_width")
 
+        row = layout.row()
+        row.prop(clip.tracking.camera, "focal_length")
+        row.prop(clip.tracking.camera, "units", text="")
+
         layout.label(text="Principal Point")
         layout.prop(clip.tracking.camera, "principal", text="")
 
@@ -240,33 +254,9 @@
         row.active = sc.show_marker_path
         row.prop(sc, "path_length")
 
-
-class CLIP_PT_test(bpy.types.Panel):
-    bl_space_type = 'CLIP_EDITOR'
-    bl_region_type = 'TOOLS'
-    bl_label = "Test"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        layout = self.layout
-        sc = context.space_data
-
-        layout.operator("clip.apply_follow_track")
-        layout.operator("clip.track_to_fcurves")
-
-
-class CLIP_PT_debug(bpy.types.Panel):
-    bl_space_type = 'CLIP_EDITOR'
-    bl_region_type = 'UI'
-    bl_label = "Debug"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        layout = self.layout
-        sc = context.space_data
-
-        layout.prop(sc, "show_cache")
         layout.prop(sc, "show_tiny_markers")
+        layout.prop(sc, "show_bundles")
+        layout.prop(sc, "use_mute_footage")
 
 
 class CLIP_PT_footage(bpy.types.Panel):
@@ -338,30 +328,79 @@
         layout.operator("clip.open")
 
 
-class CLIP_MT_edit(bpy.types.Menu):
-    bl_label = "Edit"
+class CLIP_MT_track(bpy.types.Menu):
+    bl_label = "Track"
 
     def draw(self, context):
         layout = self.layout
 
-        sc = context.space_data
+        layout.operator("clip.set_origin")
 
+        layout.separator()
+        layout.operator("clip.clear_reconstruction")
+        layout.operator("clip.solve_camera")
+
+        layout.separator()
+        op = layout.operator("clip.clear_track_path", \
+             text="Clear Remained Path")
+        op.action = 'REMAINED'
+
+        op = layout.operator("clip.clear_track_path", \
+             text="Clear Path Up To")
+        op.action = 'UPTO'
+
+        op = layout.operator("clip.clear_track_path", \
+             text="Clear Track Path")
+        op.action = 'ALL'
+
+        layout.separator()
+        op = layout.operator("clip.track_markers", \
+            text="Track Frame Backwards")
+        op.backwards = True
+
+        op = layout.operator("clip.track_markers", text="Track Backwards")
+        op.backwards = True
+        op.sequence = True
+
+        op = layout.operator("clip.track_markers", text="Track Forwards")
+        op.sequence = True
+        layout.operator("clip.track_markers", text="Track Frame Forwards")
+
+        layout.separator()
         layout.operator("clip.delete_track")
         layout.operator("clip.delete_marker")
-        layout.menu("CLIP_MT_marker")
 
+        layout.separator()
+        layout.operator("clip.add_marker_move")
 
-class CLIP_MT_marker(bpy.types.Menu):
-    bl_label = "Marker"
+        layout.separator()
+        layout.menu("CLIP_MT_track_visibility")
+        layout.menu("CLIP_MT_track_transform")
 
+
+class CLIP_MT_track_visibility(bpy.types.Menu):
+    bl_label = "Show/Hide"
+
     def draw(self, context):
         layout = self.layout
 
-        sc = context.space_data
+        layout.operator("clip.hide_tracks_clear", text="Show Hidden")
+        layout.operator("clip.hide_tracks", text="Hide Selected")
 
-        layout.operator("clip.add_marker_move")
+        op = layout.operator("clip.hide_tracks", text="Hide Unselected")
+        op.unselected = True
 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list