davidhaver-WIP-realize-depth #2

Merged
Arye Ramaty merged 11 commits from David-Haver/blender-old:davidhaver-WIP-realize-depth into WIP-realize-depth 2024-03-21 14:55:23 +01:00
Showing only changes of commit 059c73dc9f - Show all commits

View File

@ -44,7 +44,7 @@ static void node_geo_exec(GeoNodeExecParams params)
static auto depth_override = mf::build::SI2_SO<int, bool, int>(
"depth_override",
[](int value, bool realize) { return realize ? -1 : value; },
[](int value, bool realize) { return realize ? -1 : std::max(value, 0); },
aryeramaty marked this conversation as resolved Outdated

The use of std::max was intentional. We aim to prevent users from entering -1 into the field. Instead, we provide the 'realize all' option for that purpose.
This was suggested in the chat

The use of std::max was intentional. We aim to prevent users from entering -1 into the field. Instead, we provide the 'realize all' option for that purpose. This was suggested in the chat

From my understanding the users can't enter -1 because of .min(0) in line 27.
If it don't work like this I will change this back.

From my understanding the users can't enter -1 because of .min(0) in line 27. If it don't work like this I will change this back.

The user can enter -1; the .min(0) serves as a 'soft limit,' implying that the user can still set the value lower than 0 by either typing a specific value (instead of scrubbing) or connecting the socket to a link.

The user can enter -1; the .min(0) serves as a 'soft limit,' implying that the user can still set the value lower than 0 by either typing a specific value (instead of scrubbing) or connecting the socket to a link.

ok returned it

ok returned it
mf::build::exec_presets::AllSpanOrSingle());
static auto selection_override = mf::build::SI2_SO<int, bool, bool>(