This core interface provides access to the XRef Manager. Available in 3ds Max 8 and higher.
Interface: objXRefMgr
Properties:
.recordCount : DWORD : Read
Returns the number of records.
.dupObjNameAction : enum : Read|Write
dupObjNameAction enums: {#prompt|#xref|#skip|#deleteOld|#autoRename}
Get/set the action to perform when duplicate names have been detected.
.dupMtlNameAction : enum : Read|Write
dupMtlNameAction enums: {#prompt|#useXRefed|#useScene|#autoRename}
Get/set the action to perform when duplicate materials have been detected.
Methods:
<Interface>GetRecord <index>index
Returns the indexed record, where index is between 1 and the .recordCount
<Interface>FindRecord <DWORD>handle
record Validated by Validator function
Returns the record by handle. See IXrefRecord MixinInterface for details on the return value.
<bool>RemoveRecordFromScene <Interface>record
Removes the specified record from the scene. Returns true on success, false on failure. See IXrefRecord MixinInterface for details on the record argument.
<bool>MergeRecordIntoScene <Interface>record
record Validated by Validator function
Merges the specified record into the scene. Returns true on success, false on failure. See IXrefRecord MixinInterface for details on the record argument.
<bool>SetRecordSrcFile <Interface>xrefRecord <filename>fileName
Sets the source file of the specified record to the given file name. Returns true on success, false on failure. See IXrefRecord MixinInterface for details on the record argument.
<bool>UpdateAllRecords()
Updates all records in the scene. Returns true on success, false on failure.
<bool>SetXRefItemSrcName <&maxObject>xrefItem <string>itemName
xrefItem is In parameter
Sets the source item name of the object passed by-reference to the given string. Returns true on success, false on failure.
<bool>SetProxyItemSrcName <&maxObject>proxyItem <string>itemName
proxyItem is In parameter
Sets name of the proxy of the object passed by-reference to the given string. Returns true on success, false on failure.
<bool>SetXRefItemSrcFile <&maxObject>xrefItem <filename>fileName
xrefItem is In parameter
Sets the source item file name of the object passed by-reference to the given filename string. Returns true on success, false on failure.
<bool>SetProxyItemSrcFile <&maxObject>proxyItem <filename>fileName
proxyItem is In parameter
Sets the proxy item file name of the object passed by-reference to the given filename string. Returns true on success, false on failure.
<bool>AddXRefItemsToRecord <Interface>record promptObjNames:<bool> objNames:<string array>
record Validated by Validator function
promptObjNames default value: false
objNames default value: #()
Adds the array of object names to the given record. See IXrefRecord MixinInterface for details on the record argument.
<Interface>AddXRefItemsFromFile <filename>fileName promptObjNames:<bool> objNames:<string array> xrefOptions:<&enum array>
promptObjNames default value: false
objNames default value: #()
xrefOptions enums: {#asProxy|#xrefModifiers|#dropModifiers|#mergeModifiers|#mergeManipulators|#selectNodes|#mergeMaterials}
xrefOptions default value: #()
xrefOptions is In parameter
Adds the array of names to the given record.
<bool>CanCombineRecords <Interface>firstRecord <Interface>secondRecord
firstRecord Validated by Validator function
secondRecord Validated by Validator function
Returns true if the two records can be combined, false otherwise. See IXrefRecord MixinInterface for details on the record arguments.
<Interface>CombineRecords <&Interface array>records
records Validated by Validator function
records is In parameter
Combines the records given as by-reference array of interfaces to a single interface. See IXrefRecord MixinInterface for details on the record argument and return value.
<bool>RemoveXRefItemsFromScene <&maxObject array>xrefItems
xrefItems is In parameter
Removes the given XRef Items from the scene. Returns true on success, false on failure.
<bool>MergeXRefItemsIntoScene <&maxObject array>xrefItems
xrefItems is In parameter
Merges the XRef Items specified as an array into the scene. Returns true on success, false on failure.
<void>ApplyXRefMaterialsToXRefObjects <&maxObject array>objectXRefItems
objectXRefItems is In parameter
Applies XRef Materials to the specified XRef objects.
<Interface>IsNodeXRefed <node>node
If the node is XRef-ed, returns an IXRefItem MixinInterface.
Interface: IXRefRecord
Properties:
.includeAll : bool : Read|Write
Get/Set the state of the Include All checkbox. When set to true, all objects in the record will be included.
.autoUpdate : bool : Read|Write
Get/Set the state of the Auto Update checkbox. When set to true, changes to the XRef source will be automatically updated in the scene.
.enabled : bool : Read|Write
Get/Set the state of the Enable checkbox.
.uptodate : bool : Read|Write
Get/Set the whether the record is up to date or outdated.
.empty : bool : Read
Contains true if the record is empty, false otherwise.
.nested : bool : Read
Contains true if the record is nested, false otherwise.
.unresolved : bool : Read
Contains true if the record is unresolved, false otherwise.
.srcFileName : filename : Read|Write
Contains the file name of the source file.
NEW in 3ds Max 9: This property has been made writable in 3ds Max 9.
.recordID : DWORD : Read
Contains the record's ID.
.handle : DWORD : Read
Contains the record's Handle.
.xrefOptions : enum by value array : Read
xrefOptions enums: {#asProxy|#xrefModifiers|#dropModifiers|#mergeModifiers|#mergeManipulators|#selectNodes|#mergeMaterials}
Contains an array of the XRef Options.
Methods:
<DWORD>ItemCount <&enum array>types
types enums: {#XRefObjectType|#XRefMaterialType|#XRefAtmosphericType|#XRefAllType}
types is In parameter
Returns the number of items in the record that correspond to the types passed by the by-reference array argument.
<maxObject>GetItem <index>index <enum>type
type enums: {#XRefObjectType|#XRefMaterialType|#XRefAtmosphericType}
Returns the indexed item of the specified XRef type.
<DWORD>GetItems <&enum array>types <&maxObject array>xrefItems
types enums: {#XRefObjectType|#XRefMaterialType|#XRefAtmosphericType|#XRefAllType}
types is In and Out parameter
xrefItems is In and Out parameter
Returns all items of the types specified by the by-reference array of the first argument into the by-reference array of the second argument.
<DWORD>GetChildRecords <&Interface array>children
children is Out parameter
Returns the child records into the by-reference array. See IXrefRecord MixinInterface for details on the array's values type.
<DWORD>GetParentRecords <&Interface array>parents
parents is Out parameter
Returns the parent records into the by-reference array. See IXrefRecord MixinInterface for details on the array's values type.
<DWORD>GetRootRecords <&Interface array>roots
roots is Out parameter
Returns the root records into the by-reference array. See IXrefRecord MixinInterface for details on the array's values type.
<bool>CheckSrcFileChanged()
Returns true if the source file has changed, false if it has not.
<bool>Update()
Forces an update of the XRef Record and returns true on success, false on failure.
Interface: IXRefItem
Properties:
.srcFileName : filename : Read|Write
Contains the file name of the source file.
NEW in 3ds Max 9: This property has been made writable in 3ds Max 9.
.srcItemName : string : Read|Write
Contains the name of the source item.
NEW in 3ds Max 9: This property has been made writable in 3ds Max 9.
.xrefRecord : Interface : Read
Contains the Xref Record's IXRefRecord MixinInterface.
.unresolved : bool : Read
Contains true if the XRef is unresolved, false otherwise.
.nested : bool : Read
Contains true if the XRef is nested, false otherwise.
.retargetable : bool : Read
Contains true if the XRef can be retargeted, false otherwise.
Methods:
<maxObject>GetSrcItem resolveNested:<bool>
resolveNested default value: false
Returns the source item. If the resolveNested optional keyword is specified and is true, nested XRefs will be resolved to get the source item. If not specified or false, nested XRefs will not be resolved.
<DWORD>GetParentItems <&maxObject array>parentItems
parentItems is Out parameter
Returns the parent items into the by-reference array argument.
<DWORD>GetRootItems <&maxObject array>rootItems
rootItems is Out parameter
Returns the root items into the by-reference array argument.
<DWORD>GetChildItems <&maxObject array>childItems
childItems is Out parameter
Returns the child items into the by-reference array argument.
<void>GetNodes <&node array>xrefNodes
xrefNodes is Out parameter
Returns the XRef nodes into the by-reference array argument.
Interface: IXRefProxy
Properties:
.proxyFileName : filename : Read|Write
Contains the proxy filename.
NEW in 3ds Max 9: This property has been made writable in 3ds Max 9.
.proxyItemName : string : Read|Write
Contains the proxy item name.
NEW in 3ds Max 9: This property has been made writable in 3ds Max 9.
.proxyRecord : Interface : Read
Contains the IXRefRecord Interface of the Proxy.
.displayProxy : bool : Read|Write
Get/set whether to display the proxy in the viewports or not.
.renderProxy : bool : Read|Write
Get/set whether to render the proxy or not.
Interface: IXRefObject
Properties:
.activeFileName : filename : Read
Contains the active filename.
.activeObjName : string : Read
Contains the active object name.
.activeRecord : Interface : Read
Contains the IXRefRecord Interface of the Xref Object.
Methods:
<maxObject>GetSourceObject <bool>resolveNestedXRef modifiers:<&maxObject array>
modifiers default value: #()
modifiers is Out parameter
Returns the Source Object. When the first argument is set to true, nested XRefs will be resolved. The optional modifiers: array parameter will be populated with the modifiers of the object.
See also