MaterialX: fix review comments #19

Merged
Bogdan Nagirniak merged 10 commits from matx-fix-review-comments into matx-export-material 2023-09-14 02:01:04 +02:00
Showing only changes of commit c9ae63a427 - Show all commits

View File

@ -13,8 +13,8 @@
#include <pxr/usdImaging/usdImaging/materialParamUtils.h> #include <pxr/usdImaging/usdImaging/materialParamUtils.h>
#ifdef WITH_MATERIALX #ifdef WITH_MATERIALX
#include <pxr/usd/usdMtlx/reader.h> # include <pxr/usd/usdMtlx/reader.h>
#include <pxr/usd/usdMtlx/utils.h> # include <pxr/usd/usdMtlx/utils.h>
#endif #endif
#include "MEM_guardedalloc.h" #include "MEM_guardedalloc.h"
@ -94,7 +94,6 @@ void MaterialData::init()
} }
#endif #endif
BogdanNagirniak marked this conversation as resolved
Review

simplify to:

....
  else
#endif
{
usd_material = usd::create_usd_material(export_context, material_path, (Material *)id, "st");
}
simplify to: ``` .... else #endif { usd_material = usd::create_usd_material(export_context, material_path, (Material *)id, "st"); } ```
/* Convert USD material to Hydra material network map, adapted for render delegate. */ /* Convert USD material to Hydra material network map, adapted for render delegate. */
const pxr::HdRenderDelegate *render_delegate = const pxr::HdRenderDelegate *render_delegate =
scene_delegate_->GetRenderIndex().GetRenderDelegate(); scene_delegate_->GetRenderIndex().GetRenderDelegate();