3ds Max C++ API Reference
INodeBakeProperties Class Referenceabstract

#include <INodeBakeProperties.h>

+ Inheritance diagram for INodeBakeProperties:

Public Member Functions

virtual BOOL GetBakeEnabled () const =0
 Get the flag to identify if the baking is enabled. More...
 
virtual void SetBakeEnabled (BOOL isEnabled)=0
 Set the flag to identify if the baking is enabled. More...
 
virtual int GetBakeMapChannel () const =0
 Get the mapping channel to use for baking Object level. More...
 
virtual void SetBakeMapChannel (int mapChannel)=0
 Set the mapping channel for baking. More...
 
virtual int GetNDilations () const =0
 Get the number of dilations after rendering, affects seaming. More...
 
virtual void SetNDilations (int nDilations)=0
 Set the number of dilations for baking. More...
 
virtual MAX_DEPRECATED int GetBakeFlags () const final
 Get the bake flags for baking. More...
 
virtual MAX_DEPRECATED void SetBakeFlags (int flags) final
 Set the bake flags for baking. More...
 
virtual float GetSurfaceArea () const =0
 Get the surface area for baking. More...
 
virtual void SetSurfaceArea (float area)=0
 Set the surface area for baking. More...
 
virtual float GetAreaScale () const =0
 Get the area scale for baking. More...
 
virtual void SetAreaScale (float scale)=0
 Set the area scale for baking. More...
 
virtual int GetNBakeElements () const =0
 Get total number of the bake elements. More...
 
virtual MaxBakeElementGetBakeElement (int nElement)=0
 Get the bake element by the index. More...
 
virtual Tab< MaxBakeElement * > GetBakeElementArray ()=0
 returns a Tab object holding the list of Texture Bake elements assigned to the node. More...
 
virtual BOOL AddBakeElement (MaxBakeElement *pEle)=0
 Add bake element by the pointer. More...
 
virtual BOOL RemoveBakeElement (MaxBakeElement *pEle)=0
 Remove bake element by the pointer. More...
 
virtual BOOL RemoveBakeElementByName (const MCHAR *name)=0
 Remove bake element by name. More...
 
virtual BOOL RemoveBakeElementByIndex (int index)=0
 Remove bake element by index. More...
 
virtual void RemoveAllBakeElements ()=0
 Remove all bake elements hold by this entity. More...
 
virtual void ResetBakeProps ()=0
 Reset params to default, toss render elements. More...
 
virtual BOOL GetEffectiveEnable ()=0
 Get the flag to identify if there's anything effective to bake. More...
 
virtual IPoint2 GetRenderSize ()=0
 Get the render size for baking. More...
 
virtual FBox2 GetActiveRegion ()=0
 Get the active region for baking. More...
 
virtual void SetActiveRegion (FBox2 region)=0
 Set the active region for baking. More...
 
virtual IPoint2 GetActiveTile () const =0
 Get the active uv tile for baking. More...
 
virtual void SetActiveTile (const IPoint2 &tile)=0
 Set the active uv tile for baking. More...
 
- Public Member Functions inherited from FPMixinInterface
 FPMixinInterface ()
 
virtual LifetimeType LifetimeControl ()
 
virtual CoreExport bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
CoreExport ~FPMixinInterface ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
virtual FPInterfaceDescGetDescByID (Interface_ID id)
 
virtual Interface_ID GetID ()
 
- Public Member Functions inherited from FPInterface
virtual FPInterfaceDescGetDesc ()=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 ActionTableGetActionTable ()
 
virtual void EnableActions (BOOL onOff)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
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...
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 
- Protected Member Functions inherited from FPMixinInterface
 FPMixinInterface (const FPMixinInterface &rhs)
 
FPMixinInterfaceoperator= (const FPMixinInterface &rhs)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 
- Protected Attributes inherited from FPMixinInterface
Tab< InterfaceNotifyCallback * > * interfaceNotifyCBs
 

Detailed Description

Description:
This class defines an interface for accessing a node's texture baking properties. An instance of this interface can be retrieved using the following line of code (assuming 'node' is of type INode*):
static_cast<INodeBakeProperties*>(pNode->GetInterface(NODE_BAKE_PROPERTIES_INTERFACE))
#define NODE_BAKE_PROPERTIES_INTERFACE
Definition: INodeBakeProperties.h:25
Definition: INodeBakeProperties.h:54
Description of the node's texture baking properties:
General Properties:
Enable:
  • Texture baking is enabled for this object
Baking Channel:
  • Flattening & baking use this uv mapping channel for this object
List of Baking Render Elements:
  • each object has a list of render elements for output

Member Function Documentation

◆ GetBakeEnabled()

virtual BOOL GetBakeEnabled ( ) const
pure virtual

Get the flag to identify if the baking is enabled.

Remarks
The baker can query the flag to perform the baking or not.
Returns
The flag to identify if the baking is enabled.

◆ SetBakeEnabled()

virtual void SetBakeEnabled ( BOOL  isEnabled)
pure virtual

Set the flag to identify if the baking is enabled.

Remarks
The client can set the flag to enable or disable the baking.
Parameters
isEnabledThe flag to identify if the baking is enabled.

◆ GetBakeMapChannel()

virtual int GetBakeMapChannel ( ) const
pure virtual

Get the mapping channel to use for baking Object level.

Remarks
The baker can query the mapping channel, then apply it for baking.
Returns
The mapping channel for baking.

◆ SetBakeMapChannel()

virtual void SetBakeMapChannel ( int  mapChannel)
pure virtual

Set the mapping channel for baking.

Remarks
The client can set the mapping channel to bake.
Parameters
mapChannelThe mapping channel for baking.

◆ GetNDilations()

virtual int GetNDilations ( ) const
pure virtual

Get the number of dilations after rendering, affects seaming.

Remarks
The baker can query the number of dilations, then apply it for baking.
Returns
The number of dilations for baking.

◆ SetNDilations()

virtual void SetNDilations ( int  nDilations)
pure virtual

Set the number of dilations for baking.

Remarks
The client can set the number of dilations to bake.
Parameters
nDilationsThe number of dilations for baking.

◆ GetBakeFlags()

virtual MAX_DEPRECATED int GetBakeFlags ( ) const
inlinefinalvirtual

Get the bake flags for baking.

Deprecated:
This has been deprecated as of 3ds Max 2022, please do not use it.
Remarks
The baker can query the bake flags, then apply it for baking.
Returns
The bake flags for baking.
101 { return 0; }

◆ SetBakeFlags()

virtual MAX_DEPRECATED void SetBakeFlags ( int  flags)
inlinefinalvirtual

Set the bake flags for baking.

Deprecated:
This has been deprecated as of 3ds Max 2022, please do not use it.
Remarks
The client can set the bake flags to bake.
Parameters
flagsThe bake flags for baking.
108 { UNREFERENCED_PARAMETER( flags ); }

◆ GetSurfaceArea()

virtual float GetSurfaceArea ( ) const
pure virtual

Get the surface area for baking.

Remarks
The baker can query the surface area, then apply it for baking.
Returns
The surface area for baking.

◆ SetSurfaceArea()

virtual void SetSurfaceArea ( float  area)
pure virtual

Set the surface area for baking.

Remarks
The client can set the surface area to bake.
Parameters
areaThe surface area for baking.

◆ GetAreaScale()

virtual float GetAreaScale ( ) const
pure virtual

Get the area scale for baking.

Remarks
The baker can query the area scale, then apply it for baking.
Returns
The area scale for baking.

◆ SetAreaScale()

virtual void SetAreaScale ( float  scale)
pure virtual

Set the area scale for baking.

Remarks
The client can set the area scale to bake.
Parameters
scaleThe area scale for baking.

◆ GetNBakeElements()

virtual int GetNBakeElements ( ) const
pure virtual

Get total number of the bake elements.

Returns
The total number of the bake elements.

◆ GetBakeElement()

virtual MaxBakeElement* GetBakeElement ( int  nElement)
pure virtual

Get the bake element by the index.

Parameters
nElementThe index of the bake element.
Returns
The pointer to the bake element.

◆ GetBakeElementArray()

virtual Tab<MaxBakeElement*> GetBakeElementArray ( )
pure virtual

returns a Tab object holding the list of Texture Bake elements assigned to the node.

Developers should not try to set BakeElements by altering the contents of this Tab; use the methods AddBakeElement() and RemoveBakeElement() instead

Returns
a Tab object holding the list of Texture Bake elements assigned to the node.

◆ AddBakeElement()

virtual BOOL AddBakeElement ( MaxBakeElement pEle)
pure virtual

Add bake element by the pointer.

Parameters
pEleThe pointer to the bake element.
Returns
The flag to identify if the operation is successful.

◆ RemoveBakeElement()

virtual BOOL RemoveBakeElement ( MaxBakeElement pEle)
pure virtual

Remove bake element by the pointer.

Parameters
pEleThe pointer to the bake element.
Returns
The flag to identify if the operation is successful.

◆ RemoveBakeElementByName()

virtual BOOL RemoveBakeElementByName ( const MCHAR name)
pure virtual

Remove bake element by name.

Parameters
nameThe name of the bake element.
Returns
The flag to identify if the operation is successful.

◆ RemoveBakeElementByIndex()

virtual BOOL RemoveBakeElementByIndex ( int  index)
pure virtual

Remove bake element by index.

Parameters
indexThe index of the bake element.
Returns
The flag to identify if the operation is successful.

◆ RemoveAllBakeElements()

virtual void RemoveAllBakeElements ( )
pure virtual

Remove all bake elements hold by this entity.

◆ ResetBakeProps()

virtual void ResetBakeProps ( )
pure virtual

Reset params to default, toss render elements.

◆ GetEffectiveEnable()

virtual BOOL GetEffectiveEnable ( )
pure virtual

Get the flag to identify if there's anything effective to bake.

Remarks
The result depends on if the node is bake enabled & has some elements & sz not 0.
Returns
The flag to identify if there's anything effective to bake.

◆ GetRenderSize()

virtual IPoint2 GetRenderSize ( )
pure virtual

Get the render size for baking.

Remarks
It returns the largest size of enabled baking elements.
The baker can query the render size, then render to target with that size.
Returns
The the render size for baking.

◆ GetActiveRegion()

virtual FBox2 GetActiveRegion ( )
pure virtual

Get the active region for baking.

Remarks
The region is a rectangle area.
The baker can query the active region, then bake everything in that region.
Returns
The active region for baking.

◆ SetActiveRegion()

virtual void SetActiveRegion ( FBox2  region)
pure virtual

Set the active region for baking.

Remarks
The region is a rectangle area.
The client can set the active region to bake everything in that region.
Parameters
regionThe active region for baking.

◆ GetActiveTile()

virtual IPoint2 GetActiveTile ( ) const
pure virtual

Get the active uv tile for baking.

Remarks
In UDIM baking workflow, the tile to bake could be IPoint2(uOffset,vOffset), uOffset/vOffset means the offset in u/v space.
The default value is IPoint2(0,0), which represents the main/default tile or tile u0v0/1001.
The baker can query the active uv tile, then bake everything in that uv tile.
Returns
The active uv tile for baking.

◆ SetActiveTile()

virtual void SetActiveTile ( const IPoint2 tile)
pure virtual

Set the active uv tile for baking.

Remarks
In UDIM baking workflow, the tile to bake could be IPoint2(uOffset,vOffset), uOffset/vOffset means the offset in u/v space.
If no tile is specified, the default value used by baker is IPoint2(0,0), which represents the main/default tile or tile u0v0/1001.
The client can set the active uv tile to bake the specific tile.
Parameters
tileThe active uv tile for baking.