From: <au...@us...> - 2011-03-30 02:06:19
|
Revision: 8113 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=8113&view=rev Author: auria Date: 2011-03-30 02:06:13 +0000 (Wed, 30 Mar 2011) Log Message: ----------- More work on B3D exporter for 2.5 (still working in the dark with regard to animations) Modified Paths: -------------- media/trunk/B3DExport_2.5.py Modified: media/trunk/B3DExport_2.5.py =================================================================== --- media/trunk/B3DExport_2.5.py 2011-03-30 01:25:26 UTC (rev 8112) +++ media/trunk/B3DExport_2.5.py 2011-03-30 02:06:13 UTC (rev 8113) @@ -594,6 +594,7 @@ par_matrix = matrix.to_4x4() * arm_matrix bone_stack.append([par_matrix,parent,bone]) + print("Bone Stack : adding",[par_matrix,parent,bone]) if bone.children: for child in bone.children: read_armature(arm_matrix,child,bone) @@ -959,8 +960,17 @@ mesh_stack[ivert][4][0].append([face.index,[0.0,0.0]]) #mesh_stack[vert.index][5].append(vert_influ) - mesh_stack[ivert][5].append(data.vertices[vert].bevel_weight) + for vg in obj.vertex_groups: + w = 0.0 + print("Getting weigth for",ivert,"in",vg.name) + try: + w = vg.weight(ivert) + except: + pass + mesh_stack[ivert][5].append((vg.name, w)) + #print("mesh_stack[ivert][5] =",mesh_stack[ivert][5]) + #if data.vertexUV and not data.faceUV: # mesh_stack[vert.index][4][0].append([face.index,vert.uvco[0]]) #if not data.vertexUV and not data.faceUV: @@ -1238,6 +1248,8 @@ for ivert in range(len(mesh_stack)): for iuv in range(len(mesh_stack[ivert][4][0])): for vert_influ in mesh_stack[ivert][5]: + #print("bone_stack[ibone] =", bone_stack[ibone]) + #print("vert_influ =",vert_influ) if bone_stack[ibone][2].name == vert_influ[0]: if DEBUG: print(" <bone name=",bone_stack[ibone][2].name,"face_vertex_id=", mesh_stack[ivert][0] + iuv, " weigth=", vert_influ[1] , "/>") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |