문제

How i can read/import object location data (for every object/model in scene) from textile in MaxScript?

My TextFile: x,y,z,modelname

Thanks.

도움이 되었습니까?

해결책

New line for each record?

(
    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
)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top