feat(segmentation): add interactive edition methods to islands segmen…#75
Merged
Thibault-Pelletier merged 1 commit intomainfrom Mar 23, 2026
Merged
Conversation
Thibault-Pelletier
requested changes
Mar 18, 2026
| def set_minimum_island_size(self, minimum_island_size: int): | ||
| self._minimum_island_size = minimum_island_size | ||
|
|
||
| def apply(self, world_pos: tuple[float, float, float] | None = None): |
Collaborator
There was a problem hiding this comment.
Not a fan of a generic apply method.
- For the pipeline, it would be better to have a
select_island_at_position(self, world_pos)world pos shouldn't be optional. select shouldn't do anything if current mod is not on in Select ... - Effect should have a
is_interactive_select -> boolto check if the mode is select (apply doesn't make sense from the UI when in interactive selection - Pipeline should be disabled when not in interactive mode (otherwise it swallows interactions)
Collaborator
Author
There was a problem hiding this comment.
I don't get the point of disabling the pipeline if we filter the events through CanProcessInteractionEvent
Concerning select_island_at_position, should it do nothing if we are in a non-interactive mode and process the event in the same way apply does currently if the mode is interactive ?
| self.effect.remove_small_islands(self._typed_state.data.minimum_size) | ||
| elif self._typed_state.data.mode == IslandsSegmentationMode.SPLIT_TO_SEGMENTS: | ||
| self.effect.split_islands_to_segments() | ||
| self.effect.apply() |
Collaborator
There was a problem hiding this comment.
Not a fan of generic apply.
I think it's much better to keep the effect API as specialized to make intent clearer for consuming code (suggestions in the effect.apply section of the PR)
fdd484b to
15256b6
Compare
…tation effect Add Keep/Remove/Add island at [coordinates] methods to islands segmentation effect
15256b6 to
b83cf89
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…tation effect
Add Keep/Remove/Add island at [coordinates] methods to islands segmentation effect