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:
@@ -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
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user