Blender Git Loki
Git Commits -> Revision fd0370a
Revision fd0370a by Nikhil Shringarpurey (master) July 5, 2021, 16:52 (GMT) |
Geometry Nodes: Add explicit Float to Int conversion node This patch adds a very simple node that explicitly converts a float to an int. While this may seem redundant, it would offer 2 benefits to the current requirement to use implicit float conversions: 1. It makes the node tree's intent more clear and self-documenting (especially if changes in the future require integer inputs). 2. It eliminates undefined behavior in current/future nodes from float inputs by guaranteeing that the input is an integer. The node offers a variety of rounding techniques to make it more flexible. Differential Revision: https://developer.blender.org/D11700 |
Commit Details:
Full Hash: fd0370acc2129fbc3a07a776bca024ba4512b654
Parent Commit: 08241b3
Committed By: Hans Goudey
Lines Changed: +148, -0
1 Added Path:
/source/blender/nodes/function/nodes/node_fn_float_to_int.cc (+96, -0) (View)
9 Modified Paths:
/release/scripts/startup/nodeitems_builtins.py (+1, -0) (Diff)
/source/blender/blenkernel/BKE_node.h (+1, -0) (Diff)
/source/blender/blenkernel/intern/node.cc (+1, -0) (Diff)
/source/blender/makesdna/DNA_node_types.h (+8, -0) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+37, -0) (Diff)
/source/blender/makesrna/RNA_enum_types.h (+1, -0) (Diff)
/source/blender/nodes/CMakeLists.txt (+1, -0) (Diff)
/source/blender/nodes/NOD_function.h (+1, -0) (Diff)
/source/blender/nodes/NOD_static_types.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_node.h (+1, -0) (Diff)
/source/blender/blenkernel/intern/node.cc (+1, -0) (Diff)
/source/blender/makesdna/DNA_node_types.h (+8, -0) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+37, -0) (Diff)
/source/blender/makesrna/RNA_enum_types.h (+1, -0) (Diff)
/source/blender/nodes/CMakeLists.txt (+1, -0) (Diff)
/source/blender/nodes/NOD_function.h (+1, -0) (Diff)
/source/blender/nodes/NOD_static_types.h (+1, -0) (Diff)