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 NodeItem::extract(const int index) const
|
||||||
{
|
{
|
||||||
NodeItem res = empty();
|
/* TODO: Add check if (value) { ... } */
|
||||||
res = create_node("extract", Type::Float);
|
NodeItem res = create_node("extract", Type::Float);
|
||||||
res.set_input("in", *this);
|
res.set_input("in", *this);
|
||||||
res.set_input("index", val(index));
|
res.set_input("index", val(index));
|
||||||
return res;
|
return res;
|
||||||
@ -817,7 +817,7 @@ NodeItem NodeItem::arithmetic(const std::string &category, std::function<float(f
|
|||||||
if (ELEM(type, Type::Color3, Type::Color4) &&
|
if (ELEM(type, Type::Color3, Type::Color4) &&
|
||||||
ELEM(category, "sin", "cos", "tan", "asin", "acos", "atan2", "sqrt", "ln", "exp"))
|
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 */
|
||||||
BogdanNagirniak marked this conversation as resolved
Outdated
|
|||||||
type = type == Type::Color3 ? Type::Vector3 : Type::Vector4;
|
type = type == Type::Color3 ? Type::Vector3 : Type::Vector4;
|
||||||
v = v.convert(type);
|
v = v.convert(type);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user
typo
fucntions
and plural form