3ds Max USD API Reference
Loading...
Searching...
No Matches
MaxMeshConversionOptions Class Reference

Public Member Functions

MaxUSDAPI MaxMeshConversionOptions ()
 Constructor.
 
MaxUSDAPI void SetDefaults ()
 Sets default mesh conversion options. This includes a call to SetDefaultChannelPrimvarMappings().
 
MaxUSDAPI void SetDefaultChannelPrimvarMappings ()
 Sets default channel to primvar mappings. alpha -> "displayOpacity" shading -> "mapShading" vertex color -> "displayColor" 1-N -> mapN.
 
MaxUSDAPI const std::map< int, maxUsd::MappedAttributeBuilder::Config > & GetChannelMappings () const
 Returns the channel to primvar map. More...
 
MaxUSDAPI void SetChannelMappings (const std::map< int, maxUsd::MappedAttributeBuilder::Config > &mappings)
 Sets the channel to primvar map. More...
 
MaxUSDAPI NormalsMode GetNormalMode () const
 Gets the normal conversion mode. More...
 
MaxUSDAPI void SetNormalsMode (NormalsMode normalMode)
 Sets the normal conversion mode. More...
 
MaxUSDAPI MeshFormat GetMeshFormat () const
 Gets the MeshFormat to be used. More...
 
MaxUSDAPI void SetMeshFormat (MeshFormat meshFormat)
 Sets the mesh format to be used. More...
 
MaxUSDAPI void SetBakeObjectOffsetTransform (bool bakeObjectOffset)
 Sets whether or not the Object-offset transform should be baked into the geometry. Otherwise, an Xform will be used to represent the node transform's versus the offset. The object-offset transform is the offset of the object from the node it is attached too. More...
 
MaxUSDAPI bool GetBakeObjectOffsetTransform () const
 Gets whether or not the Object-offset transform should be baked into the geometry. More...
 
MaxUSDAPI void SetPreserveEdgeOrientation (bool preserve)
 Sets whether or not to preserve max edge orientation. More...
 
MaxUSDAPI bool GetPreserveEdgeOrientation () const
 Gets whether or not to preserve max edge orientation. More...
 
MaxUSDAPI void SetChannelPrimvarConfig (int channel, const maxUsd::MappedAttributeBuilder::Config &config)
 Configures a channel to primvar mapping. The specified channel will be exported using the given configuration - essentially a target primvar name and a type. More...
 
MaxUSDAPI const maxUsd::MappedAttributeBuilder::Config & GetChannelPrimvarConfig (int channelId) const
 Returns the primvar configuration for the specified channel. More...
 

Protected Attributes

NormalsMode normalMode = NormalsMode::AsPrimVar
 
MeshFormat meshFormat = MeshFormat::FromScene
 
bool bakeObjectOffsetTransform = true
 
bool preserveEdgeOrientation = false
 
std::map< int, maxUsd::MappedAttributeBuilder::Config > channelToPrimvarConfig
 

Member Function Documentation

◆ GetBakeObjectOffsetTransform()

MaxUSDAPI bool MaxMeshConversionOptions::GetBakeObjectOffsetTransform ( ) const

Gets whether or not the Object-offset transform should be baked into the geometry.

Returns
True if object offset transform are baked, false otherwise.

◆ GetChannelMappings()

MaxUSDAPI const std::map< int, maxUsd::MappedAttributeBuilder::Config > & MaxMeshConversionOptions::GetChannelMappings ( ) const

Returns the channel to primvar map.

Returns
The mapping table.

◆ GetChannelPrimvarConfig()

MaxUSDAPI const maxUsd::MappedAttributeBuilder::Config & MaxMeshConversionOptions::GetChannelPrimvarConfig ( int  channelId) const

Returns the primvar configuration for the specified channel.

Parameters
channelIdThe channel
Returns
The primvar configuration.

◆ GetMeshFormat()

MaxUSDAPI MeshFormat MaxMeshConversionOptions::GetMeshFormat ( ) const

Gets the MeshFormat to be used.

Returns
The mesh format.

◆ GetNormalMode()

MaxUSDAPI NormalsMode MaxMeshConversionOptions::GetNormalMode ( ) const

Gets the normal conversion mode.

Returns
The normal conversion mode

◆ GetPreserveEdgeOrientation()

MaxUSDAPI bool MaxMeshConversionOptions::GetPreserveEdgeOrientation ( ) const

Gets whether or not to preserve max edge orientation.

Returns
True if we should preserve the edge orientation, false otherwise.

◆ SetBakeObjectOffsetTransform()

MaxUSDAPI void MaxMeshConversionOptions::SetBakeObjectOffsetTransform ( bool  bakeObjectOffset)

Sets whether or not the Object-offset transform should be baked into the geometry. Otherwise, an Xform will be used to represent the node transform's versus the offset. The object-offset transform is the offset of the object from the node it is attached too.

Parameters
bakeObjectOffsetTrue if we should bake the transform, false otherwise.

◆ SetChannelMappings()

MaxUSDAPI void MaxMeshConversionOptions::SetChannelMappings ( const std::map< int, maxUsd::MappedAttributeBuilder::Config > &  mappings)

Sets the channel to primvar map.

Parameters
mappingsThe mapping table.

◆ SetChannelPrimvarConfig()

MaxUSDAPI void MaxMeshConversionOptions::SetChannelPrimvarConfig ( int  channel,
const maxUsd::MappedAttributeBuilder::Config &  config 
)

Configures a channel to primvar mapping. The specified channel will be exported using the given configuration - essentially a target primvar name and a type.

Parameters
channelThe channel to configure.
configThe configuration to use when exporting the given channel to a primvar. It is possible to specify we do not want this channel exported by specifying an empty target primvar name.

◆ SetMeshFormat()

MaxUSDAPI void MaxMeshConversionOptions::SetMeshFormat ( MeshFormat  meshFormat)

Sets the mesh format to be used.

Parameters
meshFormatThe mesh format to be set.

◆ SetNormalsMode()

MaxUSDAPI void MaxMeshConversionOptions::SetNormalsMode ( NormalsMode  normalMode)

Sets the normal conversion mode.

Parameters
normalModeThe normal mode to be set.

◆ SetPreserveEdgeOrientation()

MaxUSDAPI void MaxMeshConversionOptions::SetPreserveEdgeOrientation ( bool  preserve)

Sets whether or not to preserve max edge orientation.

Parameters
preserveTrue if we should preserve the edge orientation, false otherwise.

The documentation for this class was generated from the following file: