[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33586] trunk/blender/release/scripts/op/ io_scene_x3d/export_x3d.py: bugfix [#25135] X3D export places scene objects incorrectly in x3d file
Campbell Barton
ideasman42 at gmail.com
Fri Dec 10 07:08:12 CET 2010
Revision: 33586
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33586
Author: campbellbarton
Date: 2010-12-10 07:08:11 +0100 (Fri, 10 Dec 2010)
Log Message:
-----------
bugfix [#25135] X3D export places scene objects incorrectly in x3d file
matrix rotation order issue.
Modified Paths:
--------------
trunk/blender/release/scripts/op/io_scene_x3d/export_x3d.py
Modified: trunk/blender/release/scripts/op/io_scene_x3d/export_x3d.py
===================================================================
--- trunk/blender/release/scripts/op/io_scene_x3d/export_x3d.py 2010-12-10 05:35:06 UTC (rev 33585)
+++ trunk/blender/release/scripts/op/io_scene_x3d/export_x3d.py 2010-12-10 06:08:11 UTC (rev 33586)
@@ -256,7 +256,7 @@
# note dy seems to equal om[3][2]
#location=(ob.matrix_world*MATWORLD).translation_part() # now passed
- location=(mtx*MATWORLD).translation_part()
+ location=(MATWORLD * mtx).translation_part()
radius = lamp.distance*math.cos(beamWidth)
# radius = lamp.dist*math.cos(beamWidth)
@@ -301,8 +301,7 @@
ambi = 0
ambientIntensity = 0
- # location=(ob.matrix_world*MATWORLD).translation_part() # now passed
- location= (mtx*MATWORLD).translation_part()
+ location= (MATWORLD * mtx).translation_part()
self.file.write("<PointLight DEF=\"%s\" " % safeName)
self.file.write("ambientIntensity=\"%s\" " % (round(ambientIntensity,self.cp)))
@@ -319,8 +318,8 @@
return
else:
dx,dy,dz = self.computeDirection(mtx)
- # location=(ob.matrix_world*MATWORLD).translation_part()
- location=(mtx*MATWORLD).translation_part()
+ # location=(MATWORLD * ob.matrix_world).translation_part()
+ location=(MATWORLD * mtx).translation_part()
self.writeIndented("<%s\n" % obname,1)
self.writeIndented("direction=\"%s %s %s\"\n" % (round(dx,3),round(dy,3),round(dz,3)))
self.writeIndented("location=\"%s %s %s\"\n" % (round(location[0],3), round(location[1],3), round(location[2],3)))
@@ -396,8 +395,7 @@
else:
bTwoSided=0
- # mtx = ob.matrix_world * MATWORLD # mtx is now passed
- mtx = mtx * MATWORLD
+ mtx = MATWORLD * mtx
loc= mtx.translation_part()
sca= mtx.scale_part()
@@ -985,7 +983,7 @@
def computeDirection(self, mtx):
x,y,z=(0,-1.0,0) # point down
- ax,ay,az = (mtx*MATWORLD).to_euler()
+ ax,ay,az = (MATWORLD * mtx).to_euler()
# ax *= DEG2RAD
# ay *= DEG2RAD
More information about the Bf-blender-cvs
mailing list