3ds Max C++ API Reference
ISceneStateManager Class Referenceabstract

This class is the public interface to the scene state feature. More...

#include <ISceneStateManager.h>

+ Inheritance diagram for ISceneStateManager:

Public Types

enum  SceneStatePart {
  eIncludeLightProperties = 0 , eIncludeLightTM = 1 , eIncludeObjectProperties = 2 , eIncludeCameraTM = 3 ,
  eIncludeCameraProperties = 4 , eIncludeLayerProperties = 5 , eIncludeLayerAssignment = 6 , eIncludeMaterials = 7 ,
  eIncludeEnvironment = 8 , eIncludeAnimationLayerProperties =9
}
 Definition of scene state parts. More...
 
enum  {
  E_GET_COUNT , E_GET , E_FIND , E_CAPTURE ,
  E_RESTORE , E_DELETE , E_RENAME , E_GET_PARTS ,
  E_GET_NUM_PARTS , E_PART_TO_INDEX , E_INDEX_TO_PART , E_CAPTURE_ALL_PARTS ,
  E_RESTORE_ALL_PARTS
}
 
- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 

Public Member Functions

virtual int GetSceneStateCount ()=0
 Get the number of scene states stored in the scene. More...
 
virtual const MCHARGetSceneState (int index)=0
 Get the name of the scene state at this index. More...
 
virtual int FindSceneState (const MCHAR *name)=0
 Find the index of the scene state with this name. More...
 
virtual bool CaptureState (const MCHAR *name)=0
 Capture, or save, a scene state. All scene state parts will be saved. More...
 
virtual bool CaptureState (const MCHAR *name, BitArray parts)=0
 Capture, or save, a scene state with a specific set of parts. More...
 
virtual bool RestoreState (const MCHAR *name)=0
 Restore a scene state. All scene state parts included in the scene state will be restored. More...
 
virtual bool RestoreState (const MCHAR *name, BitArray parts)=0
 Restore a scene state. More...
 
virtual bool DeleteState (const MCHAR *name)=0
 Delete the scene state with this name. More...
 
virtual bool RenameState (const MCHAR *oldName, const MCHAR *newName)=0
 Rename a scene state. More...
 
virtual BitArray GetSceneStateParts (const MCHAR *name)=0
 Get the parts that are stored in a specific scene state. More...
 
virtual void DoManageDialog ()=0
 Open the Scene State manager dialog. More...
 
virtual void EnumAuxFiles (AssetEnumCallback &assetEnum, DWORD flags=FILE_ENUM_ALL)=0
 Enumerate external files used by objects stored in the scene states. More...
 
- Public Member Functions inherited from FPInterfaceDesc
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 BaseInterfaceGetInterface (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. More...
 
CoreExport void AppendProperty (int id,...)
 Add a new property to this interface descriptor. More...
 
CoreExport void AppendEnum (int id,...)
 Add a new enum to this interface descriptor. More...
 
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)
 
FPInterfaceDescGetDesc ()
 
Interface_ID GetID ()
 
CoreExport FPFunctionDefGetFnDef (FunctionID fid)
 
ActionTableGetActionTable ()
 
CoreExport void EnableActions (BOOL onOff)
 
virtual CoreExport HINSTANCE HInstance ()
 
virtual CoreExport const MCHARGetRsrcString (StringResID id)
 
- Public Member Functions inherited from FPInterface
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)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=nullptr)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Public Attributes inherited from FPInterfaceDesc
Interface_ID ID
 
MSTR internal_name
 
StringResID description
 
ClassDesccd
 
USHORT flags
 
Tab< FPFunctionDef * > functions
 
Tab< FPPropDef * > props
 
Tab< FPEnum * > enumerations
 
MSPluginClasspc
 
Rolloutrollout
 
ActionTableaction_table
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 
- Protected Member Functions inherited from FPInterfaceDesc
CoreExport void load_descriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, USHORT flag, va_list ap)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 

Detailed Description

This class is the public interface to the scene state feature.

Member Enumeration Documentation

◆ SceneStatePart

Definition of scene state parts.

Each part is represented by a bit in a BitArray

Enumerator
eIncludeLightProperties 
eIncludeLightTM 
eIncludeObjectProperties 
eIncludeCameraTM 
eIncludeCameraProperties 
eIncludeLayerProperties 
eIncludeLayerAssignment 
eIncludeMaterials 
eIncludeEnvironment 
eIncludeAnimationLayerProperties 
30  {
32  eIncludeLightTM = 1,
34  eIncludeCameraTM = 3,
41  };
@ eIncludeLightProperties
Definition: ISceneStateManager.h:31
@ eIncludeCameraProperties
Definition: ISceneStateManager.h:35
@ eIncludeCameraTM
Definition: ISceneStateManager.h:34
@ eIncludeAnimationLayerProperties
Definition: ISceneStateManager.h:40
@ eIncludeObjectProperties
Definition: ISceneStateManager.h:33
@ eIncludeLightTM
Definition: ISceneStateManager.h:32
@ eIncludeLayerProperties
Definition: ISceneStateManager.h:36
@ eIncludeEnvironment
Definition: ISceneStateManager.h:39
@ eIncludeLayerAssignment
Definition: ISceneStateManager.h:37
@ eIncludeMaterials
Definition: ISceneStateManager.h:38

◆ anonymous enum

anonymous enum
Enumerator
E_GET_COUNT 
E_GET 
E_FIND 
E_CAPTURE 
E_RESTORE 
E_DELETE 
E_RENAME 
E_GET_PARTS 
E_GET_NUM_PARTS 
E_PART_TO_INDEX 
E_INDEX_TO_PART 
E_CAPTURE_ALL_PARTS 
E_RESTORE_ALL_PARTS 
97  {
99  E_GET,
100  E_FIND,
101  E_CAPTURE,
102  E_RESTORE,
103  E_DELETE,
104  E_RENAME,
105  E_GET_PARTS,
111  };
@ E_GET_COUNT
Definition: ISceneStateManager.h:98
@ E_PART_TO_INDEX
Definition: ISceneStateManager.h:107
@ E_RENAME
Definition: ISceneStateManager.h:104
@ E_GET_PARTS
Definition: ISceneStateManager.h:105
@ E_INDEX_TO_PART
Definition: ISceneStateManager.h:108
@ E_GET
Definition: ISceneStateManager.h:99
@ E_GET_NUM_PARTS
Definition: ISceneStateManager.h:106
@ E_RESTORE
Definition: ISceneStateManager.h:102
@ E_FIND
Definition: ISceneStateManager.h:100
@ E_DELETE
Definition: ISceneStateManager.h:103
@ E_CAPTURE_ALL_PARTS
Definition: ISceneStateManager.h:109
@ E_RESTORE_ALL_PARTS
Definition: ISceneStateManager.h:110
@ E_CAPTURE
Definition: ISceneStateManager.h:101

Member Function Documentation

◆ GetSceneStateCount()

virtual int GetSceneStateCount ( )
pure virtual

Get the number of scene states stored in the scene.

Returns
The number of scene states stored in the scene.

◆ GetSceneState()

virtual const MCHAR* GetSceneState ( int  index)
pure virtual

Get the name of the scene state at this index.

Parameters
[in]index- The index of the scene state
Returns
The name of the scene state, or NULL in case of an error.

◆ FindSceneState()

virtual int FindSceneState ( const MCHAR name)
pure virtual

Find the index of the scene state with this name.

Parameters
[in]name- The name of the scene state.
Returns
The index of the scene state, or -1 in case of an error.

◆ CaptureState() [1/2]

virtual bool CaptureState ( const MCHAR name)
pure virtual

Capture, or save, a scene state. All scene state parts will be saved.

Parameters
[in]name- The name of the scene state
Returns
true if successful, otherwise false.

◆ CaptureState() [2/2]

virtual bool CaptureState ( const MCHAR name,
BitArray  parts 
)
pure virtual

Capture, or save, a scene state with a specific set of parts.

Parameters
[in]name- The name of the scene state
[in]parts- A BitArray representing the scene state parts to save.
Returns
true if successful, otherwise false.
See also
SceneStatePart

◆ RestoreState() [1/2]

virtual bool RestoreState ( const MCHAR name)
pure virtual

Restore a scene state. All scene state parts included in the scene state will be restored.

Parameters
[in]name- The name of the scene state to restore
Returns
true if successful, otherwise false.

◆ RestoreState() [2/2]

virtual bool RestoreState ( const MCHAR name,
BitArray  parts 
)
pure virtual

Restore a scene state.

Parameters
[in]name- The name of the scene state to restore
[in]parts- A BitArray representing the scene state parts to restore.
Returns
true if successful, otherwise false.
See also
SceneStatePart

◆ DeleteState()

virtual bool DeleteState ( const MCHAR name)
pure virtual

Delete the scene state with this name.

Parameters
[in]name- The name of the scene state to delete
Returns
true if successful, otherwise false.

◆ RenameState()

virtual bool RenameState ( const MCHAR oldName,
const MCHAR newName 
)
pure virtual

Rename a scene state.

Parameters
[in]oldName- The name of the scene state to rename
[in]newName- The new name of the scene state
Returns
true if successful, otherwise false.

◆ GetSceneStateParts()

virtual BitArray GetSceneStateParts ( const MCHAR name)
pure virtual

Get the parts that are stored in a specific scene state.

Parameters
[in]name- The name of the scene state
Returns
A bitarray representing the parts that the scene state contains.
See also
SceneStatePart

◆ DoManageDialog()

virtual void DoManageDialog ( )
pure virtual

Open the Scene State manager dialog.

◆ EnumAuxFiles()

virtual void EnumAuxFiles ( AssetEnumCallback assetEnum,
DWORD  flags = FILE_ENUM_ALL 
)
pure virtual

Enumerate external files used by objects stored in the scene states.

Parameters
[in]assetEnum- The callback where external files are logged.
[in]flags- Standard EnumAuxFiles flags.