-
Notifications
You must be signed in to change notification settings - Fork 26
Support for the region editing mode #2066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
92cb865 to
8ecddbe
Compare
f025d55 to
26117af
Compare
e17aa35 to
e3178e0
Compare
e3178e0 to
9d5dd1f
Compare
…tch to the region editing mode
5396095 to
579658c
Compare
579658c to
3b2975a
Compare
71c752a to
e4d1074
Compare
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.
Implement new mode to edit regions, that can be enabled by the dedicated button (a corresponding option in settings must be turned on, ATM). A brief demonstration:
demo.webm
scene. This mode does not work (intentionally) when the world configuration isread only("an exercise"). If a custom region was initiallyvisible, it will remain visible regardless of the mode, but it will not beeditableoutside the region editing mode.ellipsesandrectangleshave a context menu:2.1
Convert to region. Anellipseorrectangledrawn by the user is converted into an region of the corresponding shape, and the figure itself disappears from thescene:covert_to_region.webm
2.2
Bind to region. In this case, a dependent (accompanying)regionof the same shape is created for the selected shape, and theellipseorrectangleitself does not disappear from thescene. This functionality is useful in typical cases where arectangleorellipseis placed exactly over aregionthat is later used in constrains to check if some object is inside or outside of the corresponding original shape.bind_to_region.webm
3.1 The first type of
regionis serialized into a familiar format, becoming anindependent region:3.2. The second type of regions is serialized into a simpler construct, that is designed to be user-friendly. It is only necessary to specify
boundItem="id"attribute, whereidis the name of an existing ellipse or rectangle in the sameWorldModel.xml: