Revised exporter coordinate systems, updated emitter positioning.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4060 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2006-04-26 02:59:55 +00:00
parent 0e27af2af4
commit 01caf5cca6
6 changed files with 19 additions and 9 deletions
+2 -2
View File
@@ -50,7 +50,7 @@ macroScript TRAnimationExporter category:"File" \
-- Writes a single animation frame
fn writeFrame nodes outFile = (
format " <frame>\n" to:outFile
for node in nodes do (
for node in nodes do in coordsys world (
writeTransform node outFile
)
format " </frame>\n\n" to:outFile
@@ -68,7 +68,7 @@ macroScript TRAnimationExporter category:"File" \
) else (
nodes = objects
)
for i = animationRange.start to animationRange.end do at time i (
for t = animationRange.start to animationRange.end do at time t (
writeFrame nodes outFile
)
format "</animation>\n" to:outFile
+3 -3
View File
@@ -68,7 +68,7 @@ macroScript TRModelExporter category:"File" \
if mesh.numtverts > 0 do (
tvface = getTVFace mesh i
)
for i = 1 to 3 do in coordsys local (
for i = 1 to 3 do (
format " <vertex" to:outFile
writePoint3Attr " location" (getVert mesh face[i]) outFile
writePoint3Attr " normal" (getNormal mesh face[i]) outFile
@@ -117,7 +117,7 @@ macroScript TRModelExporter category:"File" \
writeQuatAttr " rotation" (inverse xform.rotationPart) \
outFile
writePoint3Attr " scale" xform.scalePart outFile
if isMesh then (
if isMesh then in coordsys local (
writePoint3Attr " offsetTranslation" node.objectOffsetPos outFile
writeQuatAttr " offsetRotation" node.objectOffsetRot outFile
writePoint3Attr " offsetScale" node.objectOffsetScale outFile
@@ -156,7 +156,7 @@ macroScript TRModelExporter category:"File" \
) else (
nodes = objects
)
for node in nodes do (
for node in nodes do in coordsys world (
writeNode node outFile
)
select oldsel