Go back to exporting only the nodes in the selection when something is

selected.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4146 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2006-05-24 21:28:06 +00:00
parent 26c928fc45
commit 0a2dd5b3c7
2 changed files with 18 additions and 2 deletions
+9 -1
View File
@@ -62,8 +62,16 @@ macroScript TRAnimationExporter category:"File" \
outFile = createfile fileName
format "<?xml version=\"1.0\" standalone=\"yes\"?>\n\n" to:outFile
format "<animation frameRate=\"%\">\n\n" frameRate to:outFile
objs = objects as array
sels = selection as array
if sels.count > 0 do (
objs = sels
)
for t = animationRange.start to animationRange.end do at time t (
writeFrame objects outFile
writeFrame objs outFile
)
if sels.count > 0 do (
select sels
)
format "</animation>\n" to:outFile
close outFile
+9 -1
View File
@@ -156,9 +156,17 @@ macroScript TRModelExporter category:"File" \
outFile = createfile fileName
format "<?xml version=\"1.0\" standalone=\"yes\"?>\n\n" to:outFile
format "<model>\n\n" to:outFile
for node in objects do in coordsys world (
objs = objects as array
sels = selection as array
if sels.count > 0 do (
objs = sels
)
for node in objs do in coordsys world (
writeNode node outFile
)
if sels.count > 0 do (
select sels
)
format "</model>\n" to:outFile
close outFile
)