Implement export of Math node. Continue other arithmetic support for NodeItem #6

Merged
Bogdan Nagirniak merged 9 commits from BogdanNagirniak/blender:matx-arithmetic into matx-export-material 2023-08-31 12:35:55 +02:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 408b336e6e - Show all commits

View File

@ -174,7 +174,7 @@ NodeItem NodeItem::max(const NodeItem &other) const
return arithmetic(other, "max", [](float a, float b) { return std::max(a, b); }); return arithmetic(other, "max", [](float a, float b) { return std::max(a, b); });
} }
NodeItem NodeItem::dot(const NodeItem &other) const NodeItem NodeItem::dotproduct(const NodeItem &other) const
{ {
NodeItem d = arithmetic(other, "dotproduct", [](float a, float b) { return a * b; }); NodeItem d = arithmetic(other, "dotproduct", [](float a, float b) { return a * b; });
if (d.value) { if (d.value) {

View File

@ -45,7 +45,7 @@ class NodeItem {
NodeItem ceil() const; NodeItem ceil() const;
NodeItem min(const NodeItem &other) const; NodeItem min(const NodeItem &other) const;
NodeItem max(const NodeItem &other) const; NodeItem max(const NodeItem &other) const;
NodeItem dot(const NodeItem &other) const; NodeItem dotproduct(const NodeItem &other) const;
NodeItem if_else(const std::string &condition, NodeItem if_else(const std::string &condition,
const NodeItem &other, const NodeItem &other,
const NodeItem &if_val, const NodeItem &if_val,