forked from blender/blender
Implement BSDF Transparent shader #36
@ -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();
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user
Add the same convertion to
NodeItem::Type NodeItem::type(const std::string &type_str)