3ds Max C++ API Reference
|
Manages instances of objects, modifiers, transformation controllers Use this interface to work with object instances in a Max scene. More...
#include <iInstanceMgr.h>
Public Member Functions | |
virtual unsigned long | GetInstances (INode &source, INodeTab &instances) const =0 |
Retrieves instances and references of an object. | |
virtual unsigned long | SetMtlOnInstances (INode &source, Mtl *newMtl)=0 |
Sets the provided material on all instances of a given object. | |
Automatic material propagation to instances of objects | |
When automatic material propagation to object instances is On, materials assigned to an object via all means (UI, maxscript, SDK) will be automatically propagated to all instances and references of that object. No user confirmation is be required. When Off, material assignments to an object won't get propagated to the object's instances and references. The material of an instance can be still propagated by calling the SetMtlOnInstances method. The initial value of automatic material propagation can be set through the AutomaticMtlPropagation setting, in the InstanceMgr section of the application's .ini file. When the application closes, the current value of this settings saved in the .ini file by the system. | |
virtual bool | GetAutoMtlPropagation () const =0 |
Retrieves state of automatic material propagation flag. | |
virtual bool | SetAutoMtlPropagation (bool autoPropagate)=0 |
Sets automatic material propagation flag. | |
Making instances unique | |
Methods for making base objects, derived objects, individual modifier and transform controllers of a given set of nodes unique. | |
virtual bool | CanMakeObjectsUnique (INodeTab &tabNodes) const =0 |
Determines whether the given objects can be made unique. | |
virtual bool | MakeObjectsUnique (INodeTab &tabNodes, int iMultiNodeOption=INSTANCE_MGR_MAKE_UNIQUE_PROMPT) const =0 |
Makes the given objects unique. | |
virtual bool | CanMakeModifiersUnique (INodeTab &tabNodes, Tab< ReferenceTarget * > &tabMods) const =0 |
Determines whether the given modifiers can be made unique. | |
virtual bool | MakeModifiersUnique (INodeTab &tabNodes, Tab< ReferenceTarget * > &tabMods, int iMultiNodeOption=INSTANCE_MGR_MAKE_UNIQUE_PROMPT) const =0 |
Makes the given modifiers unique. | |
virtual bool | CanMakeControllersUnique (INodeTab &tabNodes, Tab< ReferenceTarget * > &tabConts) const =0 |
Determines whether the given transform controllers can be made unique. | |
virtual bool | MakeControllersUnique (INodeTab &tabNodes, Tab< ReferenceTarget * > &tabConts, int iMultiNodeOption=INSTANCE_MGR_MAKE_UNIQUE_PROMPT) const =0 |
Makes the given transform controllers unique. | |
File IO | |
Methods for persisting the state of the instance manager. | |
virtual IOResult | Save (ISave *isave) const =0 |
Saves instance manager state. | |
virtual IOResult | Load (ILoad *iload)=0 |
Loads instance manager state. | |
![]() | |
CoreExport | FPInterfaceDesc () |
CoreExport | FPInterfaceDesc (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, ULONG flag,...) |
CoreExport | ~FPInterfaceDesc () |
virtual void | Init () |
LifetimeType | LifetimeControl () |
virtual BaseInterface * | GetInterface (Interface_ID id) |
CoreExport void | LoadDescriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *pCD, ULONG flag,...) |
CoreExport void | AppendFunction (int id,...) |
Add a new function to this interface descriptor. | |
CoreExport void | AppendProperty (int id,...) |
Add a new property to this interface descriptor. | |
CoreExport void | AppendEnum (int id,...) |
Add a new enum to this interface descriptor. | |
CoreExport void | SetClassDesc (ClassDesc *i_cd) |
CoreExport va_list | check_fn (va_list ap, int id) |
CoreExport va_list | scan_fn (va_list ap, int id, int index) |
CoreExport va_list | check_prop (va_list ap, int id) |
CoreExport va_list | scan_prop (va_list ap, int id, int index) |
CoreExport va_list | check_enum (va_list ap, EnumID id) |
CoreExport va_list | scan_enum (va_list ap, EnumID id, int index) |
FPInterfaceDesc * | GetDesc () |
Interface_ID | GetID () |
CoreExport FPFunctionDef * | GetFnDef (FunctionID fid) |
ActionTable * | GetActionTable () |
CoreExport void | EnableActions (BOOL onOff) |
virtual CoreExport HINSTANCE | HInstance () |
virtual CoreExport const MCHAR * | GetRsrcString (StringResID id) |
![]() | |
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 IInstanceMgr * | GetInstanceMgr () |
Retrieves the single instance of the instance manager. | |
![]() | |
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 } |
![]() | |
Interface_ID | ID |
MSTR | internal_name |
StringResID | description |
ClassDesc * | cd |
USHORT | flags |
Tab< FPFunctionDef * > | functions |
Tab< FPPropDef * > | props |
Tab< FPEnum * > | enumerations |
MSPluginClass * | pc |
Rollout * | rollout |
ActionTable * | action_table |
![]() | |
static CoreExport FPInterfaceDesc | nullInterface |
![]() | |
CoreExport void | load_descriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, USHORT flag, va_list ap) |
![]() | |
virtual FPStatus | _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p) |
Manages instances of objects, modifiers, transformation controllers Use this interface to work with object instances in a Max scene.
There are several criteria based on which two or more objects must be considered instances of each other. This interface abstracts the details of dealing with them and thus help client code focus on the specific tasks it needs to perform on object instances, rather than on the logic of finding them. Two or more objects are considered instances of each other if:
Retrieves instances and references of an object.
Instances of styles and blocks are collected only if IADTObjMgr and IBlockMgr interfaces are available.
[in] | source | The node of the object whose instances are to be retrieved. For an object with multiple instances, any of the nodes representing an instance can be specified here as a parameter. |
[in,out] | instances | Collection of nodes representing the instances of source The collection is cleared before this method starts filling it in. The source node is also included in this collection since every object can be thought of as having at least one instance. |
Sets the provided material on all instances of a given object.
[in] | source | The node of the object whose instances should be set up with the specified material. For an object with multiple instances, any of the nodes representing an instance can be specified as this parameter. |
[in] | newMtl | The material to be set. If NULL, all instances of the source object will have their materials removed. |
|
pure virtual |
Retrieves state of automatic material propagation flag.
|
pure virtual |
Sets automatic material propagation flag.
[in] | autoPropagate | pass true to turn On automatic material propagation, false otherwise. |
|
pure virtual |
Determines whether the given objects can be made unique.
[in] | tabNodes | The nodes representing the objects to be made unique. |
|
pure virtual |
Makes the given objects unique.
[in] | tabNodes | The nodes representing the objects to be made unique. |
[in] | iMultiNodeOption | Specifies the method to use when making objects unique. |
|
pure virtual |
Determines whether the given modifiers can be made unique.
[in] | tabNodes | The nodes the modifiers are being applied to. |
[in] | tabMods | The modifiers to be made unique. |
|
pure virtual |
Makes the given modifiers unique.
[in] | tabNodes | The nodes the modifiers are applied to. |
[in] | tabMods | The modifiers to be made unique. |
[in] | iMultiNodeOption | Specifies the method to use when making modifiers unique. |
|
pure virtual |
Determines whether the given transform controllers can be made unique.
[in] | tabNodes | The nodes the controller are applied to. |
[in] | tabConts | The controllers to be made unique. |
|
pure virtual |
Makes the given transform controllers unique.
[in] | tabNodes | The nodes the controllers are applied to. |
[in] | tabConts | The controllers to be made unique. |
[in] | iMultiNodeOption | Specifies the method to use when making controllers unique. |
Saves instance manager state.
This method is called by the system.
Loads instance manager state.
This method is called by the system.
|
inlinestatic |
Retrieves the single instance of the instance manager.