I needed to link objects using xref and place it in a particular position and set a particular rotation. But when I create xref using maxscript, the position and rotations reset to the original file’s position and rotation after saving and opening the max file.
I tried the following.
newXref = xrefs.addNewXRefObject xrefFile xrefName modifiers:#xref manipulators:#xref dupMtlNameAction: materialMode
newXref = objXRefMgr.AddXRefItemsFromFile xrefFile
newXref = objXRefMgr.AddXRefItemsFromFile xrefFile xrefOptions:#mergeControllers
xrefs.addnewXrefObject xrefFile object_names manipulators:#merge dupMtlNameAction:#useXRefed
How to merge transforms in xref?
If I move the xref object manually it is working. But if I set position using script it is resetting to origin after saving and reopening the file.
How to achieve this using maxscript?