Attach meshes under nodes so that they can be used as parents.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4055 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2006-04-25 02:26:07 +00:00
parent 918d38a3b1
commit 60591a85ee
3 changed files with 50 additions and 21 deletions
-5
View File
@@ -41,11 +41,6 @@ macroScript TRAnimationExporter category:"File" \
if node.parent != undefined do (
xform = xform * (inverse node.parent.transform)
)
if isKindOf node Editable_Mesh do (
xform = preTranslate xform node.objectOffsetPos
xform = preRotate xform node.objectOffsetRot
xform = preScale xform node.objectOffsetScale
)
writePoint3Attr " translation" xform.translationPart outFile
writeQuatAttr " rotation" (inverse xform.rotationPart) outFile
writePoint3Attr " scale" xform.scalePart outFile
+3 -5
View File
@@ -112,17 +112,15 @@ macroScript TRModelExporter category:"File" \
xform = xform * (inverse node.parent.transform)
format " parent=\"%\"" node.parent.name to:outFile
)
if isMesh do (
xform = preTranslate xform node.objectOffsetPos
xform = preRotate xform node.objectOffsetRot
xform = preScale xform node.objectOffsetScale
)
writePoint3Attr " translation" xform.translationPart \
outFile
writeQuatAttr " rotation" (inverse xform.rotationPart) \
outFile
writePoint3Attr " scale" xform.scalePart outFile
if isMesh then (
writePoint3Attr " offsetTranslation" node.objectOffsetPos outFile
writeQuatAttr " offsetRotation" node.objectOffsetRot outFile
writePoint3Attr " offsetScale" node.objectOffsetScale outFile
format " solid=\"%\"" node.backFaceCull to:outFile
if node.material != undefined and
isKindOf node.material.diffuseMap BitmapTexture do (