Interface: objXRefs
The objXRefs Core Interface provides MAXScript access to the XRef Object feature.
Methods:
<maxObject>objXRefs.addNewXRefObject <filename>fname <string>objname <integer>flags
The merge behavior is controlled by the bits set in the flags parameter:
- 1 - Add as proxy (Bit: 1)
- 2 - Drop (ignore) modifiers (Bit: 2)
- 4 - Merge modifiers (Bit: 3)
- 8 - Merge manipulators (Bit: 4)
Duplicate material names action:
256 - Prompt (Bit: 9)
512 - Use Scene Material (Bit: 10)
1024 - Use Merged Material (Bit: 11)
2048 - Merge material and automatically rename them (Bit: 12)
Reparent action: (available in 3ds Max 2019.1 Update and higher)
4096 - Prompt (Bit: 13)
8192 - Always Reparent (Bit: 14)
16384 - Never Reparent (Bit: 15)
The default behavior (flags = 0) is :
- XRef the modifiers
- XRef the manipulators
- when duplicate material names are encountered use the option specified by objXrefMgr.dupMtlNameAction (which defaults to Merge and Rename)
- Always Reparent
<integer>objXRefs.getNumXRefObjects <filename>fname
Returns the number of object XRefs contained in the file
<maxObject>objXRefs.getXRefObject <filename>fname <index>index
Returns the Nth XRef'ed object contained in the specified file
<integer>objXRefs.getNumFiles()
Returns the number of files that contain object XRefs
<filename>objXRefs.getFileName <index>index
Returns the file name of the Nth file that contains object XRefs
<boolean>objXRefs.reloadFile <filename>fname
Returns true
if successful and false
otherwise.
<boolean>objXRefs.isFileUnresolved <filename>fname
Returns true
if successful and false
otherwise.
<boolean>objXRefs.isFileDisabled <filename>fname
Returns true
if successful and false
otherwise.
<array>objXRefs.getAllXRefObjects()
Returns an array of all XRef Objects present in the current scene.
<integer>objXRefs.getEmptyXRefRecCount()
Returns the number of empty XRefs.
Available in 3ds Max 8 and higher.