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

Typed arrays exported from tool scripts cannot be edited #76642

Closed
maiself opened this issue May 1, 2023 · 6 comments · Fixed by #76389
Closed

Typed arrays exported from tool scripts cannot be edited #76642

maiself opened this issue May 1, 2023 · 6 comments · Fixed by #76389

Comments

@maiself
Copy link
Contributor

maiself commented May 1, 2023

Godot version

9f12e7b

System information

arch linux

Issue description

Attempting to edit from the editor a typed array exported from a tool script fails, any value is immediately reset, setters are never called.

Steps to reproduce

Create a script such as follows and try to add and then change items of the array in the inspector.

@tool
extends Node

@export var x: Array[String]

Minimal reproduction project

n/a

@maiself
Copy link
Contributor Author

maiself commented May 1, 2023

Reverting the commit from #76378 resolves this issue.

@kleonc
Copy link
Member

kleonc commented May 1, 2023

Reverting the commit from #76378 resolves this issue.

cc @KoBeWi, regressioception. 😆

@KoBeWi
Copy link
Member

KoBeWi commented May 1, 2023

No idea why this happens. The text sub-property is re-created for some reason, but only in tool script.

@jpcerrone
Copy link
Contributor

This seems to be fixed on the latest version. I tested both on the commit referenced by OP and on (8c729f0). While the issue did appear in the first one, it is no longer present on the latest build.

Tested on Windows 11, Forward+ mode.
noBugArray

@KoBeWi
Copy link
Member

KoBeWi commented May 4, 2023

Try restarting the editor and checking again, because you seem to have some bug (the <null>s).
I can still reproduce this issue.

@jpcerrone
Copy link
Contributor

You're right, after restarting the editor the issue does still appear on master

akien-mga pushed a commit to akien-mga/godot that referenced this issue May 31, 2023
Fixes to changes from godotengine#76114.

This PR remove the hack with pointer and replace it with a proper handling
from EditorPropertyNodePath of both NodePath and Node. Also needed to revise
a bit the saving and loading of scene to handle properly the change.

Fixes godotengine#74050.
Fixes godotengine#74141.
Fixes godotengine#75981.
Fixes godotengine#76642.

Revert "Fix typed array export... again"

This reverts commit da8d673.

Co-Authored-By: Tomek <kobewi4e@gmail.com>
@akien-mga akien-mga added this to the 4.1 milestone May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants