[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59185] branches/soc-2013-dingto: Merged revision(s) 59108-59184 from trunk/blender into soc-2013-dingto.

Thomas Dinges blender at dingto.org
Fri Aug 16 14:50:13 CEST 2013


Revision: 59185
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59185
Author:   dingto
Date:     2013-08-16 12:50:13 +0000 (Fri, 16 Aug 2013)
Log Message:
-----------
Merged revision(s) 59108-59184 from trunk/blender into soc-2013-dingto. 

Modified Paths:
--------------
    branches/soc-2013-dingto/build_files/scons/tools/Blender.py
    branches/soc-2013-dingto/doc/python_api/rst/bge.logic.rst
    branches/soc-2013-dingto/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst
    branches/soc-2013-dingto/extern/libmv/libmv/multiview/euclidean_resection.cc
    branches/soc-2013-dingto/extern/libmv/libmv/multiview/euclidean_resection.h
    branches/soc-2013-dingto/extern/libmv/libmv/tracking/track_region.cc
    branches/soc-2013-dingto/extern/libmv/libmv-capi.cc
    branches/soc-2013-dingto/extern/libmv/libmv-capi.h
    branches/soc-2013-dingto/extern/libmv/libmv-capi_stub.cc
    branches/soc-2013-dingto/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
    branches/soc-2013-dingto/intern/audaspace/OpenAL/AUD_OpenALDevice.h
    branches/soc-2013-dingto/intern/audaspace/Python/AUD_PyAPI.cpp
    branches/soc-2013-dingto/intern/audaspace/intern/AUD_IHandle.h
    branches/soc-2013-dingto/intern/audaspace/intern/AUD_SoftwareDevice.cpp
    branches/soc-2013-dingto/intern/audaspace/intern/AUD_SoftwareDevice.h
    branches/soc-2013-dingto/intern/audaspace/intern/AUD_Space.h
    branches/soc-2013-dingto/intern/cycles/kernel/kernel_shader.h
    branches/soc-2013-dingto/intern/cycles/kernel/osl/osl_closures.h
    branches/soc-2013-dingto/intern/guardedalloc/intern/mallocn.c
    branches/soc-2013-dingto/release/scripts/modules/bpy_extras/image_utils.py
    branches/soc-2013-dingto/release/scripts/startup/bl_operators/add_mesh_torus.py
    branches/soc-2013-dingto/release/scripts/startup/bl_ui/properties_mask_common.py
    branches/soc-2013-dingto/release/scripts/startup/bl_ui/space_clip.py
    branches/soc-2013-dingto/release/scripts/startup/nodeitems_builtins.py
    branches/soc-2013-dingto/source/blender/blenkernel/BKE_curve.h
    branches/soc-2013-dingto/source/blender/blenkernel/BKE_mask.h
    branches/soc-2013-dingto/source/blender/blenkernel/BKE_material.h
    branches/soc-2013-dingto/source/blender/blenkernel/BKE_mesh.h
    branches/soc-2013-dingto/source/blender/blenkernel/BKE_node.h
    branches/soc-2013-dingto/source/blender/blenkernel/BKE_tracking.h
    branches/soc-2013-dingto/source/blender/blenkernel/intern/armature.c
    branches/soc-2013-dingto/source/blender/blenkernel/intern/curve.c
    branches/soc-2013-dingto/source/blender/blenkernel/intern/mask.c
    branches/soc-2013-dingto/source/blender/blenkernel/intern/material.c
    branches/soc-2013-dingto/source/blender/blenkernel/intern/mesh.c
    branches/soc-2013-dingto/source/blender/blenkernel/intern/node.c
    branches/soc-2013-dingto/source/blender/blenkernel/intern/sound.c
    branches/soc-2013-dingto/source/blender/blenkernel/intern/tracking.c
    branches/soc-2013-dingto/source/blender/blenlib/BLI_array.h
    branches/soc-2013-dingto/source/blender/blenlib/BLI_linklist.h
    branches/soc-2013-dingto/source/blender/blenlib/BLI_math_base.h
    branches/soc-2013-dingto/source/blender/blenlib/intern/BLI_array.c
    branches/soc-2013-dingto/source/blender/blenlib/intern/BLI_linklist.c
    branches/soc-2013-dingto/source/blender/blenloader/intern/readfile.c
    branches/soc-2013-dingto/source/blender/blenloader/intern/writefile.c
    branches/soc-2013-dingto/source/blender/bmesh/intern/bmesh_marking.c
    branches/soc-2013-dingto/source/blender/bmesh/intern/bmesh_marking.h
    branches/soc-2013-dingto/source/blender/bmesh/intern/bmesh_queries.c
    branches/soc-2013-dingto/source/blender/bmesh/operators/bmo_edgenet.c
    branches/soc-2013-dingto/source/blender/bmesh/tools/bmesh_edgesplit.c
    branches/soc-2013-dingto/source/blender/compositor/CMakeLists.txt
    branches/soc-2013-dingto/source/blender/compositor/intern/COM_Converter.cpp
    branches/soc-2013-dingto/source/blender/compositor/operations/COM_ImageOperation.cpp
    branches/soc-2013-dingto/source/blender/compositor/operations/COM_ImageOperation.h
    branches/soc-2013-dingto/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
    branches/soc-2013-dingto/source/blender/editors/include/ED_transform.h
    branches/soc-2013-dingto/source/blender/editors/mask/mask_relationships.c
    branches/soc-2013-dingto/source/blender/editors/mask/mask_shapekey.c
    branches/soc-2013-dingto/source/blender/editors/mesh/editmesh_rip.c
    branches/soc-2013-dingto/source/blender/editors/mesh/editmesh_tools.c
    branches/soc-2013-dingto/source/blender/editors/space_clip/clip_draw.c
    branches/soc-2013-dingto/source/blender/editors/space_clip/clip_graph_ops.c
    branches/soc-2013-dingto/source/blender/editors/space_clip/clip_intern.h
    branches/soc-2013-dingto/source/blender/editors/space_clip/clip_utils.c
    branches/soc-2013-dingto/source/blender/editors/space_clip/space_clip.c
    branches/soc-2013-dingto/source/blender/editors/space_clip/tracking_ops.c
    branches/soc-2013-dingto/source/blender/editors/space_clip/tracking_select.c
    branches/soc-2013-dingto/source/blender/editors/space_file/file_panels.c
    branches/soc-2013-dingto/source/blender/editors/space_logic/logic_window.c
    branches/soc-2013-dingto/source/blender/editors/space_node/drawnode.c
    branches/soc-2013-dingto/source/blender/editors/space_outliner/outliner_edit.c
    branches/soc-2013-dingto/source/blender/editors/space_outliner/space_outliner.c
    branches/soc-2013-dingto/source/blender/editors/transform/transform.c
    branches/soc-2013-dingto/source/blender/editors/transform/transform.h
    branches/soc-2013-dingto/source/blender/editors/transform/transform_conversions.c
    branches/soc-2013-dingto/source/blender/editors/transform/transform_generics.c
    branches/soc-2013-dingto/source/blender/makesdna/DNA_actuator_types.h
    branches/soc-2013-dingto/source/blender/makesdna/DNA_mask_types.h
    branches/soc-2013-dingto/source/blender/makesdna/DNA_node_types.h
    branches/soc-2013-dingto/source/blender/makesdna/DNA_tracking_types.h
    branches/soc-2013-dingto/source/blender/makesrna/intern/rna_ID.c
    branches/soc-2013-dingto/source/blender/makesrna/intern/rna_actuator.c
    branches/soc-2013-dingto/source/blender/makesrna/intern/rna_curve.c
    branches/soc-2013-dingto/source/blender/makesrna/intern/rna_mask.c
    branches/soc-2013-dingto/source/blender/makesrna/intern/rna_nodetree.c
    branches/soc-2013-dingto/source/blender/makesrna/intern/rna_tracking.c
    branches/soc-2013-dingto/source/blender/nodes/CMakeLists.txt
    branches/soc-2013-dingto/source/blender/nodes/NOD_composite.h
    branches/soc-2013-dingto/source/blender/nodes/NOD_static_types.h
    branches/soc-2013-dingto/source/gameengine/Converter/BL_ActionActuator.cpp
    branches/soc-2013-dingto/source/gameengine/Converter/BL_ActionActuator.h
    branches/soc-2013-dingto/source/gameengine/Converter/BL_ArmatureObject.cpp
    branches/soc-2013-dingto/source/gameengine/Converter/BL_ArmatureObject.h
    branches/soc-2013-dingto/source/gameengine/Converter/KX_ConvertActuators.cpp
    branches/soc-2013-dingto/source/gameengine/Ketsji/BL_Action.cpp
    branches/soc-2013-dingto/source/gameengine/Ketsji/BL_Action.h
    branches/soc-2013-dingto/source/gameengine/Ketsji/BL_ActionManager.cpp
    branches/soc-2013-dingto/source/gameengine/Ketsji/BL_ActionManager.h
    branches/soc-2013-dingto/source/gameengine/Ketsji/KX_Dome.cpp
    branches/soc-2013-dingto/source/gameengine/Ketsji/KX_GameObject.cpp
    branches/soc-2013-dingto/source/gameengine/Ketsji/KX_GameObject.h
    branches/soc-2013-dingto/source/gameengine/Ketsji/KX_PythonInit.cpp
    branches/soc-2013-dingto/source/gameengine/Ketsji/KX_SoundActuator.cpp

Added Paths:
-----------
    branches/soc-2013-dingto/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.cpp
    branches/soc-2013-dingto/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h
    branches/soc-2013-dingto/source/blender/compositor/operations/COM_PlaneTrackCommonOperation.cpp
    branches/soc-2013-dingto/source/blender/compositor/operations/COM_PlaneTrackCommonOperation.h
    branches/soc-2013-dingto/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.cpp
    branches/soc-2013-dingto/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.h
    branches/soc-2013-dingto/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp
    branches/soc-2013-dingto/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.h
    branches/soc-2013-dingto/source/blender/nodes/composite/nodes/node_composite_planetrackdeform.c

Property Changed:
----------------
    branches/soc-2013-dingto/
    branches/soc-2013-dingto/source/blender/editors/interface/interface.c
    branches/soc-2013-dingto/source/blender/editors/space_outliner/


Property changes on: branches/soc-2013-dingto
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_dev:58091-58422
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573
/branches/soc-2013-depsgraph_mt:57516
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57315-57365,57369-58448,58450,58452-58770,58779,58783-58855,58857,58859-59032,59035-59107
   + /branches/ge_dev:58091-58422
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573,58822,58989
/branches/soc-2013-depsgraph_mt:57516
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57315-57365,57369-58448,58450,58452-58770,58779,58783-58855,58857,58859-59032,59035-59184

Modified: branches/soc-2013-dingto/build_files/scons/tools/Blender.py
===================================================================
--- branches/soc-2013-dingto/build_files/scons/tools/Blender.py	2013-08-16 12:43:37 UTC (rev 59184)
+++ branches/soc-2013-dingto/build_files/scons/tools/Blender.py	2013-08-16 12:50:13 UTC (rev 59185)
@@ -151,12 +151,6 @@
         libincs += Split(lenv['BF_JACK_LIBPATH'])
     if lenv['WITH_BF_SNDFILE']:
         libincs += Split(lenv['BF_SNDFILE_LIBPATH'])
-    if lenv['WITH_BF_OPENEXR']:
-        libincs += Split(lenv['BF_OPENEXR_LIBPATH'])
-        if lenv['WITH_BF_STATICOPENEXR']:
-            statlibs += Split(lenv['BF_OPENEXR_LIB_STATIC'])
-    if lenv['WITH_BF_ZLIB'] and lenv['WITH_BF_STATICZLIB']:
-        statlibs += Split(lenv['BF_ZLIB_LIB_STATIC'])
     if lenv['WITH_BF_TIFF']:
         libincs += Split(lenv['BF_TIFF_LIBPATH'])
         if lenv['WITH_BF_STATICTIFF']:
@@ -212,6 +206,12 @@
         libincs += Split(lenv['BF_OIIO_LIBPATH'])
         if lenv['WITH_BF_STATICOIIO']:
             statlibs += Split(lenv['BF_OIIO_LIB_STATIC'])
+    if lenv['WITH_BF_OPENEXR']:
+        libincs += Split(lenv['BF_OPENEXR_LIBPATH'])
+        if lenv['WITH_BF_STATICOPENEXR']:
+            statlibs += Split(lenv['BF_OPENEXR_LIB_STATIC'])
+    if lenv['WITH_BF_ZLIB'] and lenv['WITH_BF_STATICZLIB']:
+        statlibs += Split(lenv['BF_ZLIB_LIB_STATIC'])
 
     if lenv['WITH_BF_OCIO']:
         libincs += Split(lenv['BF_OCIO_LIBPATH'])

Modified: branches/soc-2013-dingto/doc/python_api/rst/bge.logic.rst
===================================================================
--- branches/soc-2013-dingto/doc/python_api/rst/bge.logic.rst	2013-08-16 12:43:37 UTC (rev 59184)
+++ branches/soc-2013-dingto/doc/python_api/rst/bge.logic.rst	2013-08-16 12:50:13 UTC (rev 59185)
@@ -1114,7 +1114,20 @@
    
    :value: 2
 
+.. _gameobject-playaction-blend:
 
+.. data:: KX_ACTION_BLEND_BLEND
+
+   Blend layers using linear interpolation
+
+   :value: 0
+
+.. data:: KX_ACTION_BLEND_ADD
+
+   Adds the layers together
+
+   :value: 1
+
 -------------
 Mouse Buttons
 -------------

Modified: branches/soc-2013-dingto/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst
===================================================================
--- branches/soc-2013-dingto/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst	2013-08-16 12:43:37 UTC (rev 59184)
+++ branches/soc-2013-dingto/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst	2013-08-16 12:50:13 UTC (rev 59185)
@@ -776,7 +776,7 @@
       Return the value matching key, or the default value if its not found.
       :return: The key value or a default.
 
-   .. method:: playAction(name, start_frame, end_frame, layer=0, priority=0, blendin=0, play_mode=ACT_MODE_PLAY, layer_weight=0.0, ipo_flags=0, speed=1.0)
+   .. method:: playAction(name, start_frame, end_frame, layer=0, priority=0, blendin=0, play_mode=KX_ACTION_MODE_PLAY, layer_weight=0.0, ipo_flags=0, speed=1.0, blend_mode=KX_ACTION_BLEND_BLEND)
 
       Plays an action.
       
@@ -794,12 +794,14 @@
       :type blendin: float
       :arg play_mode: the play mode
       :type play_mode: one of :ref:`these constants <gameobject-playaction-mode>`
-      :arg layer_weight: how much of the previous layer to use for blending (0 = add)
+      :arg layer_weight: how much of the previous layer to use for blending
       :type layer_weight: float
       :arg ipo_flags: flags for the old IPO behaviors (force, etc)
       :type ipo_flags: int bitfield
       :arg speed: the playback speed of the action as a factor (1.0 = normal speed, 2.0 = 2x speed, etc)
       :type speed: float
+	  :arg blend_mode: how to blend this layer with previous layers
+	  :type blend_mode: one of :ref:`these constants <gameobject-playaction-blend>`
 
    .. method:: stopAction(layer=0)
       

Modified: branches/soc-2013-dingto/extern/libmv/libmv/multiview/euclidean_resection.cc
===================================================================
--- branches/soc-2013-dingto/extern/libmv/libmv/multiview/euclidean_resection.cc	2013-08-16 12:43:37 UTC (rev 59184)
+++ branches/soc-2013-dingto/extern/libmv/libmv/multiview/euclidean_resection.cc	2013-08-16 12:50:13 UTC (rev 59185)
@@ -34,6 +34,11 @@
 namespace euclidean_resection {
 
 typedef unsigned int uint;
+  
+bool EuclideanResectionPPnP(const Mat2X &x_camera,
+                            const Mat3X &X_world,
+                            Mat3 *R, Vec3 *t,
+                            double tolerance);
 
 bool EuclideanResection(const Mat2X &x_camera,
                         const Mat3X &X_world,
@@ -47,6 +52,9 @@
     case RESECTION_EPNP:
       return EuclideanResectionEPnP(x_camera, X_world, R, t, success_threshold);
       break;
+    case RESECTION_PPNP:
+      return EuclideanResectionPPnP(x_camera, X_world, R, t, success_threshold);
+      break;
     default:
       LOG(FATAL) << "Unknown resection method.";
   }
@@ -674,6 +682,107 @@
   // TODO(julien): Improve the solutions with non-linear refinement.
   return true;
 }
+  
+/*
+ 
+ Straight from the paper:
+ http://www.diegm.uniud.it/fusiello/papers/3dimpvt12-b.pdf
+ 
+ function [R T] = ppnp(P,S,tol)
+ % input
+ % P  : matrix (nx3) image coordinates in camera reference [u v 1]
+ % S  : matrix (nx3) coordinates in world reference [X Y Z]
+ % tol: exit threshold
+ %
+ % output
+ % R : matrix (3x3) rotation (world-to-camera)
+ % T : vector (3x1) translation (world-to-camera)
+ %
+ n = size(P,1);
+ Z = zeros(n);
+ e = ones(n,1);
+ A = eye(n)-((e*e’)./n);
+ II = e./n;
+ err = +Inf;
+ E_old = 1000*ones(n,3);
+ while err>tol
+   [U,˜,V] = svd(P’*Z*A*S);
+   VT = V’;
+   R=U*[1 0 0; 0 1 0; 0 0 det(U*VT)]*VT;
+   PR = P*R;
+   c = (S-Z*PR)’*II;
+   Y = S-e*c’;
+   Zmindiag = diag(PR*Y’)./(sum(P.*P,2));
+   Zmindiag(Zmindiag<0)=0;
+   Z = diag(Zmindiag);
+   E = Y-Z*PR;
+   err = norm(E-E_old,’fro’);
+   E_old = E;
+ end
+ T = -R*c;
+ end
+ 
+ */
+// TODO(keir): Re-do all the variable names and add comments matching the paper.
+// This implementation has too much of the terseness of the original. On the
+// other hand, it did work on the first try.
+bool EuclideanResectionPPnP(const Mat2X &x_camera,
+                            const Mat3X &X_world,
+                            Mat3 *R, Vec3 *t,
+                            double tolerance) {
+  int n = x_camera.cols();
+  Mat Z = Mat::Zero(n, n);
+  Vec e = Vec::Ones(n);
+  Mat A = Mat::Identity(n, n) - (e * e.transpose() / n);
+  Vec II = e / n;
+  
+  Mat P(n, 3);
+  P.col(0) = x_camera.row(0);
+  P.col(1) = x_camera.row(1);
+  P.col(2).setConstant(1.0);
+  
+  Mat S = X_world.transpose();
+  
+  double error = std::numeric_limits<double>::infinity();
+  Mat E_old = 1000 * Mat::Ones(n, 3);
+  
+  Vec3 c;
+  Mat E(n, 3);
+  
+  int iteration = 0;
+  tolerance = 1e-5;
+  // TODO(keir): The limit of 100 can probably be reduced, but this will require
+  // some investigation.
+  while (error > tolerance && iteration < 100) {
+    Mat3 tmp = P.transpose() * Z * A * S;
+    Eigen::JacobiSVD<Mat3> svd(tmp, Eigen::ComputeFullU | Eigen::ComputeFullV);
+    Mat3 U = svd.matrixU();
+    Mat3 VT = svd.matrixV().transpose();
+    Vec3 s;
+    s << 1, 1, (U * VT).determinant();
+    *R = U * s.asDiagonal() * VT;
+    Mat PR = P * *R;  // n x 3
+    c = (S - Z*PR).transpose() * II;
+    Mat Y = S - e*c.transpose();  // n x 3
+    Vec Zmindiag = (PR * Y.transpose()).diagonal()
+        .cwiseQuotient(P.rowwise().squaredNorm());
+    for (int i = 0; i < n; ++i) {
+      Zmindiag[i] = std::max(Zmindiag[i], 0.0);
+    }
+    Z = Zmindiag.asDiagonal();
+    E = Y - Z*PR;
+    error = (E - E_old).norm();
+    LOG(INFO) << "PPnP error(" << (iteration++) << "): " << error;
+    E_old = E;
+  }
+  *t = -*R*c;
 
+  // TODO(keir): Figure out what the failure cases are. Is it too many
+  // iterations? Spend some time going through the math figuring out if there
+  // is some way to detect that the algorithm is going crazy, and return false.
+  return true;
+}
+
+
 }  // namespace resection
 }  // namespace libmv

Modified: branches/soc-2013-dingto/extern/libmv/libmv/multiview/euclidean_resection.h
===================================================================
--- branches/soc-2013-dingto/extern/libmv/libmv/multiview/euclidean_resection.h	2013-08-16 12:43:37 UTC (rev 59184)
+++ branches/soc-2013-dingto/extern/libmv/libmv/multiview/euclidean_resection.h	2013-08-16 12:50:13 UTC (rev 59185)
@@ -33,6 +33,10 @@
   // The "EPnP" algorithm by Lepetit et al.

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list