Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_math.cc
| Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | for (const EnumPropertyItem *item = rna_enum_node_math_items; item->identifier != nullptr; | ||||
| item++) { | item++) { | ||||
| if (item->name != nullptr && item->identifier[0] != '\0') { | if (item->name != nullptr && item->identifier[0] != '\0') { | ||||
| const int gn_weight = | const int gn_weight = | ||||
| (is_geometry_node_tree && | (is_geometry_node_tree && | ||||
| ELEM(item->value, NODE_MATH_COMPARE, NODE_MATH_GREATER_THAN, NODE_MATH_LESS_THAN)) ? | ELEM(item->value, NODE_MATH_COMPARE, NODE_MATH_GREATER_THAN, NODE_MATH_LESS_THAN)) ? | ||||
| -1 : | -1 : | ||||
| weight; | weight; | ||||
| params.add_item( | params.add_item( | ||||
| IFACE_(item->name), SocketSearchOp{"Value", (NodeMathOperation)item->value}, gn_weight); | CTX_IFACE_(BLT_I18NCONTEXT_ID_NODETREE, item->name), SocketSearchOp{"Value", (NodeMathOperation)item->value}, gn_weight); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static const char *gpu_shader_get_name(int mode) | static const char *gpu_shader_get_name(int mode) | ||||
| { | { | ||||
| const FloatMathOperationInfo *info = get_float_math_operation_info(mode); | const FloatMathOperationInfo *info = get_float_math_operation_info(mode); | ||||
| if (!info) { | if (!info) { | ||||
| ▲ Show 20 Lines • Show All 125 Lines • Show Last 20 Lines | |||||