[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11648] branches/soc-2007-red_fox: Merge 11522:11646 from /trunk/blender
Levi Schooley
redfox at hhofministries.org
Sat Aug 18 04:44:57 CEST 2007
Revision: 11648
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11648
Author: red_fox
Date: 2007-08-18 04:44:52 +0200 (Sat, 18 Aug 2007)
Log Message:
-----------
Merge 11522:11646 from /trunk/blender
Just my weekly sync with /trunk/blender.
Levi
Modified Paths:
--------------
branches/soc-2007-red_fox/SConstruct
branches/soc-2007-red_fox/doc/blender-scons.txt
branches/soc-2007-red_fox/intern/ghost/intern/GHOST_DisplayManager.cpp
branches/soc-2007-red_fox/release/scripts/bpymodules/BPyMesh.py
branches/soc-2007-red_fox/release/scripts/export_fbx.py
branches/soc-2007-red_fox/source/blender/blenkernel/BKE_constraint.h
branches/soc-2007-red_fox/source/blender/blenkernel/BKE_deform.h
branches/soc-2007-red_fox/source/blender/blenkernel/intern/constraint.c
branches/soc-2007-red_fox/source/blender/blenkernel/intern/deform.c
branches/soc-2007-red_fox/source/blender/blenkernel/intern/ipo.c
branches/soc-2007-red_fox/source/blender/blenloader/intern/readfile.c
branches/soc-2007-red_fox/source/blender/include/BIF_editarmature.h
branches/soc-2007-red_fox/source/blender/include/BIF_transform.h
branches/soc-2007-red_fox/source/blender/include/BSE_editipo.h
branches/soc-2007-red_fox/source/blender/include/BSE_node.h
branches/soc-2007-red_fox/source/blender/include/transform.h
branches/soc-2007-red_fox/source/blender/makesdna/DNA_action_types.h
branches/soc-2007-red_fox/source/blender/python/api2_2x/Bone.c
branches/soc-2007-red_fox/source/blender/python/api2_2x/Material.c
branches/soc-2007-red_fox/source/blender/python/api2_2x/Mesh.c
branches/soc-2007-red_fox/source/blender/python/api2_2x/Object.c
branches/soc-2007-red_fox/source/blender/python/api2_2x/rgbTuple.c
branches/soc-2007-red_fox/source/blender/src/buttons_object.c
branches/soc-2007-red_fox/source/blender/src/drawaction.c
branches/soc-2007-red_fox/source/blender/src/drawipo.c
branches/soc-2007-red_fox/source/blender/src/drawview.c
branches/soc-2007-red_fox/source/blender/src/editaction.c
branches/soc-2007-red_fox/source/blender/src/editarmature.c
branches/soc-2007-red_fox/source/blender/src/editconstraint.c
branches/soc-2007-red_fox/source/blender/src/editipo.c
branches/soc-2007-red_fox/source/blender/src/editipo_lib.c
branches/soc-2007-red_fox/source/blender/src/editipo_mods.c
branches/soc-2007-red_fox/source/blender/src/editmesh_mods.c
branches/soc-2007-red_fox/source/blender/src/editnode.c
branches/soc-2007-red_fox/source/blender/src/editscreen.c
branches/soc-2007-red_fox/source/blender/src/edittime.c
branches/soc-2007-red_fox/source/blender/src/header_action.c
branches/soc-2007-red_fox/source/blender/src/header_info.c
branches/soc-2007-red_fox/source/blender/src/header_view3d.c
branches/soc-2007-red_fox/source/blender/src/headerbuttons.c
branches/soc-2007-red_fox/source/blender/src/multires.c
branches/soc-2007-red_fox/source/blender/src/outliner.c
branches/soc-2007-red_fox/source/blender/src/space.c
branches/soc-2007-red_fox/source/blender/src/toolbox.c
branches/soc-2007-red_fox/source/blender/src/transform.c
branches/soc-2007-red_fox/source/blender/src/transform_conversions.c
branches/soc-2007-red_fox/source/blender/src/transform_generics.c
branches/soc-2007-red_fox/source/creator/creator.c
branches/soc-2007-red_fox/tools/Blender.py
branches/soc-2007-red_fox/tools/btools.py
Added Paths:
-----------
branches/soc-2007-red_fox/release/scripts/weightpaint_average.py
Modified: branches/soc-2007-red_fox/SConstruct
===================================================================
--- branches/soc-2007-red_fox/SConstruct 2007-08-18 01:33:57 UTC (rev 11647)
+++ branches/soc-2007-red_fox/SConstruct 2007-08-18 02:44:52 UTC (rev 11648)
@@ -429,8 +429,10 @@
Depends(nsiscmd, allinstall)
Default(B.program_list)
-Default(installtarget)
+if not env['WITHOUT_BF_INSTALL']:
+ Default(installtarget)
+
#------------ RELEASE
# TODO: zipup the installation
Modified: branches/soc-2007-red_fox/doc/blender-scons.txt
===================================================================
--- branches/soc-2007-red_fox/doc/blender-scons.txt 2007-08-18 01:33:57 UTC (rev 11647)
+++ branches/soc-2007-red_fox/doc/blender-scons.txt 2007-08-18 02:44:52 UTC (rev 11648)
@@ -160,6 +160,17 @@
for example, setting BF_QUICKDEBUG won't overwrite the contents of BF_DEBUG_LIBS.
+ Not installing
+ --------------
+
+ If you dont want to install the build result, you can use the following option either
+ on the commandline or in your user-config.py :
+
+ WITHOUT_BF_INSTALL='true'
+
+ by default, this is set to 'false', and so the build is installed
+
+
Supported toolset
-----------------
Modified: branches/soc-2007-red_fox/intern/ghost/intern/GHOST_DisplayManager.cpp
===================================================================
--- branches/soc-2007-red_fox/intern/ghost/intern/GHOST_DisplayManager.cpp 2007-08-18 01:33:57 UTC (rev 11647)
+++ branches/soc-2007-red_fox/intern/ghost/intern/GHOST_DisplayManager.cpp 2007-08-18 02:44:52 UTC (rev 11648)
@@ -116,7 +116,7 @@
GHOST_TUns8 numDisplays;
success = getNumDisplays(numDisplays);
if (success == GHOST_kSuccess) {
- if (display < numDisplays && index < m_settings[display].size()) {
+ if (display < numDisplays && ((GHOST_TUns8)index < m_settings[display].size())) {
setting = m_settings[display][index];
}
else {
Modified: branches/soc-2007-red_fox/release/scripts/bpymodules/BPyMesh.py
===================================================================
--- branches/soc-2007-red_fox/release/scripts/bpymodules/BPyMesh.py 2007-08-18 01:33:57 UTC (rev 11647)
+++ branches/soc-2007-red_fox/release/scripts/bpymodules/BPyMesh.py 2007-08-18 02:44:52 UTC (rev 11648)
@@ -56,7 +56,7 @@
if not len_groupNames:
# no verts? return a vert aligned empty list
- return [[] for i in xrange(len(me.verts))]
+ return [[] for i in xrange(len(me.verts))], []
else:
vWeightList= [[0.0]*len_groupNames for i in xrange(len(me.verts))]
Modified: branches/soc-2007-red_fox/release/scripts/export_fbx.py
===================================================================
--- branches/soc-2007-red_fox/release/scripts/export_fbx.py 2007-08-18 01:33:57 UTC (rev 11647)
+++ branches/soc-2007-red_fox/release/scripts/export_fbx.py 2007-08-18 02:44:52 UTC (rev 11648)
@@ -48,10 +48,180 @@
import BPyMessages
import time
from math import degrees, atan, pi
-from Blender.Mathutils import Matrix, Vector, Euler, RotationMatrix
+from Blender.Mathutils import Matrix, Vector, Euler, RotationMatrix, TranslationMatrix
+mtx_z90 = RotationMatrix(90, 3, 'z')
+mtx_x90 = RotationMatrix(90, 3, 'x')
+# testing
+mtx_x90 = RotationMatrix( 90, 3, 'x')
+mtx_x90n = RotationMatrix(-90, 3, 'x')
+mtx_y90 = RotationMatrix( 90, 3, 'y')
+mtx_y90n = RotationMatrix(-90, 3, 'y')
+mtx_z90 = RotationMatrix( 90, 3, 'z')
+mtx_z90n = RotationMatrix(-90, 3, 'z')
+
+
+mtx4_x90 = RotationMatrix( 90, 4, 'x')
+mtx4_x90n = RotationMatrix(-90, 4, 'x')
+mtx4_y90 = RotationMatrix( 90, 4, 'y')
+mtx4_y90n = RotationMatrix(-90, 4, 'y')
+mtx4_z90 = RotationMatrix( 90, 4, 'z')
+mtx4_z90n = RotationMatrix(-90, 4, 'z')
+
+XVEC = Vector(1, 0, 0)
+XVECN = Vector(-1, 0, 0)
+YVEC = Vector(0, 1, 0)
+YVECN = Vector(0, -1, 0)
+ZVEC = Vector(0, 0, 1)
+ZVECN = Vector(0, 0, -1)
+
+# Used to add the scene name into the filename without using odd chars
+
+sane_name_mapping_ob = {}
+sane_name_mapping_mat = {}
+sane_name_mapping_tex = {}
+
+def strip_path(p):
+ return p.split('\\')[-1].split('/')[-1]
+
+# todo - Disallow the name 'Scene' and 'blend_root' - it will bugger things up.
+def sane_name(data, dct):
+ if not data: return None
+ name = data.name
+ try: return dct[name]
+ except: pass
+
+ orig_name = name
+ name = BPySys.cleanName(name)
+ dct[orig_name] = name
+ return name
+
+def sane_obname(data): return sane_name(data, sane_name_mapping_ob)
+def sane_matname(data): return sane_name(data, sane_name_mapping_mat)
+def sane_texname(data): return sane_name(data, sane_name_mapping_tex)
+
+
+# storage classes
+class my_bone_class:
+ def __init__(self, blenBone, blenArmature, blenMesh, fbxObName):
+ self.blenName = blenBone.name
+ self.blenBone = blenBone
+ self.blenBoneParent = blenBone.parent
+ self.blenMesh = blenMesh
+ self.blenArmature = blenArmature
+ self.restMatrix = blenBone.matrix['ARMATURESPACE']
+ self.restMatrixInv = self.restMatrix.copy().invert()
+ self.restMatrixLocal = None # set later, need parent matrix
+ self.parent = None
+ self.fbxName = sane_obname(blenBone)
+ self.fbxObName = fbxObName
+
+ # not public
+ pose = blenArmature.getPose()
+ self.__pose_bone = pose.bones[self.blenName]
+ self.__bone_parent = blenBone.parent
+ self.__anim_poselist = {} # store a list if matricies here, (poseMatrix, head, tail)
+
+ def calcRestMatrixLocal(self):
+ if self.parent:
+ self.restMatrixLocal = self.restMatrix * self.parent.restMatrix.copy().invert()
+ else:
+ self.restMatrixLocal = self.restMatrix.copy()
+
+ def setPoseFrame(self, f):
+ # cache pose info here, frame must be set beforehand
+ self.__anim_poselist[f] = (\
+ self.__pose_bone.poseMatrix.copy(),\
+ self.__pose_bone.head.copy(),\
+ self.__pose_bone.tail.copy() )
+
+ # get pose from frame.
+ def getPoseMatrix(self, f):
+ #return mtx4_z90 * self.__pose_bone.poseMatrix
+ #return self.__pose_bone.poseMatrix.copy()
+ return self.__anim_poselist[f][0].copy()
+ def getPoseHead(self, f):
+ #return self.__pose_bone.head.copy()
+ return self.__anim_poselist[f][1].copy()
+ def getPoseTail(self, f):
+ #return self.__pose_bone.tail.copy()
+ return self.__anim_poselist[f][2].copy()
+ # end
+
+ def getPoseMatrixLocal(self, frame):
+ if self.parent:
+ return self.getPoseMatrix(frame) * self.parent.getPoseMatrix(frame).invert()
+ else:
+ return self.getPoseMatrix(frame)
+ #return mtx4_z90 * mat
+
+ def getPoseMatrixLocalTip(self):
+ #print "ASAS"
+ if self.parent:
+
+ vec = self.parent.getPoseTail(frame) - self.parent.getPoseHead(frame)
+ #vec = self.parent.getPoseHead(frame) - self.parent.getPoseTail(frame)
+ mat = TranslationMatrix(vec) * self.parent.getPoseMatrix(frame)
+ #mat = self.parent.getPoseMatrix() * TranslationMatrix(vec).invert()
+ #print " ASAS"
+ return mat * self.getPoseMatrix(frame)
+ else:
+ return self.getPoseMatrix(frame)
+
+ def getPoseMatrixLocal_RestRelative(self, frame):
+
+ matrix= self.getPoseMatrix(frame)
+ rest_matrix = self.restMatrix.copy()
+
+ if self.parent:
+ matrix= matrix * self.parent.getPoseMatrix(frame).invert()
+ rest_matrix= rest_matrix * self.parent.restMatrixInv
+ rest_matrix = mtx4_x90n * rest_matrix
+ else:
+ rest_matrix = mtx4_z90 * rest_matrix
+
+ # print rest_matrix.toEuler()
+ return matrix * rest_matrix.invert()
+
+ def getSomeMatrix(self, frame):
+ return self.restMatrixLocal * self.getPoseMatrixLocal(frame).invert()
+
+ def getSomeMatrix2(self, frame):
+ return self.getPoseMatrixLocal(frame) * self.restMatrixLocal.copy()
+
+ def getAnimMatrix(self, frame):
+
+ # return mtx4_z90 * self.getPoseMatrix(frame)
+
+ #if not self.parent:
+ # return mtx4_z90 * self.getPoseMatrix()
+
+ #return (mtx4_z90n * self.getPoseMatrixLocal()).invert()
+ #return mtx4_z90n * self.getPoseMatrixLocal_RestRelative()
+ #mod = Euler(90,0,90).toMatrix().resize4x4()
+
+ # Verry good except initial rotations are wrong.
+ # attempt to seperate the rotation and translation
+ #return mtx4_z90 * (mtx4_x90 * (mtx4_y90 * self.getPoseMatrixLocal_RestRelative(frame)))
+ #return mtx4_z90 * (mtx4_y90 * self.getPoseMatrixLocal_RestRelative())
+ #return mtx4_x90 * (mtx4_y90 * ( mtx4_z90 * self.getPoseMatrixLocal_RestRelative(frame)))
+ return mtx4_z90 * self.getPoseMatrixLocal_RestRelative(frame)
+
+ '''
+ mat = self.getPoseMatrixLocal_RestRelative()
+ tx = (mtx4_z90 * (mtx4_x90 * (mtx4_y90 * mat))).translationPart()
+ mat = TranslationMatrix(tx) * mat.rotationPart().resize4x4()
+ return mat
+ '''
+ def getAnimMatrixRot(self, frame):
+ #return self.getPoseMatrixLocal_RestRelative()
+ return self.getAnimMatrix(frame)
+ #return Matrix()
+
+
+
# Change the order rotation is applied.
'''
ROT_ORDER = [\
@@ -83,30 +253,10 @@
-# Used to add the scene name into the filename without using odd chars
-sane_name_mapping_ob = {}
-sane_name_mapping_mat = {}
-sane_name_mapping_tex = {}
-
-def strip_path(p):
- return p.split('\\')[-1].split('/')[-1]
-
-def sane_name(data, dct):
- if not data: return None
- name = data.name
- try: return dct[name]
- except: pass
+def mat4x4str(mat):
+ return '%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f' % tuple([ f for v in mat for f in v ])
- orig_name = name
- name = BPySys.cleanName(name)
- dct[orig_name] = name
- return name
-
-def sane_obname(data): return sane_name(data, sane_name_mapping_ob)
-def sane_matname(data): return sane_name(data, sane_name_mapping_mat)
-def sane_texname(data): return sane_name(data, sane_name_mapping_tex)
-
# May use this later
"""
# Auto class, use for datastorage only, a like a dictionary but with limited slots
@@ -153,45 +303,21 @@
-mtx_z90 = RotationMatrix(90, 3, 'z')
-mtx_x90 = RotationMatrix(90, 3, 'x')
-# testing
-mtx_x90 = RotationMatrix( 90, 3, 'x')
-mtx_x90n = RotationMatrix(-90, 3, 'x')
-mtx_y90 = RotationMatrix( 90, 3, 'y')
-mtx_y90n = RotationMatrix(-90, 3, 'y')
-mtx_z90 = RotationMatrix( 90, 3, 'z')
-mtx_z90n = RotationMatrix(-90, 3, 'z')
-
-
-mtx4_x90 = RotationMatrix( 90, 4, 'x')
-mtx4_x90n = RotationMatrix(-90, 4, 'x')
-mtx4_y90 = RotationMatrix( 90, 4, 'y')
-mtx4_y90n = RotationMatrix(-90, 4, 'y')
-mtx4_z90 = RotationMatrix( 90, 4, 'z')
-mtx4_z90n = RotationMatrix(-90, 4, 'z')
-
-XVEC = Vector(1, 0, 0)
-XVECN = Vector(-1, 0, 0)
-YVEC = Vector(0, 1, 0)
-YVECN = Vector(0, -1, 0)
-ZVEC = Vector(0, 0, 1)
-ZVECN = Vector(0, 0, -1)
-
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list