Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kowalski <makowalski@nvidia.com>2022-10-06 06:11:43 +0300
committerMichael Kowalski <makowalski@nvidia.com>2022-10-06 06:11:43 +0300
commit092fe1ef293280cbf0ff2f8b892f5c455aea3c38 (patch)
treea3adb504536c841700b16d30b14af9ab8302e830 /source/blender
parent05e8eeda3c95c960b2481b85cd836194d78c95ad (diff)
USD IO format fixes.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/io/io_usd.c7
-rw-r--r--source/blender/io/usd/intern/usd_reader_material.cc10
-rw-r--r--source/blender/io/usd/intern/usd_reader_material.h1
-rw-r--r--source/blender/io/usd/intern/usd_reader_stage.cc3
4 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/editors/io/io_usd.c b/source/blender/editors/io/io_usd.c
index 5fe8ff7a16c..9bcd16a04df 100644
--- a/source/blender/editors/io/io_usd.c
+++ b/source/blender/editors/io/io_usd.c
@@ -583,8 +583,11 @@ void WM_OT_usd_import(struct wmOperatorType *ot)
RNA_def_boolean(ot->srna, "import_render", true, "Render", "Import final render geometry");
- RNA_def_boolean(ot->srna, "import_unbound_materials", false,
- "Unbound Materials", "Include materials not bound to any geometry");
+ RNA_def_boolean(ot->srna,
+ "import_unbound_materials",
+ false,
+ "Unbound Materials",
+ "Include materials not bound to any geometry");
RNA_def_boolean(ot->srna,
"import_usd_preview",
diff --git a/source/blender/io/usd/intern/usd_reader_material.cc b/source/blender/io/usd/intern/usd_reader_material.cc
index 6416f6861d4..bf4ee0ad208 100644
--- a/source/blender/io/usd/intern/usd_reader_material.cc
+++ b/source/blender/io/usd/intern/usd_reader_material.cc
@@ -757,7 +757,6 @@ void USDMaterialReader::convert_usd_primvar_reader_float2(
link_nodes(ntree, uv_map, "UV", dest_node, dest_socket_name);
}
-
void build_material_map(const Main *bmain, std::map<std::string, Material *> *r_mat_map)
{
if (r_mat_map == nullptr) {
@@ -771,11 +770,10 @@ void build_material_map(const Main *bmain, std::map<std::string, Material *> *r_
}
}
-Material *find_existing_material(
- const pxr::SdfPath &usd_mat_path,
- const USDImportParams &params,
- const std::map<std::string, Material *> &mat_map,
- const std::map<std::string, std::string> &usd_path_to_mat_name)
+Material *find_existing_material(const pxr::SdfPath &usd_mat_path,
+ const USDImportParams &params,
+ const std::map<std::string, Material *> &mat_map,
+ const std::map<std::string, std::string> &usd_path_to_mat_name)
{
if (params.mtl_name_collision_mode == USD_MTL_NAME_COLLISION_MAKE_UNIQUE) {
/* Check if we've already created the Blender material with a modified name. */
diff --git a/source/blender/io/usd/intern/usd_reader_material.h b/source/blender/io/usd/intern/usd_reader_material.h
index abd810b9936..871954f3a99 100644
--- a/source/blender/io/usd/intern/usd_reader_material.h
+++ b/source/blender/io/usd/intern/usd_reader_material.h
@@ -71,7 +71,6 @@ class USDMaterialReader {
Main *bmain_;
public:
-
USDMaterialReader(const USDImportParams &params, Main *bmain);
Material *add_material(const pxr::UsdShadeMaterial &usd_material) const;
diff --git a/source/blender/io/usd/intern/usd_reader_stage.cc b/source/blender/io/usd/intern/usd_reader_stage.cc
index 89dd7098f6c..0533cbbffee 100644
--- a/source/blender/io/usd/intern/usd_reader_stage.cc
+++ b/source/blender/io/usd/intern/usd_reader_stage.cc
@@ -353,7 +353,8 @@ void USDStageReader::import_all_materials(Main *bmain)
* materials. */
void USDStageReader::fake_users_for_unbound_materials()
{
- std::map<std::string, std::string>::const_iterator mat_name_it = settings_.usd_path_to_mat_name.begin();
+ std::map<std::string, std::string>::const_iterator mat_name_it =
+ settings_.usd_path_to_mat_name.begin();
for (; mat_name_it != settings_.usd_path_to_mat_name.end(); ++mat_name_it) {
std::map<std::string, Material *>::iterator mat_it = settings_.mat_name_to_mat.find(
mat_name_it->second);