NoFlame
01-05-2009, 08:07 AM
Hi guys,
I want to do thing like the UI button "convert selected object(s) to Xrefs..."
The purpose of this process is swap Object via Xref.
I try the follow code
boneAry = #($bone01,$bone02)
saveNodes boneAry "d:\\123.max" quite:true
bName = for n in boneAry collect n.name
xrefs.addNewXRefObject "d:\\123.max" bName
-- change the srcfilename --
iXref = objXRefMgr.GetRecord 1
iXref.srcFileName = "d:\\123_new.max"
now I have done convert bone to XrefObj.
Change to the source file that i want.
But it become two bone01 and two bone02 in my scenes, not replace.
I have no idea to do the convert part...
Any one knows ... ?
I want to do thing like the UI button "convert selected object(s) to Xrefs..."
The purpose of this process is swap Object via Xref.
I try the follow code
boneAry = #($bone01,$bone02)
saveNodes boneAry "d:\\123.max" quite:true
bName = for n in boneAry collect n.name
xrefs.addNewXRefObject "d:\\123.max" bName
-- change the srcfilename --
iXref = objXRefMgr.GetRecord 1
iXref.srcFileName = "d:\\123_new.max"
now I have done convert bone to XrefObj.
Change to the source file that i want.
But it become two bone01 and two bone02 in my scenes, not replace.
I have no idea to do the convert part...
Any one knows ... ?
