Interface: Containers
The Containers Core Interface available in 3ds Max 2010 and higher exposes methods related to creation and management of Container Helpers and their content.
See also the Containers overview topic.
Methods:
<node>Containers.CreateContainer <&node array>contentNodes
contentNodes is In and Out parameter
Creates a new container from the given node array and returns the resulting Container node if the creation was successful.
The new container will be automatically selected.
The position of the container will be the average of the positions of the content nodes, or the world origin if the node array is empty.
<node>Containers.CreateInheritedContainer <filename>asset
Inherits the content stored in the given asset filename and returns a new Container node if the creation was successful.
If the filename argument is invalid (asset file does not exist), a file selection dialog will be opened to let the user select the asset file.
The container asset files are stored in the 3ds Max scene format but have the file extension .MAXC to be distinguished from regular scene files.
<node>Containers.IsInContainer <node>isInContainer
Returns the Container node if the node argument is in a container, undefined if it is not in a container.
<node>Containers.IsContainerNode <node>isContainerNode
Returns the Container node if the node argument is a container node, undefined if it is not a container node.
EXAMPLES:
b = Box() --> $Box:Box01 @ [0.000000,0.000000,0.000000] s = Sphere pos:[100,0,0] --> $Sphere:Sphere01 @ [100.000000,0.000000,0.000000] --Container created midway between the two content nodes: --Compare to creating a container using its constructor c = Containers.CreateContainer #(b,s) --> $Container:Container01 @ [50.000000,0.000000,0.000000] Containers.IsContainerNode b --> undefined Containers.IsContainerNode s --> undefined Containers.IsContainerNode c --> $Container:Container01 @ [50.000000,0.000000,0.000000] Containers.IsInContainer b --> $Container:Container01 @ [50.000000,0.000000,0.000000] Containers.IsInContainer s --> $Container:Container01 @ [50.000000,0.000000,0.000000] Containers.IsInContainer c --> undefined