-- handlers to rebuild 3DPI output "Trace Property List" -- (version 3.9 alpha 1) -- ******************************************* -- -- ******************************************* -- -- generic handler to rebuild all properties -- from 3DPI output "Trace Property List" and -- the list "settable properties" on mSet3dObject_Props objInfos, theProps --parameters: --objInfos ... output from 3DPI "rebuilding Help" --theProps ... output from 3DPI "settable properties" -- reference to member, sprite or getRendererServices() theObject = objInfos[#object] -- reference to a w3d object or havok object if voidP(theObject) then theMember = objInfos[#member] -- the w3d member or havok member theObjType = objInfos[#objectType] -- the ilk of object (except #modelResource for all modelResources) theObjName = objInfos[#name] -- the name of object theObject = theMember & "." & theObjType & "(" "E& theObjName "E& ")" end if nr = count(theProps) repeat with i = 1 to nr prop = getPropAt(theProps, i) val = theProps[i] if symbolP(val) then val = "#" & val action = theObject & "." & prop & "=" & val do action end repeat end -- ******************************************* -- -- ******************************************* -- -- generic handler to rebuild all properties -- from 3DPI output "Trace Property List" and -- the list "reference properties" on mSet3dObject_Refs objInfos, refList --parameters: --objInfos ... output from 3DPI "rebuilding Help" --refList ... output from 3DPI "reference properties" -- reference to member, sprite or getRendererServices() theObject = objInfos[#object] -- reference to a w3d object or havok object if voidP(theObject) then theMember = objInfos[#member] theObjType = objInfos[#objectType] theObjName = objInfos[#name] theObject = theMember & "." & theObjType & "(" "E&theObjName"E& ")" end if nr = count(refList) repeat with i = 1 to nr prop = getPropAt(refList, i) infos = refList[i] if voidP(theMember) then theMember = infos[#member] theRefType = infos[#objType] theRefName = infos[#name] if listP(theRefName) then -- exception with list of references -- eg. shader.texturelist or model.shaderList nameCnt = count(theRefName) repeat with j = 1 to nameCnt Name_j = theRefName[j] if voidP(Name_j) then RefObject = "void" else RefObject = theMember & "." & theRefType & "(" "E& Name_j "E& ")" end if action = theObject & "." & prop & "["&j&"]" & "=" & RefObject do action end repeat else -- single reference if voidP(theRefName) then RefObject = "void" else if theRefName = 0 then -- exception camera.rootNode RefObject = 0 else RefObject = theMember & "." & theRefType & "(" "E& theRefName "E& ")" end if action = theObject & "." & prop & "=" & RefObject do action end if end repeat end -- ******************************************* --