This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+1 vote

I would like to have a list of export variables/properties of a node.
How to reach that information?

Script example:

export var a = 10
export var b = "a"
var notInteresting = null

I would like to have only a, b as output.

in Engine by (327 points)

1 Answer

+2 votes
Best answer

You can parse them out get_property_list() by filtering the usage field by PROPERTY_USAGE_SCRIPT_VARIABLE.

by (5,286 points)
selected by

Thank you. It was very helpful.

The usage id of export variables is 8199.
It is not in the documentation at this pont. (Godot 3.1 alfa 4)

The normal variables has this usage id. PROPERTYUSAGESCRIPT_VARIABLE = 8192

Hey DavidPeterWorks,

could we see your code for this?

I am confused on how to turn "usage" key into 8199 . . . to get var "whatever_property" as an export var?

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.