Share

XRef Scenes and Objects

Scenes and objects can be stored in separate 3ds Max files, and referenced from a master file. This process is called external referencing or XRef for short. These XRef scenes and objects are loaded when the master file is loaded, but can not be modified from the master file.

An XRef object can be an object, controller, or material. An XRef object can be animated only if its transform controller in the external scene has also been merged with the master scene. When loading XRef object's the user has options to merge materials, and merge transforms from the scene file containing the XRef object.

An XRef scene is an entire external 3ds Max scene.

The following INode member functions are used for working with scene XRefs:

  • INode::GetXRefFile() - Returns the file asset of the nth scene XRef.
  • INode::SetXRefFile() - Sets the file asset of the nth scene XRef.
  • INode::GetXRefFileCount() - Returns the number of scene XRefs.
  • INode::AddNewXRefFile() - Adds a new scene XRef file asset.
  • INode::DeleteXRefFile() - Deletes the nth scene XRef file asset.
  • INode::BindXRefFile() - Merges a scene XRef into the scene and deletes the XRef.
  • INode::DeleteAllXRefs() - Deletes all scene XRefs from the scene.
  • INode::ReloadXRef() - This method will update the specified scene XRef, by reloading it from disk.
  • INode::FlagXrefChanged() - Sets a flag indicating that the specified XRef has been changed and should be updated.
  • INode::UpdateChangedXRefs() - Updates all XRefs which have their changed flag set.
  • INode::GetXRefTree() - Returns the root node of the tree for the specified XRef.
  • INode::GetXRefParent() - Returns the node in the scene (if any) which the scene XRef is linked to.
  • INode::SetXRefParent() - Sets the parent node of the XRef scene.
  • INode::FindUnresolvedXRefs() - Generates a list of names of unresolved XRefs in scene.
  • INode::AttemptToResolveUnresolvedXRefs() - Attempts to load unresolved XRef scenes.
  • INode::GetXRefFlags() - Returns a set of flags for the nth XRef scene.
  • INode::SetXRefFlags() - Sets the specified flags for the nth XRef scene.

For working with object XRefs see:

  • IXRefItem
  • IObjXRefManager8
  • IObjXRefRecord

Was this information helpful?