3ds Max C++ API Reference
CreaseSetContainer Class Referenceabstract

#include <CreaseSetContainer.h>

+ Inheritance diagram for CreaseSetContainer:

Public Member Functions

virtual ReferenceTargetGetCreaseSetContainerReferenceTarget ()=0
 
virtual int GetNumberOfCreaseSets ()=0
 
virtual MSTR GetCreaseContainerName (int setIndex)=0
 
virtual bool CanSetCreaseContainerName (int setIndex)
 
virtual void SetCreaseContainerName (int setIndex, const MCHAR *name)
 
virtual MSTR GetCreaseName (int setIndex)=0
 
virtual bool CanSetCreaseName (int setIndex)
 
virtual void SetCreaseName (int setIndex, const MCHAR *name)
 
virtual int GetCreaseType (int setIndex)=0
 
virtual int GetCreaseEntityCount (int setIndex)=0
 
virtual float GetCreaseValue (int setIndex, TimeValue t, Interval &valid)=0
 
virtual bool CanSetCreaseValue (int setIndex)
 
virtual void SetCreaseValue (int setIndex, TimeValue t, float value)
 
virtual const ColorGetCreaseColor (int setIndex)=0
 
virtual bool CanSetCreaseColor (int setIndex)
 
virtual void SetCreaseColor (int setIndex, const Color &color)
 
virtual void GetNodeList (INodeTab &nodeList)=0
 
virtual void GetNodeList (int setIndex, INodeTab &nodeList)=0
 
virtual Interval GetCreaseSetContainerValidity (TimeValue t)
 
virtual bool CanSetCreaseColorVisibility (int setIndex)
 
virtual bool GetCreaseColorVisibility (int setIndex)
 
virtual void SetCreaseColorVisibility (int setIndex, bool state)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
UtilExport BaseInterfaceGetInterface (Interface_ID id) override
 
virtual UtilExport Interface_ID GetID ()
 
virtual LifetimeType LifetimeControl ()
 
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

- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 
- 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...
 

Detailed Description

Remarks
CreaseSetContainer interface class

In 3ds Max, subdivision surface creasing is set up around the concept of "Crease Sets" – Groups of edges or vertices which share common crease values. Establishing groups which share common crease values makes it easier for users to manage them and control creasing of various parts of their geometry in unison.

The Crease Explorer allows users to view all Crease Sets in all objects and manipulate them. For convenience in managing them, a hierarchy is created in which each Crease Set resides in a "Crease Set Container", which may contain any number of Crease Sets. A Crease Set Container can be anything in Max which defines a Crease Set. Presently, this includes the CreaseSet and Crease modifiers, as well as the SubdivBox primitive.

Any plugin which defines Crease Sets should derive from CreaseSetContainer, implement all methods of the CreaseSetContainer class and register each instance with the Crease Set Manager using the CreaseSetManager::RegisterCreaseSetContainer method. This will allow the system to access the Crease Sets it contains and display them in the Crease Explorer for the user to examine and/or alter.

When an instance of a CreaseSetContainer is destroyed or removed from the scene, it should unregister itself by calling CreaseSetManager::UnregisterCreaseSetContainer.

When Crease Sets are created or destroyed in a CreaseSetContainer, the CreaseSetContainer should notify the CreaseSetManager via CreaseSetManager::NotifyStructureChanged so that the Crease Explorer, if active, may update to reflect the change.

Any time an existing Crease Set changes in any way, the CreaseSetContainer should notify the CreaseSetManager via CreaseSetManager::NotifyComponentChanged.

A CreaseSetContainer exposes the number of Crease Sets it contains (see CreaseSetContainer::GetNumberOfCreaseSets). Each Crease Set may be queried for its name, as well as its container's name (see CreaseSetContainer::GetCreaseName and CreaseSetContainer::GetCreaseContainerName). Usually, all Crease Sets within a CreaseSetContainer will share the same container name (for example, a CreaseSet modifier in Max returns its name whenever any of the Crease Sets it contains are queried for their container's name), but this is up to the CreaseSetContainer. The Crease Set Manager, which itself is a specialized CreaseSetContainer, wraps all CreaseSetContainers in the system and will return the proper CreaseSetContainer name for any Crease Set in the scene.

For an example of how to implement a CreaseSetContainer, see the SubdivBox plugin in MaxSDK/Objects/PolyObjects/

Member Function Documentation

◆ GetCreaseSetContainerReferenceTarget()

virtual ReferenceTarget* GetCreaseSetContainerReferenceTarget ( )
pure virtual
Remarks
Get the ReferenceTarget for this Crease Set Container
Returns
ReferenceTarget that represents this Crease Set Container

Implemented in CreaseSetManager.

◆ GetNumberOfCreaseSets()

virtual int GetNumberOfCreaseSets ( )
pure virtual
Remarks
Get the number of crease sets in this container
Returns
The number of crease sets

Implemented in CreaseSetManager.

◆ GetCreaseContainerName()

virtual MSTR GetCreaseContainerName ( int  setIndex)
pure virtual
Remarks
Get the name of the crease set container for a given crease set. Usually the same name for all sets contained by a given container (i.e. For Max's Crease Set Modifier, the container name for all crease sets is the modifier name) but the Crease Set Manager, which allows accessing all crease sets in the system, will return the appropriate container name for each crease set.
Parameters
setIndex- Index of the crease set
Returns
The name of the crease set

Implemented in CreaseSetManager.

◆ CanSetCreaseContainerName()

virtual bool CanSetCreaseContainerName ( int  setIndex)
inlinevirtual
Remarks
Query whether the crease set container containing a given set can be renamed
Parameters
setIndex- Index of the crease set
Returns
true if the crease set container can be renamed

Reimplemented in CreaseSetManager.

98 { UNREFERENCED_PARAMETER(setIndex); return false; }

◆ SetCreaseContainerName()

virtual void SetCreaseContainerName ( int  setIndex,
const MCHAR name 
)
inlinevirtual
Remarks
Set the name of a crease set container which contains a given set
Parameters
setIndex- Index of the crease set
name- Pointer to new name string

Reimplemented in CreaseSetManager.

103 { UNREFERENCED_PARAMETER(setIndex); UNREFERENCED_PARAMETER(name); DbgAssert(0); }
#define DbgAssert(expr)
Definition: assert1.h:82

◆ GetCreaseName()

virtual MSTR GetCreaseName ( int  setIndex)
pure virtual
Remarks
Get the name of a given crease set
Parameters
setIndex- Index of the crease set
Returns
The name of the crease set

Implemented in CreaseSetManager.

◆ CanSetCreaseName()

virtual bool CanSetCreaseName ( int  setIndex)
inlinevirtual
Remarks
Query whether a given crease set can be renamed
Parameters
setIndex- Index of the crease set
Returns
true if the crease set can be renamed

Reimplemented in CreaseSetManager.

113 { UNREFERENCED_PARAMETER(setIndex); return false; }

◆ SetCreaseName()

virtual void SetCreaseName ( int  setIndex,
const MCHAR name 
)
inlinevirtual
Remarks
Set the name of a given crease set
Parameters
setIndex- Index of the crease set
name- Pointer to new name string

Reimplemented in CreaseSetManager.

118 { UNREFERENCED_PARAMETER(setIndex); UNREFERENCED_PARAMETER(name); DbgAssert(0); }

◆ GetCreaseType()

virtual int GetCreaseType ( int  setIndex)
pure virtual
Remarks
Get the type of a crease set
Parameters
setIndex- Index of the crease set
Returns
The crease set type (CREASE_SET_TYPE_XXX, defined above)

Implemented in CreaseSetManager.

◆ GetCreaseEntityCount()

virtual int GetCreaseEntityCount ( int  setIndex)
pure virtual
Remarks
Get the number of entities in a crease set
Parameters
setIndex- Index of the crease set
Returns
The number of items in the set

Implemented in CreaseSetManager.

◆ GetCreaseValue()

virtual float GetCreaseValue ( int  setIndex,
TimeValue  t,
Interval valid 
)
pure virtual
Remarks
Get the crease value for a given set
Parameters
setIndex- Index of the crease set
t- The time at which to sample
valid- The interval into which the validity of the evaluated parameters is intersected.
Returns
The crease value, 0.0-1.0

Implemented in CreaseSetManager.

◆ CanSetCreaseValue()

virtual bool CanSetCreaseValue ( int  setIndex)
inlinevirtual
Remarks
Query whether the crease value of a given set can be changed
Parameters
setIndex- Index of the crease set
Returns
true if the set value may be changed

Reimplemented in CreaseSetManager.

140 { UNREFERENCED_PARAMETER(setIndex); return false; }

◆ SetCreaseValue()

virtual void SetCreaseValue ( int  setIndex,
TimeValue  t,
float  value 
)
inlinevirtual
Remarks
Set the crease value of a crease set
Parameters
setIndex- Index of the crease set
t- The time at which to set the crease value
value- The crease value to set

Reimplemented in CreaseSetManager.

146 { UNREFERENCED_PARAMETER(setIndex); UNREFERENCED_PARAMETER(t); UNREFERENCED_PARAMETER(value); DbgAssert(0); }

◆ GetCreaseColor()

virtual const Color& GetCreaseColor ( int  setIndex)
pure virtual
Remarks
Get the color used to represent a given crease set
Parameters
setIndex- Index of the crease set
Returns
The color used for the crease set

Implemented in CreaseSetManager.

◆ CanSetCreaseColor()

virtual bool CanSetCreaseColor ( int  setIndex)
inlinevirtual
Remarks
Query whether the color of a given set can be changed
Parameters
setIndex- Index of the crease set
Returns
true if the color may be set

Reimplemented in CreaseSetManager.

156 { UNREFERENCED_PARAMETER(setIndex); return false; }

◆ SetCreaseColor()

virtual void SetCreaseColor ( int  setIndex,
const Color color 
)
inlinevirtual
Remarks
Sets the color of a given crease set
Parameters
setIndex- Index of the crease set
color- The color to set

Reimplemented in CreaseSetManager.

161 { UNREFERENCED_PARAMETER(setIndex); UNREFERENCED_PARAMETER(color); DbgAssert(0); }

◆ GetNodeList() [1/2]

virtual void GetNodeList ( INodeTab nodeList)
pure virtual
Remarks
Get a list of nodes affected by this container
Parameters
nodeList- An INodeTab that will receive the list of nodes

Implemented in CreaseSetManager.

◆ GetNodeList() [2/2]

virtual void GetNodeList ( int  setIndex,
INodeTab nodeList 
)
pure virtual
Remarks
Get a list of nodes affected by the given crease set
Parameters
setIndex- Index of the crease set
nodeList- An INodeTab that will receive the list of nodes

Implemented in CreaseSetManager.

◆ GetCreaseSetContainerValidity()

virtual Interval GetCreaseSetContainerValidity ( TimeValue  t)
inlinevirtual
Remarks
Container may contain animated Crease values. Get the validity interval.
Parameters
t- The time at which to sample the validity
Returns
The validity interval for the given time

Reimplemented in CreaseSetManager.

175 { UNREFERENCED_PARAMETER(t); return FOREVER; };
#define FOREVER
Definition: interval.h:168

◆ CanSetCreaseColorVisibility()

virtual bool CanSetCreaseColorVisibility ( int  setIndex)
inlinevirtual
Remarks
Query whether the crease set color will be shown in the viewport
Parameters
setIndex- Index of the crease set
Returns
true if the visibility switch can be set

Reimplemented in CreaseSetManager.

180 { UNREFERENCED_PARAMETER(setIndex); return false; }

◆ GetCreaseColorVisibility()

virtual bool GetCreaseColorVisibility ( int  setIndex)
inlinevirtual
Remarks
Get the crease set color visibility switch for a given crease set
Parameters
setIndex- Index of the crease set
Returns
The state of the visibility switch (true = visible)

Reimplemented in CreaseSetManager.

185 { UNREFERENCED_PARAMETER(setIndex); return false; }

◆ SetCreaseColorVisibility()

virtual void SetCreaseColorVisibility ( int  setIndex,
bool  state 
)
inlinevirtual
Remarks
Set the crease set color visibility switch for a given crease set
Parameters
setIndex- Index of the crease set
state- The visibility state for the set (true = visible)

Reimplemented in CreaseSetManager.

190 { UNREFERENCED_PARAMETER(setIndex); UNREFERENCED_PARAMETER(state); }