Skip to content

Commit

Permalink
Remove unused hints
Browse files Browse the repository at this point in the history
  • Loading branch information
KoBeWi committed Jul 11, 2022
1 parent 9b3972a commit 2f777b9
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 161 deletions.
7 changes: 0 additions & 7 deletions core/core_constants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,7 @@ void register_global_constants() {
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_ENUM);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_ENUM_SUGGESTION);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_EXP_EASING);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_LENGTH);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_LINK);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_KEY_ACCEL);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_FLAGS);

BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_LAYERS_2D_RENDER);
Expand Down Expand Up @@ -620,9 +618,7 @@ void register_global_constants() {
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_NONE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_STORAGE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_EDITOR);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_NETWORK);

BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_EDITOR_HELPER);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_CHECKABLE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_CHECKED);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_INTERNATIONALIZED);
Expand Down Expand Up @@ -656,11 +652,8 @@ void register_global_constants() {

BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_NORMAL);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_EDITOR);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_NOSCRIPT);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_CONST);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_REVERSE);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_VIRTUAL);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_FROM_SCRIPT);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_VARARG);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_STATIC);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_OBJECT_CORE);
Expand Down
11 changes: 4 additions & 7 deletions core/extension/gdnative_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,10 @@ typedef void *GDNativeExtensionClassLibraryPtr;
typedef enum {
GDNATIVE_EXTENSION_METHOD_FLAG_NORMAL = 1,
GDNATIVE_EXTENSION_METHOD_FLAG_EDITOR = 2,
GDNATIVE_EXTENSION_METHOD_FLAG_NOSCRIPT = 4,
GDNATIVE_EXTENSION_METHOD_FLAG_CONST = 8,
GDNATIVE_EXTENSION_METHOD_FLAG_REVERSE = 16, /* used for events */
GDNATIVE_EXTENSION_METHOD_FLAG_VIRTUAL = 32,
GDNATIVE_EXTENSION_METHOD_FLAG_FROM_SCRIPT = 64,
GDNATIVE_EXTENSION_METHOD_FLAG_VARARG = 128,
GDNATIVE_EXTENSION_METHOD_FLAG_STATIC = 256,
GDNATIVE_EXTENSION_METHOD_FLAG_CONST = 4,
GDNATIVE_EXTENSION_METHOD_FLAG_VIRTUAL = 8,
GDNATIVE_EXTENSION_METHOD_FLAG_VARARG = 16,
GDNATIVE_EXTENSION_METHOD_FLAG_STATIC = 32,
GDNATIVE_EXTENSION_METHOD_FLAGS_DEFAULT = GDNATIVE_EXTENSION_METHOD_FLAG_NORMAL,
} GDNativeExtensionClassMethodFlags;

Expand Down
83 changes: 38 additions & 45 deletions core/object/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ enum PropertyHint {
PROPERTY_HINT_ENUM, ///< hint_text= "val1,val2,val3,etc"
PROPERTY_HINT_ENUM_SUGGESTION, ///< hint_text= "val1,val2,val3,etc"
PROPERTY_HINT_EXP_EASING, /// exponential easing function (Math::ease) use "attenuation" hint string to revert (flip h), "full" to also include in/out. (ie: "attenuation,inout")
PROPERTY_HINT_LENGTH, ///< hint_text= "length" (as integer)
PROPERTY_HINT_LINK,
PROPERTY_HINT_KEY_ACCEL, ///< hint_text= "length" (as integer)
PROPERTY_HINT_FLAGS, ///< hint_text= "flag1,flag2,etc" (as bit flags)
PROPERTY_HINT_LAYERS_2D_RENDER,
PROPERTY_HINT_LAYERS_2D_PHYSICS,
Expand Down Expand Up @@ -99,41 +97,39 @@ enum PropertyHint {

enum PropertyUsageFlags {
PROPERTY_USAGE_NONE = 0,
PROPERTY_USAGE_STORAGE = 1,
PROPERTY_USAGE_EDITOR = 2,
PROPERTY_USAGE_NETWORK = 4,
PROPERTY_USAGE_EDITOR_HELPER = 8,
PROPERTY_USAGE_CHECKABLE = 16, //used for editing global variables
PROPERTY_USAGE_CHECKED = 32, //used for editing global variables
PROPERTY_USAGE_INTERNATIONALIZED = 64, //hint for internationalized strings
PROPERTY_USAGE_GROUP = 128, //used for grouping props in the editor
PROPERTY_USAGE_CATEGORY = 256,
PROPERTY_USAGE_SUBGROUP = 512,
PROPERTY_USAGE_CLASS_IS_BITFIELD = 1024,
PROPERTY_USAGE_NO_INSTANCE_STATE = 2048,
PROPERTY_USAGE_RESTART_IF_CHANGED = 4096,
PROPERTY_USAGE_SCRIPT_VARIABLE = 8192,
PROPERTY_USAGE_STORE_IF_NULL = 16384,
PROPERTY_USAGE_ANIMATE_AS_TRIGGER = 32768,
PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED = 65536,
PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE = 1 << 17,
PROPERTY_USAGE_CLASS_IS_ENUM = 1 << 18,
PROPERTY_USAGE_NIL_IS_VARIANT = 1 << 19,
PROPERTY_USAGE_INTERNAL = 1 << 20,
PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE = 1 << 21, // If the object is duplicated also this property will be duplicated
PROPERTY_USAGE_HIGH_END_GFX = 1 << 22,
PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT = 1 << 23,
PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT = 1 << 24,
PROPERTY_USAGE_KEYING_INCREMENTS = 1 << 25, // Used in inspector to increment property when keyed in animation player
PROPERTY_USAGE_DEFERRED_SET_RESOURCE = 1 << 26, // when loading, the resource for this property can be set at the end of loading
PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT = 1 << 27, // For Object properties, instantiate them when creating in editor.
PROPERTY_USAGE_EDITOR_BASIC_SETTING = 1 << 28, //for project or editor settings, show when basic settings are selected
PROPERTY_USAGE_READ_ONLY = 1 << 29, // Mark a property as read-only in the inspector.
PROPERTY_USAGE_ARRAY = 1 << 30, // Used in the inspector to group properties as elements of an array.

PROPERTY_USAGE_DEFAULT = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK,
PROPERTY_USAGE_DEFAULT_INTL = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK | PROPERTY_USAGE_INTERNATIONALIZED,
PROPERTY_USAGE_NO_EDITOR = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK,
PROPERTY_USAGE_STORAGE = 1 << 1,
PROPERTY_USAGE_EDITOR = 1 << 2,
PROPERTY_USAGE_CHECKABLE = 1 << 3, // Used for editing global variables.
PROPERTY_USAGE_CHECKED = 1 << 4, // Used for editing global variables.
PROPERTY_USAGE_INTERNATIONALIZED = 1 << 5, // Hint for internationalized strings.
PROPERTY_USAGE_GROUP = 1 << 6, // Used for grouping props in the editor.
PROPERTY_USAGE_CATEGORY = 1 << 7,
PROPERTY_USAGE_SUBGROUP = 1 << 8,
PROPERTY_USAGE_CLASS_IS_BITFIELD = 1 << 9,
PROPERTY_USAGE_NO_INSTANCE_STATE = 1 << 10,
PROPERTY_USAGE_RESTART_IF_CHANGED = 1 << 11,
PROPERTY_USAGE_SCRIPT_VARIABLE = 1 << 12,
PROPERTY_USAGE_STORE_IF_NULL = 1 << 13,
PROPERTY_USAGE_ANIMATE_AS_TRIGGER = 1 << 14,
PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED = 1 << 15,
PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE = 1 << 16,
PROPERTY_USAGE_CLASS_IS_ENUM = 1 << 17,
PROPERTY_USAGE_NIL_IS_VARIANT = 1 << 18,
PROPERTY_USAGE_INTERNAL = 1 << 19,
PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE = 1 << 20, // If the object is duplicated also this property will be duplicated.
PROPERTY_USAGE_HIGH_END_GFX = 1 << 21,
PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT = 1 << 22,
PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT = 1 << 23,
PROPERTY_USAGE_KEYING_INCREMENTS = 1 << 24, // Used in inspector to increment property when keyed in animation player.
PROPERTY_USAGE_DEFERRED_SET_RESOURCE = 1 << 25, // when loading, the resource for this property can be set at the end of loading.
PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT = 1 << 26, // For Object properties, instantiate them when creating in editor.
PROPERTY_USAGE_EDITOR_BASIC_SETTING = 1 << 27, //for project or editor settings, show when basic settings are selected.
PROPERTY_USAGE_READ_ONLY = 1 << 28, // Mark a property as read-only in the inspector.
PROPERTY_USAGE_ARRAY = 1 << 29, // Used in the inspector to group properties as elements of an array.

PROPERTY_USAGE_DEFAULT = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR,
PROPERTY_USAGE_DEFAULT_INTL = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_INTERNATIONALIZED,
PROPERTY_USAGE_NO_EDITOR = PROPERTY_USAGE_STORAGE,
};

#define ADD_SIGNAL(m_signal) ::ClassDB::add_signal(get_class_static(), m_signal)
Expand Down Expand Up @@ -218,14 +214,11 @@ Array convert_property_list(const List<PropertyInfo> *p_list);
enum MethodFlags {
METHOD_FLAG_NORMAL = 1,
METHOD_FLAG_EDITOR = 2,
METHOD_FLAG_NOSCRIPT = 4,
METHOD_FLAG_CONST = 8,
METHOD_FLAG_REVERSE = 16, // used for events
METHOD_FLAG_VIRTUAL = 32,
METHOD_FLAG_FROM_SCRIPT = 64,
METHOD_FLAG_VARARG = 128,
METHOD_FLAG_STATIC = 256,
METHOD_FLAG_OBJECT_CORE = 512,
METHOD_FLAG_CONST = 4,
METHOD_FLAG_VIRTUAL = 8,
METHOD_FLAG_VARARG = 16,
METHOD_FLAG_STATIC = 32,
METHOD_FLAG_OBJECT_CORE = 64,
METHOD_FLAGS_DEFAULT = METHOD_FLAG_NORMAL,
};

Expand Down
Loading

0 comments on commit 2f777b9

Please sign in to comment.