From 5ae78fdf6adf4b3ab417d2b6fd5a41bfa6d5cfe2 Mon Sep 17 00:00:00 2001 From: Indah Sylvia Date: Mon, 7 Aug 2017 17:17:31 +0700 Subject: Makes all Godot API's methods Lower Case --- editor/array_property_edit.cpp | 2 +- editor/asset_library_editor_plugin.cpp | 10 +++++----- editor/connections_dialog.cpp | 2 +- editor/editor_data.cpp | 4 ++-- editor/editor_log.cpp | 4 ++-- editor/editor_node.cpp | 2 +- editor/editor_path.cpp | 2 +- editor/editor_resource_preview.cpp | 6 +++--- editor/editor_run.cpp | 2 +- editor/plugins/canvas_item_editor_plugin.cpp | 6 +++--- editor/plugins/item_list_editor_plugin.h | 8 ++++---- editor/plugins/script_text_editor.cpp | 2 +- editor/plugins/spatial_editor_plugin.cpp | 8 ++++---- editor/plugins/theme_editor_plugin.cpp | 2 +- editor/property_editor.cpp | 6 +++--- editor/property_selector.cpp | 6 +++--- editor/resources_dock.cpp | 2 +- editor/scene_tree_dock.cpp | 6 +++--- editor/scene_tree_editor.cpp | 8 ++++---- editor/spatial_editor_gizmos.cpp | 2 +- 20 files changed, 45 insertions(+), 45 deletions(-) (limited to 'editor') diff --git a/editor/array_property_edit.cpp b/editor/array_property_edit.cpp index 81d5309712..06d7d5fdc8 100644 --- a/editor/array_property_edit.cpp +++ b/editor/array_property_edit.cpp @@ -251,7 +251,7 @@ void ArrayPropertyEdit::edit(Object *p_obj, const StringName &p_prop, const Stri page = 0; property = p_prop; - obj = p_obj->get_instance_ID(); + obj = p_obj->get_instance_id(); default_type = p_deftype; if (!p_hint_string.empty()) { diff --git a/editor/asset_library_editor_plugin.cpp b/editor/asset_library_editor_plugin.cpp index f92b70d0c0..2a22cde2fb 100644 --- a/editor/asset_library_editor_plugin.cpp +++ b/editor/asset_library_editor_plugin.cpp @@ -1136,7 +1136,7 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const item->connect("category_selected", this, "_select_category"); if (r.has("icon_url") && r["icon_url"] != "") { - _request_image(item->get_instance_ID(), r["icon_url"], IMAGE_QUEUE_ICON, 0); + _request_image(item->get_instance_id(), r["icon_url"], IMAGE_QUEUE_ICON, 0); } } } break; @@ -1173,7 +1173,7 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const item->connect("category_selected",this,"_category_selected");*/ if (r.has("icon_url") && r["icon_url"] != "") { - _request_image(description->get_instance_ID(), r["icon_url"], IMAGE_QUEUE_ICON, 0); + _request_image(description->get_instance_id(), r["icon_url"], IMAGE_QUEUE_ICON, 0); } if (d.has("previews")) { @@ -1195,12 +1195,12 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const description->add_preview(i, is_video, video_url); if (p.has("thumbnail")) { - _request_image(description->get_instance_ID(), p["thumbnail"], IMAGE_QUEUE_THUMBNAIL, i); + _request_image(description->get_instance_id(), p["thumbnail"], IMAGE_QUEUE_THUMBNAIL, i); } if (is_video) { - //_request_image(description->get_instance_ID(),p["link"],IMAGE_QUEUE_SCREENSHOT,i); + //_request_image(description->get_instance_id(),p["link"],IMAGE_QUEUE_SCREENSHOT,i); } else { - _request_image(description->get_instance_ID(), p["link"], IMAGE_QUEUE_SCREENSHOT, i); + _request_image(description->get_instance_id(), p["link"], IMAGE_QUEUE_SCREENSHOT, i); } } } diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index 9762bd2000..47c2cb5536 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -220,7 +220,7 @@ void ConnectDialog::_add_bind() { if (cdbinds->params.size() >= VARIANT_ARG_MAX) return; - Variant::Type vt = (Variant::Type)type_list->get_item_ID(type_list->get_selected()); + Variant::Type vt = (Variant::Type)type_list->get_item_id(type_list->get_selected()); Variant value; diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index c82e8f1226..c3c3f0d3ca 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -183,7 +183,7 @@ ObjectID EditorHistory::get_current() { if (!obj) return 0; - return obj->get_instance_ID(); + return obj->get_instance_id(); } int EditorHistory::get_path_size() const { @@ -208,7 +208,7 @@ ObjectID EditorHistory::get_path_object(int p_index) const { if (!obj) return 0; - return obj->get_instance_ID(); + return obj->get_instance_id(); } String EditorHistory::get_path_property(int p_index) const { diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index 5d13c7c254..addffd6ea3 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -36,7 +36,7 @@ void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, ErrorHandlerType p_type) { EditorLog *self = (EditorLog *)p_self; - if (self->current != Thread::get_caller_ID()) + if (self->current != Thread::get_caller_id()) return; String err_str; @@ -204,7 +204,7 @@ EditorLog::EditorLog() { eh.userdata = this; add_error_handler(&eh); - current = Thread::get_caller_ID(); + current = Thread::get_caller_id(); EditorNode::get_undo_redo()->set_commit_notify_callback(_undo_redo_cbk, this); } diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 4d5dd14172..730ba3cacc 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -1358,7 +1358,7 @@ void EditorNode::push_item(Object *p_object, const String &p_property) { return; } - uint32_t id = p_object->get_instance_ID(); + uint32_t id = p_object->get_instance_id(); if (id != editor_history.get_current()) { if (p_property == "") diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp index 8ce4f88590..fdac68ea1f 100644 --- a/editor/editor_path.cpp +++ b/editor/editor_path.cpp @@ -63,7 +63,7 @@ void EditorPath::_add_children_to_popup(Object *p_obj, int p_depth) { int index = popup->get_item_count(); popup->add_icon_item(icon, E->get().name.capitalize(), objects.size()); popup->set_item_h_offset(index, p_depth * 10 * EDSCALE); - objects.push_back(obj->get_instance_ID()); + objects.push_back(obj->get_instance_id()); _add_children_to_popup(obj, p_depth + 1); } diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index 89fa004eb1..3d761d7289 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -295,7 +295,7 @@ void EditorResourcePreview::queue_edited_resource_preview(const Ref &p preview_mutex->lock(); - String path_id = "ID:" + itos(p_res->get_instance_ID()); + String path_id = "ID:" + itos(p_res->get_instance_id()); if (cache.has(path_id) && cache[path_id].last_hash == p_res->hash_edited_version()) { @@ -310,7 +310,7 @@ void EditorResourcePreview::queue_edited_resource_preview(const Ref &p //print_line("send to thread "+p_path); QueueItem item; item.function = p_receiver_func; - item.id = p_receiver->get_instance_ID(); + item.id = p_receiver->get_instance_id(); item.resource = p_res; item.path = path_id; item.userdata = p_userdata; @@ -334,7 +334,7 @@ void EditorResourcePreview::queue_resource_preview(const String &p_path, Object //print_line("send to thread "+p_path); QueueItem item; item.function = p_receiver_func; - item.id = p_receiver->get_instance_ID(); + item.id = p_receiver->get_instance_id(); item.path = p_path; item.userdata = p_userdata; diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp index aa97dd237b..4954b1f741 100644 --- a/editor/editor_run.cpp +++ b/editor/editor_run.cpp @@ -55,7 +55,7 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li } args.push_back("-epid"); - args.push_back(String::num(OS::get_singleton()->get_process_ID())); + args.push_back(String::num(OS::get_singleton()->get_process_id())); if (debug_collisions) { args.push_back("-debugcol"); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index a809a68c23..f5d9da195a 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -385,7 +385,7 @@ void CanvasItemEditor::_add_canvas_item(CanvasItem *p_canvas_item) { return; canvas_items.insert(p_canvas_item,p_info); - p_canvas_item->connect("hide",this,"_visibility_changed",varray(p_canvas_item->get_instance_ID()),CONNECT_ONESHOT); + p_canvas_item->connect("hide",this,"_visibility_changed",varray(p_canvas_item->get_instance_id()),CONNECT_ONESHOT); #endif } @@ -2204,7 +2204,7 @@ void CanvasItemEditor::_find_canvas_items_span(Node *p_node, Rect2 &r_rect, cons if (c->has_meta("_edit_bone_")) { - ObjectID id = c->get_instance_ID(); + ObjectID id = c->get_instance_id(); if (!bone_list.has(id)) { BoneList bone; bone.bone = id; @@ -2769,7 +2769,7 @@ void CanvasItemEditor::_popup_callback(int p_op) { pc.pos = n2d->get_position(); pc.rot = n2d->get_rotation(); pc.scale = n2d->get_scale(); - pc.id = n2d->get_instance_ID(); + pc.id = n2d->get_instance_id(); pose_clipboard.push_back(pc); } } diff --git a/editor/plugins/item_list_editor_plugin.h b/editor/plugins/item_list_editor_plugin.h index 4fed8e49f5..bc009b3d7a 100644 --- a/editor/plugins/item_list_editor_plugin.h +++ b/editor/plugins/item_list_editor_plugin.h @@ -116,8 +116,8 @@ public: virtual void set_item_enabled(int p_idx, int p_enabled) { ob->set_item_disabled(p_idx, !p_enabled); } virtual bool is_item_enabled(int p_idx) const { return !ob->is_item_disabled(p_idx); } - virtual void set_item_id(int p_idx, int p_id) { ob->set_item_ID(p_idx, p_id); } - virtual int get_item_id(int p_idx) const { return ob->get_item_ID(p_idx); } + virtual void set_item_id(int p_idx, int p_id) { ob->set_item_id(p_idx, p_id); } + virtual int get_item_id(int p_idx) const { return ob->get_item_id(p_idx); } virtual void add_item(); virtual int get_item_count() const; @@ -152,8 +152,8 @@ public: virtual void set_item_enabled(int p_idx, int p_enabled) { pp->set_item_disabled(p_idx, !p_enabled); } virtual bool is_item_enabled(int p_idx) const { return !pp->is_item_disabled(p_idx); } - virtual void set_item_id(int p_idx, int p_id) { pp->set_item_ID(p_idx, p_idx); } - virtual int get_item_id(int p_idx) const { return pp->get_item_ID(p_idx); } + virtual void set_item_id(int p_idx, int p_id) { pp->set_item_id(p_idx, p_idx); } + virtual int get_item_id(int p_idx) const { return pp->get_item_id(p_idx); } virtual void set_item_separator(int p_idx, bool p_separator) { pp->set_item_as_separator(p_idx, p_separator); } virtual bool is_item_separator(int p_idx) const { return pp->is_item_separator(p_idx); } diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index e3184a028e..62fcc4b489 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -456,7 +456,7 @@ String ScriptTextEditor::get_name() { } else if (script->get_name() != "") name = script->get_name(); else - name = script->get_class() + "(" + itos(script->get_instance_ID()) + ")"; + name = script->get_class() + "(" + itos(script->get_instance_id()) + ")"; return name; } diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 2d77bfb2c1..0bdcb83992 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -665,7 +665,7 @@ void SpatialEditorViewport::_list_select(Ref b) { if (selection_results.size() == 1) { - clicked = selection_results[0].item->get_instance_ID(); + clicked = selection_results[0].item->get_instance_id(); selection_results.clear(); if (clicked) { @@ -2166,7 +2166,7 @@ void SpatialEditorViewport::_selection_result_pressed(int p_result) { if (selection_results.size() <= p_result) return; - clicked = selection_results[p_result].item->get_instance_ID(); + clicked = selection_results[p_result].item->get_instance_id(); if (clicked) { _select_clicked(clicked_wants_append, true); @@ -3039,9 +3039,9 @@ void SpatialEditor::edit(Spatial *p_spatial) { /* if (p_spatial) { _validate_selection(); - if (selected.has(p_spatial->get_instance_ID()) && selected.size()==1) + if (selected.has(p_spatial->get_instance_id()) && selected.size()==1) return; - _select(p_spatial->get_instance_ID(),false,true); + _select(p_spatial->get_instance_id(),false,true); // should become the selection } diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index f5bb9d4a35..d45a3b1312 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -104,7 +104,7 @@ struct _TECategory { Ref item; StringName name; - bool operator<(const RefItem &p) const { return item->get_instance_ID() < p.item->get_instance_ID(); } + bool operator<(const RefItem &p) const { return item->get_instance_id() < p.item->get_instance_id(); } }; template diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 6b02afe0c1..a3a10c6c5a 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -2370,7 +2370,7 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String &p p_item->set_text(1, res->get_path().get_file()); } else if (!res->is_class("Texture")) { //texture already previews via itself - EditorResourcePreview::get_singleton()->queue_edited_resource_preview(res, this, "_resource_preview_done", p_item->get_instance_ID()); + EditorResourcePreview::get_singleton()->queue_edited_resource_preview(res, this, "_resource_preview_done", p_item->get_instance_id()); } } @@ -3630,7 +3630,7 @@ void PropertyEditor::update_tree() { item->set_text(1, res->get_path().get_file()); } else if (!res->is_class("Texture")) { //texture already previews via itself - EditorResourcePreview::get_singleton()->queue_edited_resource_preview(res, this, "_resource_preview_done", item->get_instance_ID()); + EditorResourcePreview::get_singleton()->queue_edited_resource_preview(res, this, "_resource_preview_done", item->get_instance_id()); } } @@ -4586,7 +4586,7 @@ void SectionedPropertyEditor::edit(Object *p_object) { return; } - ObjectID id = p_object->get_instance_ID(); + ObjectID id = p_object->get_instance_id(); if (obj != id) { diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp index c6af993676..bd68eac9f2 100644 --- a/editor/property_selector.cpp +++ b/editor/property_selector.cpp @@ -418,7 +418,7 @@ void PropertySelector::select_method_from_script(const Ref