Skip to content

Better document that builtins with the return type "flags" are BitFields, not enums, and document what BitFields actually are and how to use them in gdscript #11021

Open
@sleepingrainbow

Description

@sleepingrainbow

Your Godot version:
4.4.1

Issue description:
GlobalScope docs page (both online and in editor) is missing the PropertyUsageFlags entry for 4102 which is for script @export vars, which I was only able to figure out the flag for by print()ing an object's get_property_list()

I also discovered 135168, also not in the docs, which is less clear what it is, but from experimentation I think appears to be used for untyped non-exported script vars (static typed non-exported script vars show as 4096, which is listed in the docs but claims to be for all script vars)

edit: apparently these flags returned by get_property_list() are not enums at all like I'd assumed, but are actually bit fields, a data type that I have never seen before and isn't documented anywhere in gdscript

URL to the documentation page:
https://docs.godotengine.org/en/latest/classes/class_%40globalscope.html#enum-globalscope-propertyusageflags

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions