3ds Max USD API Reference
Loading...
Searching...
No Matches
PrimvarMappingOptions.h
1//**************************************************************************/
2// Copyright (c) 1998-2020 Autodesk, Inc.
3// All rights reserved.
4//
5// Use of this software is subject to the terms of the Autodesk license
6// agreement provided at the time of installation or download, or which
7// otherwise accompanies this software in either electronic or hard copy form.
8//**************************************************************************/
9// DESCRIPTION: Usd Mesh Conversion Options
10// AUTHOR: Autodesk Inc.
11//***************************************************************************/
12
13#pragma once
14
15#include "MaxUsd/MaxUSDAPI.h"
16
19{
20public:
25
30
35 MaxUSDAPI const std::map<std::string, int>& GetPrimvarMappings() const;
36
42 MaxUSDAPI void SetPrimvarChannelMapping(const std::string& primvar, int channel);
43
49 MaxUSDAPI int GetPrimvarChannelMapping(const std::string& primvar) const;
50
55 MaxUSDAPI void GetMappedPrimvars(std::vector<std::wstring>& primvars) const;
56
62 MaxUSDAPI bool IsMappedPrimvar(const std::string& primvar) const;
63
68 MaxUSDAPI bool GetImportUnmappedPrimvars() const;
69
75 MaxUSDAPI void SetImportUnmappedPrimvars(bool importUnmappedPrimvars);
76
80 MaxUSDAPI void ClearMappedPrimvars();
81
82 static MaxUSDAPI const int invalidChannel = INT_MIN;
83
84protected:
85 std::map<std::string, int> primvarToChannnelMappings;
86 bool importUnmappedPrimvars = false;
87};
This class exposes methods for getting and setting primvar/channel mapping options.
Definition: PrimvarMappingOptions.h:19
MaxUSDAPI void GetMappedPrimvars(std::vector< std::wstring > &primvars) const
Returns the list of all currently mapped primvars.
MaxUSDAPI void SetDefaultPrimvarChannelMappings()
Sets defaults primvar to channels mappings.
MaxUSDAPI void ClearMappedPrimvars()
Clears all primvar mappings.
MaxUSDAPI int GetPrimvarChannelMapping(const std::string &primvar) const
Gets the channel to which a primvar maps to.
MaxUSDAPI void SetImportUnmappedPrimvars(bool importUnmappedPrimvars)
Sets whether or not to import primvars that are not explicitely mapped. If true, try to find the most...
MaxUSDAPI bool IsMappedPrimvar(const std::string &primvar) const
Checks if a primvar is currently mapped to a channel.
MaxUSDAPI bool GetImportUnmappedPrimvars() const
Gets whether or not to import primvars that are not explicitely mapped.
MaxUSDAPI const std::map< std::string, int > & GetPrimvarMappings() const
Returns the primvar to channel map.
MaxUSDAPI PrimvarMappingOptions()
Constructor.
MaxUSDAPI void SetPrimvarChannelMapping(const std::string &primvar, int channel)
Sets a primvar to channel mapping.