[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38705] branches/soc-2011-salad: Merging r38638 through r38704 into from trunk soc-2011-salad

Sergey Sharybin g.ulairi at gmail.com
Mon Jul 25 20:11:01 CEST 2011


Revision: 38705
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38705
Author:   nazgul
Date:     2011-07-25 18:11:00 +0000 (Mon, 25 Jul 2011)
Log Message:
-----------
Merging r38638 through r38704 into from trunk soc-2011-salad

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

Modified Paths:
--------------
    branches/soc-2011-salad/release/scripts/modules/bpy/path.py
    branches/soc-2011-salad/release/scripts/modules/bpy_extras/view3d_utils.py
    branches/soc-2011-salad/release/scripts/modules/bpy_types.py
    branches/soc-2011-salad/release/scripts/startup/bl_operators/add_mesh_torus.py
    branches/soc-2011-salad/release/scripts/startup/bl_operators/image.py
    branches/soc-2011-salad/release/scripts/startup/bl_operators/mesh.py
    branches/soc-2011-salad/release/scripts/startup/bl_operators/object.py
    branches/soc-2011-salad/release/scripts/startup/bl_operators/object_align.py
    branches/soc-2011-salad/release/scripts/startup/bl_operators/object_quick_effects.py
    branches/soc-2011-salad/release/scripts/startup/bl_operators/object_randomize_transform.py
    branches/soc-2011-salad/release/scripts/startup/bl_operators/presets.py
    branches/soc-2011-salad/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
    branches/soc-2011-salad/release/scripts/startup/bl_operators/uvcalc_smart_project.py
    branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_world.py
    branches/soc-2011-salad/release/scripts/startup/bl_ui/space_view3d.py
    branches/soc-2011-salad/release/scripts/startup/bl_ui/space_view3d_toolbar.py
    branches/soc-2011-salad/source/blender/blenkernel/BKE_effect.h
    branches/soc-2011-salad/source/blender/blenkernel/intern/effect.c
    branches/soc-2011-salad/source/blender/editors/interface/interface_templates.c
    branches/soc-2011-salad/source/blender/editors/space_view3d/view3d_header.c
    branches/soc-2011-salad/source/blender/editors/transform/transform_generics.c
    branches/soc-2011-salad/source/blender/imbuf/IMB_imbuf.h
    branches/soc-2011-salad/source/blender/imbuf/intern/filter.c
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2011-salad/source/blender/python/mathutils/mathutils.h
    branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Matrix.c
    branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Quaternion.c
    branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Vector.c
    branches/soc-2011-salad/source/blender/render/intern/source/convertblender.c
    branches/soc-2011-salad/source/blender/render/intern/source/rendercore.c
    branches/soc-2011-salad/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
    branches/soc-2011-salad/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
    branches/soc-2011-salad/source/tests/CMakeLists.txt

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


Property changes on: branches/soc-2011-salad
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282,38620,38661-38662
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38208
/branches/soc-2011-tomato:36831-38638
/trunk/blender:36834-38637
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282,38620,38661-38662
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38208
/branches/soc-2011-tomato:36831-38638
/trunk/blender:36834-38704


Property changes on: branches/soc-2011-salad/intern/audaspace/OpenAL
___________________________________________________________________
Modified: 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-carrot/intern/audaspace/OpenAL:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282,38620,38661-38662
/branches/soc-2011-cucumber/intern/audaspace/OpenAL:36829-36994
/branches/soc-2011-onion/intern/audaspace/OpenAL:36833-38309
/branches/soc-2011-pepper/intern/audaspace/OpenAL:36830-38208,38630
/branches/soc-2011-tomato/intern/audaspace/OpenAL:36831-38638
/trunk/blender/intern/audaspace/OpenAL:36834-38637
   + /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-carrot/intern/audaspace/OpenAL:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282,38620,38661-38662
/branches/soc-2011-cucumber/intern/audaspace/OpenAL:36829-36994
/branches/soc-2011-onion/intern/audaspace/OpenAL:36833-38309
/branches/soc-2011-pepper/intern/audaspace/OpenAL:36830-38208,38630
/branches/soc-2011-tomato/intern/audaspace/OpenAL:36831-38638
/trunk/blender/intern/audaspace/OpenAL:36834-38704

Modified: branches/soc-2011-salad/release/scripts/modules/bpy/path.py
===================================================================
--- branches/soc-2011-salad/release/scripts/modules/bpy/path.py	2011-07-25 18:05:27 UTC (rev 38704)
+++ branches/soc-2011-salad/release/scripts/modules/bpy/path.py	2011-07-25 18:11:00 UTC (rev 38705)
@@ -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-salad/release/scripts/modules/bpy_extras/view3d_utils.py
===================================================================
--- branches/soc-2011-salad/release/scripts/modules/bpy_extras/view3d_utils.py	2011-07-25 18:05:27 UTC (rev 38704)
+++ branches/soc-2011-salad/release/scripts/modules/bpy_extras/view3d_utils.py	2011-07-25 18:11:00 UTC (rev 38705)
@@ -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-salad/release/scripts/modules/bpy_types.py
===================================================================
--- branches/soc-2011-salad/release/scripts/modules/bpy_types.py	2011-07-25 18:05:27 UTC (rev 38704)
+++ branches/soc-2011-salad/release/scripts/modules/bpy_types.py	2011-07-25 18:11:00 UTC (rev 38705)
@@ -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-salad/release/scripts/startup/bl_operators/add_mesh_torus.py
===================================================================
--- branches/soc-2011-salad/release/scripts/startup/bl_operators/add_mesh_torus.py	2011-07-25 18:05:27 UTC (rev 38704)
+++ branches/soc-2011-salad/release/scripts/startup/bl_operators/add_mesh_torus.py	2011-07-25 18:11:00 UTC (rev 38705)
@@ -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",

Modified: branches/soc-2011-salad/release/scripts/startup/bl_operators/image.py
===================================================================
--- branches/soc-2011-salad/release/scripts/startup/bl_operators/image.py	2011-07-25 18:05:27 UTC (rev 38704)
+++ branches/soc-2011-salad/release/scripts/startup/bl_operators/image.py	2011-07-25 18:11:00 UTC (rev 38705)
@@ -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)
+                    self.report({'WARNING'},
+                                "Path used by more then one image: %r" %
+                                filepath)
                 else:
                     unique_paths.add(filepath)
                     image.save()
@@ -142,14 +154,14 @@
 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list