forked from blender/blender
Support group nodes #22
@ -609,8 +609,8 @@ NodeItem NodeItem::if_else(CompareOp op,
|
||||
|
||||
NodeItem NodeItem::extract(const int index) const
|
||||
{
|
||||
NodeItem res = empty();
|
||||
res = create_node("extract", Type::Float);
|
||||
/* TODO: Add check if (value) { ... } */
|
||||
NodeItem res = create_node("extract", Type::Float);
|
||||
res.set_input("in", *this);
|
||||
res.set_input("index", val(index));
|
||||
return res;
|
||||
@ -817,7 +817,7 @@ NodeItem NodeItem::arithmetic(const std::string &category, std::function<float(f
|
||||
if (ELEM(type, Type::Color3, Type::Color4) &&
|
||||
ELEM(category, "sin", "cos", "tan", "asin", "acos", "atan2", "sqrt", "ln", "exp"))
|
||||
{
|
||||
/* Such fucntions doesn't have implementation in MaterialX, converting to Vector types */
|
||||
/* These functions haven't implementation in MaterialX, converting to Vector types */
|
||||
type = type == Type::Color3 ? Type::Vector3 : Type::Vector4;
|
||||
v = v.convert(type);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user