Fix: MaterialX: Use correct output node type
The output node types were seemingly incorrect since the initial commit and would produce incorrect MaterialX documents[1]. When MaterialX is upgraded to 1.38.10 this will now fail material creation in Hydra. Use the node type directly instead of setting things to their default `color3` output type. [1] See PR for an example. Pull Request: https://projects.blender.org/blender/blender/pulls/132362
This commit is contained in:
committed by
Jesse Yurkovich
parent
6bfb6399ea
commit
95be928c5e
@@ -828,11 +828,7 @@ void NodeItem::set_input(const std::string &in_name, const NodeItem &item)
|
||||
|
||||
auto output = graph_->getOutput(output_name);
|
||||
if (!output) {
|
||||
auto output_type = MaterialX::DEFAULT_TYPE_STRING;
|
||||
if (item.node->getType() == "BSDF") {
|
||||
output_type = "BSDF";
|
||||
}
|
||||
output = graph_->addOutput(output_name, output_type);
|
||||
output = graph_->addOutput(output_name, item.node->getType());
|
||||
}
|
||||
|
||||
output->setConnectedNode(item.node);
|
||||
|
||||
Reference in New Issue
Block a user