Page MenuHome

Geometry Node: Bool and Int Input
ClosedPublic

Authored by Dorian (BD3D) on Oct 20 2021, 12:46 AM.
Tokens
"Love" token, awarded by zNight."100" token, awarded by charlie."Love" token, awarded by karmaral."Love" token, awarded by wilBr."Love" token, awarded by PiloeGAO."Like" token, awarded by lone_noel.

Details

Summary

This patch will add the missing Boolean and Integer input.
I've looked mostly at how the Material/Color/Vector input is done.
This is mostly some copy-pasting of existing snippets.

(first patch ever)

Diff Detail

Event Timeline

Dorian (BD3D) requested review of this revision.Oct 20 2021, 12:46 AM
Dorian (BD3D) created this revision.
Jacques Lucke (JacquesLucke) requested changes to this revision.Oct 20 2021, 4:48 PM

Thanks for your first patch! Mostly looks good, but some smaller changes are still necessary.

The changes for the bool node also apply to the int node.

source/blender/blenkernel/intern/node.cc
5888

These lines are sorted alphabetically.

source/blender/nodes/NOD_static_types.h
282

These lines are sorted alphabetically.

source/blender/nodes/function/nodes/node_fn_input_bool.cc
32

The namespace should go to right before register_node_type_fn_input_bool. (other files still have to be updated in that regard)

45

Remove the blender:: part when the namespace is larger.

46

Missing newline.

This revision now requires changes to proceed.Oct 20 2021, 4:48 PM
Dorian (BD3D) updated this revision to Diff 43655.EditedOct 20 2021, 9:00 PM

As Jacques asked:
-changed the order to alphabetical on two files
-changed namespace of the two node function

However, I am not sure if I've done the diff file of this revision correctly.

Dorian (BD3D) marked 5 inline comments as done.Oct 21 2021, 3:55 PM

Unfortunately you didn't update the diff correctly. Make sure you create a diff between your local branch and master. When you are on your branch do this: git diff master -U1000. The last part adds more context to the diff.

Jacques Lucke (JacquesLucke) requested changes to this revision.Oct 21 2021, 5:44 PM
This revision now requires changes to proceed.Oct 21 2021, 5:44 PM

sorry, won't happend again

Added 2x inline comments about input color order inconsistencies.
Not sure if i can do these kinds of cleanups myself.

source/blender/blenkernel/intern/node.cc
5879

normally, color input go in between.

source/blender/nodes/NOD_function.h
29

normally, color input go in between.

Added Context

LGTM.

source/blender/nodes/function/nodes/node_fn_input_int.cc
37

The naming is slightly inconsistent here (input_int vs int_input).

This revision is now accepted and ready to land.Oct 22 2021, 2:43 PM