forked from blender/blender
MaterialX: add convert nodes #15
No reviewers
Labels
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: DagerD/blender#15
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "matx-add-convert-nodes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose:
Add support for convert nodes
Technical steps:
Added nodes:
@ -0,0 +9,4 @@
NodeItem BlackbodyNodeParser::compute()
{
/* This node doesn't have an implementation in MaterialX 1.38.6.
* It's added in MaterialX 1.38.8. Uncomment this code after switching to 1.38.8.
It is exists in pbrlib_def.mtlx, can be used here
@ -0,0 +14,4 @@
NodeItem max = get_input_value("Max", NodeItem::Type::Float);
if (type == NODE_CLAMP_MINMAX) {
min = min.if_else(NodeItem::CompareOp::Greater, max, max, min);
min = min.min(max)
@ -0,0 +16,4 @@
if (type == NODE_CLAMP_MINMAX) {
min = min.if_else(NodeItem::CompareOp::Greater, max, max, min);
}
does it correctly work with RANGE? do we need swap min max if min > max?
@ -17,6 +17,7 @@ class NodeItem {
/* Value types */
String,
Filename,
Bool,
Maybe rename to Boolean, as we use full names for other types?
@ -0,0 +8,4 @@
NodeItem RGBToBWNodeParser::compute()
{
NodeItem color = get_input_value("Color", NodeItem::Type::Color3);
use Color4 type
Looks good