Load a 3ds Max XRef Material without Object

63 Views Asked by At

When loading a XRef Material inside the 'XRef Material' in the Material Editor, Max will load only the Material reference. When loading a XRef with maxscript it will always load the Object along with the Material which I try to avoid. Can this be controlled?

objXrefMgr.AddXrefItemsFromFile \
    \
    "C:\\materials.max" \
    promptObjNames:false \
    xrefOptions:#(#mergeModifiers, #mergeControllers, #mergeManipulators)

edit:

A workaround I found is by importing an XRef Object and then moving its material to the Material Editor. Then deleting the Object will keep the XRef Record intact since the material is still used by the Material Editor.

objXrefMgr.AddXrefItemsFromFile \
    \
    "C:\\materials.max" \
    promptObjNames:false \
    objNames:"yourObjName"

meditMaterials[1] = $yourObjName.material

delete $yourObjName

Th XRef Record will then qualify as .empty true and hold only the Material reference. Is this the intended way?

0

There are 0 best solutions below