forked from blender/blender
davidhaver-WIP-realize-depth #2
@ -44,7 +44,7 @@ static void node_geo_exec(GeoNodeExecParams params)
|
|||||||
|
|
||||||
static auto depth_override = mf::build::SI2_SO<int, bool, int>(
|
static auto depth_override = mf::build::SI2_SO<int, bool, int>(
|
||||||
"depth_override",
|
"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
|
|||||||
mf::build::exec_presets::AllSpanOrSingle());
|
mf::build::exec_presets::AllSpanOrSingle());
|
||||||
|
|
||||||
static auto selection_override = mf::build::SI2_SO<int, bool, bool>(
|
static auto selection_override = mf::build::SI2_SO<int, bool, bool>(
|
||||||
|
Loading…
Reference in New Issue
Block a user
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.
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