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

This class exposes methods for getting and setting primvar/channel mapping options. More...

#include <PrimvarMappingOptions.h>

Public Member Functions

MaxUSDAPI PrimvarMappingOptions ()
 Constructor.
 
MaxUSDAPI void SetDefaultPrimvarChannelMappings ()
 Sets defaults primvar to channels mappings.
 
MaxUSDAPI const std::map< std::string, int > & GetPrimvarMappings () const
 Returns the primvar to channel map. More...
 
MaxUSDAPI void SetPrimvarChannelMapping (const std::string &primvar, int channel)
 Sets a primvar to channel mapping. More...
 
MaxUSDAPI int GetPrimvarChannelMapping (const std::string &primvar) const
 Gets the channel to which a primvar maps to. More...
 
MaxUSDAPI void GetMappedPrimvars (std::vector< std::wstring > &primvars) const
 Returns the list of all currently mapped primvars. More...
 
MaxUSDAPI bool IsMappedPrimvar (const std::string &primvar) const
 Checks if a primvar is currently mapped to a channel. More...
 
MaxUSDAPI bool GetImportUnmappedPrimvars () const
 Gets whether or not to import primvars that are not explicitely mapped. More...
 
MaxUSDAPI void SetImportUnmappedPrimvars (bool importUnmappedPrimvars)
 Sets whether or not to import primvars that are not explicitely mapped. If true, try to find the most appropriate channels for each unmapped primvar, based on their types. More...
 
MaxUSDAPI void ClearMappedPrimvars ()
 Clears all primvar mappings.
 

Static Public Attributes

static MaxUSDAPI const int invalidChannel = INT_MIN
 

Protected Attributes

std::map< std::string, int > primvarToChannnelMappings
 
bool importUnmappedPrimvars = false
 

Detailed Description

This class exposes methods for getting and setting primvar/channel mapping options.

Member Function Documentation

◆ GetImportUnmappedPrimvars()

MaxUSDAPI bool PrimvarMappingOptions::GetImportUnmappedPrimvars ( ) const

Gets whether or not to import primvars that are not explicitely mapped.

Returns
True if unmapped primvars should be imported, false otherwise.

◆ GetMappedPrimvars()

MaxUSDAPI void PrimvarMappingOptions::GetMappedPrimvars ( std::vector< std::wstring > &  primvars) const

Returns the list of all currently mapped primvars.

Parameters
primvarsThe vector of primvar names to be filled.

◆ GetPrimvarChannelMapping()

MaxUSDAPI int PrimvarMappingOptions::GetPrimvarChannelMapping ( const std::string &  primvar) const

Gets the channel to which a primvar maps to.

Parameters
primvarThe name of the primvar for which to retrieve the target channel.
Returns
The target channel for this primvar.

◆ GetPrimvarMappings()

MaxUSDAPI const std::map< std::string, int > & PrimvarMappingOptions::GetPrimvarMappings ( ) const

Returns the primvar to channel map.

Returns
The mapping table.

◆ IsMappedPrimvar()

MaxUSDAPI bool PrimvarMappingOptions::IsMappedPrimvar ( const std::string &  primvar) const

Checks if a primvar is currently mapped to a channel.

Parameters
primvarThe primvar to check.
Returns
True if the primvar is mapped, false otherwise.

◆ SetImportUnmappedPrimvars()

MaxUSDAPI void PrimvarMappingOptions::SetImportUnmappedPrimvars ( bool  importUnmappedPrimvars)

Sets whether or not to import primvars that are not explicitely mapped. If true, try to find the most appropriate channels for each unmapped primvar, based on their types.

Parameters
importUnmappedPrimvarsIf true, unmapped primvars will be imported.

◆ SetPrimvarChannelMapping()

MaxUSDAPI void PrimvarMappingOptions::SetPrimvarChannelMapping ( const std::string &  primvar,
int  channel 
)

Sets a primvar to channel mapping.

Parameters
primvarThe name of the primvar.
channelThe channel this primvar should be imported to.

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