mirror of
https://github.com/godotengine/godot.git
synced 2024-11-25 13:43:15 +00:00
Merge pull request #51156 from Muller-Castro/value2ref
Add const lvalue ref to container parameters
This commit is contained in:
commit
91dacb469d
@ -1375,11 +1375,11 @@ Variant ClassDB::instantiate(const StringName &p_class) const {
|
||||
}
|
||||
}
|
||||
|
||||
bool ClassDB::class_has_signal(StringName p_class, StringName p_signal) const {
|
||||
bool ClassDB::class_has_signal(const StringName &p_class, const StringName &p_signal) const {
|
||||
return ::ClassDB::has_signal(p_class, p_signal);
|
||||
}
|
||||
|
||||
Dictionary ClassDB::class_get_signal(StringName p_class, StringName p_signal) const {
|
||||
Dictionary ClassDB::class_get_signal(const StringName &p_class, const StringName &p_signal) const {
|
||||
MethodInfo signal;
|
||||
if (::ClassDB::get_signal(p_class, p_signal, &signal)) {
|
||||
return signal.operator Dictionary();
|
||||
@ -1388,7 +1388,7 @@ Dictionary ClassDB::class_get_signal(StringName p_class, StringName p_signal) co
|
||||
}
|
||||
}
|
||||
|
||||
TypedArray<Dictionary> ClassDB::class_get_signal_list(StringName p_class, bool p_no_inheritance) const {
|
||||
TypedArray<Dictionary> ClassDB::class_get_signal_list(const StringName &p_class, bool p_no_inheritance) const {
|
||||
List<MethodInfo> signals;
|
||||
::ClassDB::get_signal_list(p_class, &signals, p_no_inheritance);
|
||||
TypedArray<Dictionary> ret;
|
||||
@ -1400,7 +1400,7 @@ TypedArray<Dictionary> ClassDB::class_get_signal_list(StringName p_class, bool p
|
||||
return ret;
|
||||
}
|
||||
|
||||
TypedArray<Dictionary> ClassDB::class_get_property_list(StringName p_class, bool p_no_inheritance) const {
|
||||
TypedArray<Dictionary> ClassDB::class_get_property_list(const StringName &p_class, bool p_no_inheritance) const {
|
||||
List<PropertyInfo> plist;
|
||||
::ClassDB::get_property_list(p_class, &plist, p_no_inheritance);
|
||||
TypedArray<Dictionary> ret;
|
||||
@ -1428,11 +1428,11 @@ Error ClassDB::class_set_property(Object *p_object, const StringName &p_property
|
||||
return OK;
|
||||
}
|
||||
|
||||
bool ClassDB::class_has_method(StringName p_class, StringName p_method, bool p_no_inheritance) const {
|
||||
bool ClassDB::class_has_method(const StringName &p_class, const StringName &p_method, bool p_no_inheritance) const {
|
||||
return ::ClassDB::has_method(p_class, p_method, p_no_inheritance);
|
||||
}
|
||||
|
||||
TypedArray<Dictionary> ClassDB::class_get_method_list(StringName p_class, bool p_no_inheritance) const {
|
||||
TypedArray<Dictionary> ClassDB::class_get_method_list(const StringName &p_class, bool p_no_inheritance) const {
|
||||
List<MethodInfo> methods;
|
||||
::ClassDB::get_method_list(p_class, &methods, p_no_inheritance);
|
||||
TypedArray<Dictionary> ret;
|
||||
@ -1513,7 +1513,7 @@ StringName ClassDB::class_get_integer_constant_enum(const StringName &p_class, c
|
||||
return ::ClassDB::get_integer_constant_enum(p_class, p_name, p_no_inheritance);
|
||||
}
|
||||
|
||||
bool ClassDB::is_class_enabled(StringName p_class) const {
|
||||
bool ClassDB::is_class_enabled(const StringName &p_class) const {
|
||||
return ::ClassDB::is_class_enabled(p_class);
|
||||
}
|
||||
|
||||
|
@ -435,17 +435,17 @@ public:
|
||||
bool can_instantiate(const StringName &p_class) const;
|
||||
Variant instantiate(const StringName &p_class) const;
|
||||
|
||||
bool class_has_signal(StringName p_class, StringName p_signal) const;
|
||||
Dictionary class_get_signal(StringName p_class, StringName p_signal) const;
|
||||
TypedArray<Dictionary> class_get_signal_list(StringName p_class, bool p_no_inheritance = false) const;
|
||||
bool class_has_signal(const StringName &p_class, const StringName &p_signal) const;
|
||||
Dictionary class_get_signal(const StringName &p_class, const StringName &p_signal) const;
|
||||
TypedArray<Dictionary> class_get_signal_list(const StringName &p_class, bool p_no_inheritance = false) const;
|
||||
|
||||
TypedArray<Dictionary> class_get_property_list(StringName p_class, bool p_no_inheritance = false) const;
|
||||
TypedArray<Dictionary> class_get_property_list(const StringName &p_class, bool p_no_inheritance = false) const;
|
||||
Variant class_get_property(Object *p_object, const StringName &p_property) const;
|
||||
Error class_set_property(Object *p_object, const StringName &p_property, const Variant &p_value) const;
|
||||
|
||||
bool class_has_method(StringName p_class, StringName p_method, bool p_no_inheritance = false) const;
|
||||
bool class_has_method(const StringName &p_class, const StringName &p_method, bool p_no_inheritance = false) const;
|
||||
|
||||
TypedArray<Dictionary> class_get_method_list(StringName p_class, bool p_no_inheritance = false) const;
|
||||
TypedArray<Dictionary> class_get_method_list(const StringName &p_class, bool p_no_inheritance = false) const;
|
||||
|
||||
PackedStringArray class_get_integer_constant_list(const StringName &p_class, bool p_no_inheritance = false) const;
|
||||
bool class_has_integer_constant(const StringName &p_class, const StringName &p_name) const;
|
||||
@ -456,7 +456,7 @@ public:
|
||||
PackedStringArray class_get_enum_constants(const StringName &p_class, const StringName &p_enum, bool p_no_inheritance = false) const;
|
||||
StringName class_get_integer_constant_enum(const StringName &p_class, const StringName &p_name, bool p_no_inheritance = false) const;
|
||||
|
||||
bool is_class_enabled(StringName p_class) const;
|
||||
bool is_class_enabled(const StringName &p_class) const;
|
||||
|
||||
ClassDB() {}
|
||||
~ClassDB() {}
|
||||
|
@ -845,7 +845,7 @@ bool CoreConstants::is_global_enum(const StringName &p_enum) {
|
||||
return _global_enums.has(p_enum);
|
||||
}
|
||||
|
||||
void CoreConstants::get_enum_values(StringName p_enum, HashMap<StringName, int64_t> *p_values) {
|
||||
void CoreConstants::get_enum_values(const StringName &p_enum, HashMap<StringName, int64_t> *p_values) {
|
||||
ERR_FAIL_NULL_MSG(p_values, "Trying to get enum values with null map.");
|
||||
ERR_FAIL_COND_MSG(!_global_enums.has(p_enum), "Trying to get values of non-existing enum.");
|
||||
for (const _CoreConstant &constant : _global_enums[p_enum]) {
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
static bool is_global_constant(const StringName &p_name);
|
||||
static int get_global_constant_index(const StringName &p_name);
|
||||
static bool is_global_enum(const StringName &p_enum);
|
||||
static void get_enum_values(StringName p_enum, HashMap<StringName, int64_t> *p_values);
|
||||
static void get_enum_values(const StringName &p_enum, HashMap<StringName, int64_t> *p_values);
|
||||
};
|
||||
|
||||
#endif // CORE_CONSTANTS_H
|
||||
|
@ -666,12 +666,12 @@ void GDExtension::_get_library_path(GDExtensionClassLibraryPtr p_library, GDExte
|
||||
|
||||
HashMap<StringName, GDExtensionInterfaceFunctionPtr> GDExtension::gdextension_interface_functions;
|
||||
|
||||
void GDExtension::register_interface_function(StringName p_function_name, GDExtensionInterfaceFunctionPtr p_function_pointer) {
|
||||
void GDExtension::register_interface_function(const StringName &p_function_name, GDExtensionInterfaceFunctionPtr p_function_pointer) {
|
||||
ERR_FAIL_COND_MSG(gdextension_interface_functions.has(p_function_name), "Attempt to register interface function '" + p_function_name + "', which appears to be already registered.");
|
||||
gdextension_interface_functions.insert(p_function_name, p_function_pointer);
|
||||
}
|
||||
|
||||
GDExtensionInterfaceFunctionPtr GDExtension::get_interface_function(StringName p_function_name) {
|
||||
GDExtensionInterfaceFunctionPtr GDExtension::get_interface_function(const StringName &p_function_name) {
|
||||
GDExtensionInterfaceFunctionPtr *function = gdextension_interface_functions.getptr(p_function_name);
|
||||
ERR_FAIL_NULL_V_MSG(function, nullptr, "Attempt to get non-existent interface function: " + String(p_function_name) + ".");
|
||||
return *function;
|
||||
|
@ -154,8 +154,8 @@ public:
|
||||
void initialize_library(InitializationLevel p_level);
|
||||
void deinitialize_library(InitializationLevel p_level);
|
||||
|
||||
static void register_interface_function(StringName p_function_name, GDExtensionInterfaceFunctionPtr p_function_pointer);
|
||||
static GDExtensionInterfaceFunctionPtr get_interface_function(StringName p_function_name);
|
||||
static void register_interface_function(const StringName &p_function_name, GDExtensionInterfaceFunctionPtr p_function_pointer);
|
||||
static GDExtensionInterfaceFunctionPtr get_interface_function(const StringName &p_function_name);
|
||||
static void initialize_gdextensions();
|
||||
static void finalize_gdextensions();
|
||||
|
||||
|
@ -243,7 +243,7 @@ public:
|
||||
virtual void get_doc_comment_delimiters(List<String> *p_delimiters) const = 0;
|
||||
virtual void get_string_delimiters(List<String> *p_delimiters) const = 0;
|
||||
virtual Ref<Script> make_template(const String &p_template, const String &p_class_name, const String &p_base_class_name) const { return Ref<Script>(); }
|
||||
virtual Vector<ScriptTemplate> get_built_in_templates(StringName p_object) { return Vector<ScriptTemplate>(); }
|
||||
virtual Vector<ScriptTemplate> get_built_in_templates(const StringName &p_object) { return Vector<ScriptTemplate>(); }
|
||||
virtual bool is_using_templates() { return false; }
|
||||
virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptError> *r_errors = nullptr, List<Warning> *r_warnings = nullptr, HashSet<int> *r_safe_lines = nullptr) const = 0;
|
||||
virtual String validate_path(const String &p_path) const { return ""; }
|
||||
|
@ -265,7 +265,7 @@ public:
|
||||
|
||||
GDVIRTUAL1RC(TypedArray<Dictionary>, _get_built_in_templates, StringName)
|
||||
|
||||
virtual Vector<ScriptTemplate> get_built_in_templates(StringName p_object) override {
|
||||
virtual Vector<ScriptTemplate> get_built_in_templates(const StringName &p_object) override {
|
||||
TypedArray<Dictionary> ret;
|
||||
GDVIRTUAL_REQUIRED_CALL(_get_built_in_templates, p_object, ret);
|
||||
Vector<ScriptTemplate> stret;
|
||||
|
@ -781,8 +781,8 @@ public:
|
||||
static Variant get_constant_value(Variant::Type p_type, const StringName &p_value, bool *r_valid = nullptr);
|
||||
|
||||
static void get_enums_for_type(Variant::Type p_type, List<StringName> *p_enums);
|
||||
static void get_enumerations_for_enum(Variant::Type p_type, StringName p_enum_name, List<StringName> *p_enumerations);
|
||||
static int get_enum_value(Variant::Type p_type, StringName p_enum_name, StringName p_enumeration, bool *r_valid = nullptr);
|
||||
static void get_enumerations_for_enum(Variant::Type p_type, const StringName &p_enum_name, List<StringName> *p_enumerations);
|
||||
static int get_enum_value(Variant::Type p_type, const StringName &p_enum_name, const StringName &p_enumeration, bool *r_valid = nullptr);
|
||||
|
||||
typedef String (*ObjectDeConstruct)(const Variant &p_object, void *ud);
|
||||
typedef void (*ObjectConstruct)(const String &p_text, void *ud, Variant &r_value);
|
||||
|
@ -1071,14 +1071,14 @@ struct _VariantCall {
|
||||
|
||||
static ConstantData *constant_data;
|
||||
|
||||
static void add_constant(int p_type, StringName p_constant_name, int64_t p_constant_value) {
|
||||
static void add_constant(int p_type, const StringName &p_constant_name, int64_t p_constant_value) {
|
||||
constant_data[p_type].value[p_constant_name] = p_constant_value;
|
||||
#ifdef DEBUG_ENABLED
|
||||
constant_data[p_type].value_ordered.push_back(p_constant_name);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void add_variant_constant(int p_type, StringName p_constant_name, const Variant &p_constant_value) {
|
||||
static void add_variant_constant(int p_type, const StringName &p_constant_name, const Variant &p_constant_value) {
|
||||
constant_data[p_type].variant_value[p_constant_name] = p_constant_value;
|
||||
#ifdef DEBUG_ENABLED
|
||||
constant_data[p_type].variant_value_ordered.push_back(p_constant_name);
|
||||
@ -1091,7 +1091,7 @@ struct _VariantCall {
|
||||
|
||||
static EnumData *enum_data;
|
||||
|
||||
static void add_enum_constant(int p_type, StringName p_enum_type_name, StringName p_enumeration_name, int p_enum_value) {
|
||||
static void add_enum_constant(int p_type, const StringName &p_enum_type_name, const StringName &p_enumeration_name, int p_enum_value) {
|
||||
enum_data[p_type].value[p_enum_type_name][p_enumeration_name] = p_enum_value;
|
||||
}
|
||||
};
|
||||
@ -1504,7 +1504,7 @@ void Variant::get_enums_for_type(Variant::Type p_type, List<StringName> *p_enums
|
||||
}
|
||||
}
|
||||
|
||||
void Variant::get_enumerations_for_enum(Variant::Type p_type, StringName p_enum_name, List<StringName> *p_enumerations) {
|
||||
void Variant::get_enumerations_for_enum(Variant::Type p_type, const StringName &p_enum_name, List<StringName> *p_enumerations) {
|
||||
ERR_FAIL_INDEX(p_type, Variant::VARIANT_MAX);
|
||||
|
||||
_VariantCall::EnumData &enum_data = _VariantCall::enum_data[p_type];
|
||||
@ -1516,7 +1516,7 @@ void Variant::get_enumerations_for_enum(Variant::Type p_type, StringName p_enum_
|
||||
}
|
||||
}
|
||||
|
||||
int Variant::get_enum_value(Variant::Type p_type, StringName p_enum_name, StringName p_enumeration, bool *r_valid) {
|
||||
int Variant::get_enum_value(Variant::Type p_type, const StringName &p_enum_name, const StringName &p_enumeration, bool *r_valid) {
|
||||
if (r_valid) {
|
||||
*r_valid = false;
|
||||
}
|
||||
|
@ -675,7 +675,7 @@ bool EditorResourcePicker::_is_drop_valid(const Dictionary &p_drag_data) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditorResourcePicker::_is_type_valid(const String p_type_name, HashSet<StringName> p_allowed_types) const {
|
||||
bool EditorResourcePicker::_is_type_valid(const String p_type_name, const HashSet<StringName> &p_allowed_types) const {
|
||||
for (const StringName &E : p_allowed_types) {
|
||||
String at = E;
|
||||
if (p_type_name == at || ClassDB::is_parent_class(p_type_name, at) || EditorNode::get_editor_data().script_class_is_parent(p_type_name, at)) {
|
||||
|
@ -99,7 +99,7 @@ class EditorResourcePicker : public HBoxContainer {
|
||||
String _get_resource_type(const Ref<Resource> &p_resource) const;
|
||||
void _get_allowed_types(bool p_with_convert, HashSet<StringName> *p_vector) const;
|
||||
bool _is_drop_valid(const Dictionary &p_drag_data) const;
|
||||
bool _is_type_valid(const String p_type_name, HashSet<StringName> p_allowed_types) const;
|
||||
bool _is_type_valid(const String p_type_name, const HashSet<StringName> &p_allowed_types) const;
|
||||
|
||||
Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
|
||||
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
|
||||
|
@ -1284,7 +1284,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
||||
ClassDB::get_inheriters_from_class("Resource", &resource_names);
|
||||
|
||||
PackedStringArray strippable;
|
||||
for (StringName resource_name : resource_names) {
|
||||
for (const StringName &resource_name : resource_names) {
|
||||
if (ClassDB::has_method(resource_name, "create_placeholder", true)) {
|
||||
strippable.push_back(resource_name);
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ void PostImportPluginSkeletonRenamer::get_internal_import_options(InternalImport
|
||||
}
|
||||
}
|
||||
|
||||
void PostImportPluginSkeletonRenamer::_internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, Ref<Resource> p_resource, const Dictionary &p_options, HashMap<String, String> p_rename_map) {
|
||||
void PostImportPluginSkeletonRenamer::_internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, Ref<Resource> p_resource, const Dictionary &p_options, const HashMap<String, String> &p_rename_map) {
|
||||
// Prepare objects.
|
||||
Object *map = p_options["retarget/bone_map"].get_validated_object();
|
||||
if (!map || !bool(p_options["retarget/bone_renamer/rename_bones"])) {
|
||||
@ -121,7 +121,7 @@ void PostImportPluginSkeletonRenamer::_internal_process(InternalImportCategory p
|
||||
// Rename bones in all Nodes by calling method.
|
||||
{
|
||||
Dictionary rename_map_dict;
|
||||
for (HashMap<String, String>::Iterator E = p_rename_map.begin(); E; ++E) {
|
||||
for (HashMap<String, String>::ConstIterator E = p_rename_map.begin(); E; ++E) {
|
||||
rename_map_dict[E->key] = E->value;
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
virtual void get_internal_import_options(InternalImportCategory p_category, List<ResourceImporter::ImportOption> *r_options) override;
|
||||
virtual void internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, Ref<Resource> p_resource, const Dictionary &p_options) override;
|
||||
|
||||
void _internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, Ref<Resource> p_resource, const Dictionary &p_options, HashMap<String, String> p_rename_map);
|
||||
void _internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, Ref<Resource> p_resource, const Dictionary &p_options, const HashMap<String, String> &p_rename_map);
|
||||
|
||||
PostImportPluginSkeletonRenamer();
|
||||
};
|
||||
|
@ -95,7 +95,7 @@ void BoneMapperButton::_notification(int p_what) {
|
||||
}
|
||||
}
|
||||
|
||||
BoneMapperButton::BoneMapperButton(const StringName p_profile_bone_name, bool p_require, bool p_selected) {
|
||||
BoneMapperButton::BoneMapperButton(const StringName &p_profile_bone_name, bool p_require, bool p_selected) {
|
||||
profile_bone_name = p_profile_bone_name;
|
||||
require = p_require;
|
||||
selected = p_selected;
|
||||
|
@ -78,7 +78,7 @@ public:
|
||||
|
||||
bool is_require() const;
|
||||
|
||||
BoneMapperButton(const StringName p_profile_bone_name, bool p_require, bool p_selected);
|
||||
BoneMapperButton(const StringName &p_profile_bone_name, bool p_require, bool p_selected);
|
||||
~BoneMapperButton();
|
||||
};
|
||||
|
||||
|
@ -345,7 +345,7 @@ void CanvasItemEditor::_snap_other_nodes(
|
||||
}
|
||||
}
|
||||
|
||||
Point2 CanvasItemEditor::snap_point(Point2 p_target, unsigned int p_modes, unsigned int p_forced_modes, const CanvasItem *p_self_canvas_item, List<CanvasItem *> p_other_nodes_exceptions) {
|
||||
Point2 CanvasItemEditor::snap_point(Point2 p_target, unsigned int p_modes, unsigned int p_forced_modes, const CanvasItem *p_self_canvas_item, const List<CanvasItem *> &p_other_nodes_exceptions) {
|
||||
snap_target[0] = SNAP_TARGET_NONE;
|
||||
snap_target[1] = SNAP_TARGET_NONE;
|
||||
|
||||
@ -535,7 +535,7 @@ void CanvasItemEditor::_keying_changed() {
|
||||
}
|
||||
}
|
||||
|
||||
Rect2 CanvasItemEditor::_get_encompassing_rect_from_list(List<CanvasItem *> p_list) {
|
||||
Rect2 CanvasItemEditor::_get_encompassing_rect_from_list(const List<CanvasItem *> &p_list) {
|
||||
ERR_FAIL_COND_V(p_list.is_empty(), Rect2());
|
||||
|
||||
// Handles the first element
|
||||
@ -830,7 +830,7 @@ Vector2 CanvasItemEditor::_position_to_anchor(const Control *p_control, Vector2
|
||||
return output;
|
||||
}
|
||||
|
||||
void CanvasItemEditor::_save_canvas_item_state(List<CanvasItem *> p_canvas_items, bool save_bones) {
|
||||
void CanvasItemEditor::_save_canvas_item_state(const List<CanvasItem *> &p_canvas_items, bool save_bones) {
|
||||
original_transform = Transform2D();
|
||||
bool transform_stored = false;
|
||||
|
||||
@ -853,14 +853,14 @@ void CanvasItemEditor::_save_canvas_item_state(List<CanvasItem *> p_canvas_items
|
||||
}
|
||||
}
|
||||
|
||||
void CanvasItemEditor::_restore_canvas_item_state(List<CanvasItem *> p_canvas_items, bool restore_bones) {
|
||||
void CanvasItemEditor::_restore_canvas_item_state(const List<CanvasItem *> &p_canvas_items, bool restore_bones) {
|
||||
for (CanvasItem *ci : drag_selection) {
|
||||
CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(ci);
|
||||
ci->_edit_set_state(se->undo_state);
|
||||
}
|
||||
}
|
||||
|
||||
void CanvasItemEditor::_commit_canvas_item_state(List<CanvasItem *> p_canvas_items, String action_name, bool commit_bones) {
|
||||
void CanvasItemEditor::_commit_canvas_item_state(const List<CanvasItem *> &p_canvas_items, String action_name, bool commit_bones) {
|
||||
List<CanvasItem *> modified_canvas_items;
|
||||
for (CanvasItem *ci : p_canvas_items) {
|
||||
Dictionary old_state = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(ci)->undo_state;
|
||||
|
@ -393,9 +393,9 @@ private:
|
||||
|
||||
CanvasItem *ref_item = nullptr;
|
||||
|
||||
void _save_canvas_item_state(List<CanvasItem *> p_canvas_items, bool save_bones = false);
|
||||
void _restore_canvas_item_state(List<CanvasItem *> p_canvas_items, bool restore_bones = false);
|
||||
void _commit_canvas_item_state(List<CanvasItem *> p_canvas_items, String action_name, bool commit_bones = false);
|
||||
void _save_canvas_item_state(const List<CanvasItem *> &p_canvas_items, bool save_bones = false);
|
||||
void _restore_canvas_item_state(const List<CanvasItem *> &p_canvas_items, bool restore_bones = false);
|
||||
void _commit_canvas_item_state(const List<CanvasItem *> &p_canvas_items, String action_name, bool commit_bones = false);
|
||||
|
||||
Vector2 _anchor_to_position(const Control *p_control, Vector2 anchor);
|
||||
Vector2 _position_to_anchor(const Control *p_control, Vector2 position);
|
||||
@ -429,7 +429,7 @@ private:
|
||||
void _switch_theme_preview(int p_mode);
|
||||
|
||||
List<CanvasItem *> _get_edited_canvas_items(bool retrieve_locked = false, bool remove_canvas_item_if_parent_in_selection = true) const;
|
||||
Rect2 _get_encompassing_rect_from_list(List<CanvasItem *> p_list);
|
||||
Rect2 _get_encompassing_rect_from_list(const List<CanvasItem *> &p_list);
|
||||
void _expand_encompassing_rect_using_children(Rect2 &r_rect, const Node *p_node, bool &r_first, const Transform2D &p_parent_xform = Transform2D(), const Transform2D &p_canvas_xform = Transform2D(), bool include_locked_nodes = true);
|
||||
Rect2 _get_encompassing_rect(const Node *p_node);
|
||||
|
||||
@ -545,7 +545,7 @@ public:
|
||||
SNAP_DEFAULT = SNAP_GRID | SNAP_GUIDES | SNAP_PIXEL,
|
||||
};
|
||||
|
||||
Point2 snap_point(Point2 p_target, unsigned int p_modes = SNAP_DEFAULT, unsigned int p_forced_modes = 0, const CanvasItem *p_self_canvas_item = nullptr, List<CanvasItem *> p_other_nodes_exceptions = List<CanvasItem *>());
|
||||
Point2 snap_point(Point2 p_target, unsigned int p_modes = SNAP_DEFAULT, unsigned int p_forced_modes = 0, const CanvasItem *p_self_canvas_item = nullptr, const List<CanvasItem *> &p_other_nodes_exceptions = List<CanvasItem *>());
|
||||
real_t snap_angle(real_t p_target, real_t p_start = 0) const;
|
||||
|
||||
Transform2D get_canvas_transform() const { return transform; }
|
||||
|
@ -2374,7 +2374,7 @@ void ThemeTypeEditor::_update_type_list_debounced() {
|
||||
update_debounce_timer->start();
|
||||
}
|
||||
|
||||
HashMap<StringName, bool> ThemeTypeEditor::_get_type_items(String p_type_name, void (Theme::*get_list_func)(StringName, List<StringName> *) const, bool include_default) {
|
||||
HashMap<StringName, bool> ThemeTypeEditor::_get_type_items(String p_type_name, void (Theme::*get_list_func)(const StringName &, List<StringName> *) const, bool include_default) {
|
||||
HashMap<StringName, bool> items;
|
||||
List<StringName> names;
|
||||
|
||||
|
@ -373,7 +373,7 @@ class ThemeTypeEditor : public MarginContainer {
|
||||
VBoxContainer *_create_item_list(Theme::DataType p_data_type);
|
||||
void _update_type_list();
|
||||
void _update_type_list_debounced();
|
||||
HashMap<StringName, bool> _get_type_items(String p_type_name, void (Theme::*get_list_func)(StringName, List<StringName> *) const, bool include_default);
|
||||
HashMap<StringName, bool> _get_type_items(String p_type_name, void (Theme::*get_list_func)(const StringName &, List<StringName> *) const, bool include_default);
|
||||
HBoxContainer *_create_property_control(Theme::DataType p_data_type, String p_item_name, bool p_editable);
|
||||
void _add_focusable(Control *p_control);
|
||||
void _update_type_items();
|
||||
|
@ -112,16 +112,16 @@ bool DummyObject::_get(const StringName &p_name, Variant &r_ret) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DummyObject::has_dummy_property(StringName p_name) {
|
||||
bool DummyObject::has_dummy_property(const StringName &p_name) {
|
||||
return properties.has(p_name);
|
||||
}
|
||||
|
||||
void DummyObject::add_dummy_property(StringName p_name) {
|
||||
void DummyObject::add_dummy_property(const StringName &p_name) {
|
||||
ERR_FAIL_COND(properties.has(p_name));
|
||||
properties[p_name] = Variant();
|
||||
}
|
||||
|
||||
void DummyObject::remove_dummy_property(StringName p_name) {
|
||||
void DummyObject::remove_dummy_property(const StringName &p_name) {
|
||||
ERR_FAIL_COND(!properties.has(p_name));
|
||||
properties.erase(p_name);
|
||||
}
|
||||
@ -948,7 +948,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
|
||||
_set_snap_option(EditorSettings::get_singleton()->get_project_metadata("editor_metadata", "tile_snap_option", SNAP_NONE));
|
||||
}
|
||||
|
||||
void TileDataDefaultEditor::_property_value_changed(StringName p_property, Variant p_value, StringName p_field) {
|
||||
void TileDataDefaultEditor::_property_value_changed(const StringName &p_property, Variant p_value, const StringName &p_field) {
|
||||
ERR_FAIL_NULL(dummy_object);
|
||||
dummy_object->set(p_property, p_value);
|
||||
emit_signal(SNAME("needs_redraw"));
|
||||
@ -981,7 +981,7 @@ Variant TileDataDefaultEditor::_get_value(TileSetAtlasSource *p_tile_set_atlas_s
|
||||
return tile_data->get(property);
|
||||
}
|
||||
|
||||
void TileDataDefaultEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) {
|
||||
void TileDataDefaultEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, const HashMap<TileMapCell, Variant, TileMapCell> &p_previous_values, Variant p_new_value) {
|
||||
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
|
||||
for (const KeyValue<TileMapCell, Variant> &E : p_previous_values) {
|
||||
Vector2i coords = E.key.get_atlas_coords();
|
||||
@ -1455,7 +1455,7 @@ Variant TileDataOcclusionShapeEditor::_get_value(TileSetAtlasSource *p_tile_set_
|
||||
return tile_data->get_occluder(occlusion_layer);
|
||||
}
|
||||
|
||||
void TileDataOcclusionShapeEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) {
|
||||
void TileDataOcclusionShapeEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, const HashMap<TileMapCell, Variant, TileMapCell> &p_previous_values, Variant p_new_value) {
|
||||
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
|
||||
for (const KeyValue<TileMapCell, Variant> &E : p_previous_values) {
|
||||
Vector2i coords = E.key.get_atlas_coords();
|
||||
@ -1481,11 +1481,11 @@ TileDataOcclusionShapeEditor::TileDataOcclusionShapeEditor() {
|
||||
add_child(polygon_editor);
|
||||
}
|
||||
|
||||
void TileDataCollisionEditor::_property_value_changed(StringName p_property, Variant p_value, StringName p_field) {
|
||||
void TileDataCollisionEditor::_property_value_changed(const StringName &p_property, Variant p_value, const StringName &p_field) {
|
||||
dummy_object->set(p_property, p_value);
|
||||
}
|
||||
|
||||
void TileDataCollisionEditor::_property_selected(StringName p_path, int p_focusable) {
|
||||
void TileDataCollisionEditor::_property_selected(const StringName &p_path, int p_focusable) {
|
||||
// Deselect all other properties
|
||||
for (KeyValue<StringName, EditorProperty *> &editor : property_editors) {
|
||||
if (editor.key != p_path) {
|
||||
@ -1634,10 +1634,10 @@ Variant TileDataCollisionEditor::_get_value(TileSetAtlasSource *p_tile_set_atlas
|
||||
return dict;
|
||||
}
|
||||
|
||||
void TileDataCollisionEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) {
|
||||
void TileDataCollisionEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, const HashMap<TileMapCell, Variant, TileMapCell> &p_previous_values, Variant p_new_value) {
|
||||
Dictionary new_dict = p_new_value;
|
||||
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
|
||||
for (KeyValue<TileMapCell, Variant> &E : p_previous_values) {
|
||||
for (const KeyValue<TileMapCell, Variant> &E : p_previous_values) {
|
||||
Vector2i coords = E.key.get_atlas_coords();
|
||||
|
||||
Dictionary old_dict = E.value;
|
||||
@ -1802,7 +1802,7 @@ void TileDataTerrainsEditor::_update_terrain_selector() {
|
||||
}
|
||||
}
|
||||
|
||||
void TileDataTerrainsEditor::_property_value_changed(StringName p_property, Variant p_value, StringName p_field) {
|
||||
void TileDataTerrainsEditor::_property_value_changed(const StringName &p_property, Variant p_value, const StringName &p_field) {
|
||||
Variant old_value = dummy_object->get(p_property);
|
||||
dummy_object->set(p_property, p_value);
|
||||
if (p_property == "terrain_set") {
|
||||
@ -2871,7 +2871,7 @@ Variant TileDataNavigationEditor::_get_value(TileSetAtlasSource *p_tile_set_atla
|
||||
return tile_data->get_navigation_polygon(navigation_layer);
|
||||
}
|
||||
|
||||
void TileDataNavigationEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) {
|
||||
void TileDataNavigationEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, const HashMap<TileMapCell, Variant, TileMapCell> &p_previous_values, Variant p_new_value) {
|
||||
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
|
||||
for (const KeyValue<TileMapCell, Variant> &E : p_previous_values) {
|
||||
Vector2i coords = E.key.get_atlas_coords();
|
||||
|
@ -82,9 +82,9 @@ protected:
|
||||
bool _get(const StringName &p_name, Variant &r_ret) const;
|
||||
|
||||
public:
|
||||
bool has_dummy_property(StringName p_name);
|
||||
void add_dummy_property(StringName p_name);
|
||||
void remove_dummy_property(StringName p_name);
|
||||
bool has_dummy_property(const StringName &p_name);
|
||||
void add_dummy_property(const StringName &p_name);
|
||||
void remove_dummy_property(const StringName &p_name);
|
||||
void clear_dummy_properties();
|
||||
};
|
||||
|
||||
@ -224,7 +224,7 @@ private:
|
||||
HashMap<TileMapCell, Variant, TileMapCell> drag_modified;
|
||||
Variant drag_painted_value;
|
||||
|
||||
void _property_value_changed(StringName p_property, Variant p_value, StringName p_field);
|
||||
void _property_value_changed(const StringName &p_property, Variant p_value, const StringName &p_field);
|
||||
|
||||
protected:
|
||||
DummyObject *dummy_object = memnew(DummyObject);
|
||||
@ -238,7 +238,7 @@ protected:
|
||||
virtual void _set_painted_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile);
|
||||
virtual void _set_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile, Variant p_value);
|
||||
virtual Variant _get_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile);
|
||||
virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value);
|
||||
virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, const HashMap<TileMapCell, Variant, TileMapCell> &p_previous_values, Variant p_new_value);
|
||||
|
||||
public:
|
||||
virtual Control *get_toolbar() override { return toolbar; };
|
||||
@ -291,7 +291,7 @@ private:
|
||||
virtual void _set_painted_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override;
|
||||
virtual void _set_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile, Variant p_value) override;
|
||||
virtual Variant _get_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override;
|
||||
virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) override;
|
||||
virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, const HashMap<TileMapCell, Variant, TileMapCell> &p_previous_values, Variant p_new_value) override;
|
||||
|
||||
protected:
|
||||
virtual void _tile_set_changed() override;
|
||||
@ -316,15 +316,15 @@ class TileDataCollisionEditor : public TileDataDefaultEditor {
|
||||
DummyObject *dummy_object = memnew(DummyObject);
|
||||
HashMap<StringName, EditorProperty *> property_editors;
|
||||
|
||||
void _property_value_changed(StringName p_property, Variant p_value, StringName p_field);
|
||||
void _property_selected(StringName p_path, int p_focusable);
|
||||
void _property_value_changed(const StringName &p_property, Variant p_value, const StringName &p_field);
|
||||
void _property_selected(const StringName &p_path, int p_focusable);
|
||||
void _polygons_changed();
|
||||
|
||||
virtual Variant _get_painted_value() override;
|
||||
virtual void _set_painted_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override;
|
||||
virtual void _set_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile, Variant p_value) override;
|
||||
virtual Variant _get_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override;
|
||||
virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) override;
|
||||
virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, const HashMap<TileMapCell, Variant, TileMapCell> &p_previous_values, Variant p_new_value) override;
|
||||
|
||||
protected:
|
||||
virtual void _tile_set_changed() override;
|
||||
@ -368,7 +368,7 @@ private:
|
||||
EditorPropertyEnum *terrain_set_property_editor = nullptr;
|
||||
EditorPropertyEnum *terrain_property_editor = nullptr;
|
||||
|
||||
void _property_value_changed(StringName p_property, Variant p_value, StringName p_field);
|
||||
void _property_value_changed(const StringName &p_property, Variant p_value, const StringName &p_field);
|
||||
|
||||
void _update_terrain_selector();
|
||||
|
||||
@ -405,7 +405,7 @@ private:
|
||||
virtual void _set_painted_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override;
|
||||
virtual void _set_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile, Variant p_value) override;
|
||||
virtual Variant _get_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override;
|
||||
virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) override;
|
||||
virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, const HashMap<TileMapCell, Variant, TileMapCell> &p_previous_values, Variant p_new_value) override;
|
||||
|
||||
protected:
|
||||
virtual void _tile_set_changed() override;
|
||||
|
@ -507,7 +507,7 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::_get_property_list(List<Pro
|
||||
}
|
||||
}
|
||||
|
||||
void TileSetAtlasSourceEditor::AtlasTileProxyObject::edit(Ref<TileSetAtlasSource> p_tile_set_atlas_source, RBSet<TileSelection> p_tiles) {
|
||||
void TileSetAtlasSourceEditor::AtlasTileProxyObject::edit(Ref<TileSetAtlasSource> p_tile_set_atlas_source, const RBSet<TileSelection> &p_tiles) {
|
||||
ERR_FAIL_COND(!p_tile_set_atlas_source.is_valid());
|
||||
ERR_FAIL_COND(p_tiles.is_empty());
|
||||
for (const TileSelection &E : p_tiles) {
|
||||
|
@ -105,7 +105,7 @@ public:
|
||||
RBSet<TileSelection> get_edited_tiles() const { return tiles; };
|
||||
|
||||
// Update the proxyed object.
|
||||
void edit(Ref<TileSetAtlasSource> p_tile_set_atlas_source, RBSet<TileSelection> p_tiles = RBSet<TileSelection>());
|
||||
void edit(Ref<TileSetAtlasSource> p_tile_set_atlas_source, const RBSet<TileSelection> &p_tiles = RBSet<TileSelection>());
|
||||
|
||||
AtlasTileProxyObject(TileSetAtlasSourceEditor *p_tiles_set_atlas_source_editor) {
|
||||
tiles_set_atlas_source_editor = p_tiles_set_atlas_source_editor;
|
||||
|
@ -1243,7 +1243,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
|
||||
if (cant_be_set_unique_names.size()) {
|
||||
String popup_text = TTR("Unique names already used by another node in the scene:");
|
||||
popup_text += "\n";
|
||||
for (StringName name : cant_be_set_unique_names) {
|
||||
for (const StringName &name : cant_be_set_unique_names) {
|
||||
popup_text += "\n" + String(name);
|
||||
}
|
||||
accept->set_text(popup_text);
|
||||
|
@ -540,7 +540,7 @@ public:
|
||||
virtual void get_string_delimiters(List<String> *p_delimiters) const override;
|
||||
virtual bool is_using_templates() override;
|
||||
virtual Ref<Script> make_template(const String &p_template, const String &p_class_name, const String &p_base_class_name) const override;
|
||||
virtual Vector<ScriptTemplate> get_built_in_templates(StringName p_object) override;
|
||||
virtual Vector<ScriptTemplate> get_built_in_templates(const StringName &p_object) override;
|
||||
virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptLanguage::ScriptError> *r_errors = nullptr, List<ScriptLanguage::Warning> *r_warnings = nullptr, HashSet<int> *r_safe_lines = nullptr) const override;
|
||||
virtual Script *create_script() const override;
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
|
@ -845,7 +845,7 @@ GDScriptParser::DataType GDScriptAnalyzer::resolve_datatype(GDScriptParser::Type
|
||||
return result;
|
||||
}
|
||||
|
||||
void GDScriptAnalyzer::resolve_class_member(GDScriptParser::ClassNode *p_class, StringName p_name, const GDScriptParser::Node *p_source) {
|
||||
void GDScriptAnalyzer::resolve_class_member(GDScriptParser::ClassNode *p_class, const StringName &p_name, const GDScriptParser::Node *p_source) {
|
||||
ERR_FAIL_COND(!p_class->has_member(p_name));
|
||||
resolve_class_member(p_class, p_class->members_indices[p_name], p_source);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ class GDScriptAnalyzer {
|
||||
void decide_suite_type(GDScriptParser::Node *p_suite, GDScriptParser::Node *p_statement);
|
||||
|
||||
void resolve_annotation(GDScriptParser::AnnotationNode *p_annotation);
|
||||
void resolve_class_member(GDScriptParser::ClassNode *p_class, StringName p_name, const GDScriptParser::Node *p_source = nullptr);
|
||||
void resolve_class_member(GDScriptParser::ClassNode *p_class, const StringName &p_name, const GDScriptParser::Node *p_source = nullptr);
|
||||
void resolve_class_member(GDScriptParser::ClassNode *p_class, int p_index, const GDScriptParser::Node *p_source = nullptr);
|
||||
void resolve_class_interface(GDScriptParser::ClassNode *p_class, const GDScriptParser::Node *p_source = nullptr);
|
||||
void resolve_class_interface(GDScriptParser::ClassNode *p_class, bool p_recursive);
|
||||
|
@ -104,7 +104,7 @@ Ref<Script> GDScriptLanguage::make_template(const String &p_template, const Stri
|
||||
return scr;
|
||||
}
|
||||
|
||||
Vector<ScriptLanguage::ScriptTemplate> GDScriptLanguage::get_built_in_templates(StringName p_object) {
|
||||
Vector<ScriptLanguage::ScriptTemplate> GDScriptLanguage::get_built_in_templates(const StringName &p_object) {
|
||||
Vector<ScriptLanguage::ScriptTemplate> templates;
|
||||
#ifdef TOOLS_ENABLED
|
||||
for (int i = 0; i < TEMPLATES_ARRAY_SIZE; i++) {
|
||||
@ -537,7 +537,7 @@ struct GDScriptCompletionIdentifier {
|
||||
// appears. For example, if you are completing code in a class that inherits Node2D, a property found on Node2D
|
||||
// will have a "better" (lower) location "score" than a property that is found on CanvasItem.
|
||||
|
||||
static int _get_property_location(StringName p_class, StringName p_property) {
|
||||
static int _get_property_location(const StringName &p_class, const StringName &p_property) {
|
||||
if (!ClassDB::has_property(p_class, p_property)) {
|
||||
return ScriptLanguage::LOCATION_OTHER;
|
||||
}
|
||||
@ -552,7 +552,7 @@ static int _get_property_location(StringName p_class, StringName p_property) {
|
||||
return depth | ScriptLanguage::LOCATION_PARENT_MASK;
|
||||
}
|
||||
|
||||
static int _get_constant_location(StringName p_class, StringName p_constant) {
|
||||
static int _get_constant_location(const StringName &p_class, const StringName &p_constant) {
|
||||
if (!ClassDB::has_integer_constant(p_class, p_constant)) {
|
||||
return ScriptLanguage::LOCATION_OTHER;
|
||||
}
|
||||
@ -567,7 +567,7 @@ static int _get_constant_location(StringName p_class, StringName p_constant) {
|
||||
return depth | ScriptLanguage::LOCATION_PARENT_MASK;
|
||||
}
|
||||
|
||||
static int _get_signal_location(StringName p_class, StringName p_signal) {
|
||||
static int _get_signal_location(const StringName &p_class, const StringName &p_signal) {
|
||||
if (!ClassDB::has_signal(p_class, p_signal)) {
|
||||
return ScriptLanguage::LOCATION_OTHER;
|
||||
}
|
||||
@ -582,7 +582,7 @@ static int _get_signal_location(StringName p_class, StringName p_signal) {
|
||||
return depth | ScriptLanguage::LOCATION_PARENT_MASK;
|
||||
}
|
||||
|
||||
static int _get_method_location(StringName p_class, StringName p_method) {
|
||||
static int _get_method_location(const StringName &p_class, const StringName &p_method) {
|
||||
if (!ClassDB::has_method(p_class, p_method)) {
|
||||
return ScriptLanguage::LOCATION_OTHER;
|
||||
}
|
||||
@ -597,7 +597,7 @@ static int _get_method_location(StringName p_class, StringName p_method) {
|
||||
return depth | ScriptLanguage::LOCATION_PARENT_MASK;
|
||||
}
|
||||
|
||||
static int _get_enum_constant_location(StringName p_class, StringName p_enum_constant) {
|
||||
static int _get_enum_constant_location(const StringName &p_class, const StringName &p_enum_constant) {
|
||||
if (!ClassDB::get_integer_constant_enum(p_class, p_enum_constant)) {
|
||||
return ScriptLanguage::LOCATION_OTHER;
|
||||
}
|
||||
|
@ -5049,7 +5049,7 @@ Error GLTFDocument::_serialize_animations(Ref<GLTFState> p_state) {
|
||||
AnimationPlayer *animation_player = p_state->animation_players[player_i];
|
||||
List<StringName> animations;
|
||||
animation_player->get_animation_list(&animations);
|
||||
for (StringName animation_name : animations) {
|
||||
for (const StringName &animation_name : animations) {
|
||||
_convert_animation(p_state, animation_player, animation_name);
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ public:
|
||||
//RBMap<int32_t, GLTFNodeIndex> get_godot_bone_node() {
|
||||
// return this->godot_bone_node;
|
||||
//}
|
||||
//void set_godot_bone_node(RBMap<int32_t, GLTFNodeIndex> p_godot_bone_node) {
|
||||
//void set_godot_bone_node(const RBMap<int32_t, GLTFNodeIndex> &p_godot_bone_node) {
|
||||
// this->godot_bone_node = p_godot_bone_node;
|
||||
//}
|
||||
Dictionary get_godot_bone_node();
|
||||
|
@ -371,7 +371,7 @@ Ref<Script> CSharpLanguage::make_template(const String &p_template, const String
|
||||
return scr;
|
||||
}
|
||||
|
||||
Vector<ScriptLanguage::ScriptTemplate> CSharpLanguage::get_built_in_templates(StringName p_object) {
|
||||
Vector<ScriptLanguage::ScriptTemplate> CSharpLanguage::get_built_in_templates(const StringName &p_object) {
|
||||
Vector<ScriptLanguage::ScriptTemplate> templates;
|
||||
#ifdef TOOLS_ENABLED
|
||||
for (int i = 0; i < TEMPLATES_ARRAY_SIZE; i++) {
|
||||
|
@ -423,7 +423,7 @@ public:
|
||||
void get_string_delimiters(List<String> *p_delimiters) const override;
|
||||
bool is_using_templates() override;
|
||||
virtual Ref<Script> make_template(const String &p_template, const String &p_class_name, const String &p_base_class_name) const override;
|
||||
virtual Vector<ScriptTemplate> get_built_in_templates(StringName p_object) override;
|
||||
virtual Vector<ScriptTemplate> get_built_in_templates(const StringName &p_object) override;
|
||||
/* TODO */ bool validate(const String &p_script, const String &p_path, List<String> *r_functions,
|
||||
List<ScriptLanguage::ScriptError> *r_errors = nullptr, List<ScriptLanguage::Warning> *r_warnings = nullptr, HashSet<int> *r_safe_lines = nullptr) const override {
|
||||
return true;
|
||||
|
@ -707,7 +707,7 @@ MultiplayerSynchronizer *SceneReplicationInterface::_find_synchronizer(int p_pee
|
||||
return sync;
|
||||
}
|
||||
|
||||
void SceneReplicationInterface::_send_delta(int p_peer, const HashSet<ObjectID> p_synchronizers, uint64_t p_usec, const HashMap<ObjectID, uint64_t> p_last_watch_usecs) {
|
||||
void SceneReplicationInterface::_send_delta(int p_peer, const HashSet<ObjectID> &p_synchronizers, uint64_t p_usec, const HashMap<ObjectID, uint64_t> &p_last_watch_usecs) {
|
||||
MAKE_ROOM(/* header */ 1 + /* element */ 4 + 8 + 4 + delta_mtu);
|
||||
uint8_t *ptr = packet_cache.ptrw();
|
||||
ptr[0] = SceneMultiplayer::NETWORK_COMMAND_SYNC | (1 << SceneMultiplayer::CMD_FLAG_0_SHIFT);
|
||||
@ -799,7 +799,7 @@ Error SceneReplicationInterface::on_delta_receive(int p_from, const uint8_t *p_b
|
||||
return OK;
|
||||
}
|
||||
|
||||
void SceneReplicationInterface::_send_sync(int p_peer, const HashSet<ObjectID> p_synchronizers, uint16_t p_sync_net_time, uint64_t p_usec) {
|
||||
void SceneReplicationInterface::_send_sync(int p_peer, const HashSet<ObjectID> &p_synchronizers, uint16_t p_sync_net_time, uint64_t p_usec) {
|
||||
MAKE_ROOM(/* header */ 3 + /* element */ 4 + 4 + sync_mtu);
|
||||
uint8_t *ptr = packet_cache.ptrw();
|
||||
ptr[0] = SceneMultiplayer::NETWORK_COMMAND_SYNC;
|
||||
|
@ -101,8 +101,8 @@ private:
|
||||
bool _verify_synchronizer(int p_peer, MultiplayerSynchronizer *p_sync, uint32_t &r_net_id);
|
||||
MultiplayerSynchronizer *_find_synchronizer(int p_peer, uint32_t p_net_ida);
|
||||
|
||||
void _send_sync(int p_peer, const HashSet<ObjectID> p_synchronizers, uint16_t p_sync_net_time, uint64_t p_usec);
|
||||
void _send_delta(int p_peer, const HashSet<ObjectID> p_synchronizers, uint64_t p_usec, const HashMap<ObjectID, uint64_t> p_last_watch_usecs);
|
||||
void _send_sync(int p_peer, const HashSet<ObjectID> &p_synchronizers, uint16_t p_sync_net_time, uint64_t p_usec);
|
||||
void _send_delta(int p_peer, const HashSet<ObjectID> &p_synchronizers, uint64_t p_usec, const HashMap<ObjectID, uint64_t> &p_last_watch_usecs);
|
||||
Error _make_spawn_packet(Node *p_node, MultiplayerSpawner *p_spawner, int &r_len);
|
||||
Error _make_despawn_packet(Node *p_node, int &r_len);
|
||||
Error _send_raw(const uint8_t *p_buffer, int p_size, int p_peer, bool p_reliable);
|
||||
|
@ -334,7 +334,7 @@ void GodotJavaWrapper::vibrate(int p_duration_ms) {
|
||||
}
|
||||
}
|
||||
|
||||
int GodotJavaWrapper::create_new_godot_instance(List<String> args) {
|
||||
int GodotJavaWrapper::create_new_godot_instance(const List<String> &args) {
|
||||
if (_create_new_godot_instance) {
|
||||
JNIEnv *env = get_jni_env();
|
||||
ERR_FAIL_NULL_V(env, 0);
|
||||
|
@ -104,7 +104,7 @@ public:
|
||||
void init_input_devices();
|
||||
void vibrate(int p_duration_ms);
|
||||
String get_input_fallback_mapping();
|
||||
int create_new_godot_instance(List<String> args);
|
||||
int create_new_godot_instance(const List<String> &args);
|
||||
void begin_benchmark_measure(const String &p_context, const String &p_label);
|
||||
void end_benchmark_measure(const String &p_context, const String &p_label);
|
||||
void dump_benchmark(const String &benchmark_file);
|
||||
|
@ -112,7 +112,7 @@ Error EditorExportPlatformWeb::_write_or_error(const uint8_t *p_content, int p_s
|
||||
return OK;
|
||||
}
|
||||
|
||||
void EditorExportPlatformWeb::_replace_strings(HashMap<String, String> p_replaces, Vector<uint8_t> &r_template) {
|
||||
void EditorExportPlatformWeb::_replace_strings(const HashMap<String, String> &p_replaces, Vector<uint8_t> &r_template) {
|
||||
String str_template = String::utf8(reinterpret_cast<const char *>(r_template.ptr()), r_template.size());
|
||||
String out;
|
||||
Vector<String> lines = str_template.split("\n");
|
||||
|
@ -90,7 +90,7 @@ class EditorExportPlatformWeb : public EditorExportPlatform {
|
||||
}
|
||||
|
||||
Error _extract_template(const String &p_template, const String &p_dir, const String &p_name, bool pwa);
|
||||
void _replace_strings(HashMap<String, String> p_replaces, Vector<uint8_t> &r_template);
|
||||
void _replace_strings(const HashMap<String, String> &p_replaces, Vector<uint8_t> &r_template);
|
||||
void _fix_html(Vector<uint8_t> &p_html, const Ref<EditorExportPreset> &p_preset, const String &p_name, bool p_debug, int p_flags, const Vector<SharedObject> p_shared_objects, const Dictionary &p_file_sizes);
|
||||
Error _add_manifest_icon(const String &p_path, const String &p_icon, int p_size, Array &r_arr);
|
||||
Error _build_pwa(const Ref<EditorExportPreset> &p_preset, const String p_path, const Vector<SharedObject> &p_shared_objects);
|
||||
|
@ -250,7 +250,7 @@ GeometryInstance3D::VisibilityRangeFadeMode GeometryInstance3D::get_visibility_r
|
||||
return visibility_range_fade_mode;
|
||||
}
|
||||
|
||||
const StringName *GeometryInstance3D::_instance_uniform_get_remap(const StringName p_name) const {
|
||||
const StringName *GeometryInstance3D::_instance_uniform_get_remap(const StringName &p_name) const {
|
||||
StringName *r = instance_shader_parameter_property_remap.getptr(p_name);
|
||||
if (!r) {
|
||||
String s = p_name;
|
||||
|
@ -135,7 +135,7 @@ private:
|
||||
GIMode gi_mode = GI_MODE_STATIC;
|
||||
bool ignore_occlusion_culling = false;
|
||||
|
||||
const StringName *_instance_uniform_get_remap(const StringName p_name) const;
|
||||
const StringName *_instance_uniform_get_remap(const StringName &p_name) const;
|
||||
|
||||
protected:
|
||||
bool _set(const StringName &p_name, const Variant &p_value);
|
||||
|
@ -58,13 +58,13 @@ void XRCamera3D::_unbind_tracker() {
|
||||
tracker.unref();
|
||||
}
|
||||
|
||||
void XRCamera3D::_changed_tracker(const StringName p_tracker_name, int p_tracker_type) {
|
||||
void XRCamera3D::_changed_tracker(const StringName &p_tracker_name, int p_tracker_type) {
|
||||
if (p_tracker_name == tracker_name) {
|
||||
_bind_tracker();
|
||||
}
|
||||
}
|
||||
|
||||
void XRCamera3D::_removed_tracker(const StringName p_tracker_name, int p_tracker_type) {
|
||||
void XRCamera3D::_removed_tracker(const StringName &p_tracker_name, int p_tracker_type) {
|
||||
if (p_tracker_name == tracker_name) {
|
||||
_unbind_tracker();
|
||||
}
|
||||
@ -258,7 +258,7 @@ void XRNode3D::_validate_property(PropertyInfo &p_property) const {
|
||||
}
|
||||
}
|
||||
|
||||
void XRNode3D::set_tracker(const StringName p_tracker_name) {
|
||||
void XRNode3D::set_tracker(const StringName &p_tracker_name) {
|
||||
if (tracker.is_valid() && tracker->get_tracker_name() == p_tracker_name) {
|
||||
// didn't change
|
||||
return;
|
||||
@ -282,7 +282,7 @@ StringName XRNode3D::get_tracker() const {
|
||||
return tracker_name;
|
||||
}
|
||||
|
||||
void XRNode3D::set_pose_name(const StringName p_pose_name) {
|
||||
void XRNode3D::set_pose_name(const StringName &p_pose_name) {
|
||||
pose_name = p_pose_name;
|
||||
|
||||
// Update pose if we are bound to a tracker with a valid pose
|
||||
@ -363,7 +363,7 @@ void XRNode3D::_unbind_tracker() {
|
||||
}
|
||||
}
|
||||
|
||||
void XRNode3D::_changed_tracker(const StringName p_tracker_name, int p_tracker_type) {
|
||||
void XRNode3D::_changed_tracker(const StringName &p_tracker_name, int p_tracker_type) {
|
||||
if (tracker_name == p_tracker_name) {
|
||||
// just in case unref our current tracker
|
||||
_unbind_tracker();
|
||||
@ -373,7 +373,7 @@ void XRNode3D::_changed_tracker(const StringName p_tracker_name, int p_tracker_t
|
||||
}
|
||||
}
|
||||
|
||||
void XRNode3D::_removed_tracker(const StringName p_tracker_name, int p_tracker_type) {
|
||||
void XRNode3D::_removed_tracker(const StringName &p_tracker_name, int p_tracker_type) {
|
||||
if (tracker_name == p_tracker_name) {
|
||||
// unref our tracker, it's no longer available
|
||||
_unbind_tracker();
|
||||
|
@ -50,8 +50,8 @@ protected:
|
||||
|
||||
void _bind_tracker();
|
||||
void _unbind_tracker();
|
||||
void _changed_tracker(const StringName p_tracker_name, int p_tracker_type);
|
||||
void _removed_tracker(const StringName p_tracker_name, int p_tracker_type);
|
||||
void _changed_tracker(const StringName &p_tracker_name, int p_tracker_type);
|
||||
void _removed_tracker(const StringName &p_tracker_name, int p_tracker_type);
|
||||
void _pose_changed(const Ref<XRPose> &p_pose);
|
||||
|
||||
public:
|
||||
@ -87,8 +87,8 @@ protected:
|
||||
|
||||
virtual void _bind_tracker();
|
||||
virtual void _unbind_tracker();
|
||||
void _changed_tracker(const StringName p_tracker_name, int p_tracker_type);
|
||||
void _removed_tracker(const StringName p_tracker_name, int p_tracker_type);
|
||||
void _changed_tracker(const StringName &p_tracker_name, int p_tracker_type);
|
||||
void _removed_tracker(const StringName &p_tracker_name, int p_tracker_type);
|
||||
|
||||
void _pose_changed(const Ref<XRPose> &p_pose);
|
||||
void _pose_lost_tracking(const Ref<XRPose> &p_pose);
|
||||
@ -96,10 +96,10 @@ protected:
|
||||
|
||||
public:
|
||||
void _validate_property(PropertyInfo &p_property) const;
|
||||
void set_tracker(const StringName p_tracker_name);
|
||||
void set_tracker(const StringName &p_tracker_name);
|
||||
StringName get_tracker() const;
|
||||
|
||||
void set_pose_name(const StringName p_pose);
|
||||
void set_pose_name(const StringName &p_pose);
|
||||
StringName get_pose_name() const;
|
||||
|
||||
bool get_is_active() const;
|
||||
|
@ -2166,7 +2166,7 @@ AnimationMixer::AnimationMixer() {
|
||||
AnimationMixer::~AnimationMixer() {
|
||||
}
|
||||
|
||||
void AnimatedValuesBackup::set_data(const HashMap<NodePath, AnimationMixer::TrackCache *> p_data) {
|
||||
void AnimatedValuesBackup::set_data(const HashMap<NodePath, AnimationMixer::TrackCache *> &p_data) {
|
||||
clear_data();
|
||||
|
||||
for (const KeyValue<NodePath, AnimationMixer::TrackCache *> &E : p_data) {
|
||||
|
@ -447,7 +447,7 @@ class AnimatedValuesBackup : public RefCounted {
|
||||
HashMap<NodePath, AnimationMixer::TrackCache *> data;
|
||||
|
||||
public:
|
||||
void set_data(const HashMap<NodePath, AnimationMixer::TrackCache *> p_data);
|
||||
void set_data(const HashMap<NodePath, AnimationMixer::TrackCache *> &p_data);
|
||||
HashMap<NodePath, AnimationMixer::TrackCache *> get_data() const;
|
||||
void clear_data();
|
||||
|
||||
|
@ -421,7 +421,7 @@ void GraphEditArranger::_calculate_inner_shifts(Dictionary &r_inner_shifts, cons
|
||||
}
|
||||
}
|
||||
|
||||
float GraphEditArranger::_calculate_threshold(StringName p_v, StringName p_w, const Dictionary &r_node_names, const HashMap<int, Vector<StringName>> &r_layers, const Dictionary &r_root, const Dictionary &r_align, const Dictionary &r_inner_shift, real_t p_current_threshold, const HashMap<StringName, Vector2> &r_node_positions) {
|
||||
float GraphEditArranger::_calculate_threshold(const StringName &p_v, const StringName &p_w, const Dictionary &r_node_names, const HashMap<int, Vector<StringName>> &r_layers, const Dictionary &r_root, const Dictionary &r_align, const Dictionary &r_inner_shift, real_t p_current_threshold, const HashMap<StringName, Vector2> &r_node_positions) {
|
||||
#define MAX_ORDER 2147483647
|
||||
#define ORDER(node, layers) \
|
||||
for (unsigned int i = 0; i < layers.size(); i++) { \
|
||||
@ -503,7 +503,7 @@ float GraphEditArranger::_calculate_threshold(StringName p_v, StringName p_w, co
|
||||
return threshold;
|
||||
}
|
||||
|
||||
void GraphEditArranger::_place_block(StringName p_v, float p_delta, const HashMap<int, Vector<StringName>> &r_layers, const Dictionary &r_root, const Dictionary &r_align, const Dictionary &r_node_name, const Dictionary &r_inner_shift, Dictionary &r_sink, Dictionary &r_shift, HashMap<StringName, Vector2> &r_node_positions) {
|
||||
void GraphEditArranger::_place_block(const StringName &p_v, float p_delta, const HashMap<int, Vector<StringName>> &r_layers, const Dictionary &r_root, const Dictionary &r_align, const Dictionary &r_node_name, const Dictionary &r_inner_shift, Dictionary &r_sink, Dictionary &r_shift, HashMap<StringName, Vector2> &r_node_positions) {
|
||||
#define PRED(node, layers) \
|
||||
for (unsigned int i = 0; i < layers.size(); i++) { \
|
||||
int index = layers[i].find(node); \
|
||||
|
@ -54,8 +54,8 @@ class GraphEditArranger : public RefCounted {
|
||||
void _horizontal_alignment(Dictionary &r_root, Dictionary &r_align, const HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, HashSet<StringName>> &r_upper_neighbours, const HashSet<StringName> &r_selected_nodes);
|
||||
void _crossing_minimisation(HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, HashSet<StringName>> &r_upper_neighbours);
|
||||
void _calculate_inner_shifts(Dictionary &r_inner_shifts, const Dictionary &r_root, const Dictionary &r_node_names, const Dictionary &r_align, const HashSet<StringName> &r_block_heads, const HashMap<StringName, Pair<int, int>> &r_port_info);
|
||||
float _calculate_threshold(StringName p_v, StringName p_w, const Dictionary &r_node_names, const HashMap<int, Vector<StringName>> &r_layers, const Dictionary &r_root, const Dictionary &r_align, const Dictionary &r_inner_shift, real_t p_current_threshold, const HashMap<StringName, Vector2> &r_node_positions);
|
||||
void _place_block(StringName p_v, float p_delta, const HashMap<int, Vector<StringName>> &r_layers, const Dictionary &r_root, const Dictionary &r_align, const Dictionary &r_node_name, const Dictionary &r_inner_shift, Dictionary &r_sink, Dictionary &r_shift, HashMap<StringName, Vector2> &r_node_positions);
|
||||
float _calculate_threshold(const StringName &p_v, const StringName &p_w, const Dictionary &r_node_names, const HashMap<int, Vector<StringName>> &r_layers, const Dictionary &r_root, const Dictionary &r_align, const Dictionary &r_inner_shift, real_t p_current_threshold, const HashMap<StringName, Vector2> &r_node_positions);
|
||||
void _place_block(const StringName &p_v, float p_delta, const HashMap<int, Vector<StringName>> &r_layers, const Dictionary &r_root, const Dictionary &r_align, const Dictionary &r_node_name, const Dictionary &r_inner_shift, Dictionary &r_sink, Dictionary &r_shift, HashMap<StringName, Vector2> &r_node_positions);
|
||||
|
||||
public:
|
||||
void arrange_nodes();
|
||||
|
@ -77,22 +77,22 @@ void BoneMap::set_profile(const Ref<SkeletonProfile> &p_profile) {
|
||||
notify_property_list_changed();
|
||||
}
|
||||
|
||||
StringName BoneMap::get_skeleton_bone_name(StringName p_profile_bone_name) const {
|
||||
StringName BoneMap::get_skeleton_bone_name(const StringName &p_profile_bone_name) const {
|
||||
ERR_FAIL_COND_V(!bone_map.has(p_profile_bone_name), StringName());
|
||||
return bone_map.get(p_profile_bone_name);
|
||||
}
|
||||
|
||||
void BoneMap::_set_skeleton_bone_name(StringName p_profile_bone_name, const StringName p_skeleton_bone_name) {
|
||||
void BoneMap::_set_skeleton_bone_name(const StringName &p_profile_bone_name, const StringName &p_skeleton_bone_name) {
|
||||
ERR_FAIL_COND(!bone_map.has(p_profile_bone_name));
|
||||
bone_map.insert(p_profile_bone_name, p_skeleton_bone_name);
|
||||
}
|
||||
|
||||
void BoneMap::set_skeleton_bone_name(StringName p_profile_bone_name, const StringName p_skeleton_bone_name) {
|
||||
void BoneMap::set_skeleton_bone_name(const StringName &p_profile_bone_name, const StringName &p_skeleton_bone_name) {
|
||||
_set_skeleton_bone_name(p_profile_bone_name, p_skeleton_bone_name);
|
||||
emit_signal("bone_map_updated");
|
||||
}
|
||||
|
||||
StringName BoneMap::find_profile_bone_name(StringName p_skeleton_bone_name) const {
|
||||
StringName BoneMap::find_profile_bone_name(const StringName &p_skeleton_bone_name) const {
|
||||
StringName profile_bone_name;
|
||||
HashMap<StringName, StringName>::ConstIterator E = bone_map.begin();
|
||||
while (E) {
|
||||
@ -105,7 +105,7 @@ StringName BoneMap::find_profile_bone_name(StringName p_skeleton_bone_name) cons
|
||||
return profile_bone_name;
|
||||
}
|
||||
|
||||
int BoneMap::get_skeleton_bone_name_count(const StringName p_skeleton_bone_name) const {
|
||||
int BoneMap::get_skeleton_bone_name_count(const StringName &p_skeleton_bone_name) const {
|
||||
int count = 0;
|
||||
HashMap<StringName, StringName>::ConstIterator E = bone_map.begin();
|
||||
while (E) {
|
||||
|
@ -53,13 +53,13 @@ public:
|
||||
Ref<SkeletonProfile> get_profile() const;
|
||||
void set_profile(const Ref<SkeletonProfile> &p_profile);
|
||||
|
||||
int get_skeleton_bone_name_count(const StringName p_skeleton_bone_name) const;
|
||||
int get_skeleton_bone_name_count(const StringName &p_skeleton_bone_name) const;
|
||||
|
||||
StringName get_skeleton_bone_name(StringName p_profile_bone_name) const;
|
||||
void set_skeleton_bone_name(StringName p_profile_bone_name, const StringName p_skeleton_bone_name);
|
||||
void _set_skeleton_bone_name(StringName p_profile_bone_name, const StringName p_skeleton_bone_name); // Avoid to emit signal for editor.
|
||||
StringName get_skeleton_bone_name(const StringName &p_profile_bone_name) const;
|
||||
void set_skeleton_bone_name(const StringName &p_profile_bone_name, const StringName &p_skeleton_bone_name);
|
||||
void _set_skeleton_bone_name(const StringName &p_profile_bone_name, const StringName &p_skeleton_bone_name); // Avoid to emit signal for editor.
|
||||
|
||||
StringName find_profile_bone_name(StringName p_skeleton_bone_name) const;
|
||||
StringName find_profile_bone_name(const StringName &p_skeleton_bone_name) const;
|
||||
|
||||
BoneMap();
|
||||
~BoneMap();
|
||||
|
@ -1947,7 +1947,7 @@ Ref<Texture2D> BaseMaterial3D::get_texture(TextureParam p_param) const {
|
||||
return textures[p_param];
|
||||
}
|
||||
|
||||
Ref<Texture2D> BaseMaterial3D::get_texture_by_name(StringName p_name) const {
|
||||
Ref<Texture2D> BaseMaterial3D::get_texture_by_name(const StringName &p_name) const {
|
||||
for (int i = 0; i < (int)BaseMaterial3D::TEXTURE_MAX; i++) {
|
||||
TextureParam param = TextureParam(i);
|
||||
if (p_name == shader_names->texture_names[param]) {
|
||||
|
@ -682,7 +682,7 @@ public:
|
||||
void set_texture(TextureParam p_param, const Ref<Texture2D> &p_texture);
|
||||
Ref<Texture2D> get_texture(TextureParam p_param) const;
|
||||
// Used only for shader material conversion
|
||||
Ref<Texture2D> get_texture_by_name(StringName p_name) const;
|
||||
Ref<Texture2D> get_texture_by_name(const StringName &p_name) const;
|
||||
|
||||
void set_texture_filter(TextureFilter p_filter);
|
||||
TextureFilter get_texture_filter() const;
|
||||
|
@ -127,7 +127,7 @@ NavigationMesh::SourceGeometryMode NavigationMesh::get_source_geometry_mode() co
|
||||
return source_geometry_mode;
|
||||
}
|
||||
|
||||
void NavigationMesh::set_source_group_name(StringName p_group_name) {
|
||||
void NavigationMesh::set_source_group_name(const StringName &p_group_name) {
|
||||
source_group_name = p_group_name;
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ public:
|
||||
void set_source_geometry_mode(SourceGeometryMode p_geometry_mode);
|
||||
SourceGeometryMode get_source_geometry_mode() const;
|
||||
|
||||
void set_source_group_name(StringName p_group_name);
|
||||
void set_source_group_name(const StringName &p_group_name);
|
||||
StringName get_source_group_name() const;
|
||||
|
||||
void set_cell_size(float p_value);
|
||||
|
@ -393,7 +393,7 @@ NavigationPolygon::SourceGeometryMode NavigationPolygon::get_source_geometry_mod
|
||||
return source_geometry_mode;
|
||||
}
|
||||
|
||||
void NavigationPolygon::set_source_geometry_group_name(StringName p_group_name) {
|
||||
void NavigationPolygon::set_source_geometry_group_name(const StringName &p_group_name) {
|
||||
source_geometry_group_name = p_group_name;
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ public:
|
||||
void set_source_geometry_mode(SourceGeometryMode p_geometry_mode);
|
||||
SourceGeometryMode get_source_geometry_mode() const;
|
||||
|
||||
void set_source_geometry_group_name(StringName p_group_name);
|
||||
void set_source_geometry_group_name(const StringName &p_group_name);
|
||||
StringName get_source_geometry_group_name() const;
|
||||
|
||||
void set_agent_radius(real_t p_value);
|
||||
|
@ -180,7 +180,7 @@ StringName SkeletonProfile::get_root_bone() {
|
||||
return root_bone;
|
||||
}
|
||||
|
||||
void SkeletonProfile::set_root_bone(StringName p_bone_name) {
|
||||
void SkeletonProfile::set_root_bone(const StringName &p_bone_name) {
|
||||
if (is_read_only) {
|
||||
return;
|
||||
}
|
||||
@ -191,7 +191,7 @@ StringName SkeletonProfile::get_scale_base_bone() {
|
||||
return scale_base_bone;
|
||||
}
|
||||
|
||||
void SkeletonProfile::set_scale_base_bone(StringName p_bone_name) {
|
||||
void SkeletonProfile::set_scale_base_bone(const StringName &p_bone_name) {
|
||||
if (is_read_only) {
|
||||
return;
|
||||
}
|
||||
@ -217,7 +217,7 @@ StringName SkeletonProfile::get_group_name(int p_group_idx) const {
|
||||
return groups[p_group_idx].group_name;
|
||||
}
|
||||
|
||||
void SkeletonProfile::set_group_name(int p_group_idx, const StringName p_group_name) {
|
||||
void SkeletonProfile::set_group_name(int p_group_idx, const StringName &p_group_name) {
|
||||
if (is_read_only) {
|
||||
return;
|
||||
}
|
||||
@ -254,7 +254,7 @@ void SkeletonProfile::set_bone_size(int p_size) {
|
||||
notify_property_list_changed();
|
||||
}
|
||||
|
||||
int SkeletonProfile::find_bone(StringName p_bone_name) const {
|
||||
int SkeletonProfile::find_bone(const StringName &p_bone_name) const {
|
||||
if (p_bone_name == StringName()) {
|
||||
return -1;
|
||||
}
|
||||
@ -271,7 +271,7 @@ StringName SkeletonProfile::get_bone_name(int p_bone_idx) const {
|
||||
return bones[p_bone_idx].bone_name;
|
||||
}
|
||||
|
||||
void SkeletonProfile::set_bone_name(int p_bone_idx, const StringName p_bone_name) {
|
||||
void SkeletonProfile::set_bone_name(int p_bone_idx, const StringName &p_bone_name) {
|
||||
if (is_read_only) {
|
||||
return;
|
||||
}
|
||||
@ -285,7 +285,7 @@ StringName SkeletonProfile::get_bone_parent(int p_bone_idx) const {
|
||||
return bones[p_bone_idx].bone_parent;
|
||||
}
|
||||
|
||||
void SkeletonProfile::set_bone_parent(int p_bone_idx, const StringName p_bone_parent) {
|
||||
void SkeletonProfile::set_bone_parent(int p_bone_idx, const StringName &p_bone_parent) {
|
||||
if (is_read_only) {
|
||||
return;
|
||||
}
|
||||
@ -314,7 +314,7 @@ StringName SkeletonProfile::get_bone_tail(int p_bone_idx) const {
|
||||
return bones[p_bone_idx].bone_tail;
|
||||
}
|
||||
|
||||
void SkeletonProfile::set_bone_tail(int p_bone_idx, const StringName p_bone_tail) {
|
||||
void SkeletonProfile::set_bone_tail(int p_bone_idx, const StringName &p_bone_tail) {
|
||||
if (is_read_only) {
|
||||
return;
|
||||
}
|
||||
@ -356,7 +356,7 @@ StringName SkeletonProfile::get_group(int p_bone_idx) const {
|
||||
return bones[p_bone_idx].group;
|
||||
}
|
||||
|
||||
void SkeletonProfile::set_group(int p_bone_idx, const StringName p_group) {
|
||||
void SkeletonProfile::set_group(int p_bone_idx, const StringName &p_group) {
|
||||
if (is_read_only) {
|
||||
return;
|
||||
}
|
||||
@ -379,7 +379,7 @@ void SkeletonProfile::set_require(int p_bone_idx, const bool p_require) {
|
||||
emit_signal("profile_updated");
|
||||
}
|
||||
|
||||
bool SkeletonProfile::has_bone(StringName p_bone_name) {
|
||||
bool SkeletonProfile::has_bone(const StringName &p_bone_name) {
|
||||
bool is_found = false;
|
||||
for (int i = 0; i < bones.size(); i++) {
|
||||
if (bones[i].bone_name == p_bone_name) {
|
||||
|
@ -78,16 +78,16 @@ protected:
|
||||
|
||||
public:
|
||||
StringName get_root_bone();
|
||||
void set_root_bone(StringName p_bone_name);
|
||||
void set_root_bone(const StringName &p_bone_name);
|
||||
|
||||
StringName get_scale_base_bone();
|
||||
void set_scale_base_bone(StringName p_bone_name);
|
||||
void set_scale_base_bone(const StringName &p_bone_name);
|
||||
|
||||
int get_group_size();
|
||||
void set_group_size(int p_size);
|
||||
|
||||
StringName get_group_name(int p_group_idx) const;
|
||||
void set_group_name(int p_group_idx, const StringName p_group_name);
|
||||
void set_group_name(int p_group_idx, const StringName &p_group_name);
|
||||
|
||||
Ref<Texture2D> get_texture(int p_group_idx) const;
|
||||
void set_texture(int p_group_idx, const Ref<Texture2D> &p_texture);
|
||||
@ -95,19 +95,19 @@ public:
|
||||
int get_bone_size();
|
||||
void set_bone_size(int p_size);
|
||||
|
||||
int find_bone(const StringName p_bone_name) const;
|
||||
int find_bone(const StringName &p_bone_name) const;
|
||||
|
||||
StringName get_bone_name(int p_bone_idx) const;
|
||||
void set_bone_name(int p_bone_idx, const StringName p_bone_name);
|
||||
void set_bone_name(int p_bone_idx, const StringName &p_bone_name);
|
||||
|
||||
StringName get_bone_parent(int p_bone_idx) const;
|
||||
void set_bone_parent(int p_bone_idx, const StringName p_bone_parent);
|
||||
void set_bone_parent(int p_bone_idx, const StringName &p_bone_parent);
|
||||
|
||||
TailDirection get_tail_direction(int p_bone_idx) const;
|
||||
void set_tail_direction(int p_bone_idx, const TailDirection p_tail_direction);
|
||||
|
||||
StringName get_bone_tail(int p_bone_idx) const;
|
||||
void set_bone_tail(int p_bone_idx, const StringName p_bone_tail);
|
||||
void set_bone_tail(int p_bone_idx, const StringName &p_bone_tail);
|
||||
|
||||
Transform3D get_reference_pose(int p_bone_idx) const;
|
||||
void set_reference_pose(int p_bone_idx, const Transform3D p_reference_pose);
|
||||
@ -116,12 +116,12 @@ public:
|
||||
void set_handle_offset(int p_bone_idx, const Vector2 p_handle_offset);
|
||||
|
||||
StringName get_group(int p_bone_idx) const;
|
||||
void set_group(int p_bone_idx, const StringName p_group);
|
||||
void set_group(int p_bone_idx, const StringName &p_group);
|
||||
|
||||
bool is_require(int p_bone_idx) const;
|
||||
void set_require(int p_bone_idx, const bool p_require);
|
||||
|
||||
bool has_bone(StringName p_bone_name);
|
||||
bool has_bone(const StringName &p_bone_name);
|
||||
|
||||
SkeletonProfile();
|
||||
~SkeletonProfile();
|
||||
|
@ -322,7 +322,7 @@ void Theme::clear_icon(const StringName &p_name, const StringName &p_theme_type)
|
||||
_emit_theme_changed(true);
|
||||
}
|
||||
|
||||
void Theme::get_icon_list(StringName p_theme_type, List<StringName> *p_list) const {
|
||||
void Theme::get_icon_list(const StringName &p_theme_type, List<StringName> *p_list) const {
|
||||
ERR_FAIL_NULL(p_list);
|
||||
|
||||
if (!icon_map.has(p_theme_type)) {
|
||||
@ -432,7 +432,7 @@ void Theme::clear_stylebox(const StringName &p_name, const StringName &p_theme_t
|
||||
_emit_theme_changed(true);
|
||||
}
|
||||
|
||||
void Theme::get_stylebox_list(StringName p_theme_type, List<StringName> *p_list) const {
|
||||
void Theme::get_stylebox_list(const StringName &p_theme_type, List<StringName> *p_list) const {
|
||||
ERR_FAIL_NULL(p_list);
|
||||
|
||||
if (!style_map.has(p_theme_type)) {
|
||||
@ -544,7 +544,7 @@ void Theme::clear_font(const StringName &p_name, const StringName &p_theme_type)
|
||||
_emit_theme_changed(true);
|
||||
}
|
||||
|
||||
void Theme::get_font_list(StringName p_theme_type, List<StringName> *p_list) const {
|
||||
void Theme::get_font_list(const StringName &p_theme_type, List<StringName> *p_list) const {
|
||||
ERR_FAIL_NULL(p_list);
|
||||
|
||||
if (!font_map.has(p_theme_type)) {
|
||||
@ -643,7 +643,7 @@ void Theme::clear_font_size(const StringName &p_name, const StringName &p_theme_
|
||||
_emit_theme_changed(true);
|
||||
}
|
||||
|
||||
void Theme::get_font_size_list(StringName p_theme_type, List<StringName> *p_list) const {
|
||||
void Theme::get_font_size_list(const StringName &p_theme_type, List<StringName> *p_list) const {
|
||||
ERR_FAIL_NULL(p_list);
|
||||
|
||||
if (!font_size_map.has(p_theme_type)) {
|
||||
@ -729,7 +729,7 @@ void Theme::clear_color(const StringName &p_name, const StringName &p_theme_type
|
||||
_emit_theme_changed(true);
|
||||
}
|
||||
|
||||
void Theme::get_color_list(StringName p_theme_type, List<StringName> *p_list) const {
|
||||
void Theme::get_color_list(const StringName &p_theme_type, List<StringName> *p_list) const {
|
||||
ERR_FAIL_NULL(p_list);
|
||||
|
||||
if (!color_map.has(p_theme_type)) {
|
||||
@ -815,7 +815,7 @@ void Theme::clear_constant(const StringName &p_name, const StringName &p_theme_t
|
||||
_emit_theme_changed(true);
|
||||
}
|
||||
|
||||
void Theme::get_constant_list(StringName p_theme_type, List<StringName> *p_list) const {
|
||||
void Theme::get_constant_list(const StringName &p_theme_type, List<StringName> *p_list) const {
|
||||
ERR_FAIL_NULL(p_list);
|
||||
|
||||
if (!constant_map.has(p_theme_type)) {
|
||||
@ -1009,7 +1009,7 @@ void Theme::clear_theme_item(DataType p_data_type, const StringName &p_name, con
|
||||
}
|
||||
}
|
||||
|
||||
void Theme::get_theme_item_list(DataType p_data_type, StringName p_theme_type, List<StringName> *p_list) const {
|
||||
void Theme::get_theme_item_list(DataType p_data_type, const StringName &p_theme_type, List<StringName> *p_list) const {
|
||||
switch (p_data_type) {
|
||||
case DATA_TYPE_COLOR:
|
||||
get_color_list(p_theme_type, p_list);
|
||||
|
@ -136,7 +136,7 @@ public:
|
||||
bool has_icon_nocheck(const StringName &p_name, const StringName &p_theme_type) const;
|
||||
void rename_icon(const StringName &p_old_name, const StringName &p_name, const StringName &p_theme_type);
|
||||
void clear_icon(const StringName &p_name, const StringName &p_theme_type);
|
||||
void get_icon_list(StringName p_theme_type, List<StringName> *p_list) const;
|
||||
void get_icon_list(const StringName &p_theme_type, List<StringName> *p_list) const;
|
||||
void add_icon_type(const StringName &p_theme_type);
|
||||
void remove_icon_type(const StringName &p_theme_type);
|
||||
void get_icon_type_list(List<StringName> *p_list) const;
|
||||
@ -147,7 +147,7 @@ public:
|
||||
bool has_stylebox_nocheck(const StringName &p_name, const StringName &p_theme_type) const;
|
||||
void rename_stylebox(const StringName &p_old_name, const StringName &p_name, const StringName &p_theme_type);
|
||||
void clear_stylebox(const StringName &p_name, const StringName &p_theme_type);
|
||||
void get_stylebox_list(StringName p_theme_type, List<StringName> *p_list) const;
|
||||
void get_stylebox_list(const StringName &p_theme_type, List<StringName> *p_list) const;
|
||||
void add_stylebox_type(const StringName &p_theme_type);
|
||||
void remove_stylebox_type(const StringName &p_theme_type);
|
||||
void get_stylebox_type_list(List<StringName> *p_list) const;
|
||||
@ -158,7 +158,7 @@ public:
|
||||
bool has_font_nocheck(const StringName &p_name, const StringName &p_theme_type) const;
|
||||
void rename_font(const StringName &p_old_name, const StringName &p_name, const StringName &p_theme_type);
|
||||
void clear_font(const StringName &p_name, const StringName &p_theme_type);
|
||||
void get_font_list(StringName p_theme_type, List<StringName> *p_list) const;
|
||||
void get_font_list(const StringName &p_theme_type, List<StringName> *p_list) const;
|
||||
void add_font_type(const StringName &p_theme_type);
|
||||
void remove_font_type(const StringName &p_theme_type);
|
||||
void get_font_type_list(List<StringName> *p_list) const;
|
||||
@ -169,7 +169,7 @@ public:
|
||||
bool has_font_size_nocheck(const StringName &p_name, const StringName &p_theme_type) const;
|
||||
void rename_font_size(const StringName &p_old_name, const StringName &p_name, const StringName &p_theme_type);
|
||||
void clear_font_size(const StringName &p_name, const StringName &p_theme_type);
|
||||
void get_font_size_list(StringName p_theme_type, List<StringName> *p_list) const;
|
||||
void get_font_size_list(const StringName &p_theme_type, List<StringName> *p_list) const;
|
||||
void add_font_size_type(const StringName &p_theme_type);
|
||||
void remove_font_size_type(const StringName &p_theme_type);
|
||||
void get_font_size_type_list(List<StringName> *p_list) const;
|
||||
@ -180,7 +180,7 @@ public:
|
||||
bool has_color_nocheck(const StringName &p_name, const StringName &p_theme_type) const;
|
||||
void rename_color(const StringName &p_old_name, const StringName &p_name, const StringName &p_theme_type);
|
||||
void clear_color(const StringName &p_name, const StringName &p_theme_type);
|
||||
void get_color_list(StringName p_theme_type, List<StringName> *p_list) const;
|
||||
void get_color_list(const StringName &p_theme_type, List<StringName> *p_list) const;
|
||||
void add_color_type(const StringName &p_theme_type);
|
||||
void remove_color_type(const StringName &p_theme_type);
|
||||
void get_color_type_list(List<StringName> *p_list) const;
|
||||
@ -191,7 +191,7 @@ public:
|
||||
bool has_constant_nocheck(const StringName &p_name, const StringName &p_theme_type) const;
|
||||
void rename_constant(const StringName &p_old_name, const StringName &p_name, const StringName &p_theme_type);
|
||||
void clear_constant(const StringName &p_name, const StringName &p_theme_type);
|
||||
void get_constant_list(StringName p_theme_type, List<StringName> *p_list) const;
|
||||
void get_constant_list(const StringName &p_theme_type, List<StringName> *p_list) const;
|
||||
void add_constant_type(const StringName &p_theme_type);
|
||||
void remove_constant_type(const StringName &p_theme_type);
|
||||
void get_constant_type_list(List<StringName> *p_list) const;
|
||||
@ -202,7 +202,7 @@ public:
|
||||
bool has_theme_item_nocheck(DataType p_data_type, const StringName &p_name, const StringName &p_theme_type) const;
|
||||
void rename_theme_item(DataType p_data_type, const StringName &p_old_name, const StringName &p_name, const StringName &p_theme_type);
|
||||
void clear_theme_item(DataType p_data_type, const StringName &p_name, const StringName &p_theme_type);
|
||||
void get_theme_item_list(DataType p_data_type, StringName p_theme_type, List<StringName> *p_list) const;
|
||||
void get_theme_item_list(DataType p_data_type, const StringName &p_theme_type, List<StringName> *p_list) const;
|
||||
void add_theme_item_type(DataType p_data_type, const StringName &p_theme_type);
|
||||
void remove_theme_item_type(DataType p_data_type, const StringName &p_theme_type);
|
||||
void get_theme_item_type_list(DataType p_data_type, List<StringName> *p_list) const;
|
||||
|
@ -249,7 +249,7 @@ void ThemeOwner::get_theme_type_dependencies(const Node *p_for_node, const Strin
|
||||
ThemeDB::get_singleton()->get_native_type_dependencies(p_theme_type, r_list);
|
||||
}
|
||||
|
||||
Variant ThemeOwner::get_theme_item_in_types(Theme::DataType p_data_type, const StringName &p_name, List<StringName> p_theme_types) {
|
||||
Variant ThemeOwner::get_theme_item_in_types(Theme::DataType p_data_type, const StringName &p_name, const List<StringName> &p_theme_types) {
|
||||
ERR_FAIL_COND_V_MSG(p_theme_types.size() == 0, Variant(), "At least one theme type must be specified.");
|
||||
|
||||
// First, look through each control or window node in the branch, until no valid parent can be found.
|
||||
@ -285,7 +285,7 @@ Variant ThemeOwner::get_theme_item_in_types(Theme::DataType p_data_type, const S
|
||||
return global_context->get_fallback_theme()->get_theme_item(p_data_type, p_name, StringName());
|
||||
}
|
||||
|
||||
bool ThemeOwner::has_theme_item_in_types(Theme::DataType p_data_type, const StringName &p_name, List<StringName> p_theme_types) {
|
||||
bool ThemeOwner::has_theme_item_in_types(Theme::DataType p_data_type, const StringName &p_name, const List<StringName> &p_theme_types) {
|
||||
ERR_FAIL_COND_V_MSG(p_theme_types.size() == 0, false, "At least one theme type must be specified.");
|
||||
|
||||
// First, look through each control or window node in the branch, until no valid parent can be found.
|
||||
|
@ -71,8 +71,8 @@ public:
|
||||
|
||||
void get_theme_type_dependencies(const Node *p_for_node, const StringName &p_theme_type, List<StringName> *r_list) const;
|
||||
|
||||
Variant get_theme_item_in_types(Theme::DataType p_data_type, const StringName &p_name, List<StringName> p_theme_types);
|
||||
bool has_theme_item_in_types(Theme::DataType p_data_type, const StringName &p_name, List<StringName> p_theme_types);
|
||||
Variant get_theme_item_in_types(Theme::DataType p_data_type, const StringName &p_name, const List<StringName> &p_theme_types);
|
||||
bool has_theme_item_in_types(Theme::DataType p_data_type, const StringName &p_name, const List<StringName> &p_theme_types);
|
||||
|
||||
float get_theme_default_base_scale();
|
||||
Ref<Font> get_theme_default_font();
|
||||
|
@ -1120,7 +1120,7 @@ float AudioServer::get_playback_speed_scale() const {
|
||||
return playback_speed_scale;
|
||||
}
|
||||
|
||||
void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volume_db_vector, float p_start_time, float p_pitch_scale) {
|
||||
void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, const StringName &p_bus, Vector<AudioFrame> p_volume_db_vector, float p_start_time, float p_pitch_scale) {
|
||||
ERR_FAIL_COND(p_playback.is_null());
|
||||
|
||||
HashMap<StringName, Vector<AudioFrame>> map;
|
||||
@ -1129,7 +1129,7 @@ void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, Str
|
||||
start_playback_stream(p_playback, map, p_start_time, p_pitch_scale);
|
||||
}
|
||||
|
||||
void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, HashMap<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time, float p_pitch_scale, float p_highshelf_gain, float p_attenuation_cutoff_hz) {
|
||||
void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, const HashMap<StringName, Vector<AudioFrame>> &p_bus_volumes, float p_start_time, float p_pitch_scale, float p_highshelf_gain, float p_attenuation_cutoff_hz) {
|
||||
ERR_FAIL_COND(p_playback.is_null());
|
||||
|
||||
AudioStreamPlaybackListNode *playback_node = new AudioStreamPlaybackListNode();
|
||||
@ -1188,7 +1188,7 @@ void AudioServer::stop_playback_stream(Ref<AudioStreamPlayback> p_playback) {
|
||||
} while (!playback_node->state.compare_exchange_strong(old_state, new_state));
|
||||
}
|
||||
|
||||
void AudioServer::set_playback_bus_exclusive(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volumes) {
|
||||
void AudioServer::set_playback_bus_exclusive(Ref<AudioStreamPlayback> p_playback, const StringName &p_bus, Vector<AudioFrame> p_volumes) {
|
||||
ERR_FAIL_COND(p_volumes.size() != MAX_CHANNELS_PER_BUS);
|
||||
|
||||
HashMap<StringName, Vector<AudioFrame>> map;
|
||||
@ -1197,7 +1197,7 @@ void AudioServer::set_playback_bus_exclusive(Ref<AudioStreamPlayback> p_playback
|
||||
set_playback_bus_volumes_linear(p_playback, map);
|
||||
}
|
||||
|
||||
void AudioServer::set_playback_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, HashMap<StringName, Vector<AudioFrame>> p_bus_volumes) {
|
||||
void AudioServer::set_playback_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, const HashMap<StringName, Vector<AudioFrame>> &p_bus_volumes) {
|
||||
ERR_FAIL_COND(p_bus_volumes.size() > MAX_BUSES_PER_PLAYBACK);
|
||||
|
||||
AudioStreamPlaybackListNode *playback_node = _find_playback_list_node(p_playback);
|
||||
|
@ -372,13 +372,13 @@ public:
|
||||
float get_playback_speed_scale() const;
|
||||
|
||||
// Convenience method.
|
||||
void start_playback_stream(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volume_db_vector, float p_start_time = 0, float p_pitch_scale = 1);
|
||||
void start_playback_stream(Ref<AudioStreamPlayback> p_playback, const StringName &p_bus, Vector<AudioFrame> p_volume_db_vector, float p_start_time = 0, float p_pitch_scale = 1);
|
||||
// Expose all parameters.
|
||||
void start_playback_stream(Ref<AudioStreamPlayback> p_playback, HashMap<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time = 0, float p_pitch_scale = 1, float p_highshelf_gain = 0, float p_attenuation_cutoff_hz = 0);
|
||||
void start_playback_stream(Ref<AudioStreamPlayback> p_playback, const HashMap<StringName, Vector<AudioFrame>> &p_bus_volumes, float p_start_time = 0, float p_pitch_scale = 1, float p_highshelf_gain = 0, float p_attenuation_cutoff_hz = 0);
|
||||
void stop_playback_stream(Ref<AudioStreamPlayback> p_playback);
|
||||
|
||||
void set_playback_bus_exclusive(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volumes);
|
||||
void set_playback_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, HashMap<StringName, Vector<AudioFrame>> p_bus_volumes);
|
||||
void set_playback_bus_exclusive(Ref<AudioStreamPlayback> p_playback, const StringName &p_bus, Vector<AudioFrame> p_volumes);
|
||||
void set_playback_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, const HashMap<StringName, Vector<AudioFrame>> &p_bus_volumes);
|
||||
void set_playback_all_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, Vector<AudioFrame> p_volumes);
|
||||
void set_playback_pitch_scale(Ref<AudioStreamPlayback> p_playback, float p_pitch_scale);
|
||||
void set_playback_paused(Ref<AudioStreamPlayback> p_playback, bool p_paused);
|
||||
|
@ -330,7 +330,7 @@ RID RenderSceneBuffersRD::create_texture_from_format(const StringName &p_context
|
||||
return named_texture.texture;
|
||||
}
|
||||
|
||||
RID RenderSceneBuffersRD::_create_texture_view(const StringName &p_context, const StringName &p_texture_name, const StringName p_view_name, const Ref<RDTextureView> p_view) {
|
||||
RID RenderSceneBuffersRD::_create_texture_view(const StringName &p_context, const StringName &p_texture_name, const StringName &p_view_name, const Ref<RDTextureView> p_view) {
|
||||
RD::TextureView texture_view;
|
||||
if (p_view.is_valid()) { // only use when supplied, else default.
|
||||
texture_view = p_view->base;
|
||||
@ -339,7 +339,7 @@ RID RenderSceneBuffersRD::_create_texture_view(const StringName &p_context, cons
|
||||
return create_texture_view(p_context, p_texture_name, p_view_name, texture_view);
|
||||
}
|
||||
|
||||
RID RenderSceneBuffersRD::create_texture_view(const StringName &p_context, const StringName &p_texture_name, const StringName p_view_name, RD::TextureView p_view) {
|
||||
RID RenderSceneBuffersRD::create_texture_view(const StringName &p_context, const StringName &p_texture_name, const StringName &p_view_name, RD::TextureView p_view) {
|
||||
NTKey view_key(p_context, p_view_name);
|
||||
|
||||
// check if this is a known texture
|
||||
|
@ -106,7 +106,7 @@ private:
|
||||
}
|
||||
|
||||
NTKey() {}
|
||||
NTKey(const StringName p_context, const StringName p_texture_name) {
|
||||
NTKey(const StringName &p_context, const StringName &p_texture_name) {
|
||||
context = p_context;
|
||||
buffer_name = p_texture_name;
|
||||
}
|
||||
@ -196,7 +196,7 @@ public:
|
||||
bool has_texture(const StringName &p_context, const StringName &p_texture_name) const;
|
||||
RID create_texture(const StringName &p_context, const StringName &p_texture_name, const RD::DataFormat p_data_format, const uint32_t p_usage_bits, const RD::TextureSamples p_texture_samples = RD::TEXTURE_SAMPLES_1, const Size2i p_size = Size2i(0, 0), const uint32_t p_layers = 0, const uint32_t p_mipmaps = 1, bool p_unique = true);
|
||||
RID create_texture_from_format(const StringName &p_context, const StringName &p_texture_name, const RD::TextureFormat &p_texture_format, RD::TextureView p_view = RD::TextureView(), bool p_unique = true);
|
||||
RID create_texture_view(const StringName &p_context, const StringName &p_texture_name, const StringName p_view_name, RD::TextureView p_view = RD::TextureView());
|
||||
RID create_texture_view(const StringName &p_context, const StringName &p_texture_name, const StringName &p_view_name, RD::TextureView p_view = RD::TextureView());
|
||||
RID get_texture(const StringName &p_context, const StringName &p_texture_name) const;
|
||||
const RD::TextureFormat get_texture_format(const StringName &p_context, const StringName &p_texture_name) const;
|
||||
RID get_texture_slice(const StringName &p_context, const StringName &p_texture_name, const uint32_t p_layer, const uint32_t p_mipmap, const uint32_t p_layers = 1, const uint32_t p_mipmaps = 1);
|
||||
@ -310,7 +310,7 @@ public:
|
||||
|
||||
private:
|
||||
RID _create_texture_from_format(const StringName &p_context, const StringName &p_texture_name, const Ref<RDTextureFormat> &p_texture_format, const Ref<RDTextureView> &p_view = Ref<RDTextureView>(), bool p_unique = true);
|
||||
RID _create_texture_view(const StringName &p_context, const StringName &p_texture_name, const StringName p_view_name, const Ref<RDTextureView> p_view = Ref<RDTextureView>());
|
||||
RID _create_texture_view(const StringName &p_context, const StringName &p_texture_name, const StringName &p_view_name, const Ref<RDTextureView> p_view = Ref<RDTextureView>());
|
||||
Ref<RDTextureFormat> _get_texture_format(const StringName &p_context, const StringName &p_texture_name) const;
|
||||
RID _get_texture_slice_view(const StringName &p_context, const StringName &p_texture_name, const uint32_t p_layer, const uint32_t p_mipmap, const uint32_t p_layers = 1, const uint32_t p_mipmaps = 1, const Ref<RDTextureView> p_view = Ref<RDTextureView>());
|
||||
|
||||
|
@ -4665,7 +4665,7 @@ bool ShaderLanguage::_validate_assign(Node *p_node, const FunctionInfo &p_functi
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ShaderLanguage::_propagate_function_call_sampler_uniform_settings(StringName p_name, int p_argument, TextureFilter p_filter, TextureRepeat p_repeat) {
|
||||
bool ShaderLanguage::_propagate_function_call_sampler_uniform_settings(const StringName &p_name, int p_argument, TextureFilter p_filter, TextureRepeat p_repeat) {
|
||||
for (int i = 0; i < shader->vfunctions.size(); i++) {
|
||||
if (shader->vfunctions[i].name == p_name) {
|
||||
ERR_FAIL_INDEX_V(p_argument, shader->vfunctions[i].function->arguments.size(), false);
|
||||
@ -4699,7 +4699,7 @@ bool ShaderLanguage::_propagate_function_call_sampler_uniform_settings(StringNam
|
||||
ERR_FAIL_V(false); //bug? function not found
|
||||
}
|
||||
|
||||
bool ShaderLanguage::_propagate_function_call_sampler_builtin_reference(StringName p_name, int p_argument, const StringName &p_builtin) {
|
||||
bool ShaderLanguage::_propagate_function_call_sampler_builtin_reference(const StringName &p_name, int p_argument, const StringName &p_builtin) {
|
||||
for (int i = 0; i < shader->vfunctions.size(); i++) {
|
||||
if (shader->vfunctions[i].name == p_name) {
|
||||
ERR_FAIL_INDEX_V(p_argument, shader->vfunctions[i].function->arguments.size(), false);
|
||||
|
@ -1092,8 +1092,8 @@ private:
|
||||
|
||||
bool _validate_function_call(BlockNode *p_block, const FunctionInfo &p_function_info, OperatorNode *p_func, DataType *r_ret_type, StringName *r_ret_type_str, bool *r_is_custom_function = nullptr);
|
||||
bool _parse_function_arguments(BlockNode *p_block, const FunctionInfo &p_function_info, OperatorNode *p_func, int *r_complete_arg = nullptr);
|
||||
bool _propagate_function_call_sampler_uniform_settings(StringName p_name, int p_argument, TextureFilter p_filter, TextureRepeat p_repeat);
|
||||
bool _propagate_function_call_sampler_builtin_reference(StringName p_name, int p_argument, const StringName &p_builtin);
|
||||
bool _propagate_function_call_sampler_uniform_settings(const StringName &p_name, int p_argument, TextureFilter p_filter, TextureRepeat p_repeat);
|
||||
bool _propagate_function_call_sampler_builtin_reference(const StringName &p_name, int p_argument, const StringName &p_builtin);
|
||||
bool _validate_varying_assign(ShaderNode::Varying &p_varying, String *r_message);
|
||||
bool _check_node_constness(const Node *p_node) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user