-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Add editor check for compatible visibility layers for CanvasItem
#93351
base: master
Are you sure you want to change the base?
Conversation
13f804b
to
869d4eb
Compare
There, changed to using |
@@ -500,6 +523,7 @@ void CanvasItem::_top_level_changed() { | |||
child->_top_level_changed_on_parent(); | |||
} | |||
} | |||
update_configuration_warnings(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can move this back to set_as_top_level
if there would be performance concerns calling it down a deep tree and add a note to this as well, works either way
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
So if someone on the rendering team could confirm some details of the functioning here if there's something missing, to clarify:
Here's the assumptions made that I'd like verified (based on the wording in the docs and other conversations as well as reading the code):
In other words, is there potentially something further needed than the direct traversal of canvas item parents here |
869d4eb
to
358aaad
Compare
358aaad
to
c08571e
Compare
c08571e
to
1bc3a04
Compare
de0f473
to
165dc30
Compare
165dc30
to
f17d9ec
Compare
f17d9ec
to
57ad671
Compare
The wording might need some improvement, and need confirmation that this catches the full behavior of this feature. It doesn't check the cull layers of any viewport, can add if desired but keeping it simple for just the hierarchy (and an error for the viewport might be annoying if you want them to be invisible at the start just by the layers, but the hierarchy itself would usually be an accident I'd say)
In short: This checks that the condition for visibility is met, i.e. that a
CanvasItem
has at least one layer shared with all parents until either the root or one parent that is top-level. To avoid annoying potential false positives it also doesn't check if the layers for the node itself is empty, that feels like something intentional and shouldn't throw a warningCorrectly updates when layers of parents update, as well as when top-level changes for parents and self
See (I'd say regardless of that one being merged this one is useful, but not vice versa):