Format fixes.
This commit is contained in:
parent
5649158db9
commit
b31807c75f
|
@ -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",
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ typedef enum eUSDMtlPurpose {
|
|||
USD_MTL_PURPOSE_FULL = 2
|
||||
} eUSDMtlPurpose;
|
||||
|
||||
|
||||
struct USDExportParams {
|
||||
bool export_animation;
|
||||
bool export_hair;
|
||||
|
|
Loading…
Reference in New Issue