diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2020-12-20 21:18:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-20 21:18:11 +0100 |
commit | fa9332a0e77d498ce9815d36414ebbe4eadfc37b (patch) | |
tree | a9a9eaa30148b12ce3e04f29a0d4860aabfd5003 /doc/classes | |
parent | bf088da33998451602a583468cae55a623a66a15 (diff) | |
parent | 1e6b684d4407a7f3fff63ef59a6993992d11ac92 (diff) |
Merge pull request #43414 from Xrayez/pi-type-string
Expose `PROPERTY_HINT_TYPE_STRING` to scripting
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/@GlobalScope.xml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index f94eb7adef..3f0a7b7c25 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2423,6 +2423,16 @@ <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="21" enum="PropertyHint"> Hints that an image is compressed using lossless compression. </constant> + <constant name="PROPERTY_HINT_TYPE_STRING" value="23" enum="PropertyHint"> + Hint that a property represents a particular type. If a property is [constant TYPE_STRING], allows to set a type from the create dialog. If you need to create an [Array] to contain elements of a specific type, the [code]hint_string[/code] must encode nested types using [code]":"[/code] and [code]"/"[/code] for specifying [Resource] types. For instance: + [codeblock] + hint_string = "%s:" % [TYPE_INT] # Array of inteters. + hint_string = "%s:%s:" % [TYPE_ARRAY, TYPE_REAL] # Two-dimensional array of floats. + hint_string = "%s/%s:Resource" % [TYPE_OBJECT, TYPE_OBJECT] # Array of resources. + hint_string = "%s:%s/%s:Resource" % [TYPE_ARRAY, TYPE_OBJECT, TYPE_OBJECT] # Two-dimensional array of resources. + [/codeblock] + [b]Note:[/b] the final colon is required to specify for properly detecting built-in types. + </constant> <constant name="PROPERTY_USAGE_STORAGE" value="1" enum="PropertyUsageFlags"> The property is serialized and saved in the scene file (default). </constant> |