如何在MaxScript中从纺织品中读取/导入对象位置数据(对于场景中的每个对象/模型)?
我的TextFile: X,Y,Z,MODELNAME
感谢。
答案 0 :(得分:1)
每条记录的新行?
(
file = memStreamMgr.openFile @"C:\sample.ext"
while NOT file.eos() do
(
local line = filterString (file.readLine()) ", "
if line.count == 4 AND isValidNode (local obj = getNodeByName line[4]) do
obj.pos = [line[1] as float, line[2] as float, line[3] as float]
)
memStreamMgr.close file
)