[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43848] branches/soc-2011-tomato: Merging r43721 through r43847 from trunk into soc-2011-tomato

Sergey Sharybin sergey.vfx at gmail.com
Thu Feb 2 14:05:04 CET 2012


Revision: 43848
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43848
Author:   nazgul
Date:     2012-02-02 13:04:52 +0000 (Thu, 02 Feb 2012)
Log Message:
-----------
Merging r43721 through r43847 from trunk into soc-2011-tomato

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

Modified Paths:
--------------
    branches/soc-2011-tomato/CMakeLists.txt
    branches/soc-2011-tomato/doc/python_api/rst/bge.logic.rst
    branches/soc-2011-tomato/doc/python_api/rst/info_quickstart.rst
    branches/soc-2011-tomato/extern/carve/bundle.sh
    branches/soc-2011-tomato/extern/carve/lib/intersect_face_division.cpp
    branches/soc-2011-tomato/extern/carve/lib/triangulator.cpp
    branches/soc-2011-tomato/intern/boolop/intern/BOP_CarveInterface.cpp
    branches/soc-2011-tomato/intern/cycles/blender/addon/ui.py
    branches/soc-2011-tomato/intern/cycles/blender/blender_session.cpp
    branches/soc-2011-tomato/intern/cycles/device/device.cpp
    branches/soc-2011-tomato/intern/cycles/device/device.h
    branches/soc-2011-tomato/intern/cycles/device/device_cpu.cpp
    branches/soc-2011-tomato/intern/cycles/device/device_cuda.cpp
    branches/soc-2011-tomato/intern/cycles/device/device_multi.cpp
    branches/soc-2011-tomato/intern/cycles/device/device_network.cpp
    branches/soc-2011-tomato/intern/cycles/device/device_opencl.cpp
    branches/soc-2011-tomato/intern/cycles/kernel/kernel_emission.h
    branches/soc-2011-tomato/intern/cycles/kernel/kernel_film.h
    branches/soc-2011-tomato/intern/cycles/kernel/kernel_light.h
    branches/soc-2011-tomato/intern/cycles/kernel/kernel_passes.h
    branches/soc-2011-tomato/intern/cycles/kernel/kernel_path.h
    branches/soc-2011-tomato/intern/cycles/kernel/kernel_shader.h
    branches/soc-2011-tomato/intern/cycles/kernel/kernel_types.h
    branches/soc-2011-tomato/intern/cycles/render/buffers.cpp
    branches/soc-2011-tomato/intern/cycles/render/film.cpp
    branches/soc-2011-tomato/intern/cycles/render/light.cpp
    branches/soc-2011-tomato/intern/cycles/render/svm.cpp
    branches/soc-2011-tomato/intern/cycles/util/util_progress.h
    branches/soc-2011-tomato/intern/cycles/util/util_types.h
    branches/soc-2011-tomato/intern/memutil/MEM_CacheLimiter.h
    branches/soc-2011-tomato/intern/memutil/MEM_CacheLimiterC-Api.h
    branches/soc-2011-tomato/intern/memutil/intern/MEM_CacheLimiterC-Api.cpp
    branches/soc-2011-tomato/release/scripts/modules/bpy_extras/object_utils.py
    branches/soc-2011-tomato/release/scripts/presets/tracking_settings/blurry_footage.py
    branches/soc-2011-tomato/release/scripts/presets/tracking_settings/default.py
    branches/soc-2011-tomato/release/scripts/presets/tracking_settings/fast_motion.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/clip.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/object.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/presets.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_data_mesh.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_object_constraint.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_physics_fluid.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_image.py
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_anim.h
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_armature.h
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_blender.h
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_cloth.h
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_customdata.h
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_lattice.h
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_movieclip.h
    branches/soc-2011-tomato/source/blender/blenkernel/intern/anim.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/armature.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/cloth.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/constraint.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/context.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/depsgraph.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/displist.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/dynamicpaint.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/lattice.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/movieclip.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/navmesh_conversion.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/particle_system.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/bpath.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/math_matrix.c
    branches/soc-2011-tomato/source/blender/collada/GeometryExporter.cpp
    branches/soc-2011-tomato/source/blender/editors/animation/anim_channels_edit.c
    branches/soc-2011-tomato/source/blender/editors/include/ED_view3d.h
    branches/soc-2011-tomato/source/blender/editors/interface/interface_draw.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_regions.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_templates.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_widgets.c
    branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_loop.c
    branches/soc-2011-tomato/source/blender/editors/mesh/mesh_data.c
    branches/soc-2011-tomato/source/blender/editors/object/object_bake.c
    branches/soc-2011-tomato/source/blender/editors/object/object_modifier.c
    branches/soc-2011-tomato/source/blender/editors/space_buttons/buttons_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_ops.c
    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/editors/space_file/file_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_node/node_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_draw.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_view.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
    branches/soc-2011-tomato/source/blender/gpu/intern/gpu_shader_material.glsl
    branches/soc-2011-tomato/source/blender/gpu/intern/gpu_shader_material.glsl.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/moviecache.c
    branches/soc-2011-tomato/source/blender/makesdna/DNA_movieclip_types.h
    branches/soc-2011-tomato/source/blender/makesdna/DNA_object_fluidsim.h
    branches/soc-2011-tomato/source/blender/makesdna/DNA_tracking_types.h
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_constraint.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_fluidsim.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_key.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_material.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mesh.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_movieclip.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_pose.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_space.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_tracking.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_userdef.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_wm.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_boolean.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_boolean_util.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_cloth.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_curve.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_fluidsim_util.c
    branches/soc-2011-tomato/source/blender/nodes/composite/node_composite_tree.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_rna.c
    branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_Matrix.c
    branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_Vector.c
    branches/soc-2011-tomato/source/blender/render/intern/source/pipeline.c
    branches/soc-2011-tomato/source/blender/render/intern/source/shadeoutput.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_files.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_operators.c
    branches/soc-2011-tomato/source/gameengine/Ketsji/KX_NavMeshObject.cpp
    branches/soc-2011-tomato/source/gameengine/Ketsji/KX_PythonInit.cpp
    branches/soc-2011-tomato/source/tests/bl_run_operators.py

Added Paths:
-----------
    branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_noise.c

Removed Paths:
-------------
    branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_noise.c

Property Changed:
----------------
    branches/soc-2011-tomato/
    branches/soc-2011-tomato/release/scripts/
    branches/soc-2011-tomato/release/scripts/modules/
    branches/soc-2011-tomato/release/scripts/presets/
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/
    branches/soc-2011-tomato/release/scripts/templates/
    branches/soc-2011-tomato/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:ignore
   - *.pdb
.*
TAGS
build
cscope.out
install
mingw
mingw-user-config.py
mingw-user-config_debug.py
msvc
msvc-user-config.py
obj
sgc.bat
sgd.bat
smc.bat
ssenv.bat
tags
user-config.py
user-def.mk
graphicall_32b
graphicall_64b
graphicall_64b_debug
installer_32b
installer_64b

   + *.pdb
.*
TAGS
cscope.out
sgc.bat
sgd.bat
smc.bat
ssenv.bat
tags
user-config.py
CMakeFiles
CMakeCache.txt
blender.bin

Modified: svn:mergeinfo
   - /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/vgroup_modifiers:38694-39989
/trunk/blender:36831-43720
   + /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/vgroup_modifiers:38694-39989
/trunk/blender:36831-43847

Modified: branches/soc-2011-tomato/CMakeLists.txt
===================================================================
--- branches/soc-2011-tomato/CMakeLists.txt	2012-02-02 11:12:41 UTC (rev 43847)
+++ branches/soc-2011-tomato/CMakeLists.txt	2012-02-02 13:04:52 UTC (rev 43848)
@@ -249,6 +249,12 @@
 		"Choose the minimum OSX version required: 10.4 or 10.5"
 		FORCE)
 	endif()
+	if(${CMAKE_GENERATOR} MATCHES "Xcode" AND (${XCODE_VERSION} VERSION_EQUAL 4 OR ${XCODE_VERSION} VERSION_GREATER 4))
+		# Xcode 4 defaults to the Apple LLVM Compiler.
+		# Override the default compiler selection because Blender only compiles with gcc
+		set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
+		message(STATUS "Setting compiler to: " ${CMAKE_XCODE_ATTRIBUTE_GCC_VERSION})
+	endif()
 	option(WITH_COCOA	  "Use Cocoa framework instead of deprecated Carbon" ON)
 	option(USE_QTKIT	  "Use QtKit instead of Carbon quicktime (needed for having partial quicktime for 64bit)" OFF)
 	option(WITH_LIBS10.5  "Use 10.5 libs (needed for 64bit builds)" OFF)

Modified: branches/soc-2011-tomato/doc/python_api/rst/bge.logic.rst
===================================================================
--- branches/soc-2011-tomato/doc/python_api/rst/bge.logic.rst	2012-02-02 11:12:41 UTC (rev 43847)
+++ branches/soc-2011-tomato/doc/python_api/rst/bge.logic.rst	2012-02-02 13:04:52 UTC (rev 43848)
@@ -69,11 +69,9 @@
    :columns: 3
    
    * :class:`~bge.types.BL_ActionActuator`
-   * :class:`~bge.types.BL_ShapeActionActuator`
    * :class:`~bge.types.KX_CameraActuator`
    * :class:`~bge.types.KX_ConstraintActuator`
    * :class:`~bge.types.KX_GameActuator`
-   * :class:`~bge.types.KX_IpoActuator`
    * :class:`~bge.types.KX_NetworkMessageActuator`
    * :class:`~bge.types.KX_ObjectActuator`
    * :class:`~bge.types.KX_ParentActuator`
@@ -477,6 +475,7 @@
 See :class:`bge.types.BL_ActionActuator`
 
 .. data:: KX_ACTIONACT_PLAY
+.. data:: KX_ACTIONACT_PINGPONG
 .. data:: KX_ACTIONACT_FLIPPER
 .. data:: KX_ACTIONACT_LOOPSTOP
 .. data:: KX_ACTIONACT_LOOPEND
@@ -635,21 +634,6 @@
 .. data:: KX_GAME_SAVECFG
 .. data:: KX_GAME_LOADCFG
 
-.. _ipo-actuator:
-
-------------
-IPO Actuator
-------------
-
-See :class:`bge.types.KX_IpoActuator`
-
-.. data:: KX_IPOACT_PLAY
-.. data:: KX_IPOACT_PINGPONG
-.. data:: KX_IPOACT_FLIPPER
-.. data:: KX_IPOACT_LOOPSTOP
-.. data:: KX_IPOACT_LOOPEND
-.. data:: KX_IPOACT_FROM_PROP
-
 ---------------
 Parent Actuator
 ---------------
@@ -691,20 +675,6 @@
 .. data:: KX_SCENE_SUSPEND
 .. data:: KX_SCENE_RESUME
 
-.. _shape-action-actuator:
-
----------------------
-Shape Action Actuator
----------------------
-
-See :class:`bge.types.BL_ActionActuator`
-
-.. data:: KX_ACTIONACT_PLAY
-.. data:: KX_ACTIONACT_FLIPPER
-.. data:: KX_ACTIONACT_LOOPSTOP
-.. data:: KX_ACTIONACT_LOOPEND
-.. data:: KX_ACTIONACT_PROPERTY
-
 .. _logic-sound-actuator:
 
 --------------

Modified: branches/soc-2011-tomato/doc/python_api/rst/info_quickstart.rst
===================================================================
--- branches/soc-2011-tomato/doc/python_api/rst/info_quickstart.rst	2012-02-02 11:12:41 UTC (rev 43847)
+++ branches/soc-2011-tomato/doc/python_api/rst/info_quickstart.rst	2012-02-02 13:04:52 UTC (rev 43848)
@@ -123,6 +123,29 @@
    1.0
 
 
+Data Creation/Removal
+^^^^^^^^^^^^^^^^^^^^^
+
+Those of you familiar with other python api's may be surprised that new datablocks in the bpy api can't be created by calling the class:
+
+   >>> bpy.types.Mesh()
+   Traceback (most recent call last):
+     File "<blender_console>", line 1, in <module>
+   TypeError: bpy_struct.__new__(type): expected a single argument
+
+
+This is an intentional part of the API design.
+The blender/python api can't create blender data that exists outside the main blender database (accessed through bpy.data), because this data is managed by blender (save/load/undo/append... etc).
+
+Data is added and removed via methods on the collections in bpy.data, eg:
+
+   >>> mesh = bpy.data.meshes.new(name="MyMesh")
+   >>> print(mesh)
+   <bpy_struct, Mesh("MyMesh.001")>
+
+   >>> bpy.data.meshes.remove(mesh)
+
+
 Custom Properties
 ^^^^^^^^^^^^^^^^^
 

Modified: branches/soc-2011-tomato/extern/carve/bundle.sh
===================================================================
--- branches/soc-2011-tomato/extern/carve/bundle.sh	2012-02-02 11:12:41 UTC (rev 43847)
+++ branches/soc-2011-tomato/extern/carve/bundle.sh	2012-02-02 13:04:52 UTC (rev 43848)
@@ -17,7 +17,7 @@
 rm -rf include
 rm -rf lib
 
-cat "files.txt" | while f=`line`; do
+cat "files.txt" | while read f; do
   mkdir -p `dirname $f`
   cp $tmp/carve/$f $f
 done

Modified: branches/soc-2011-tomato/extern/carve/lib/intersect_face_division.cpp
===================================================================
--- branches/soc-2011-tomato/extern/carve/lib/intersect_face_division.cpp	2012-02-02 11:12:41 UTC (rev 43847)
+++ branches/soc-2011-tomato/extern/carve/lib/intersect_face_division.cpp	2012-02-02 13:04:52 UTC (rev 43848)
@@ -48,6 +48,63 @@
 
 
 
+#if defined(CARVE_DEBUG_WRITE_PLY_DATA)
+  template<typename iter_t>
+  void dumpFacesAndHoles(iter_t f_begin, iter_t f_end,
+                         iter_t h_begin, iter_t h_end,
+                         const std::string &fname) {
+    std::cerr << "dumping " << std::distance(f_begin, f_end) << " faces, " << std::distance(h_begin, h_end) << " holes." << std::endl;
+    std::map<carve::mesh::MeshSet<3>::vertex_t *, size_t> v_included;
+
+    for (iter_t i = f_begin; i != f_end; ++i) {
+      for (size_t j = 0; j < (*i).size(); ++j) {
+        if (v_included.find((*i)[j]) == v_included.end()) {
+          size_t &p = v_included[(*i)[j]];
+          p = v_included.size() - 1;
+        }
+      }
+    }
+
+    for (iter_t i = h_begin; i != h_end; ++i) {
+      for (size_t j = 0; j < (*i).size(); ++j) {
+        if (v_included.find((*i)[j]) == v_included.end()) {
+          size_t &p = v_included[(*i)[j]];
+          p = v_included.size() - 1;
+        }
+      }
+    }
+
+    carve::line::PolylineSet fh;
+    fh.vertices.resize(v_included.size());
+    for (std::map<carve::mesh::MeshSet<3>::vertex_t *, size_t>::const_iterator
+           i = v_included.begin(); i != v_included.end(); ++i) {
+      fh.vertices[(*i).second].v = (*i).first->v;
+    }
+
+    {
+      std::vector<size_t> connected;
+      for (iter_t i = f_begin; i != f_end; ++i) {
+        connected.clear();
+        for (size_t j = 0; j < (*i).size(); ++j) {
+          connected.push_back(v_included[(*i)[j]]);
+        }
+        fh.addPolyline(true, connected.begin(), connected.end());
+      }
+      for (iter_t i = h_begin; i != h_end; ++i) {
+        connected.clear();
+        for (size_t j = 0; j < (*i).size(); ++j) {
+          connected.push_back(v_included[(*i)[j]]);
+        }
+        fh.addPolyline(true, connected.begin(), connected.end());
+      }
+    }
+
+    ::writePLY(fname, &fh, true);
+  }
+#endif
+
+
+
   template<typename T>
   void populateVectorFromList(std::list<T> &l, std::vector<T> &v) {
     v.clear();
@@ -433,6 +490,7 @@
         face_loops_sorted[m].push_back(n);
       }
       face_loop_areas.push_back(carve::geom2d::signedArea(face_loops_projected[m]));
+
       std::sort(face_loops_sorted[m].begin(), face_loops_sorted[m].end(), 
                 carve::make_index_sort(face_loops[m].begin()));
       face_loop_aabb[m].fit(face_loops_projected[m].begin(), face_loops_projected[m].end());
@@ -449,6 +507,7 @@
         hole_loops_sorted[m].push_back(n);
       }
       hole_loop_areas.push_back(carve::geom2d::signedArea(hole_loops_projected[m]));
+
       std::sort(hole_loops_sorted[m].begin(), hole_loops_sorted[m].end(), 
                 carve::make_index_sort(hole_loops[m].begin()));
       hole_loop_aabb[m].fit(hole_loops_projected[m].begin(), hole_loops_projected[m].end());
@@ -572,6 +631,10 @@
     std::vector<std::vector<int> > containing_faces;
     std::map<int, std::map<int, std::pair<unsigned, unsigned> > > hole_shared_vertices;
 
+#if defined(CARVE_DEBUG_WRITE_PLY_DATA)
+    dumpFacesAndHoles(f_loops.begin(), f_loops.end(), h_loops.begin(), h_loops.end(), "/tmp/pre_merge.ply");
+#endif
+
     {
       // move input face and hole loops to temp vectors.
       size_t m;
@@ -720,6 +783,10 @@
       }
     }
 #endif
+#if defined(CARVE_DEBUG_WRITE_PLY_DATA)
+    dumpFacesAndHoles(f_loops.begin(), f_loops.end(), h_loops.begin(), h_loops.end(), "/tmp/post_merge.ply");
+#endif
+
   }
 
 
@@ -738,7 +805,7 @@
    *            on that edge.
    * @param[out] base_loop A vector of the vertices of the base loop.
    */
-  static void assembleBaseLoop(carve::mesh::MeshSet<3>::face_t *face,
+  static bool assembleBaseLoop(carve::mesh::MeshSet<3>::face_t *face,
                                const carve::csg::detail::Data &data,
                                std::vector<carve::mesh::MeshSet<3>::vertex_t *> &base_loop) {
     base_loop.clear();
@@ -746,6 +813,7 @@
     // XXX: assumes that face->edges is in the same order as
     // face->vertices. (Which it is)
     carve::mesh::MeshSet<3>::edge_t *e = face->edge;
+    bool face_edge_intersected = false;
     do {
       base_loop.push_back(carve::csg::map_vertex(data.vmap, e->vert));
 
@@ -757,9 +825,13 @@
         for (size_t k = 0, ke = ev_vec.size(); k < ke;) {
           base_loop.push_back(ev_vec[k++]);
         }
+
+        face_edge_intersected = true;
       }
       e = e->next;
     } while (e != face->edge);
+
+    return face_edge_intersected;
   }
 
 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list