[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38718] branches/bmesh/blender: svn merge -r38600:38700 https://svn.blender.org/svnroot/bf-blender/trunk/ blender

Campbell Barton ideasman42 at gmail.com
Tue Jul 26 06:32:00 CEST 2011


Revision: 38718
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38718
Author:   campbellbarton
Date:     2011-07-26 04:31:59 +0000 (Tue, 26 Jul 2011)
Log Message:
-----------
svn merge -r38600:38700 https://svn.blender.org/svnroot/bf-blender/trunk/blender

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

Modified Paths:
--------------
    branches/bmesh/blender/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
    branches/bmesh/blender/intern/audaspace/OpenAL/AUD_OpenALDevice.h
    branches/bmesh/blender/release/scripts/modules/bpy/path.py
    branches/bmesh/blender/release/scripts/modules/bpy_extras/view3d_utils.py
    branches/bmesh/blender/release/scripts/modules/bpy_types.py
    branches/bmesh/blender/release/scripts/startup/bl_operators/add_mesh_torus.py
    branches/bmesh/blender/release/scripts/startup/bl_operators/image.py
    branches/bmesh/blender/release/scripts/startup/bl_operators/mesh.py
    branches/bmesh/blender/release/scripts/startup/bl_operators/object.py
    branches/bmesh/blender/release/scripts/startup/bl_operators/object_align.py
    branches/bmesh/blender/release/scripts/startup/bl_operators/object_quick_effects.py
    branches/bmesh/blender/release/scripts/startup/bl_operators/object_randomize_transform.py
    branches/bmesh/blender/release/scripts/startup/bl_operators/presets.py
    branches/bmesh/blender/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
    branches/bmesh/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_world.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_info.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_view3d.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
    branches/bmesh/blender/source/blender/blenkernel/BKE_effect.h
    branches/bmesh/blender/source/blender/blenkernel/intern/effect.c
    branches/bmesh/blender/source/blender/editors/include/ED_node.h
    branches/bmesh/blender/source/blender/editors/interface/interface_templates.c
    branches/bmesh/blender/source/blender/editors/object/object_edit.c
    branches/bmesh/blender/source/blender/editors/space_node/drawnode.c
    branches/bmesh/blender/source/blender/editors/space_node/node_edit.c
    branches/bmesh/blender/source/blender/editors/space_view3d/view3d_header.c
    branches/bmesh/blender/source/blender/editors/transform/transform_conversions.c
    branches/bmesh/blender/source/blender/editors/transform/transform_generics.c
    branches/bmesh/blender/source/blender/imbuf/IMB_imbuf.h
    branches/bmesh/blender/source/blender/imbuf/intern/filter.c
    branches/bmesh/blender/source/blender/makesdna/DNA_node_types.h
    branches/bmesh/blender/source/blender/makesrna/intern/rna_scene.c
    branches/bmesh/blender/source/blender/python/mathutils/mathutils.h
    branches/bmesh/blender/source/blender/python/mathutils/mathutils_Matrix.c
    branches/bmesh/blender/source/blender/python/mathutils/mathutils_Quaternion.c
    branches/bmesh/blender/source/blender/python/mathutils/mathutils_Vector.c
    branches/bmesh/blender/source/blender/render/intern/source/convertblender.c
    branches/bmesh/blender/source/blender/render/intern/source/rendercore.c
    branches/bmesh/blender/source/gameengine/Expressions/PyObjectPlus.cpp
    branches/bmesh/blender/source/gameengine/Expressions/PyObjectPlus.h
    branches/bmesh/blender/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
    branches/bmesh/blender/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
    branches/bmesh/blender/source/tests/CMakeLists.txt

Property Changed:
----------------
    branches/bmesh/blender/
    branches/bmesh/blender/intern/audaspace/OpenAL/
    branches/bmesh/blender/release/scripts/startup/bl_operators/add_mesh_torus.py
    branches/bmesh/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py
    branches/bmesh/blender/release/scripts/startup/bl_operators/vertexpaint_dirt.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_armature.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_bone.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_camera.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_empty.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_lamp.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_lattice.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_mesh.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_metaball.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_modifier.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_game.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_material.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_particle.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_physics_field.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_physics_smoke.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_texture.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_world.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_node.py
    branches/bmesh/blender/source/blender/editors/render/render_update.c
    branches/bmesh/blender/source/blender/editors/uvedit/uvedit_buttons.c


Property changes on: branches/bmesh/blender
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender:31524-38600
   + /trunk/blender:31524-38700


Property changes on: branches/bmesh/blender/intern/audaspace/OpenAL
___________________________________________________________________
Added: svn:mergeinfo
   + /branches/soc-2011-pepper/intern/audaspace/OpenAL:38630
/trunk/blender/intern/audaspace/OpenAL:38601-38700

Modified: branches/bmesh/blender/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
===================================================================
--- branches/bmesh/blender/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp	2011-07-26 04:30:30 UTC (rev 38717)
+++ branches/bmesh/blender/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp	2011-07-26 04:31:59 UTC (rev 38718)
@@ -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/bmesh/blender/intern/audaspace/OpenAL/AUD_OpenALDevice.h
===================================================================
--- branches/bmesh/blender/intern/audaspace/OpenAL/AUD_OpenALDevice.h	2011-07-26 04:30:30 UTC (rev 38717)
+++ branches/bmesh/blender/intern/audaspace/OpenAL/AUD_OpenALDevice.h	2011-07-26 04:31:59 UTC (rev 38718)
@@ -106,7 +106,7 @@
 	/**
 	 * Starts the streaming thread.
 	 */
-	void start();
+	void start(bool join = true);
 
 	/**
 	 * Checks if a handle is valid.

Modified: branches/bmesh/blender/release/scripts/modules/bpy/path.py
===================================================================
--- branches/bmesh/blender/release/scripts/modules/bpy/path.py	2011-07-26 04:30:30 UTC (rev 38717)
+++ branches/bmesh/blender/release/scripts/modules/bpy/path.py	2011-07-26 04:31:59 UTC (rev 38718)
@@ -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/bmesh/blender/release/scripts/modules/bpy_extras/view3d_utils.py
===================================================================
--- branches/bmesh/blender/release/scripts/modules/bpy_extras/view3d_utils.py	2011-07-26 04:30:30 UTC (rev 38717)
+++ branches/bmesh/blender/release/scripts/modules/bpy_extras/view3d_utils.py	2011-07-26 04:31:59 UTC (rev 38718)
@@ -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/bmesh/blender/release/scripts/modules/bpy_types.py
===================================================================
--- branches/bmesh/blender/release/scripts/modules/bpy_types.py	2011-07-26 04:30:30 UTC (rev 38717)
+++ branches/bmesh/blender/release/scripts/modules/bpy_types.py	2011-07-26 04:31:59 UTC (rev 38718)
@@ -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/bmesh/blender/release/scripts/startup/bl_operators/add_mesh_torus.py
===================================================================
--- branches/bmesh/blender/release/scripts/startup/bl_operators/add_mesh_torus.py	2011-07-26 04:30:30 UTC (rev 38717)
+++ branches/bmesh/blender/release/scripts/startup/bl_operators/add_mesh_torus.py	2011-07-26 04:31:59 UTC (rev 38718)
@@ -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):
@@ -82,7 +88,8 @@
     bl_options = {'REGISTER', 'UNDO'}
 
     major_radius = FloatProperty(name="Major Radius",
-            description="Radius from the origin to the center of the cross sections",
+            description=("Radius from the origin to the "
+                         "center of the cross sections"),
             default=1.0, min=0.01, max=100.0)
     minor_radius = FloatProperty(name="Minor Radius",
             description="Radius of the torus' cross section",


Property changes on: branches/bmesh/blender/release/scripts/startup/bl_operators/add_mesh_torus.py
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py:36154-38600
   + /trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py:36154-38700

Modified: branches/bmesh/blender/release/scripts/startup/bl_operators/image.py
===================================================================
--- branches/bmesh/blender/release/scripts/startup/bl_operators/image.py	2011-07-26 04:30:30 UTC (rev 38717)
+++ branches/bmesh/blender/release/scripts/startup/bl_operators/image.py	2011-07-26 04:31:59 UTC (rev 38718)
@@ -16,7 +16,7 @@
 #
 # ##### END GPL LICENSE BLOCK #####
 
-# <pep8 compliant>
+# <pep8-80 compliant>
 
 import bpy
 from bpy.props import StringProperty
@@ -28,7 +28,11 @@
     bl_label = "Image Edit Externally"
     bl_options = {'REGISTER'}
 
-    filepath = StringProperty(name="File Path", description="Path to an image file", maxlen=1024, default="")
+    filepath = StringProperty(
+            name="File Path",
+            description="Path to an image file",
+            maxlen=1024,
+            )
 
     def _editor_guess(self, context):
         import sys
@@ -57,10 +61,13 @@
     def execute(self, context):
         import os
         import subprocess
-        filepath = bpy.path.abspath(self.filepath)
+        filepath = os.path.normpath(bpy.path.abspath(self.filepath))
 
         if not os.path.exists(filepath):
-            self.report({'ERROR'}, "Image path %r not found, image may be packed or unsaved." % filepath)
+            self.report({'ERROR'},
+                        "Image path %r not found, image may be packed or "
+                        "unsaved." % filepath)
+
             return {'CANCELLED'}
 
         cmd = self._editor_guess(context) + [filepath]
@@ -70,7 +77,10 @@
         except:
             import traceback
             traceback.print_exc()
-            self.report({'ERROR'}, "Image editor not found, please specify in User Preferences > File")
+            self.report({'ERROR'},
+                        "Image editor not found, "
+                        "please specify in User Preferences > File")
+
             return {'CANCELLED'}
 
         return {'FINISHED'}
@@ -104,7 +114,9 @@
                 if "\\" not in filepath and "/" not in filepath:
                     self.report({'WARNING'}, "Invalid path: " + filepath)
                 elif filepath in unique_paths:
-                    self.report({'WARNING'}, "Path used by more then one image: " + filepath)

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list