Add basic supported nodes #1

Merged
Bogdan Nagirniak merged 5 commits from add-basic-nodes into matx-export-material 2023-08-24 10:23:00 +02:00
3 changed files with 4 additions and 3 deletions
Showing only changes of commit c0243a0ad6 - Show all commits

View File

@ -17,7 +17,7 @@ MaterialXTexImageNode::MaterialXTexImageNode(MaterialX::DocumentPtr doc,
const bNode *node)
: MaterialXNode(doc, depsgraph, material, node)
{
matx_node = doc->addNode("image", node->name, "color3");
matx_node = doc->addNode("image", MaterialX::createValidName(node->name), "color3");
}
MaterialX::NodePtr MaterialXTexImageNode::convert()

View File

@ -13,7 +13,7 @@ MaterialXMaterialOutputNode::MaterialXMaterialOutputNode(MaterialX::DocumentPtr
const bNode *node)
: MaterialXNode(doc, depsgraph, material, node)
{
matx_node = doc->addNode("surfacematerial", node->name, "material");
matx_node = doc->addNode("surfacematerial", MaterialX::createValidName(node->name), "material");
}
MaterialX::NodePtr MaterialXMaterialOutputNode::convert()

View File

@ -16,7 +16,8 @@ MaterialXPrincipledBSDFNode::MaterialXPrincipledBSDFNode(MaterialX::DocumentPtr
const bNode *node)
: MaterialXNode(doc, depsgraph, material, node)
{
matx_node = doc->addNode("standard_surface", node->name, "surfaceshader");
matx_node = doc->addNode(
"standard_surface", MaterialX::createValidName(node->name), "surfaceshader");
}
MaterialX::NodePtr MaterialXPrincipledBSDFNode::convert()