forked from blender/blender
davidhaver-WIP-realize-depth #2
No reviewers
Labels
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: aryeramaty/blender#2
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "David-Haver/blender-old:davidhaver-WIP-realize-depth"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
more changes
I think it is ready for code reveiw
I didn't have time to review all the changes in the 'realize_instance' file, but that's it for now.
@ -74,8 +74,8 @@ static void fill_new_attribute(const Span<const GeometryComponent *> src_compone
}
I would rather not make clean-up or style changes to files I didn't modify in the PR. It just makes it a little bit harder to see what has changed.
the changes were done because you moved the declaration to the .hh file so it needed to follow the convention of public functions
OK
@ -2,23 +2,14 @@
*
As a general rule, I'll try to minimize the length of the PR, aiming to stay as close as possible to origin/main. I believe things like 'include clean-up' can wait for a later PR.
The changes were done mainly to the code you add and to thing that changed because of it.
New included made some other unnecessary.
Fair enough
@ -44,3 +45,3 @@
static auto depth_override = mf::build::SI2_SO<int, bool, int>(
"depth_override",
[](int value, bool realize) { return realize ? -1 : std::max(value, 0); },
[](int value, bool realize) { return realize ? -1 : value; },
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
@ -66,2 +67,2 @@
const VArray<int> depths = evaluator.get_evaluated<int>(0);
const IndexMask selection = evaluator.get_evaluated_selection_as_mask();
geometry::SpecificInstancesChoice chosen_instances;
This is fine, but I'm not sure about the name 'SpecificInstancesChoice'. I think something like 'SelectionAndDepthOption' may be clearer. Alternatively, 'VariedDepthOption' could also work.
I couldn't think of a better name VariedDepthOption sound great, I will change it to that.