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
Contributor

more changes
I think it is ready for code reveiw

more changes I think it is ready for code reveiw
David-Haver added 8 commits 2024-03-21 00:28:17 +01:00
David-Haver added 1 commit 2024-03-21 12:38:18 +01:00
Arye Ramaty requested changes 2024-03-21 12:49:04 +01:00
Arye Ramaty left a comment
Owner

I didn't have time to review all the changes in the 'realize_instance' file, but that's it for now.

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
}
Owner

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.

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.
Author
Contributor

the changes were done because you moved the declaration to the .hh file so it needed to follow the convention of public functions

the changes were done because you moved the declaration to the .hh file so it needed to follow the convention of public functions
Owner

OK

OK
aryeramaty marked this conversation as resolved
@ -2,23 +2,14 @@
*
Owner

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.

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.
Author
Contributor

The changes were done mainly to the code you add and to thing that changed because of it.
New included made some other unnecessary.

The changes were done mainly to the code you add and to thing that changed because of it. New included made some other unnecessary.
Owner

Fair enough

Fair enough
aryeramaty marked this conversation as resolved
@ -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; },
Owner

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
Author
Contributor

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.
Owner

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.
Author
Contributor

ok returned it

ok returned it
aryeramaty marked this conversation as resolved
@ -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;
Owner

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.

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.
Author
Contributor

I couldn't think of a better name VariedDepthOption sound great, I will change it to that.

I couldn't think of a better name VariedDepthOption sound great, I will change it to that.
David-Haver marked this conversation as resolved
David-Haver added 1 commit 2024-03-21 13:23:02 +01:00
David-Haver added 1 commit 2024-03-21 14:53:46 +01:00
Arye Ramaty merged commit 4370ae85cf into WIP-realize-depth 2024-03-21 14:55:23 +01:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: aryeramaty/blender#2
No description provided.