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:
authorHallam Roberts <MysteryPancake>2022-01-25 18:09:39 +0300
committerHans Goudey <h.goudey@me.com>2022-01-25 18:09:39 +0300
commit14f6afb09003903a25872e6b05c67411db5e5267 (patch)
tree8841144fa644fff777d194c48e8a73df65ac88a8 /source/blender/makesrna
parent368bfa80f9e0d29a4b1a9c78be8a238c3e1ddcec (diff)
Geometry Nodes: Expand the Boolean Math node
Currently the Boolean Math node only has 3 basic logic gates: AND, OR, and NOT. This commit adds 6 additional logic gates for convenience and ease of use. - **Not And (NAND)** returns true when at least one input is false. - **Nor (NOR)** returns true when both inputs are false. - **Equal (XNOR)** returns true when both inputs are equal. - **Not Equal (XOR)** returns true when both inputs are different. - **Imply (IMPLY)** returns true unless the first input is true and the second is false. - **Subtract (NIMPLY)** returns true when the first input is true and the second is false. Differential Revision: https://developer.blender.org/D13774
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c30
1 files changed, 27 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 117b9dbd983..536b2f7aa6e 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -300,9 +300,33 @@ const EnumPropertyItem rna_enum_node_vec_math_items[] = {
};
const EnumPropertyItem rna_enum_node_boolean_math_items[] = {
- {NODE_BOOLEAN_MATH_AND, "AND", 0, "And", "Outputs true only when both inputs are true"},
- {NODE_BOOLEAN_MATH_OR, "OR", 0, "Or", "Outputs or when at least one of the inputs is true"},
- {NODE_BOOLEAN_MATH_NOT, "NOT", 0, "Not", "Outputs the opposite of the input"},
+ {NODE_BOOLEAN_MATH_AND, "AND", 0, "And", "True when both inputs are true"},
+ {NODE_BOOLEAN_MATH_OR, "OR", 0, "Or", "True when at least one input is true"},
+ {NODE_BOOLEAN_MATH_NOT, "NOT", 0, "Not", "Opposite of the input"},
+ {0, "", ICON_NONE, NULL, NULL},
+ {NODE_BOOLEAN_MATH_NAND, "NAND", 0, "Not And", "True when at least one input is false"},
+ {NODE_BOOLEAN_MATH_NOR, "NOR", 0, "Nor", "True when both inputs are false"},
+ {NODE_BOOLEAN_MATH_XNOR,
+ "XNOR",
+ 0,
+ "Equal",
+ "True when both inputs are equal (exclusive nor)"},
+ {NODE_BOOLEAN_MATH_XOR,
+ "XOR",
+ 0,
+ "Not Equal",
+ "True when both inputs are different (exclusive or)"},
+ {0, "", ICON_NONE, NULL, NULL},
+ {NODE_BOOLEAN_MATH_IMPLY,
+ "IMPLY",
+ 0,
+ "Imply",
+ "True unless the first input is true and the second is false"},
+ {NODE_BOOLEAN_MATH_NIMPLY,
+ "NIMPLY",
+ 0,
+ "Subtract",
+ "True when the first input is true and the second is false (not imply)"},
{0, NULL, 0, NULL, NULL},
};