diff options
Diffstat (limited to 'core/object')
-rw-r--r-- | core/object/object.cpp | 21 | ||||
-rw-r--r-- | core/object/object.h | 21 |
2 files changed, 5 insertions, 37 deletions
diff --git a/core/object/object.cpp b/core/object/object.cpp index 0e82440fc0..2cb56dfe6c 100644 --- a/core/object/object.cpp +++ b/core/object/object.cpp @@ -1055,7 +1055,7 @@ Error Object::emit_signalp(const StringName &p_name, const Variant **p_args, int if (ce.error == Callable::CallError::CALL_ERROR_INVALID_METHOD && !ClassDB::class_exists(target->get_class_name())) { //most likely object is not initialized yet, do not throw error. } else { - ERR_PRINT("Error calling from signal '" + String(p_name) + "' to callable: " + Variant::get_callable_error_text(c.callable, args, argc + c.callable.get_bound_arguments_count(), ce) + "."); + ERR_PRINT("Error calling from signal '" + String(p_name) + "' to callable: " + Variant::get_callable_error_text(c.callable, args, argc, ce) + "."); err = ERR_METHOD_NOT_FOUND; } } @@ -1594,25 +1594,6 @@ bool Object::is_blocking_signals() const { return _block_signals; } -void Object::get_translatable_strings(List<String> *p_strings) const { - List<PropertyInfo> plist; - get_property_list(&plist); - - for (const PropertyInfo &E : plist) { - if (!(E.usage & PROPERTY_USAGE_INTERNATIONALIZED)) { - continue; - } - - String text = get(E.name); - - if (text.is_empty()) { - continue; - } - - p_strings->push_back(text); - } -} - Variant::Type Object::get_static_property_type(const StringName &p_property, bool *r_valid) const { bool valid; Variant::Type t = ClassDB::get_property_type(get_class_name(), p_property, &valid); diff --git a/core/object/object.h b/core/object/object.h index 2ba86c9d31..f78c7c34fd 100644 --- a/core/object/object.h +++ b/core/object/object.h @@ -74,14 +74,6 @@ enum PropertyHint { PROPERTY_HINT_OBJECT_ID, PROPERTY_HINT_TYPE_STRING, ///< a type string, the hint is the base type to choose PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE, ///< so something else can provide this (used in scripts) - PROPERTY_HINT_METHOD_OF_VARIANT_TYPE, ///< a method of a type - PROPERTY_HINT_METHOD_OF_BASE_TYPE, ///< a method of a base type - PROPERTY_HINT_METHOD_OF_INSTANCE, ///< a method of an instance - PROPERTY_HINT_METHOD_OF_SCRIPT, ///< a method of a script & base - PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE, ///< a property of a type - PROPERTY_HINT_PROPERTY_OF_BASE_TYPE, ///< a property of a base type - PROPERTY_HINT_PROPERTY_OF_INSTANCE, ///< a property of an instance - PROPERTY_HINT_PROPERTY_OF_SCRIPT, ///< a property of a script & base PROPERTY_HINT_OBJECT_TOO_BIG, ///< object is too big to send PROPERTY_HINT_NODE_PATH_VALID_TYPES, PROPERTY_HINT_SAVE_FILE, ///< a file path must be passed, hint_text (optionally) is a filter "*.png,*.wav,*.doc,". This opens a save dialog @@ -95,16 +87,15 @@ enum PropertyHint { PROPERTY_HINT_HIDE_QUATERNION_EDIT, /// Only Node3D::transform should hide the quaternion editor. PROPERTY_HINT_PASSWORD, PROPERTY_HINT_MAX, - // When updating PropertyHint, also sync the hardcoded list in VisualScriptEditorVariableEdit }; enum PropertyUsageFlags { PROPERTY_USAGE_NONE = 0, 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_INTERNAL = 1 << 3, + PROPERTY_USAGE_CHECKABLE = 1 << 4, // Used for editing global variables. + PROPERTY_USAGE_CHECKED = 1 << 5, // Used for editing global variables. PROPERTY_USAGE_GROUP = 1 << 6, // Used for grouping props in the editor. PROPERTY_USAGE_CATEGORY = 1 << 7, PROPERTY_USAGE_SUBGROUP = 1 << 8, @@ -117,7 +108,7 @@ enum PropertyUsageFlags { PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE = 1 << 15, PROPERTY_USAGE_CLASS_IS_ENUM = 1 << 16, PROPERTY_USAGE_NIL_IS_VARIANT = 1 << 17, - PROPERTY_USAGE_INTERNAL = 1 << 18, + PROPERTY_USAGE_ARRAY = 1 << 18, // Used in the inspector to group properties as elements of an array. PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE = 1 << 19, // If the object is duplicated also this property will be duplicated. PROPERTY_USAGE_HIGH_END_GFX = 1 << 20, PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT = 1 << 21, @@ -127,10 +118,8 @@ enum PropertyUsageFlags { PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT = 1 << 25, // For Object properties, instantiate them when creating in editor. PROPERTY_USAGE_EDITOR_BASIC_SETTING = 1 << 26, //for project or editor settings, show when basic settings are selected. PROPERTY_USAGE_READ_ONLY = 1 << 27, // Mark a property as read-only in the inspector. - PROPERTY_USAGE_ARRAY = 1 << 28, // 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_DEFAULT | PROPERTY_USAGE_INTERNATIONALIZED, PROPERTY_USAGE_NO_EDITOR = PROPERTY_USAGE_STORAGE, }; @@ -894,8 +883,6 @@ public: Variant::Type get_static_property_type(const StringName &p_property, bool *r_valid = nullptr) const; Variant::Type get_static_property_type_indexed(const Vector<StringName> &p_path, bool *r_valid = nullptr) const; - virtual void get_translatable_strings(List<String> *p_strings) const; - virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const; // Translate message (internationalization). |