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
path: root/source
diff options
context:
space:
mode:
authorMichael Kowalski <makowalski@nvidia.com>2022-08-17 05:25:51 +0300
committerMichael Kowalski <makowalski@nvidia.com>2022-08-17 05:25:51 +0300
commitb31807c75f0c18c43ac6979e6da57dc9d420167a (patch)
tree2abc1023a46a57d82c8459be0f7051ec2696912b /source
parent5649158db9985608adf3b24d0726cdab35788036 (diff)
Format fixes.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/io/io_usd.c17
-rw-r--r--source/blender/io/usd/intern/usd_reader_material.cc3
-rw-r--r--source/blender/io/usd/intern/usd_reader_mesh.cc10
-rw-r--r--source/blender/io/usd/usd.h1
4 files changed, 15 insertions, 16 deletions
diff --git a/source/blender/editors/io/io_usd.c b/source/blender/editors/io/io_usd.c
index 6c4c35fe490..fd8caf6836e 100644
--- a/source/blender/editors/io/io_usd.c
+++ b/source/blender/editors/io/io_usd.c
@@ -612,15 +612,14 @@ void WM_OT_usd_import(struct wmOperatorType *ot)
"the material blend method will automatically be set based on the "
"shader's opacity and opacityThreshold inputs");
- RNA_def_enum(
- ot->srna,
- "mtl_purpose",
- rna_enum_usd_mtl_purpose_items,
- USD_MTL_PURPOSE_ALL,
- "Material Purpose",
- "Attempt to import materials with the given purpose. "
- "If no material with this purpose is bound to the primitive, "
- "fall back on loading any other bound material");
+ RNA_def_enum(ot->srna,
+ "mtl_purpose",
+ rna_enum_usd_mtl_purpose_items,
+ USD_MTL_PURPOSE_ALL,
+ "Material Purpose",
+ "Attempt to import materials with the given purpose. "
+ "If no material with this purpose is bound to the primitive, "
+ "fall back on loading any other bound material");
RNA_def_float(ot->srna,
"light_intensity_scale",
diff --git a/source/blender/io/usd/intern/usd_reader_material.cc b/source/blender/io/usd/intern/usd_reader_material.cc
index 5d64f3279ee..a786cdc70f4 100644
--- a/source/blender/io/usd/intern/usd_reader_material.cc
+++ b/source/blender/io/usd/intern/usd_reader_material.cc
@@ -749,7 +749,8 @@ void USDMaterialReader::convert_usd_primvar_reader_float2(
std::string varname;
if (varname_val.IsHolding<std::string>()) {
varname = varname_val.Get<std::string>();
- } else if (varname_val.IsHolding<pxr::TfToken>()) {
+ }
+ else if (varname_val.IsHolding<pxr::TfToken>()) {
varname = varname_val.Get<pxr::TfToken>().GetString();
}
if (!varname.empty()) {
diff --git a/source/blender/io/usd/intern/usd_reader_mesh.cc b/source/blender/io/usd/intern/usd_reader_mesh.cc
index fb7f2cfe41c..c016c9127ec 100644
--- a/source/blender/io/usd/intern/usd_reader_mesh.cc
+++ b/source/blender/io/usd/intern/usd_reader_mesh.cc
@@ -62,7 +62,8 @@ static void build_mat_map(const Main *bmain, std::map<std::string, Material *> *
}
}
-static pxr::UsdShadeMaterial compute_bound_material(const pxr::UsdPrim &prim, eUSDMtlPurpose purpose)
+static pxr::UsdShadeMaterial compute_bound_material(const pxr::UsdPrim &prim,
+ eUSDMtlPurpose purpose)
{
pxr::UsdShadeMaterial mtl;
@@ -791,8 +792,8 @@ void USDMeshReader::assign_facesets_to_mpoly(double motionSampleTime,
if (!subsets.empty()) {
for (const pxr::UsdGeomSubset &subset : subsets) {
- pxr::UsdShadeMaterial subset_mtl =
- utils::compute_bound_material(subset.GetPrim(), import_params_.mtl_purpose);
+ pxr::UsdShadeMaterial subset_mtl = utils::compute_bound_material(subset.GetPrim(),
+ import_params_.mtl_purpose);
if (!subset_mtl) {
continue;
}
@@ -822,8 +823,7 @@ void USDMeshReader::assign_facesets_to_mpoly(double motionSampleTime,
if (r_mat_map->empty()) {
- pxr::UsdShadeMaterial mtl =
- utils::compute_bound_material(prim_, import_params_.mtl_purpose);
+ pxr::UsdShadeMaterial mtl = utils::compute_bound_material(prim_, import_params_.mtl_purpose);
if (mtl) {
pxr::SdfPath mtl_path = mtl.GetPath();
diff --git a/source/blender/io/usd/usd.h b/source/blender/io/usd/usd.h
index 7caba9dea07..7f0660765d1 100644
--- a/source/blender/io/usd/usd.h
+++ b/source/blender/io/usd/usd.h
@@ -31,7 +31,6 @@ typedef enum eUSDMtlPurpose {
USD_MTL_PURPOSE_FULL = 2
} eUSDMtlPurpose;
-
struct USDExportParams {
bool export_animation;
bool export_hair;