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

GDScript: Enable exporting nodes to the inspector #62470

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

vnen
Copy link
Member

@vnen vnen commented Jun 27, 2022

Use the addition from #62185 to allow exporting node types as well. Also fixed a small issue with it.

I notice one bug here that I can't revert it. The revert button is always active and clicking it does nothing, even if the path is cleared. I'm not familiar with the inspector code so I'll leave to someone else to figure it out.

Bugsquad edit:

Also fix an small issue in the property editor for NodePath trying to
use the meta property when not needed.
@vnen vnen added this to the 4.0 milestone Jun 27, 2022
@vnen vnen requested a review from a team as a code owner June 27, 2022 21:45
@KoBeWi
Copy link
Member

KoBeWi commented Jun 27, 2022

I noticed one obvious (?) editor-side problem:
image
There is no way to tell what node type the property expects without looking into the script (unless your scene contains the expected node type).

EDIT:
btw it does fix #62461

EDIT2:
As for the revert problem, the current property is type NODE_PATH, but the default is type NIL. Hence they are different.
Trying to set null to NodePath assigns an empty NodePath. Or at least it should. For whatever reason this doesn't clear the property if something is assigned.

@akien-mga
Copy link
Member

There is no way to tell what node type the property expects without looking into the script (unless your scene contains the expected node type).

It should probably include the node type in the title, and likely filter to show only compatible types as selectable? (Others disabled so the scene tree is still recognizable).

@akien-mga akien-mga merged commit 4c14bf7 into godotengine:master Jun 28, 2022
@akien-mga
Copy link
Member

Thanks!

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.

Clicking on nodes in the scene tree emits errors: Condition "!pointer_mode" is true. Returning: String()
3 participants