[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38704] branches/soc-2011-tomato: Merging r38637 through r38703 from trunk into soc-2011-tomato
Sergey Sharybin
g.ulairi at gmail.com
Mon Jul 25 20:05:28 CEST 2011
Revision: 38704
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38704
Author: nazgul
Date: 2011-07-25 18:05:27 +0000 (Mon, 25 Jul 2011)
Log Message:
-----------
Merging r38637 through r38703 from trunk into soc-2011-tomato
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38637
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38703
Modified Paths:
--------------
branches/soc-2011-tomato/release/scripts/modules/bpy/path.py
branches/soc-2011-tomato/release/scripts/modules/bpy_extras/view3d_utils.py
branches/soc-2011-tomato/release/scripts/modules/bpy_types.py
branches/soc-2011-tomato/release/scripts/startup/bl_operators/add_mesh_torus.py
branches/soc-2011-tomato/release/scripts/startup/bl_operators/image.py
branches/soc-2011-tomato/release/scripts/startup/bl_operators/mesh.py
branches/soc-2011-tomato/release/scripts/startup/bl_operators/object.py
branches/soc-2011-tomato/release/scripts/startup/bl_operators/object_align.py
branches/soc-2011-tomato/release/scripts/startup/bl_operators/object_quick_effects.py
branches/soc-2011-tomato/release/scripts/startup/bl_operators/object_randomize_transform.py
branches/soc-2011-tomato/release/scripts/startup/bl_operators/presets.py
branches/soc-2011-tomato/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
branches/soc-2011-tomato/release/scripts/startup/bl_operators/uvcalc_smart_project.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_world.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d_toolbar.py
branches/soc-2011-tomato/source/blender/blenkernel/BKE_effect.h
branches/soc-2011-tomato/source/blender/blenkernel/intern/effect.c
branches/soc-2011-tomato/source/blender/editors/interface/interface_templates.c
branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_header.c
branches/soc-2011-tomato/source/blender/editors/transform/transform_generics.c
branches/soc-2011-tomato/source/blender/imbuf/IMB_imbuf.h
branches/soc-2011-tomato/source/blender/imbuf/intern/filter.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_scene.c
branches/soc-2011-tomato/source/blender/python/mathutils/mathutils.h
branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_Matrix.c
branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_Quaternion.c
branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_Vector.c
branches/soc-2011-tomato/source/blender/render/intern/source/convertblender.c
branches/soc-2011-tomato/source/blender/render/intern/source/rendercore.c
branches/soc-2011-tomato/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
branches/soc-2011-tomato/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
branches/soc-2011-tomato/source/tests/CMakeLists.txt
Property Changed:
----------------
branches/soc-2011-tomato/
branches/soc-2011-tomato/intern/audaspace/OpenAL/
Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/blender:36831-38636
+ /trunk/blender:36831-38703
Property changes on: branches/soc-2011-tomato/intern/audaspace/OpenAL
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2011-pepper/intern/audaspace/OpenAL:38630
/trunk/blender/intern/audaspace/OpenAL:36831-38636
+ /branches/soc-2011-pepper/intern/audaspace/OpenAL:38630
/trunk/blender/intern/audaspace/OpenAL:36831-38703
Modified: branches/soc-2011-tomato/release/scripts/modules/bpy/path.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/bpy/path.py 2011-07-25 17:51:30 UTC (rev 38703)
+++ branches/soc-2011-tomato/release/scripts/modules/bpy/path.py 2011-07-25 18:05:27 UTC (rev 38704)
@@ -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-tomato/release/scripts/modules/bpy_extras/view3d_utils.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/bpy_extras/view3d_utils.py 2011-07-25 17:51:30 UTC (rev 38703)
+++ branches/soc-2011-tomato/release/scripts/modules/bpy_extras/view3d_utils.py 2011-07-25 18:05:27 UTC (rev 38704)
@@ -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-tomato/release/scripts/modules/bpy_types.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/bpy_types.py 2011-07-25 17:51:30 UTC (rev 38703)
+++ branches/soc-2011-tomato/release/scripts/modules/bpy_types.py 2011-07-25 18:05:27 UTC (rev 38704)
@@ -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-tomato/release/scripts/startup/bl_operators/add_mesh_torus.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_operators/add_mesh_torus.py 2011-07-25 17:51:30 UTC (rev 38703)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_operators/add_mesh_torus.py 2011-07-25 18:05:27 UTC (rev 38704)
@@ -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-tomato/release/scripts/startup/bl_operators/image.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_operators/image.py 2011-07-25 17:51:30 UTC (rev 38703)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_operators/image.py 2011-07-25 18:05:27 UTC (rev 38704)
@@ -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 @@
filepath = os.path.basename(bpy.data.filepath)
filepath = os.path.splitext(filepath)[0]
- # filepath = bpy.path.clean_name(filepath) # fixes <memory> rubbish, needs checking
+ # fixes <memory> rubbish, needs checking
+ # filepath = bpy.path.clean_name(filepath)
- if filepath.startswith(".") or filepath == "":
- # TODO, have a way to check if the file is saved, assume startup.blend
+ if bpy.data.is_saved:
+ filepath = "//" + filepath
+ else:
tmpdir = context.user_preferences.filepaths.temporary_directory
filepath = os.path.join(tmpdir, "project_edit")
- else:
- filepath = "//" + filepath
obj = context.object
Modified: branches/soc-2011-tomato/release/scripts/startup/bl_operators/mesh.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_operators/mesh.py 2011-07-25 17:51:30 UTC (rev 38703)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_operators/mesh.py 2011-07-25 18:05:27 UTC (rev 38704)
@@ -16,7 +16,7 @@
#
# ##### END GPL LICENSE BLOCK #####
-# <pep8 compliant>
+# <pep8-80 compliant>
import bpy
@@ -111,7 +111,8 @@
#for i, v in enumerate(mesh.vertices):
vmap = {}
- for mirror_a, mirror_b in (mirror_gt, mirror_lt), (mirror_lt, mirror_gt):
+ for mirror_a, mirror_b in ((mirror_gt, mirror_lt),
+ (mirror_lt, mirror_gt)):
for co, i in mirror_a.items():
nco = (-co[0], co[1], co[2])
j = mirror_b.get(nco)
@@ -120,7 +121,8 @@
active_uv_layer = mesh.uv_textures.active.data
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list