forked from blender/blender
Support group nodes #22
@ -81,6 +81,15 @@ void MaterialData::init()
|
||||
MaterialX::DocumentPtr doc = blender::nodes::materialx::export_to_materialx(
|
||||
scene_delegate_->depsgraph, (Material *)id);
|
||||
pxr::UsdMtlxRead(doc, stage);
|
||||
pxr::UsdMtlxReadNodeGraphs(doc, stage);
|
||||
|
||||
auto stage_str = [&stage]() {
|
||||
std::string str;
|
||||
stage->ExportToString(&str);
|
||||
return str;
|
||||
};
|
||||
ID_LOGN(2, "Stage:\n%s", stage_str().c_str());
|
||||
|
||||
if (pxr::UsdPrim materials = stage->GetPrimAtPath(pxr::SdfPath("/MaterialX/Materials"))) {
|
||||
pxr::UsdPrimSiblingRange children = materials.GetChildren();
|
||||
if (!children.empty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user