GDScript: Add @export_custom annotation

Allows setting any arbitrary hint, hint string, and usage flags.
Useful for more complex hints or potential future hints not
available as a dedicated annotation.
This commit is contained in:
George Marques
2023-02-08 16:15:48 -03:00
parent 24f775089e
commit 8e520454ef
3 changed files with 38 additions and 0 deletions
@@ -341,6 +341,18 @@
[/codeblock]
</description>
</annotation>
<annotation name="@export_custom">
<return type="void" />
<param index="0" name="hint" type="int" enum="PropertyHint" />
<param index="1" name="hint_string" type="String" />
<param index="2" name="usage" type="int" enum="PropertyUsageFlags" is_bitfield="true" default="6" />
<description>
Allows you to set a custom hint, hint string, and usage flags for the exported property. Note that there's no validation done in GDScript, it will just pass the hint along to the editor.
[codeblock]
@export_custom(PROPERTY_HINT_NONE, "suffix:m") var suffix: Vector3
[/codeblock]
</description>
</annotation>
<annotation name="@export_dir">
<return type="void" />
<description>