Skip to content
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

Implement visibility_condition for Node3D and CanvasItem. #77300

Closed

Conversation

EMBYRDEV
Copy link
Contributor

@EMBYRDEV EMBYRDEV commented May 21, 2023

Implements godotengine/godot-proposals#3433.

image

Also makes CanvasItems visibility testing a little cleaner.

I have seen #56446 and believe that this is a less intrusive solution to the problem of level design markup.

The "Runner Only" mode may also be useful for things like intrusive post-processing/fog-volumes/effects that you might not always wish to see in-editor.

When a node is hidden in the editor, it will show with an open eye that is greyed out, signifying to the user that the node is actually marked visible but that is overriden at the moment.

image

@EMBYRDEV EMBYRDEV requested review from a team as code owners May 21, 2023 06:17
@dalexeev
Copy link
Member

dalexeev commented May 21, 2023

There should probably be a better name (visibility_mode?). visibility_condition sounds like a custom string expression that is evaluated to determine if a node should be shown.

@EMBYRDEV
Copy link
Contributor Author

visibility_mode

That was also my first name choice but some nodes such as TouchScreenButton already use visibility_mode. I wanted to minimise breaking changes with this PR.

@EMBYRDEV
Copy link
Contributor Author

image

I have added a debug option that allows developers to view editor only nodes in the running project.

@dalexeev
Copy link
Member

but some nodes such as TouchScreenButton already use visibility_mode

Yes, in this case we are forced to choose some other name. Perhaps there is another option that is still better than visibility_condition. For example visibility_flags (but this also changes the enum values). Or something different.

@EMBYRDEV
Copy link
Contributor Author

Appologies for the commit spam, still working this all out, I will close and reopen a squashed PR when I this passes checks.

@EMBYRDEV EMBYRDEV closed this May 21, 2023
@EMBYRDEV EMBYRDEV deleted the conditional-visibility-mode branch May 21, 2023 07:23
@dalexeev
Copy link
Member

New PR: #77301.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants