[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50224] branches/soc-2011-tomato: Merging r50192 through r50223 from trunk into soc-2011-tomato

Sergey Sharybin sergey.vfx at gmail.com
Sun Aug 26 16:12:10 CEST 2012


Revision: 50224
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50224
Author:   nazgul
Date:     2012-08-26 14:12:09 +0000 (Sun, 26 Aug 2012)
Log Message:
-----------
Merging r50192 through r50223 from trunk into soc-2011-tomato

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

Modified Paths:
--------------
    branches/soc-2011-tomato/extern/recastnavigation/Recast/Source/RecastFilter.cpp
    branches/soc-2011-tomato/release/scripts/modules/bpy/utils.py
    branches/soc-2011-tomato/release/scripts/modules/bpy_extras/anim_utils.py
    branches/soc-2011-tomato/release/scripts/modules/rna_xml.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/wm.py
    branches/soc-2011-tomato/release/scripts/templates/addon_add_object.py
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h
    branches/soc-2011-tomato/source/blender/blenkernel/CMakeLists.txt
    branches/soc-2011-tomato/source/blender/blenkernel/intern/DerivedMesh.c
    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/curve.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/customdata.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/dynamicpaint.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/fcurve.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/mesh.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/nla.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/node.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/object.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/sound.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/writeffmpeg.c
    branches/soc-2011-tomato/source/blender/blenlib/BLI_math_base.h
    branches/soc-2011-tomato/source/blender/blenlib/BLI_math_rotation.h
    branches/soc-2011-tomato/source/blender/blenlib/BLI_pbvh.h
    branches/soc-2011-tomato/source/blender/blenlib/BLI_string.h
    branches/soc-2011-tomato/source/blender/blenlib/BLI_utildefines.h
    branches/soc-2011-tomato/source/blender/blenlib/intern/math_rotation.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/pbvh.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/string.c
    branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-tomato/source/blender/blenloader/intern/versioning_250.c
    branches/soc-2011-tomato/source/blender/blenloader/intern/versioning_legacy.c
    branches/soc-2011-tomato/source/blender/blenloader/intern/writefile.c
    branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_error.h
    branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_mods.c
    branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_mods.h
    branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_opdefines.c
    branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_operator_api.h
    branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_connect.c
    branches/soc-2011-tomato/source/blender/collada/AnimationExporter.h
    branches/soc-2011-tomato/source/blender/collada/AnimationImporter.cpp
    branches/soc-2011-tomato/source/blender/collada/TransformReader.h
    branches/soc-2011-tomato/source/blender/collada/collada_internal.h
    branches/soc-2011-tomato/source/blender/editors/animation/fmodifier_ui.c
    branches/soc-2011-tomato/source/blender/editors/curve/editcurve.c
    branches/soc-2011-tomato/source/blender/editors/gpencil/gpencil_paint.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_intern.h
    branches/soc-2011-tomato/source/blender/editors/interface/interface_layout.c
    branches/soc-2011-tomato/source/blender/editors/io/io_collada.c
    branches/soc-2011-tomato/source/blender/editors/mask/mask_add.c
    branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_tools.c
    branches/soc-2011-tomato/source/blender/editors/object/object_group.c
    branches/soc-2011-tomato/source/blender/editors/physics/physics_fluid.c
    branches/soc-2011-tomato/source/blender/editors/render/render_internal.c
    branches/soc-2011-tomato/source/blender/editors/sculpt_paint/paint_image.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_dopesheet_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_file/space_file.c
    branches/soc-2011-tomato/source/blender/editors/space_logic/logic_window.c
    branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_intern.h
    branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_fly.c
    branches/soc-2011-tomato/source/blender/editors/uvedit/uvedit_parametrizer.c
    branches/soc-2011-tomato/source/blender/imbuf/IMB_imbuf.h
    branches/soc-2011-tomato/source/blender/imbuf/IMB_thumbs.h
    branches/soc-2011-tomato/source/blender/imbuf/intern/anim_movie.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/imbuf_cocoa.m
    branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/openexr_api.cpp
    branches/soc-2011-tomato/source/blender/imbuf/intern/util.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_object.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_tracking.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_displace.c
    branches/soc-2011-tomato/source/blender/python/bmesh/bmesh_py_api.c
    branches/soc-2011-tomato/source/blender/python/bmesh/bmesh_py_ops.c
    branches/soc-2011-tomato/source/blender/python/bmesh/bmesh_py_types.c
    branches/soc-2011-tomato/source/blender/python/bmesh/bmesh_py_types_customdata.c
    branches/soc-2011-tomato/source/blender/python/bmesh/bmesh_py_types_meshdata.c
    branches/soc-2011-tomato/source/blender/python/bmesh/bmesh_py_types_select.c
    branches/soc-2011-tomato/source/blender/python/bmesh/bmesh_py_utils.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_rna.c
    branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_Euler.c
    branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_Euler.h
    branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_Matrix.c
    branches/soc-2011-tomato/source/blender/quicktime/apple/qtkit_export.m
    branches/soc-2011-tomato/source/blender/quicktime/apple/qtkit_import.m
    branches/soc-2011-tomato/source/blender/render/intern/include/rayobject.h
    branches/soc-2011-tomato/source/blender/windowmanager/WM_api.h
    branches/soc-2011-tomato/source/blenderplayer/bad_level_call_stubs/stubs.c
    branches/soc-2011-tomato/source/creator/creator.c
    branches/soc-2011-tomato/source/gameengine/Converter/KX_ConvertSensors.cpp
    branches/soc-2011-tomato/source/gameengine/Expressions/BoolValue.cpp
    branches/soc-2011-tomato/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
    branches/soc-2011-tomato/source/gameengine/Ketsji/KX_Camera.cpp
    branches/soc-2011-tomato/source/gameengine/SceneGraph/SG_ParentRelation.h
    branches/soc-2011-tomato/source/gameengine/VideoTexture/VideoFFmpeg.cpp

Added Paths:
-----------
    branches/soc-2011-tomato/source/blender/blenkernel/intern/mask_evaluate.c

Property Changed:
----------------
    branches/soc-2011-tomato/
    branches/soc-2011-tomato/source/blender/editors/interface/interface.c
    branches/soc-2011-tomato/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /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/vgroup_modifiers:38694-39989
/trunk/blender:36831-50191
   + /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/vgroup_modifiers:38694-39989
/trunk/blender:36831-50223

Modified: branches/soc-2011-tomato/extern/recastnavigation/Recast/Source/RecastFilter.cpp
===================================================================
--- branches/soc-2011-tomato/extern/recastnavigation/Recast/Source/RecastFilter.cpp	2012-08-26 13:41:40 UTC (rev 50223)
+++ branches/soc-2011-tomato/extern/recastnavigation/Recast/Source/RecastFilter.cpp	2012-08-26 14:12:09 UTC (rev 50224)
@@ -128,7 +128,7 @@
 					rcSpan* ns = solid.spans[dx + dy*w];
 					int nbot = -walkableClimb;
 					int ntop = ns ? (int)ns->smin : MAX_HEIGHT;
-					// Skip neightbour if the gap between the spans is too small.
+					// Skip neighbor if the gap between the spans is too small.
 					if (rcMin(top,ntop) - rcMax(bot,nbot) > walkableHeight)
 						minh = rcMin(minh, nbot - bot);
 					
@@ -137,7 +137,7 @@
 					{
 						nbot = (int)ns->smax;
 						ntop = ns->next ? (int)ns->next->smin : MAX_HEIGHT;
-						// Skip neightbour if the gap between the spans is too small.
+						// Skip neighbor if the gap between the spans is too small.
 						if (rcMin(top,ntop) - rcMax(bot,nbot) > walkableHeight)
 						{
 							minh = rcMin(minh, nbot - bot);

Modified: branches/soc-2011-tomato/release/scripts/modules/bpy/utils.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/bpy/utils.py	2012-08-26 13:41:40 UTC (rev 50223)
+++ branches/soc-2011-tomato/release/scripts/modules/bpy/utils.py	2012-08-26 14:12:09 UTC (rev 50224)
@@ -33,6 +33,9 @@
     "refresh_script_paths",
     "register_class",
     "register_module",
+    "register_manual_map",
+    "unregister_manual_map",
+    "manual_map",
     "resource_path",
     "script_path_user",
     "script_path_pref",
@@ -56,7 +59,6 @@
 
 _script_module_dirs = "startup", "modules"
 
-
 def _test_import(module_name, loaded_modules):
     use_time = _bpy.app.debug_python
 
@@ -595,3 +597,40 @@
             traceback.print_exc()
     if verbose:
         print("done.\n")
+
+
+# -----------------------------------------------------------------------------
+# Manual lookups, each function has to return a basepath and a sequence
+# of...
+
+# we start with the built-in default mapping
+def _blender_default_map():
+    import sys
+    import rna_wiki_reference as ref_mod
+    ret = (ref_mod.url_manual_prefix, ref_mod.url_manual_mapping)
+    # avoid storing in memory
+    del sys.modules["rna_wiki_reference"]
+    return ret
+
+# hooks for doc lookups
+_manual_map = [_blender_default_map]
+
+def register_manual_map(manual_hook):
+    _manual_map.append(manual_hook)
+
+def unregister_manual_map(manual_hook):
+    _manual_map.remove(manual_hook)
+
+def manual_map():
+    # reverse so default is called last
+    for cb in reversed(_manual_map):
+        try:
+            prefix, url_manual_mapping = cb()
+        except:
+            print("Error calling %r" % cb)
+            import traceback
+            traceback.print_exc()
+            continue
+
+        yield prefix, url_manual_mapping
+

Modified: branches/soc-2011-tomato/release/scripts/modules/bpy_extras/anim_utils.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/bpy_extras/anim_utils.py	2012-08-26 13:41:40 UTC (rev 50223)
+++ branches/soc-2011-tomato/release/scripts/modules/bpy_extras/anim_utils.py	2012-08-26 14:12:09 UTC (rev 50224)
@@ -181,6 +181,9 @@
             while pbone.constraints:
                 pbone.constraints.remove(pbone.constraints[0])
 
+        # create compatible eulers
+        euler_prev = None
+
         for f in frame_range:
             f_step = (f - frame_start) // frame_step
             matrix = pose_info[f_step][name]["matrix_key"]
@@ -198,8 +201,19 @@
             elif rotation_mode == 'AXIS_ANGLE':
                 pbone.keyframe_insert("rotation_axis_angle", -1, f, name)
             else:  # euler, XYZ, ZXY etc
+
+                if euler_prev is not None:
+                    euler = pbone.rotation_euler.copy()
+                    euler.make_compatible(euler_prev)
+                    pbone.rotation_euler = euler
+                    euler_prev = euler
+                    del euler
+
                 pbone.keyframe_insert("rotation_euler", -1, f, name)
 
+                if euler_prev is None:
+                    euler_prev = pbone.rotation_euler.copy()
+
             pbone.keyframe_insert("scale", -1, f, name)
 
     # object. TODO. multiple objects
@@ -208,6 +222,9 @@
             while obj.constraints:
                 obj.constraints.remove(obj.constraints[0])
 
+        # create compatible eulers
+        euler_prev = None
+
         for f in frame_range:
             matrix = obj_info[(f - frame_start) // frame_step]["matrix_key"]
             obj.matrix_local = matrix
@@ -221,8 +238,18 @@
             elif rotation_mode == 'AXIS_ANGLE':
                 obj.keyframe_insert("rotation_axis_angle", -1, f)
             else:  # euler, XYZ, ZXY etc
+                if euler_prev is not None:
+                    euler = obj.rotation_euler.copy()
+                    euler.make_compatible(euler_prev)
+                    obj.rotation_euler = euler
+                    euler_prev = euler
+                    del euler
+
                 obj.keyframe_insert("rotation_euler", -1, f)
 
+                if euler_prev is None:
+                    euler_prev = obj.rotation_euler.copy()
+
             obj.keyframe_insert("scale", -1, f)
 
     scene.frame_set(frame_back)

Modified: branches/soc-2011-tomato/release/scripts/modules/rna_xml.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/rna_xml.py	2012-08-26 13:41:40 UTC (rev 50223)
+++ branches/soc-2011-tomato/release/scripts/modules/rna_xml.py	2012-08-26 14:12:09 UTC (rev 50224)
@@ -99,11 +99,11 @@
             subvalue = getattr(value, prop)
             subvalue_type = type(subvalue)
 
-            if subvalue_type in (int, bool, float):
+            if subvalue_type in {int, bool, float}:
                 node_attrs.append("%s=\"%s\"" % (prop, number_to_str(subvalue, subvalue_type)))
             elif subvalue_type is str:
                 node_attrs.append("%s=%s" % (prop, quoteattr(subvalue)))
-            elif subvalue_type == set:
+            elif subvalue_type is set:
                 node_attrs.append("%s=%s" % (prop, quoteattr("{" + ",".join(list(subvalue)) + "}")))
             elif subvalue is None:
                 node_attrs.append("%s=\"NONE\"" % prop)
@@ -137,7 +137,7 @@
                             # default
                             def str_recursive(s):
                                 subsubvalue_type = type(s)
-                                if subsubvalue_type in (int, float, bool):
+                                if subsubvalue_type in {int, float, bool}:
                                     return number_to_str(s, subsubvalue_type)
                                 else:
                                     return " ".join([str_recursive(si) for si in s])

Modified: branches/soc-2011-tomato/release/scripts/startup/bl_operators/wm.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_operators/wm.py	2012-08-26 13:41:40 UTC (rev 50223)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_operators/wm.py	2012-08-26 14:12:09 UTC (rev 50224)
@@ -862,28 +862,26 @@
         if rna_id is None:
             return {'PASS_THROUGH'}
 
-        import rna_wiki_reference
-        rna_ref = self._find_reference(rna_id, rna_wiki_reference.url_manual_mapping)
+        url = None
 
-        if rna_ref is None:
-            self.report({'WARNING'}, "No reference available '%s', "
-                                     "Update info in %r" %
-                                     (self.doc_id, rna_wiki_reference.__file__))
+        for prefix, url_manual_mapping in bpy.utils.manual_map():
+            rna_ref = self._find_reference(rna_id, url_manual_mapping)
+            if rna_ref is not None:
+                url = prefix + rna_ref
+                break
 
-        import sys
-        del sys.modules["rna_wiki_reference"]
-
-        if rna_ref is None:
+        if url is None:
+            self.report({'WARNING'}, "No reference available %r, "
+                                     "Update info in 'rna_wiki_reference.py' "
+                                     " or callback to bpy.utils.manual_map()" %
+                                     self.doc_id)
             return {'CANCELLED'}
         else:
-            url = rna_wiki_reference.url_manual_prefix + rna_ref
+            import webbrowser
+            webbrowser.open(url)
+            return {'FINISHED'}
 
-        import webbrowser
-        webbrowser.open(url)
 
-        return {'FINISHED'}
-
-
 class WM_OT_doc_view(Operator):
     """Load online reference docs"""
     bl_idname = "wm.doc_view"

Modified: branches/soc-2011-tomato/release/scripts/templates/addon_add_object.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/templates/addon_add_object.py	2012-08-26 13:41:40 UTC (rev 50223)
+++ branches/soc-2011-tomato/release/scripts/templates/addon_add_object.py	2012-08-26 14:12:09 UTC (rev 50224)
@@ -68,13 +68,23 @@
         icon='PLUGIN')
 
 
+# This allows you to right click on a button and link to the manual
+def add_object_manual_map():
+    url_manual_prefix = "http://wiki.blender.org/index.php/Doc:2.6/Manual/"
+    url_manual_mapping = (

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list