[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28426] branches/render25: Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28388 :28425

Campbell Barton ideasman42 at gmail.com
Mon Apr 26 09:26:24 CEST 2010


Revision: 28426
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28426
Author:   campbellbarton
Date:     2010-04-26 09:26:21 +0200 (Mon, 26 Apr 2010)

Log Message:
-----------
Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28388:28425

Modified Paths:
--------------
    branches/render25/intern/audaspace/intern/AUD_C-API.cpp
    branches/render25/intern/audaspace/intern/AUD_C-API.h
    branches/render25/release/scripts/io/export_fbx.py
    branches/render25/release/scripts/io/import_anim_bvh.py
    branches/render25/release/scripts/modules/bpy_types.py
    branches/render25/release/scripts/modules/console/complete_import.py
    branches/render25/release/scripts/op/add_mesh_torus.py
    branches/render25/release/scripts/op/console_python.py
    branches/render25/release/scripts/op/object.py
    branches/render25/release/scripts/op/uvcalc_smart_project.py
    branches/render25/release/scripts/op/vertexpaint_dirt.py
    branches/render25/release/scripts/ui/space_sequencer.py
    branches/render25/source/blender/blenfont/BLF_api.h
    branches/render25/source/blender/blenkernel/BKE_constraint.h
    branches/render25/source/blender/blenkernel/BKE_context.h
    branches/render25/source/blender/blenkernel/BKE_sequencer.h
    branches/render25/source/blender/blenkernel/BKE_sound.h
    branches/render25/source/blender/blenkernel/intern/anim.c
    branches/render25/source/blender/blenkernel/intern/armature.c
    branches/render25/source/blender/blenkernel/intern/boids.c
    branches/render25/source/blender/blenkernel/intern/brush.c
    branches/render25/source/blender/blenkernel/intern/colortools.c
    branches/render25/source/blender/blenkernel/intern/constraint.c
    branches/render25/source/blender/blenkernel/intern/context.c
    branches/render25/source/blender/blenkernel/intern/deform.c
    branches/render25/source/blender/blenkernel/intern/effect.c
    branches/render25/source/blender/blenkernel/intern/ipo.c
    branches/render25/source/blender/blenkernel/intern/modifier.c
    branches/render25/source/blender/blenkernel/intern/object.c
    branches/render25/source/blender/blenkernel/intern/packedFile.c
    branches/render25/source/blender/blenkernel/intern/seqeffects.c
    branches/render25/source/blender/blenkernel/intern/sequencer.c
    branches/render25/source/blender/blenkernel/intern/sketch.c
    branches/render25/source/blender/blenkernel/intern/sound.c
    branches/render25/source/blender/blenlib/BLI_fnmatch.h
    branches/render25/source/blender/blenlib/BLI_path_util.h
    branches/render25/source/blender/blenlib/BLI_threads.h
    branches/render25/source/blender/blenlib/intern/math_rotation.c
    branches/render25/source/blender/blenlib/intern/path_util.c
    branches/render25/source/blender/blenlib/intern/threads.c
    branches/render25/source/blender/blenlib/intern/voxel.c
    branches/render25/source/blender/blenloader/intern/readfile.c
    branches/render25/source/blender/blenloader/intern/writefile.c
    branches/render25/source/blender/collada/DocumentImporter.cpp
    branches/render25/source/blender/editors/armature/editarmature.c
    branches/render25/source/blender/editors/armature/editarmature_generate.c
    branches/render25/source/blender/editors/armature/editarmature_sketch.c
    branches/render25/source/blender/editors/armature/meshlaplacian.c
    branches/render25/source/blender/editors/armature/poseobject.c
    branches/render25/source/blender/editors/armature/reeb.c
    branches/render25/source/blender/editors/curve/editcurve.c
    branches/render25/source/blender/editors/include/ED_armature.h
    branches/render25/source/blender/editors/interface/interface_handlers.c
    branches/render25/source/blender/editors/interface/interface_icons.c
    branches/render25/source/blender/editors/mesh/editface.c
    branches/render25/source/blender/editors/mesh/editmesh.c
    branches/render25/source/blender/editors/mesh/editmesh_lib.c
    branches/render25/source/blender/editors/mesh/editmesh_loop.c
    branches/render25/source/blender/editors/mesh/editmesh_mods.c
    branches/render25/source/blender/editors/mesh/editmesh_tools.c
    branches/render25/source/blender/editors/mesh/meshtools.c
    branches/render25/source/blender/editors/metaball/mball_edit.c
    branches/render25/source/blender/editors/object/object_constraint.c
    branches/render25/source/blender/editors/object/object_edit.c
    branches/render25/source/blender/editors/object/object_hook.c
    branches/render25/source/blender/editors/object/object_transform.c
    branches/render25/source/blender/editors/screen/screen_context.c
    branches/render25/source/blender/editors/screen/screen_edit.c
    branches/render25/source/blender/editors/sculpt_paint/paint_stroke.c
    branches/render25/source/blender/editors/space_file/filelist.c
    branches/render25/source/blender/editors/space_file/filesel.c
    branches/render25/source/blender/editors/space_file/writeimage.c
    branches/render25/source/blender/editors/space_image/image_buttons.c
    branches/render25/source/blender/editors/space_node/space_node.c
    branches/render25/source/blender/editors/space_outliner/outliner.c
    branches/render25/source/blender/editors/space_sequencer/sequencer_draw.c
    branches/render25/source/blender/editors/space_sequencer/sequencer_edit.c
    branches/render25/source/blender/editors/space_sequencer/sequencer_select.c
    branches/render25/source/blender/editors/space_text/text_ops.c
    branches/render25/source/blender/editors/space_view3d/space_view3d.c
    branches/render25/source/blender/editors/space_view3d/view3d_edit.c
    branches/render25/source/blender/editors/space_view3d/view3d_select.c
    branches/render25/source/blender/editors/space_view3d/view3d_snap.c
    branches/render25/source/blender/editors/space_view3d/view3d_view.c
    branches/render25/source/blender/editors/transform/transform.c
    branches/render25/source/blender/editors/util/editmode_undo.c
    branches/render25/source/blender/gpu/GPU_draw.h
    branches/render25/source/blender/gpu/intern/gpu_buffers.c
    branches/render25/source/blender/gpu/intern/gpu_draw.c
    branches/render25/source/blender/imbuf/intern/anim.c
    branches/render25/source/blender/makesdna/DNA_ID.h
    branches/render25/source/blender/makesdna/DNA_documentation.h
    branches/render25/source/blender/makesdna/DNA_modifier_types.h
    branches/render25/source/blender/makesdna/DNA_sequence_types.h
    branches/render25/source/blender/makesrna/RNA_access.h
    branches/render25/source/blender/makesrna/intern/rna_modifier.c
    branches/render25/source/blender/makesrna/intern/rna_property.c
    branches/render25/source/blender/makesrna/intern/rna_sequencer.c
    branches/render25/source/blender/modifiers/MOD_modifiertypes.h
    branches/render25/source/blender/modifiers/intern/MOD_cast.c
    branches/render25/source/blender/modifiers/intern/MOD_screw.c
    branches/render25/source/blender/modifiers/intern/MOD_util.c
    branches/render25/source/blender/modifiers/intern/MOD_util.h
    branches/render25/source/blender/nodes/intern/SHD_nodes/SHD_material.c
    branches/render25/source/blender/python/generic/mathutils.c
    branches/render25/source/blender/python/generic/mathutils.h
    branches/render25/source/blender/python/generic/mathutils_color.c
    branches/render25/source/blender/python/generic/mathutils_euler.c
    branches/render25/source/blender/python/generic/mathutils_matrix.c
    branches/render25/source/blender/python/generic/mathutils_quat.c
    branches/render25/source/blender/python/generic/mathutils_vector.c
    branches/render25/source/blender/python/intern/bpy_driver.c
    branches/render25/source/blender/python/intern/bpy_rna.c
    branches/render25/source/blender/render/intern/source/volumetric.c
    branches/render25/source/blender/windowmanager/intern/wm_draw.c
    branches/render25/source/blender/windowmanager/intern/wm_init_exit.c
    branches/render25/source/creator/CMakeLists.txt
    branches/render25/source/creator/creator.c
    branches/render25/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
    branches/render25/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp
    branches/render25/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h
    branches/render25/source/gameengine/GameLogic/SCA_MouseManager.cpp
    branches/render25/source/gameengine/GameLogic/SCA_MouseManager.h
    branches/render25/source/gameengine/GameLogic/SCA_PythonMouse.cpp
    branches/render25/source/gameengine/GamePlayer/common/unix/GPU_Engine.h
    branches/render25/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
    branches/render25/source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp
    branches/render25/source/gameengine/GamePlayer/ghost/GPG_Canvas.h
    branches/render25/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
    branches/render25/source/gameengine/Ketsji/KX_RayCast.cpp
    branches/render25/source/gameengine/Ketsji/KX_Scene.cpp
    branches/render25/source/gameengine/Ketsji/KX_Scene.h
    branches/render25/source/gameengine/Rasterizer/RAS_ICanvas.h

Modified: branches/render25/intern/audaspace/intern/AUD_C-API.cpp
===================================================================
--- branches/render25/intern/audaspace/intern/AUD_C-API.cpp	2010-04-26 06:35:25 UTC (rev 28425)
+++ branches/render25/intern/audaspace/intern/AUD_C-API.cpp	2010-04-26 07:26:21 UTC (rev 28426)
@@ -84,11 +84,15 @@
 static int AUD_available_devices[4];
 static AUD_I3DDevice* AUD_3ddevice = NULL;
 
-int AUD_init(AUD_DeviceType device, AUD_DeviceSpecs specs, int buffersize)
+void AUD_initOnce()
 {
 #ifdef WITH_FFMPEG
 	av_register_all();
 #endif
+}
+
+int AUD_init(AUD_DeviceType device, AUD_DeviceSpecs specs, int buffersize)
+{
 	AUD_IDevice* dev = NULL;
 
 	if(AUD_device)

Modified: branches/render25/intern/audaspace/intern/AUD_C-API.h
===================================================================
--- branches/render25/intern/audaspace/intern/AUD_C-API.h	2010-04-26 06:35:25 UTC (rev 28425)
+++ branches/render25/intern/audaspace/intern/AUD_C-API.h	2010-04-26 07:26:21 UTC (rev 28426)
@@ -56,6 +56,11 @@
 #endif
 
 /**
+ * Initializes FFMPEG if it is enabled.
+ */
+extern void AUD_initOnce();
+
+/**
  * Initializes an audio device.
  * \param device The device type that should be used.
  * \param specs The audio specification to be used.

Modified: branches/render25/release/scripts/io/export_fbx.py
===================================================================
--- branches/render25/release/scripts/io/export_fbx.py	2010-04-26 06:35:25 UTC (rev 28425)
+++ branches/render25/release/scripts/io/export_fbx.py	2010-04-26 07:26:21 UTC (rev 28426)
@@ -54,50 +54,11 @@
 import math # math.pi
 import shutil # for file copying
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# import Blender
 import bpy
-import mathutils
+from mathutils import Vector, Euler, Matrix, RotationMatrix
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 def copy_file(source, dest):
+    # XXX - remove, can use shutil
     file = open(source, 'rb')
     data = file.read()
     file.close()
@@ -135,7 +96,7 @@
 # I guess FBX uses degrees instead of radians (Arystan).
 # Call this function just before writing to FBX.
 def eulerRadToDeg(eul):
-    ret = mathutils.Euler()
+    ret = Euler()
 
     ret.x = 180 / math.pi * eul[0]
     ret.y = 180 / math.pi * eul[1]
@@ -143,10 +104,10 @@
 
     return ret
 
-mtx4_identity = mathutils.Matrix()
+mtx4_identity = Matrix()
 
 # testing
-mtx_x90		= mathutils.RotationMatrix( math.pi/2, 3, 'X') # used
+mtx_x90		= RotationMatrix( math.pi/2, 3, 'X') # used
 #mtx_x90n	= RotationMatrix(-90, 3, 'x')
 #mtx_y90	= RotationMatrix( 90, 3, 'y')
 #mtx_y90n	= RotationMatrix(-90, 3, 'y')
@@ -154,11 +115,11 @@
 #mtx_z90n	= RotationMatrix(-90, 3, 'z')
 
 #mtx4_x90	= RotationMatrix( 90, 4, 'x')
-mtx4_x90n	= mathutils.RotationMatrix(-math.pi/2, 4, 'X') # used
+mtx4_x90n	= RotationMatrix(-math.pi/2, 4, 'X') # used
 #mtx4_y90	= RotationMatrix( 90, 4, 'y')
-mtx4_y90n	= mathutils.RotationMatrix(-math.pi/2, 4, 'Y') # used
-mtx4_z90	= mathutils.RotationMatrix( math.pi/2, 4, 'Z') # used
-mtx4_z90n	= mathutils.RotationMatrix(-math.pi/2, 4, 'Z') # used
+mtx4_y90n	= RotationMatrix(-math.pi/2, 4, 'Y') # used
+mtx4_z90	= RotationMatrix( math.pi/2, 4, 'Z') # used
+mtx4_z90n	= RotationMatrix(-math.pi/2, 4, 'Z') # used
 
 # def strip_path(p):
 # 	return p.split('\\')[-1].split('/')[-1]
@@ -333,7 +294,7 @@
         EXP_CAMERA =				True,
         EXP_EMPTY =					True,
         EXP_IMAGE_COPY =			False,
-        GLOBAL_MATRIX =				mathutils.Matrix(),
+        GLOBAL_MATRIX =				Matrix(),
         ANIM_ENABLE =				True,
         ANIM_OPTIMIZE =				True,
         ANIM_OPTIMIZE_PRECISSION =	6,
@@ -600,8 +561,8 @@
                 matrix_rot = matrix_rot * mtx_x90
             elif type =='CAMERA':
 # 			elif ob and type =='Camera':
-                y = matrix_rot * mathutils.Vector(0,1,0)
-                matrix_rot = mathutils.RotationMatrix(math.pi/2, 3, y) * matrix_rot
+                y = matrix_rot * Vector((0.0, 1.0, 0.0))
+                matrix_rot = RotationMatrix(math.pi/2, 3, y) * matrix_rot
 
             return matrix_rot
 
@@ -702,8 +663,8 @@
                     matrix_rot = matrix_rot * mtx_x90
                     rot = tuple(matrix_rot.to_euler())
                 elif ob and ob.type =='Camera':
-                    y = matrix_rot * mathutils.Vector(0,1,0)
-                    matrix_rot = mathutils.RotationMatrix(math.pi/2, 3, y) * matrix_rot
+                    y = matrix_rot * Vector((0.0, 1.0, 0.0))
+                    matrix_rot = RotationMatrix(math.pi/2, 3, y) * matrix_rot
                     rot = tuple(matrix_rot.to_euler())
                 else:
                     rot = tuple(matrix_rot.to_euler())
@@ -1088,8 +1049,8 @@
         file.write('\n\t\tTypeFlags: "Camera"')
         file.write('\n\t\tGeometryVersion: 124')
         file.write('\n\t\tPosition: %.6f,%.6f,%.6f' % loc)
-        file.write('\n\t\tUp: %.6f,%.6f,%.6f' % tuple(matrix_rot * mathutils.Vector(0,1,0)) )
-        file.write('\n\t\tLookAt: %.6f,%.6f,%.6f' % tuple(matrix_rot * mathutils.Vector(0,0,-1)) )
+        file.write('\n\t\tUp: %.6f,%.6f,%.6f' % tuple(matrix_rot * Vector((0.0, 1.0, 0.0))))
+        file.write('\n\t\tLookAt: %.6f,%.6f,%.6f' % tuple(matrix_rot * Vector((0.0, 0.0, -1.0))))
 
         #file.write('\n\t\tUp: 0,0,0' )
         #file.write('\n\t\tLookAt: 0,0,0' )

Modified: branches/render25/release/scripts/io/import_anim_bvh.py
===================================================================
--- branches/render25/release/scripts/io/import_anim_bvh.py	2010-04-26 06:35:25 UTC (rev 28425)
+++ branches/render25/release/scripts/io/import_anim_bvh.py	2010-04-26 07:26:21 UTC (rev 28426)
@@ -83,7 +83,7 @@
 
     # Should work but doesnt!
     '''
-    eul = Euler(x,y,z)
+    eul = Euler((x, y, z))
     eul.order = "XYZ"[rot_order[0]] + "XYZ"[rot_order[1]] + "XYZ"[rot_order[2]]
     return tuple(eul.to_matrix().to_euler())
     '''
@@ -136,7 +136,7 @@
             #print '%snode: %s, parent: %s' % (len(bvh_nodes_serial) * '  ', name,  bvh_nodes_serial[-1])
 
             lineIdx += 2 # Incriment to the next line (Offset)
-            rest_head_local = Vector(float(file_lines[lineIdx][1]), float(file_lines[lineIdx][2]), float(file_lines[lineIdx][3])) * GLOBAL_SCALE
+            rest_head_local = Vector((float(file_lines[lineIdx][1]), float(file_lines[lineIdx][2]), float(file_lines[lineIdx][3]))) * GLOBAL_SCALE
             lineIdx += 1 # Incriment to the next line (Channels)
 
             # newChannel[Xposition, Yposition, Zposition, Xrotation, Yrotation, Zrotation]
@@ -188,7 +188,7 @@
         # Account for an end node
         if file_lines[lineIdx][0].lower() == 'end' and file_lines[lineIdx][1].lower() == 'site': # There is somtimes a name after 'End Site' but we will ignore it.
             lineIdx += 2 # Incriment to the next line (Offset)
-            rest_tail = Vector(float(file_lines[lineIdx][1]), float(file_lines[lineIdx][2]), float(file_lines[lineIdx][3])) * GLOBAL_SCALE
+            rest_tail = Vector((float(file_lines[lineIdx][1]), float(file_lines[lineIdx][2]), float(file_lines[lineIdx][3]))) * GLOBAL_SCALE
 
             bvh_nodes_serial[-1].rest_tail_world = bvh_nodes_serial[-1].rest_head_world + rest_tail
             bvh_nodes_serial[-1].rest_tail_local = bvh_nodes_serial[-1].rest_head_local + rest_tail
@@ -267,8 +267,8 @@
                 #	raise 'error, bvh node has no end and no children. bad file'
 
                 # Removed temp for now
-                rest_tail_world = Vector(0.0, 0.0, 0.0)
-                rest_tail_local = Vector(0.0, 0.0, 0.0)
+                rest_tail_world = Vector((0.0, 0.0, 0.0))
+                rest_tail_local = Vector((0.0, 0.0, 0.0))
                 for bvh_node_child in bvh_node.children:
                     rest_tail_world += bvh_node_child.rest_head_world
                     rest_tail_local += bvh_node_child.rest_head_local
@@ -328,7 +328,7 @@
             lx, ly, lz, rx, ry, rz = bvh_node.anim_data[frame_current]
 
             rest_head_local = bvh_node.rest_head_local
-            bvh_node.temp.loc = rest_head_local + Vector(lx, ly, lz)
+            bvh_node.temp.loc = rest_head_local + Vector((lx, ly, lz))
 
             bvh_node.temp.rot = rx, ry, rz
 
@@ -531,7 +531,7 @@
                     prev_euler[i] = euler
 
             if bvh_node.has_loc:
-                pose_bone.location = (bone_rest_matrix_inv * TranslationMatrix(Vector(lx, ly, lz) - bvh_node.rest_head_local)).translation_part()
+                pose_bone.location = (bone_rest_matrix_inv * TranslationMatrix(Vector((lx, ly, lz)) - bvh_node.rest_head_local)).translation_part()
 
             if bvh_node.has_loc:
                 pose_bone.keyframe_insert("location")

Modified: branches/render25/release/scripts/modules/bpy_types.py
===================================================================
--- branches/render25/release/scripts/modules/bpy_types.py	2010-04-26 06:35:25 UTC (rev 28425)
+++ branches/render25/release/scripts/modules/bpy_types.py	2010-04-26 07:26:21 UTC (rev 28426)
@@ -95,19 +95,19 @@
     def x_axis(self):
         """ Vector pointing down the x-axis of the bone.
         """
-        return self.matrix.rotation_part() * Vector(1.0, 0.0, 0.0)
+        return self.matrix.rotation_part() * Vector((1.0, 0.0, 0.0))
 
     @property
     def y_axis(self):
         """ Vector pointing down the x-axis of the bone.
         """
-        return self.matrix.rotation_part() * Vector(0.0, 1.0, 0.0)
+        return self.matrix.rotation_part() * Vector((0.0, 1.0, 0.0))
 
     @property
     def z_axis(self):
         """ Vector pointing down the x-axis of the bone.
         """
-        return self.matrix.rotation_part() * Vector(0.0, 0.0, 1.0)
+        return self.matrix.rotation_part() * Vector((0.0, 0.0, 1.0))
 
     @property
     def basename(self):
@@ -237,7 +237,7 @@
         Expects a 4x4 or 3x3 matrix.
         """
         from mathutils import Vector
-        z_vec = self.matrix.rotation_part() * Vector(0.0, 0.0, 1.0)
+        z_vec = self.matrix.rotation_part() * Vector((0.0, 0.0, 1.0))
         self.tail = matrix * self.tail
         self.head = matrix * self.head
         scalar = matrix.median_scale

Modified: branches/render25/release/scripts/modules/console/complete_import.py
===================================================================
--- branches/render25/release/scripts/modules/console/complete_import.py	2010-04-26 06:35:25 UTC (rev 28425)

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list