diff options
Diffstat (limited to 'source/blender/io/usd/intern/usd_reader_prim.h')
-rw-r--r-- | source/blender/io/usd/intern/usd_reader_prim.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/io/usd/intern/usd_reader_prim.h b/source/blender/io/usd/intern/usd_reader_prim.h index fdf6247de16..c44c4a14ad7 100644 --- a/source/blender/io/usd/intern/usd_reader_prim.h +++ b/source/blender/io/usd/intern/usd_reader_prim.h @@ -7,7 +7,11 @@ #include <pxr/usd/usd/prim.h> +#include <map> +#include <string> + struct Main; +struct Material; struct Object; namespace blender::io::usd { @@ -33,6 +37,17 @@ struct ImportSettings { CacheFile *cache_file; + /* Map a USD material prim path to a Blender material name. + * This map is updated by readers during stage traversal. + * This field is mutable because it is used to keep track + * of what the importer is doing. This is necessary even + * when all the other import settings are to remain const. */ + mutable std::map<std::string, std::string> usd_path_to_mat_name; + /* Map a material name to Blender material. + * This map is updated by readers during stage traversal, + * and is mutable similar to the map above. */ + mutable std::map<std::string, Material *> mat_name_to_mat; + ImportSettings() : do_convert_mat(false), from_up(0), |