Implement BSDF Transparent shader #36

Merged
Bogdan Nagirniak merged 5 commits from BogdanNagirniak/blender:matx-transparent-shader into matx-export-material 2023-09-26 16:16:26 +02:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit 9ee454d491 - Show all commits

View File

@ -103,6 +103,8 @@ std::string NodeItem::type(Type type)
return "surfaceshader"; return "surfaceshader";
case Type::Material: case Type::Material:
return "material"; return "material";
case Type::SurfaceOpacity:
return "opacity";
default: default:
BLI_assert_unreachable(); BLI_assert_unreachable();
} }

View File

@ -64,7 +64,7 @@ std::string NodeParser::node_name() const
if (node_->output_sockets().size() > 1) { if (node_->output_sockets().size() > 1) {
name += std::string("_") + socket_out_->name; name += std::string("_") + socket_out_->name;
} }
if (ELEM(to_type_, NodeItem::Type::BSDF, NodeItem::Type::EDF)) { if (ELEM(to_type_, NodeItem::Type::BSDF, NodeItem::Type::EDF, NodeItem::Type::SurfaceOpacity)) {
name += "_" + NodeItem::type(to_type_); name += "_" + NodeItem::type(to_type_);
} }
#ifdef USE_MATERIALX_NODEGRAPH #ifdef USE_MATERIALX_NODEGRAPH