USD import: fixed compiler warnings.
Removed unused function and assignment in a conditional expression.
This commit is contained in:
@@ -48,20 +48,6 @@ static const pxr::TfToken normalsPrimvar("normals", pxr::TfToken::Immortal);
|
||||
} // namespace usdtokens
|
||||
|
||||
namespace utils {
|
||||
/* Very similar to #blender::io::alembic::utils. */
|
||||
static void build_mat_map(const Main *bmain, std::map<std::string, Material *> *r_mat_map)
|
||||
{
|
||||
if (r_mat_map == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
Material *material = static_cast<Material *>(bmain->materials.first);
|
||||
|
||||
for (; material; material = static_cast<Material *>(material->id.next)) {
|
||||
/* We have to do this because the stored material name is coming directly from USD. */
|
||||
(*r_mat_map)[pxr::TfMakeValidIdentifier(material->id.name + 2)] = material;
|
||||
}
|
||||
}
|
||||
|
||||
static pxr::UsdShadeMaterial compute_bound_material(const pxr::UsdPrim &prim)
|
||||
{
|
||||
|
@@ -332,8 +332,8 @@ void USDStageReader::import_all_materials(Main *bmain)
|
||||
}
|
||||
|
||||
/* Add the material now. */
|
||||
if (blend_mtl = mtl_reader.add_material(usd_mtl)) {
|
||||
|
||||
blend_mtl = mtl_reader.add_material(usd_mtl);
|
||||
if (blend_mtl) {
|
||||
if (params_.mtl_name_collision_mode == USD_MTL_NAME_COLLISION_MAKE_UNIQUE) {
|
||||
/* Record the name of the Blender material we created for the USD material
|
||||
* with the given path, so we don't import the material again if the
|
||||
|
Reference in New Issue
Block a user