Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Matthews <johnny.matthews@gmail.com>2021-12-01 18:36:25 +0300
committerJohnny Matthews <johnny.matthews@gmail.com>2021-12-01 18:36:25 +0300
commit17578408434fafd2463ed253eebb5cb1412a6c67 (patch)
tree7052f46de29ed0d7180c00d2a8b64c03c4941995 /source/blender/nodes/intern/math_functions.cc
parentf8dd03d3dd1b2d7f0ade7c209092212098c75cb4 (diff)
Geometry Nodes: Generalized Compare Node
Replace compare floats node with a generalized compare node. The node allows for the comparison of float, int, string, color, and vector. The datatypes support the following operators: Float, Int: <, >, <=, >=, ==, != String: ==, != Color: ==, !=, lighter, darker (using rgb_to_grayscale value as the brightness value) Vector Supports 5 comparison modes for: ==, !=, <, >, <=, >= Average: The average of the components of the vectors are compared. Dot Product: The dot product of the vectors are compared. Direction: The angle between the vectors is compared to an angle Element-wise: The individual components of the vectors are compared. Length: The lengths of the vectors are compared. Differential Revision: https://developer.blender.org/D13228
Diffstat (limited to 'source/blender/nodes/intern/math_functions.cc')
-rw-r--r--source/blender/nodes/intern/math_functions.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/nodes/intern/math_functions.cc b/source/blender/nodes/intern/math_functions.cc
index aa23777b664..00f4f2a3405 100644
--- a/source/blender/nodes/intern/math_functions.cc
+++ b/source/blender/nodes/intern/math_functions.cc
@@ -127,17 +127,17 @@ const FloatMathOperationInfo *get_float_compare_operation_info(const int operati
((void)0)
switch (operation) {
- case NODE_FLOAT_COMPARE_LESS_THAN:
+ case NODE_COMPARE_LESS_THAN:
RETURN_OPERATION_INFO("Less Than", "math_less_than");
- case NODE_FLOAT_COMPARE_LESS_EQUAL:
+ case NODE_COMPARE_LESS_EQUAL:
RETURN_OPERATION_INFO("Less Than or Equal", "math_less_equal");
- case NODE_FLOAT_COMPARE_GREATER_THAN:
+ case NODE_COMPARE_GREATER_THAN:
RETURN_OPERATION_INFO("Greater Than", "math_greater_than");
- case NODE_FLOAT_COMPARE_GREATER_EQUAL:
+ case NODE_COMPARE_GREATER_EQUAL:
RETURN_OPERATION_INFO("Greater Than or Equal", "math_greater_equal");
- case NODE_FLOAT_COMPARE_EQUAL:
+ case NODE_COMPARE_EQUAL:
RETURN_OPERATION_INFO("Equal", "math_equal");
- case NODE_FLOAT_COMPARE_NOT_EQUAL:
+ case NODE_COMPARE_NOT_EQUAL:
RETURN_OPERATION_INFO("Not Equal", "math_not_equal");
}