Support group nodes #22

Merged
Bogdan Nagirniak merged 18 commits from BogdanNagirniak/blender:matx-group-nodes into matx-export-material 2023-09-18 12:49:19 +02:00
3 changed files with 7 additions and 9 deletions
Showing only changes of commit 8a2461c6b2 - Show all commits

View File

@ -83,7 +83,7 @@ void MaterialData::init()
pxr::UsdMtlxRead(doc, stage); pxr::UsdMtlxRead(doc, stage);
/* Logging stage: creating lambda stage_str() for not to call stage->ExportToString() /* Logging stage: creating lambda stage_str() for not to call stage->ExportToString()
* if log doesn't execute. */ * if log won't be printed. */
auto stage_str = [&stage]() { auto stage_str = [&stage]() {
std::string str; std::string str;
stage->ExportToString(&str); stage->ExportToString(&str);

View File

@ -47,13 +47,11 @@ NodeItem GroupNodeParser::compute()
NodeItem GroupNodeParser::compute_full() NodeItem GroupNodeParser::compute_full()
{ {
CLOG_INFO(LOG_MATERIALX_SHADER, NodeItem res = compute();
1, if (NodeItem::is_arithmetic(to_type_)) {
"%s [%d] => %s", res = res.convert(to_type_);
node_->name, }
node_->typeinfo->type, return res;
NodeItem::type(to_type_).c_str());
return compute();
} }
NodeItem GroupOutputNodeParser::compute() NodeItem GroupOutputNodeParser::compute()

View File

@ -8,7 +8,7 @@
/* TODO: pxr::UsdMtlxRead() doesn't perform nodegraphs. /* TODO: pxr::UsdMtlxRead() doesn't perform nodegraphs.
* Uncomment USE_MATERIALX_NODEGRAPH after fixing it. */ * Uncomment USE_MATERIALX_NODEGRAPH after fixing it. */
#define USE_MATERIALX_NODEGRAPH //#define USE_MATERIALX_NODEGRAPH
namespace blender::nodes::materialx { namespace blender::nodes::materialx {