[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30029] branches/soc-2010-jwilkins: * more fixing problems caused by past bad merges

Jason Wilkins Jason.A.Wilkins at gmail.com
Tue Jul 6 13:34:20 CEST 2010


Revision: 30029
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30029
Author:   jwilkins
Date:     2010-07-06 13:34:20 +0200 (Tue, 06 Jul 2010)

Log Message:
-----------
* more fixing problems caused by past bad merges

Modified Paths:
--------------
    branches/soc-2010-jwilkins/release/scripts/io/engine_render_pov.py
    branches/soc-2010-jwilkins/release/scripts/io/export_3ds.py
    branches/soc-2010-jwilkins/release/scripts/io/export_fbx.py
    branches/soc-2010-jwilkins/release/scripts/io/export_mdd.py
    branches/soc-2010-jwilkins/release/scripts/io/export_obj.py
    branches/soc-2010-jwilkins/release/scripts/io/export_ply.py
    branches/soc-2010-jwilkins/release/scripts/io/export_x3d.py
    branches/soc-2010-jwilkins/release/scripts/io/import_scene_3ds.py
    branches/soc-2010-jwilkins/release/scripts/ui/properties_data_curve.py
    branches/soc-2010-jwilkins/release/scripts/ui/properties_object_constraint.py
    branches/soc-2010-jwilkins/release/scripts/ui/space_view3d.py
    branches/soc-2010-jwilkins/source/blender/blenkernel/intern/blender.c
    branches/soc-2010-jwilkins/source/blender/editors/space_file/file_ops.c

Property Changed:
----------------
    branches/soc-2010-jwilkins/release/scripts/io/import_scene_3ds.py
    branches/soc-2010-jwilkins/release/scripts/modules/blend_render_info.py
    branches/soc-2010-jwilkins/release/scripts/ui/properties_data_curve.py
    branches/soc-2010-jwilkins/release/scripts/ui/properties_object_constraint.py
    branches/soc-2010-jwilkins/release/scripts/ui/properties_physics_common.py

Modified: branches/soc-2010-jwilkins/release/scripts/io/engine_render_pov.py
===================================================================
--- branches/soc-2010-jwilkins/release/scripts/io/engine_render_pov.py	2010-07-06 11:14:51 UTC (rev 30028)
+++ branches/soc-2010-jwilkins/release/scripts/io/engine_render_pov.py	2010-07-06 11:34:20 UTC (rev 30029)
@@ -134,7 +134,7 @@
 
     def exportCamera():
         camera = scene.camera
-        matrix = camera.matrix
+        matrix = camera.matrix_world
 
         # compute resolution
         Qsize = float(render.resolution_x) / float(render.resolution_y)
@@ -155,7 +155,7 @@
         for ob in lamps:
             lamp = ob.data
 
-            matrix = ob.matrix
+            matrix = ob.matrix_world
 
             color = tuple([c * lamp.energy for c in lamp.color]) # Colour is modified by energy
 
@@ -263,7 +263,7 @@
 
             writeObjectMaterial(material)
 
-            writeMatrix(ob.matrix)
+            writeMatrix(ob.matrix_world)
 
             file.write('}\n')
 
@@ -292,7 +292,7 @@
             #	continue
             # me = ob.data
 
-            matrix = ob.matrix
+            matrix = ob.matrix_world
             try:
                 uv_layer = me.active_uv_texture.data
             except:

Modified: branches/soc-2010-jwilkins/release/scripts/io/export_3ds.py
===================================================================
--- branches/soc-2010-jwilkins/release/scripts/io/export_3ds.py	2010-07-06 11:14:51 UTC (rev 30028)
+++ branches/soc-2010-jwilkins/release/scripts/io/export_3ds.py	2010-07-06 11:34:20 UTC (rev 30029)
@@ -82,7 +82,7 @@
         ob.create_dupli_list(scene)
         return True, [(dob.object, dob.matrix) for dob in ob.dupli_list]
     else:
-        return False, [(ob, ob.matrix)]
+        return False, [(ob, ob.matrix_world)]
 
 # also used by X3D exporter
 def free_derived_objects(ob):

Modified: branches/soc-2010-jwilkins/release/scripts/io/export_fbx.py
===================================================================
--- branches/soc-2010-jwilkins/release/scripts/io/export_fbx.py	2010-07-06 11:14:51 UTC (rev 30028)
+++ branches/soc-2010-jwilkins/release/scripts/io/export_fbx.py	2010-07-06 11:34:20 UTC (rev 30029)
@@ -528,7 +528,7 @@
             self.fbxGroupNames = []
             self.fbxParent = None # set later on IF the parent is in the selection.
             if matrixWorld:		self.matrixWorld = GLOBAL_MATRIX * matrixWorld
-            else:				self.matrixWorld = GLOBAL_MATRIX * ob.matrix
+            else:				self.matrixWorld = GLOBAL_MATRIX * ob.matrix_world
 # 			else:				self.matrixWorld = ob.matrixWorld * GLOBAL_MATRIX
             self.__anim_poselist = {} # we should only access this
 
@@ -539,8 +539,7 @@
                 return self.matrixWorld
 
         def setPoseFrame(self, f):
-            self.__anim_poselist[f] =  self.blenObject.matrix.copy()
-# 			self.__anim_poselist[f] =  self.blenObject.matrixWorld.copy()
+            self.__anim_poselist[f] =  self.blenObject.matrix_world.copy()
 
         def getAnimParRelMatrix(self, frame):
             if self.fbxParent:
@@ -646,7 +645,7 @@
 
         else:
             # This is bad because we need the parent relative matrix from the fbx parent (if we have one), dont use anymore
-            #if ob and not matrix: matrix = ob.matrixWorld * GLOBAL_MATRIX
+            #if ob and not matrix: matrix = ob.matrix_world * GLOBAL_MATRIX
             if ob and not matrix: raise Exception("error: this should never happen!")
 
             matrix_rot = matrix
@@ -2025,7 +2024,7 @@
         if ob_base.parent and ob_base.parent.dupli_type != 'NONE':
             continue
 
-        obs = [(ob_base, ob_base.matrix)]
+        obs = [(ob_base, ob_base.matrix_world)]
         if ob_base.dupli_type != 'NONE':
             ob_base.create_dupli_list(scene)
             obs = [(dob.object, dob.matrix) for dob in ob_base.dupli_list]

Modified: branches/soc-2010-jwilkins/release/scripts/io/export_mdd.py
===================================================================
--- branches/soc-2010-jwilkins/release/scripts/io/export_mdd.py	2010-07-06 11:14:51 UTC (rev 30028)
+++ branches/soc-2010-jwilkins/release/scripts/io/export_mdd.py	2010-07-06 11:34:20 UTC (rev 30029)
@@ -113,7 +113,7 @@
     """
 
     check_vertcount(me, numverts)
-    me.transform(mat_flip * ob.matrix)
+    me.transform(mat_flip * ob.matrix_world)
     f.write(pack(">%df" % (numverts * 3), *[axis for v in me.verts for axis in v.co]))
 
     for frame in range(PREF_STARTFRAME, PREF_ENDFRAME + 1):#in order to start at desired frame
@@ -125,7 +125,7 @@
         sce.set_frame(frame)
         me = ob.create_mesh(sce, True, 'PREVIEW')
         check_vertcount(me, numverts)
-        me.transform(mat_flip * ob.matrix)
+        me.transform(mat_flip * ob.matrix_world)
 
         # Write the vertex data
         f.write(pack(">%df" % (numverts * 3), *[axis for v in me.verts for axis in v.co]))

Modified: branches/soc-2010-jwilkins/release/scripts/io/export_obj.py
===================================================================
--- branches/soc-2010-jwilkins/release/scripts/io/export_obj.py	2010-07-06 11:14:51 UTC (rev 30028)
+++ branches/soc-2010-jwilkins/release/scripts/io/export_obj.py	2010-07-06 11:34:20 UTC (rev 30029)
@@ -403,7 +403,7 @@
             # XXX debug print
             print(ob_main.name, 'has', len(obs), 'dupli children')
         else:
-            obs = [(ob_main, ob_main.matrix)]
+            obs = [(ob_main, ob_main.matrix_world)]
 
         for ob, ob_mat in obs:
 

Modified: branches/soc-2010-jwilkins/release/scripts/io/export_ply.py
===================================================================
--- branches/soc-2010-jwilkins/release/scripts/io/export_ply.py	2010-07-06 11:14:51 UTC (rev 30028)
+++ branches/soc-2010-jwilkins/release/scripts/io/export_ply.py	2010-07-06 11:34:20 UTC (rev 30029)
@@ -111,7 +111,7 @@
         raise ("Error, could not get mesh data from active object")
         return
 
-    # mesh.transform(ob.matrixWorld) # XXX
+    # mesh.transform(ob.matrix_world) # XXX
 
     faceUV = (len(mesh.uv_textures) > 0)
     vertexUV = (len(mesh.sticky) > 0)

Modified: branches/soc-2010-jwilkins/release/scripts/io/export_x3d.py
===================================================================
--- branches/soc-2010-jwilkins/release/scripts/io/export_x3d.py	2010-07-06 11:14:51 UTC (rev 30028)
+++ branches/soc-2010-jwilkins/release/scripts/io/export_x3d.py	2010-07-06 11:34:20 UTC (rev 30029)
@@ -237,7 +237,7 @@
         lens = min(lens, math.pi)
 
         # get the camera location, subtract 90 degress from X to orient like X3D does
-        # mat = ob.matrixWorld - mat is now passed!
+        # mat = ob.matrix_world - mat is now passed!
 
         loc = self.rotatePointForVRML(mat.translation_part())
         rot = mat.to_euler()
@@ -300,7 +300,7 @@
         # note -dz seems to equal om[3][1]
         # note  dy seems to equal om[3][2]
 
-        #location=(ob.matrixWorld*MATWORLD).translation_part() # now passed
+        #location=(ob.matrix_world*MATWORLD).translation_part() # now passed
         location=(mtx*MATWORLD).translation_part()
 
         radius = lamp.distance*math.cos(beamWidth)
@@ -346,7 +346,7 @@
             ambi = 0
             ambientIntensity = 0
 
-        # location=(ob.matrixWorld*MATWORLD).translation_part() # now passed
+        # location=(ob.matrix_world*MATWORLD).translation_part() # now passed
         location= (mtx*MATWORLD).translation_part()
 
         self.file.write("<PointLight DEF=\"%s\" " % safeName)
@@ -364,7 +364,7 @@
             return
         else:
             dx,dy,dz = self.computeDirection(mtx)
-            # location=(ob.matrixWorld*MATWORLD).translation_part()
+            # location=(ob.matrix_world*MATWORLD).translation_part()
             location=(mtx*MATWORLD).translation_part()
             self.writeIndented("<%s\n" % obname,1)
             self.writeIndented("direction=\"%s %s %s\"\n" % (round(dx,3),round(dy,3),round(dz,3)))
@@ -445,7 +445,7 @@
         else:
             bTwoSided=0
 
-        # mtx = ob.matrixWorld * MATWORLD # mtx is now passed
+        # mtx = ob.matrix_world * MATWORLD # mtx is now passed
         mtx = mtx * MATWORLD
 
         loc= mtx.translation_part()
@@ -601,7 +601,7 @@
             self.file.write("\">\n")
         else:
             #-- vertices
-            # mesh.transform(ob.matrixWorld)
+            # mesh.transform(ob.matrix_world)
             self.writeIndented("<Coordinate DEF=\"%s%s\" \n" % ("coord_",meshName), 1)
             self.file.write("\t\t\t\tpoint=\"")
             for v in mesh.verts:

Modified: branches/soc-2010-jwilkins/release/scripts/io/import_scene_3ds.py
===================================================================
--- branches/soc-2010-jwilkins/release/scripts/io/import_scene_3ds.py	2010-07-06 11:14:51 UTC (rev 30028)
+++ branches/soc-2010-jwilkins/release/scripts/io/import_scene_3ds.py	2010-07-06 11:34:20 UTC (rev 30029)
@@ -427,9 +427,7 @@
             '''
 
             if contextMatrix_rot:
-                # ob.matrix = [x for row in contextMatrix_rot for x in row]
-                ob.matrix = contextMatrix_rot
-# 				ob.setMatrix(contextMatrix_rot)
+                ob.matrix_world = contextMatrix_rot
 
             importedObjects.append(ob)
             bmesh.update()
@@ -892,7 +890,7 @@
 # 			me = ob.getData(mesh=1)
 # 			me.verts.delete([me.verts[0],])
 # 			if not APPLY_MATRIX:
-# 				me.transform(ob.matrixWorld.copy().invert())
+# 				me.transform(ob.matrix_world.copy().invert())
 
     # Done DUMMYVERT
     """
@@ -950,7 +948,7 @@
 # 			SCALE_MAT = Blender.mathutils.Matrix([SCALE,0,0,0],[0,SCALE,0,0],[0,0,SCALE,0],[0,0,0,1])
 
             for ob in importedObjects:
-                ob.setMatrix(ob.matrixWorld * SCALE_MAT)
+                ob.matrix_world =  ob.matrix_world * SCALE_MAT
 
         # Done constraining to bounds.
 


Property changes on: branches/soc-2010-jwilkins/release/scripts/io/import_scene_3ds.py
___________________________________________________________________
Name: svn:mergeinfo
   - 


Property changes on: branches/soc-2010-jwilkins/release/scripts/modules/blend_render_info.py
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Modified: branches/soc-2010-jwilkins/release/scripts/ui/properties_data_curve.py

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list