[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38739] branches/soc-2011-onion: merge with trunk 38738

Antony Riakiotakis kalast at gmail.com
Tue Jul 26 19:42:57 CEST 2011


Revision: 38739
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38739
Author:   psy-fi
Date:     2011-07-26 17:42:57 +0000 (Tue, 26 Jul 2011)
Log Message:
-----------
merge with trunk 38738

Modified Paths:
--------------
    branches/soc-2011-onion/CMakeLists.txt
    branches/soc-2011-onion/doc/python_api/examples/mathutils.Vector.py
    branches/soc-2011-onion/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
    branches/soc-2011-onion/intern/audaspace/OpenAL/AUD_OpenALDevice.h
    branches/soc-2011-onion/release/scripts/modules/bpy/path.py
    branches/soc-2011-onion/release/scripts/modules/bpy/utils.py
    branches/soc-2011-onion/release/scripts/modules/bpy_extras/view3d_utils.py
    branches/soc-2011-onion/release/scripts/modules/bpy_types.py
    branches/soc-2011-onion/release/scripts/startup/bl_operators/add_mesh_torus.py
    branches/soc-2011-onion/release/scripts/startup/bl_operators/image.py
    branches/soc-2011-onion/release/scripts/startup/bl_operators/mesh.py
    branches/soc-2011-onion/release/scripts/startup/bl_operators/object.py
    branches/soc-2011-onion/release/scripts/startup/bl_operators/object_align.py
    branches/soc-2011-onion/release/scripts/startup/bl_operators/object_quick_effects.py
    branches/soc-2011-onion/release/scripts/startup/bl_operators/object_randomize_transform.py
    branches/soc-2011-onion/release/scripts/startup/bl_operators/presets.py
    branches/soc-2011-onion/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
    branches/soc-2011-onion/release/scripts/startup/bl_operators/uvcalc_smart_project.py
    branches/soc-2011-onion/release/scripts/startup/bl_ui/properties_world.py
    branches/soc-2011-onion/release/scripts/startup/bl_ui/space_image.py
    branches/soc-2011-onion/release/scripts/startup/bl_ui/space_info.py
    branches/soc-2011-onion/release/scripts/startup/bl_ui/space_text.py
    branches/soc-2011-onion/release/scripts/startup/bl_ui/space_view3d.py
    branches/soc-2011-onion/release/scripts/startup/bl_ui/space_view3d_toolbar.py
    branches/soc-2011-onion/source/blender/blenkernel/BKE_blender.h
    branches/soc-2011-onion/source/blender/blenkernel/BKE_effect.h
    branches/soc-2011-onion/source/blender/blenkernel/CMakeLists.txt
    branches/soc-2011-onion/source/blender/blenkernel/SConscript
    branches/soc-2011-onion/source/blender/blenkernel/intern/effect.c
    branches/soc-2011-onion/source/blender/blenkernel/intern/image.c
    branches/soc-2011-onion/source/blender/blenkernel/intern/text.c
    branches/soc-2011-onion/source/blender/blenkernel/intern/writeavi.c
    branches/soc-2011-onion/source/blender/blenkernel/intern/writeframeserver.c
    branches/soc-2011-onion/source/blender/editors/include/ED_node.h
    branches/soc-2011-onion/source/blender/editors/interface/interface_regions.c
    branches/soc-2011-onion/source/blender/editors/interface/interface_templates.c
    branches/soc-2011-onion/source/blender/editors/object/object_add.c
    branches/soc-2011-onion/source/blender/editors/object/object_bake.c
    branches/soc-2011-onion/source/blender/editors/object/object_edit.c
    branches/soc-2011-onion/source/blender/editors/render/render_shading.c
    branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_image.c
    branches/soc-2011-onion/source/blender/editors/space_image/image_buttons.c
    branches/soc-2011-onion/source/blender/editors/space_image/image_ops.c
    branches/soc-2011-onion/source/blender/editors/space_node/drawnode.c
    branches/soc-2011-onion/source/blender/editors/space_node/node_edit.c
    branches/soc-2011-onion/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2011-onion/source/blender/editors/space_view3d/view3d_draw.c
    branches/soc-2011-onion/source/blender/editors/space_view3d/view3d_edit.c
    branches/soc-2011-onion/source/blender/editors/space_view3d/view3d_header.c
    branches/soc-2011-onion/source/blender/editors/space_view3d/view3d_intern.h
    branches/soc-2011-onion/source/blender/editors/transform/transform.c
    branches/soc-2011-onion/source/blender/editors/transform/transform_conversions.c
    branches/soc-2011-onion/source/blender/editors/transform/transform_generics.c
    branches/soc-2011-onion/source/blender/editors/transform/transform_ops.c
    branches/soc-2011-onion/source/blender/editors/transform/transform_snap.c
    branches/soc-2011-onion/source/blender/editors/util/undo.c
    branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c
    branches/soc-2011-onion/source/blender/imbuf/IMB_imbuf.h
    branches/soc-2011-onion/source/blender/imbuf/intern/filter.c
    branches/soc-2011-onion/source/blender/makesdna/DNA_image_types.h
    branches/soc-2011-onion/source/blender/makesdna/DNA_node_types.h
    branches/soc-2011-onion/source/blender/makesdna/DNA_scene_types.h
    branches/soc-2011-onion/source/blender/makesrna/intern/CMakeLists.txt
    branches/soc-2011-onion/source/blender/makesrna/intern/SConscript
    branches/soc-2011-onion/source/blender/makesrna/intern/rna_access.c
    branches/soc-2011-onion/source/blender/makesrna/intern/rna_image.c
    branches/soc-2011-onion/source/blender/makesrna/intern/rna_object.c
    branches/soc-2011-onion/source/blender/makesrna/intern/rna_object_api.c
    branches/soc-2011-onion/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2011-onion/source/blender/makesrna/intern/rna_wm.c
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils.h
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Matrix.c
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Quaternion.c
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Vector.c
    branches/soc-2011-onion/source/blender/render/intern/source/convertblender.c
    branches/soc-2011-onion/source/blender/render/intern/source/rendercore.c
    branches/soc-2011-onion/source/blender/windowmanager/WM_api.h
    branches/soc-2011-onion/source/blender/windowmanager/intern/wm.c
    branches/soc-2011-onion/source/blenderplayer/bad_level_call_stubs/stubs.c
    branches/soc-2011-onion/source/gameengine/Expressions/PyObjectPlus.cpp
    branches/soc-2011-onion/source/gameengine/Expressions/PyObjectPlus.h
    branches/soc-2011-onion/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
    branches/soc-2011-onion/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
    branches/soc-2011-onion/source/tests/CMakeLists.txt

Added Paths:
-----------
    branches/soc-2011-onion/release/scripts/templates/ui_menu.py
    branches/soc-2011-onion/release/scripts/templates/ui_menu_simple.py
    branches/soc-2011-onion/release/scripts/templates/ui_panel_simple.py

Removed Paths:
-------------
    branches/soc-2011-onion/release/scripts/templates/panel_simple.py

Property Changed:
----------------
    branches/soc-2011-onion/
    branches/soc-2011-onion/intern/audaspace/OpenAL/


Property changes on: branches/soc-2011-onion
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/trunk/blender:36833-38530
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/trunk/blender:36833-38738

Modified: branches/soc-2011-onion/CMakeLists.txt
===================================================================
--- branches/soc-2011-onion/CMakeLists.txt	2011-07-26 17:23:52 UTC (rev 38738)
+++ branches/soc-2011-onion/CMakeLists.txt	2011-07-26 17:42:57 UTC (rev 38739)
@@ -155,6 +155,7 @@
 option(WITH_IMAGE_CINEON        "Enable CINEON and DPX Image Support" ON)
 option(WITH_IMAGE_HDR           "Enable HDR Image Support" ON)
 option(WITH_IMAGE_REDCODE       "Enable RedCode Image Support" OFF)
+option(WITH_IMAGE_FRAMESERVER   "Enable image FrameServer Support for rendering" ON)
 
 # Audio/Video format support
 option(WITH_CODEC_FFMPEG        "Enable FFMPeg Support (http://ffmpeg.org)" OFF)

Modified: branches/soc-2011-onion/doc/python_api/examples/mathutils.Vector.py
===================================================================
--- branches/soc-2011-onion/doc/python_api/examples/mathutils.Vector.py	2011-07-26 17:23:52 UTC (rev 38738)
+++ branches/soc-2011-onion/doc/python_api/examples/mathutils.Vector.py	2011-07-26 17:42:57 UTC (rev 38739)
@@ -1,15 +1,15 @@
 import mathutils
 
 # zero length vector
-vec = mathutils.Vector((0, 0, 1))
+vec = mathutils.Vector((0.0, 0.0, 1.0))
 
 # unit length vector
 vec_a = vec.copy().normalize()
 
-vec_b = mathutils.Vector((0, 1, 2))
+vec_b = mathutils.Vector((0.0, 1.0, 2.0))
 
-vec2d = mathutils.Vector((1, 2))
-vec3d = mathutils.Vector((1, 0, 0))
+vec2d = mathutils.Vector((1.0, 2.0))
+vec3d = mathutils.Vector((1.0, 0.0, 0.0))
 vec4d = vec_a.to_4d()
 
 # other mathutuls types
@@ -34,9 +34,9 @@
 vec_a - vec_b
 vec_a * vec_b
 vec_a * 10.0
-vec_a * matrix
+matrix * vec_a
+quat * vec_a
 vec_a * vec_b
-vec_a * quat
 -vec_a
 
 
@@ -44,6 +44,7 @@
 x = vec_a[0]
 len(vec)
 vec_a[:] = vec_b
+vec_a[:] = 1.0, 2.0, 3.0
 vec2d[:] = vec3d[:2]
 
 


Property changes on: branches/soc-2011-onion/intern/audaspace/OpenAL
___________________________________________________________________
Added: svn:mergeinfo
   + /branches/soc-2010-jwilkins/intern/audaspace/OpenAL:28499-37009
/branches/soc-2010-nicolasbishop/intern/audaspace/OpenAL:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-pepper/intern/audaspace/OpenAL:38630
/trunk/blender/intern/audaspace/OpenAL:36833-38738

Modified: branches/soc-2011-onion/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
===================================================================
--- branches/soc-2011-onion/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp	2011-07-26 17:23:52 UTC (rev 38738)
+++ branches/soc-2011-onion/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp	2011-07-26 17:42:57 UTC (rev 38739)
@@ -105,12 +105,15 @@
 	return NULL;
 }
 
-void AUD_OpenALDevice::start()
+void AUD_OpenALDevice::start(bool join)
 {
 	lock();
 
 	if(!m_playing)
 	{
+		if(join)
+			pthread_join(m_thread, NULL);
+
 		pthread_attr_t attr;
 		pthread_attr_init(&attr);
 		pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
@@ -271,8 +274,8 @@
 		// stop thread
 		if(m_playingSounds->empty() || (cerr != ALC_NO_ERROR))
 		{
+			m_playing = false;
 			unlock();
-			m_playing = false;
 			pthread_exit(NULL);
 		}
 
@@ -366,6 +369,8 @@
 	pthread_mutex_init(&m_mutex, &attr);
 
 	pthread_mutexattr_destroy(&attr);
+
+	start(false);
 }
 
 AUD_OpenALDevice::~AUD_OpenALDevice()
@@ -414,13 +419,8 @@
 	alcProcessContext(m_context);
 
 	// wait for the thread to stop
-	if(m_playing)
-	{
-		unlock();
-		pthread_join(m_thread, NULL);
-	}
-	else
-		unlock();
+	unlock();
+	pthread_join(m_thread, NULL);
 
 	delete m_playingSounds;
 	delete m_pausedSounds;

Modified: branches/soc-2011-onion/intern/audaspace/OpenAL/AUD_OpenALDevice.h
===================================================================
--- branches/soc-2011-onion/intern/audaspace/OpenAL/AUD_OpenALDevice.h	2011-07-26 17:23:52 UTC (rev 38738)
+++ branches/soc-2011-onion/intern/audaspace/OpenAL/AUD_OpenALDevice.h	2011-07-26 17:42:57 UTC (rev 38739)
@@ -106,7 +106,7 @@
 	/**
 	 * Starts the streaming thread.
 	 */
-	void start();
+	void start(bool join = true);
 
 	/**
 	 * Checks if a handle is valid.

Modified: branches/soc-2011-onion/release/scripts/modules/bpy/path.py
===================================================================
--- branches/soc-2011-onion/release/scripts/modules/bpy/path.py	2011-07-26 17:23:52 UTC (rev 38738)
+++ branches/soc-2011-onion/release/scripts/modules/bpy/path.py	2011-07-26 17:42:57 UTC (rev 38739)
@@ -239,4 +239,4 @@
 
     Use for Windows compatibility.
     """
-    return _os.path.basename(path[2:] if path.startswith("//") else path)
+    return _os.path.basename(path[2:] if path[:2] in {"//", b"//"} else path)

Modified: branches/soc-2011-onion/release/scripts/modules/bpy/utils.py
===================================================================
--- branches/soc-2011-onion/release/scripts/modules/bpy/utils.py	2011-07-26 17:23:52 UTC (rev 38738)
+++ branches/soc-2011-onion/release/scripts/modules/bpy/utils.py	2011-07-26 17:42:57 UTC (rev 38739)
@@ -298,11 +298,18 @@
 def preset_paths(subdir):
     """
     Returns a list of paths for a specific preset.
+
+    :arg subdir: preset subdirectory (must not be an absolute path).
+    :type subdir: string
+    :return: script paths.
+    :rtype: list
     """
     dirs = []
     for path in script_paths("presets", all=True):
         directory = _os.path.join(path, subdir)
-        if _os.path.isdir(directory):
+        if not directory.startswith(path):
+            raise Exception("invalid subdir given %r" % subdir)
+        elif _os.path.isdir(directory):
             dirs.append(directory)
     return dirs
 

Modified: branches/soc-2011-onion/release/scripts/modules/bpy_extras/view3d_utils.py
===================================================================
--- branches/soc-2011-onion/release/scripts/modules/bpy_extras/view3d_utils.py	2011-07-26 17:23:52 UTC (rev 38738)
+++ branches/soc-2011-onion/release/scripts/modules/bpy_extras/view3d_utils.py	2011-07-26 17:42:57 UTC (rev 38739)
@@ -50,11 +50,11 @@
                       -0.5
                     ))
 
-        w = (out[0] * persinv[0][3]) + \
-            (out[1] * persinv[1][3]) + \
-            (out[2] * persinv[2][3]) + persinv[3][3]
+        w = ((out[0] * persinv[0][3]) +
+             (out[1] * persinv[1][3]) +
+             (out[2] * persinv[2][3]) + persinv[3][3])
 
-        return ((out * persinv) / w) - rv3d.view_matrix.inverted()[3].xyz
+        return ((persinv * out) / w) - rv3d.view_matrix.inverted()[3].xyz
     else:
         return rv3d.view_matrix.inverted()[2].xyz.normalized()
 
@@ -116,7 +116,7 @@
     """
     from mathutils import Vector
 
-    prj = Vector((coord[0], coord[1], coord[2], 1.0)) * rv3d.perspective_matrix
+    prj = rv3d.perspective_matrix * Vector((coord[0], coord[1], coord[2], 1.0))
     if prj.w > 0.0:
         width_half = region.width / 2.0
         height_half = region.height / 2.0

Modified: branches/soc-2011-onion/release/scripts/modules/bpy_types.py
===================================================================
--- branches/soc-2011-onion/release/scripts/modules/bpy_types.py	2011-07-26 17:23:52 UTC (rev 38738)
+++ branches/soc-2011-onion/release/scripts/modules/bpy_types.py	2011-07-26 17:42:57 UTC (rev 38739)
@@ -144,21 +144,21 @@
         """ Vector pointing down the x-axis of the bone.
         """
         from mathutils import Vector
-        return Vector((1.0, 0.0, 0.0)) * self.matrix.to_3x3()
+        return self.matrix.to_3x3() * Vector((1.0, 0.0, 0.0))
 
     @property
     def y_axis(self):
         """ Vector pointing down the x-axis of the bone.
         """
         from mathutils import Vector
-        return Vector((0.0, 1.0, 0.0)) * self.matrix.to_3x3()
+        return self.matrix.to_3x3() * Vector((0.0, 1.0, 0.0))
 
     @property
     def z_axis(self):
         """ Vector pointing down the x-axis of the bone.
         """
         from mathutils import Vector
-        return Vector((0.0, 0.0, 1.0)) * self.matrix.to_3x3()
+        return self.matrix.to_3x3() * Vector((0.0, 0.0, 1.0))
 
     @property
     def basename(self):
@@ -294,9 +294,9 @@
         :type roll: bool
         """
         from mathutils import Vector
-        z_vec = Vector((0.0, 0.0, 1.0)) * self.matrix.to_3x3()
-        self.tail = self.tail * matrix
-        self.head = self.head * matrix
+        z_vec = self.matrix.to_3x3() * Vector((0.0, 0.0, 1.0))
+        self.tail = matrix * self.tail
+        self.head = matrix * self.head
 
         if scale:
             scalar = matrix.median_scale
@@ -304,7 +304,7 @@
             self.tail_radius *= scalar
 
         if roll:
-            self.align_roll(z_vec * matrix)
+            self.align_roll(matrix * z_vec)
 
 
 def ord_ind(i1, i2):

Modified: branches/soc-2011-onion/release/scripts/startup/bl_operators/add_mesh_torus.py
===================================================================
--- branches/soc-2011-onion/release/scripts/startup/bl_operators/add_mesh_torus.py	2011-07-26 17:23:52 UTC (rev 38738)
+++ branches/soc-2011-onion/release/scripts/startup/bl_operators/add_mesh_torus.py	2011-07-26 17:42:57 UTC (rev 38739)
@@ -16,7 +16,7 @@
 #
 # ##### END GPL LICENSE BLOCK #####
 
-# <pep8 compliant>
+# <pep8-80 compliant>
 import bpy
 import mathutils
 
@@ -40,8 +40,10 @@
         for minor_index in range(minor_seg):
             angle = 2 * pi * minor_index / minor_seg
 
-            vec = Vector((major_rad + (cos(angle) * minor_rad), 0.0,
-                        (sin(angle) * minor_rad))) * quat
+            vec = quat * Vector((major_rad + (cos(angle) * minor_rad),
+                                0.0,
+                                (sin(angle) * minor_rad),
+                                ))
 
             verts.extend(vec[:])
 
@@ -72,7 +74,11 @@
 
     return verts, faces
 
-from bpy.props import FloatProperty, IntProperty, BoolProperty, FloatVectorProperty
+from bpy.props import (FloatProperty,
+                       IntProperty,
+                       BoolProperty,
+                       FloatVectorProperty,
+                       )
 
 
 class AddTorus(bpy.types.Operator):

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list