3ds Max C++ API Reference
|
#include <IContainerObject.h>
Public Member Functions | |
FPInterfaceDesc * | GetDesc () |
virtual INode * | GetContainerNode () const =0 |
Returns the node containing this container object. | |
Content queries and modifications | |
virtual void | GetContentNodes (bool nestedContainerNodes, INodeTab &contentNodes) const =0 |
Returns the content nodes for this container. | |
virtual bool | IsNodeInContent (INode *in_node, bool nestedContainerNodes) const =0 |
Checks for content membership. | |
virtual bool | IsNodeInInheritedContent (INode *in_node, bool nestedContainerNodes) const =0 |
Checks for inherited content membership. | |
virtual bool | AddNodeToContent (INode *in_node)=0 |
Adds a node and its children to the container. | |
virtual bool | AddNodesToContent (INodeTab &in_nodeTab)=0 |
Adds several nodes to the container. | |
virtual bool | RemoveNodeFromContent (INode *in_node, bool detach=true)=0 |
Removes a node from the container. | |
Definition files. <br> | |
virtual MaxSDK::AssetManagement::AssetUser | GetLocalDefinitionFileName () const =0 |
Definition files have the format of a max file, but use a different file extension: .MAXC. | |
virtual bool | SetLocalDefinitionFileName (const MaxSDK::AssetManagement::AssetUser &val)=0 |
Sets the local definition file for the container. | |
virtual MaxSDK::AssetManagement::AssetUser | GetSourceDefinitionFileName () const =0 |
Gets the source definition file for the container. | |
virtual bool | SetSourceDefinitionFileName (const MaxSDK::AssetManagement::AssetUser &val)=0 |
Sets the source definition file for the container. | |
Definition file operations and content management | |
virtual bool | SaveContainer (bool newFileName=false)=0 |
Saves the current content and rules as the new definition. If there is no definition file name, the user will be prompted for one. | |
virtual bool | UpdateContainer ()=0 |
Updates the content from its definition, preserving local modifications. | |
virtual bool | UnloadContainer ()=0 |
Saves the local definition and deletes the content from the scene. | |
virtual bool | LoadContainer ()=0 |
Reloads content from its definition and local modifications. Only available when unloaded. | |
virtual bool | ReloadContainer ()=0 |
Reloads content from its definition and local modifications. | |
virtual bool | MergeSource ()=0 |
Turns an inherited container into an unsaved local container, merging its content into the scene. | |
virtual bool | MakeUnique ()=0 |
Merges a container source, and recursively merges any nested container among its content. | |
Container status and rules. | |
virtual bool | IsInherited () const =0 |
virtual bool | IsOpen () const =0 |
Returns whether the container is open. | |
virtual bool | SetOpen (bool isOpen)=0 |
Opens or closes the container. | |
virtual bool | IsContainerOpenableOrClosable () const =0 |
Returns whether the open status of the container can be changed in its current state. | |
virtual bool | IsUnloaded () const =0 |
Returns whether the container is unloaded, that is, whether its content has been temporarily deleted. | |
virtual bool | IsUnique () const =0 |
Returns whether the container is unique, that is, whether it is local as well as any container it may contain. | |
virtual void | AllowInPlaceEdit (bool allowEdit)=0 |
Sets whether the container, when inherited, will allow editing in place. | |
virtual bool | GetAllowInPlaceEdit () const =0 |
Returns whether the container, when inherited, will allow editing in place. | |
virtual void | SetEditInPlace (bool edit)=0 |
Temporarily makes an inherited container that allows it to act like a local container. | |
virtual bool | IsInPlaceEditing () const =0 |
Returns whether the container is currently editing in place. | |
virtual bool | CanEditInPlace () const =0 |
For an imported container, returns whether it allows editing in place. | |
virtual void | SetAutoUpdateClosed (bool setAutoUpdate)=0 |
Sets whether the container will automatically update if it is closed and its definition is updated. | |
virtual bool | AutoUpdateClosed () const =0 |
Returns whether the container will automatically update if it is closed and its definition is updated. | |
Display properties of the container helper. | |
virtual void | SetLabelDisplay (bool display)=0 |
virtual bool | GetLabelDisplay () const =0 |
Returns whether the container displays its name in the viewport. | |
virtual void | UseContentBoundingBox (bool useContent)=0 |
Sets whether the bounding box for the container object will be extended to encompass all of its content. | |
virtual bool | IsUsingContentBoundingBox () const =0 |
Returns whether the bounding box for the container object will be extended to encompass all of its content. | |
virtual void | SetOverrideNodeProperties (bool setOverride)=0 |
Sets whether the container overrides the object properties (wire color, hidden status etc) of its content. | |
virtual bool | OverrideNodeProperties () const =0 |
Returns whether the container overrides the object properties (wire color, hidden status etc) of its content. | |
virtual void | SetSize (float size, TimeValue t=0)=0 |
Sets the size of the container helper object. | |
virtual float | GetSize (TimeValue t=0) const =0 |
Returns the size of the container helper. | |
![]() | |
FPMixinInterface () | |
virtual LifetimeType | LifetimeControl () |
virtual CoreExport bool | RegisterNotifyCallback (InterfaceNotifyCallback *incb) |
virtual void | UnRegisterNotifyCallback (InterfaceNotifyCallback *incb) |
CoreExport | ~FPMixinInterface () |
virtual BaseInterface * | GetInterface (Interface_ID id) |
virtual FPInterfaceDesc * | GetDescByID (Interface_ID id) |
virtual Interface_ID | GetID () |
![]() | |
virtual BaseInterface * | GetInterface (Interface_ID id) |
virtual FPInterfaceDesc * | GetDesc ()=0 |
virtual CoreExport FPStatus | Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL) |
virtual FPStatus | Invoke (FunctionID fid, FPParams *params) |
virtual CoreExport FPStatus | Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL) |
virtual FPStatus | Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL) |
virtual CoreExport FunctionID | FindFn (const MCHAR *name) |
virtual CoreExport BOOL | IsEnabled (FunctionID actionID) |
virtual CoreExport BOOL | IsChecked (FunctionID actionID) |
virtual CoreExport BOOL | IsVisible (FunctionID actionID) |
virtual CoreExport FunctionID | GetIsEnabled (FunctionID actionID) |
virtual CoreExport FunctionID | GetIsChecked (FunctionID actionID) |
virtual CoreExport FunctionID | GetIsVisible (FunctionID actionID) |
virtual ActionTable * | GetActionTable () |
virtual void | EnableActions (BOOL onOff) |
![]() | |
virtual UtilExport | ~BaseInterface () |
Destructor. | |
UtilExport BaseInterface * | GetInterface (Interface_ID id) override |
virtual UtilExport Interface_ID | GetID () |
virtual LifetimeType | LifetimeControl () |
virtual bool | RegisterNotifyCallback (InterfaceNotifyCallback *incb) |
virtual void | UnRegisterNotifyCallback (InterfaceNotifyCallback *incb) |
virtual BaseInterface * | AcquireInterface () |
virtual void | ReleaseInterface () |
virtual void | DeleteInterface () |
virtual BaseInterface * | CloneInterface (void *remapDir=nullptr) |
![]() | |
virtual UtilExport | ~InterfaceServer () |
Destructor. | |
virtual UtilExport BaseInterface * | GetInterface (Interface_ID id) |
template<class InterfaceType > | |
InterfaceType * | GetTypedInterface () |
Static Public Member Functions | |
static IContainerObject * | GetInterface (Animatable *anim) |
If the Animatable supports the IContainerObject interface, returns a pointer to it. | |
![]() | |
static UtilExport void * | operator new (size_t size) |
Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e) |
Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new (size_t size, const char *filename, int line) |
New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, const char *filename, int line) |
New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new (size_t size, unsigned long flags) |
New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, unsigned long flags) |
New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new[] (size_t size) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new[] (size_t size, const char *filename, int line) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate arrays of objects. | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new[] (size_t size, unsigned long flags) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, unsigned long flags) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. | |
static UtilExport void | operator delete (void *ptr) |
Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e) |
Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete (void *ptr, const char *filename, int line) |
Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, int block_type, const char *filename, int line) |
Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete (void *ptr, unsigned long flags) |
Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags) |
Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete[] (void *ptr) |
Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e) |
Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete[] (void *ptr, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, int block_type, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete[] (void *ptr, unsigned long flags) |
Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags) |
Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, void *placement_ptr) |
Placement new operator. | |
static UtilExport void | operator delete (void *ptr, void *placement_ptr) |
Placement delete operator. | |
static UtilExport void * | aligned_malloc (size_t size, size_t alignment) |
Allocates memory on a specified alignment boundary. | |
static UtilExport void * | aligned_realloc (void *ptr, size_t size, size_t alignment) |
Reallocates memory on a specified alignment boundary. | |
static UtilExport void | aligned_free (void *ptr) |
Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. | |
Additional Inherited Members | |
![]() | |
enum | LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled } |
![]() | |
static CoreExport FPInterfaceDesc | nullInterface |
![]() | |
FPMixinInterface (const FPMixinInterface &rhs) | |
FPMixinInterface & | operator= (const FPMixinInterface &rhs) |
![]() | |
virtual FPStatus | _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p) |
![]() | |
Tab< InterfaceNotifyCallback * > * | interfaceNotifyCBs |
Container Interface.
IContainer provides access to the container object functionality.
A container is a helper object in the scene. Once created, the user can choose its content, that is, nodes that are meant to be grouped together. Containers should be self-contained blocks without references from the content to nodes outside of the container, otherwise the references will be lost during operation of the container. Containers hold the content, and moving or deleting a container will affect the content, but containers and content are not the same thing.
For example, content can be unloaded, while the container remains in the scene. The container is associated to a container definition file, which is a Max file that stores only the container and its contents. Container definitions are tracked as file assets.
There are two types of containers:
Content nodes of containers are all children of the container. It is possible to have objects linked to containers or contents of containers without being inside, but this is not recommended. It is not
possible to instance containers, but they can be copied, and then changes to one of the copies can be saved, and all containers can be reloaded, and all copies will inherit the changes. Many containers can point to the same definition.
In addition to the content, containers also govern what users of a container are allowed to do with the content if they inherit the container. This is called the container rules. At the moment, the only options are either no access (the user can only read in the content but make no modification) or edit in-place, which allows someone inheriting the container to modify the content and save the result, overwriting the original definition.
Containers can be closed, making the content uneditable. When a container is closed the content behaves like an xreffed scene, displayed and rendered but not selectable or editable.
|
virtual |
Implements FPInterface.
|
pure virtual |
Returns the node containing this container object.
|
pure virtual |
Returns the content nodes for this container.
[in] | nestedContainerNodes | - if true include nested content |
[out] | contentNodes | - returned content nodes |
|
pure virtual |
Checks for content membership.
[in] | in_node | - node to check for membership |
[in] | nestedContainerNodes | - include nested containers child nodes when checking |
|
pure virtual |
Checks for inherited content membership.
[in] | in_node | - node to check for membership |
[in] | nestedContainerNodes | - check content of nested containers |
|
pure virtual |
Adds a node and its children to the container.
The container node becomes the parent of the content node. Some nodes are automatically added to the local content along with the input node. The children of the node are added. If the node is part of a system [like biped or bones], all nodes in the system are also added.
If the node has a target [as in INode::GetTarget() - for instance a camera target], then its
target is added and if it is a target, the targeting node is also added
[in] | in_node | - node to add to the container |
|
pure virtual |
Adds several nodes to the container.
[in] | in_nodeTab | - array of nodes to add to the container |
|
pure virtual |
Removes a node from the container.
Some nodes are automatically removed along with the input node. The children of the node are removed. If the node is part of a system, all nodes in the system are also removed. If the node has a target, its target is removed and if it is a target, the targeting node is also removed
[in] | in_node | - node to remove from the container |
[in] | detach | - whether or not the removed node should also be unlinked from its parent |
|
pure virtual |
Definition files have the format of a max file, but use a different file extension: .MAXC.
This is to allow users to distinguish container definitions from regular max scenes when browsing folders, and prevent mistaken edits of container definitions. It is possible to rename the container definition and open it as a MAX file. Local containers use a local definition file. Inherited containers reference a source definition file.
Gets the local definition file for the container. If the container is inherited, the name is empty
|
pure virtual |
Sets the local definition file for the container.
|
pure virtual |
Gets the source definition file for the container.
If the container is local, the name is empty
|
pure virtual |
Sets the source definition file for the container.
|
pure virtual |
Saves the current content and rules as the new definition. If there is no definition file name, the user will be prompted for one.
[in] | newFileName | - if true, prompt the user for a definition file name |
|
pure virtual |
Updates the content from its definition, preserving local modifications.
|
pure virtual |
Saves the local definition and deletes the content from the scene.
|
pure virtual |
Reloads content from its definition and local modifications. Only available when unloaded.
|
pure virtual |
Reloads content from its definition and local modifications.
Same as load but is always available. Discards unsaved local changes.
|
pure virtual |
Turns an inherited container into an unsaved local container, merging its content into the scene.
|
pure virtual |
Merges a container source, and recursively merges any nested container among its content.
|
pure virtual |
Returns whether the container is inherited (or local)
|
pure virtual |
Returns whether the container is open.
|
pure virtual |
Opens or closes the container.
Depending on the container state, this may not be allowed
|
pure virtual |
Returns whether the open status of the container can be changed in its current state.
|
pure virtual |
Returns whether the container is unloaded, that is, whether its content has been temporarily deleted.
|
pure virtual |
Returns whether the container is unique, that is, whether it is local as well as any container it may contain.
|
pure virtual |
Sets whether the container, when inherited, will allow editing in place.
Editing in place is a container rule that allows a user to temporarily turn an inherited container into a local container and change its definition. You can now set more rules than just edit in place.
[in] | allowEdit | - whether the container, when inherited, will allow editing in place |
|
pure virtual |
Returns whether the container, when inherited, will allow editing in place.
|
pure virtual |
Temporarily makes an inherited container that allows it to act like a local container.
|
pure virtual |
Returns whether the container is currently editing in place.
|
pure virtual |
For an imported container, returns whether it allows editing in place.
|
pure virtual |
Sets whether the container will automatically update if it is closed and its definition is updated.
Otherwise a manual Update or Reload is needed.
|
pure virtual |
Returns whether the container will automatically update if it is closed and its definition is updated.
|
pure virtual |
Sets whether the container displays its name in the viewport
|
pure virtual |
Returns whether the container displays its name in the viewport.
|
pure virtual |
Sets whether the bounding box for the container object will be extended to encompass all of its content.
|
pure virtual |
Returns whether the bounding box for the container object will be extended to encompass all of its content.
|
pure virtual |
Sets whether the container overrides the object properties (wire color, hidden status etc) of its content.
|
pure virtual |
Returns whether the container overrides the object properties (wire color, hidden status etc) of its content.
Sets the size of the container helper object.
|
pure virtual |
Returns the size of the container helper.
|
inlinestatic |
If the Animatable supports the IContainerObject interface, returns a pointer to it.
[in] | anim | - Animatable to be tested for support of the IContainer interface |