diff options
Diffstat (limited to 'editor')
70 files changed, 261 insertions, 0 deletions
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index 893a3f62b1..dededfb617 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -509,6 +509,7 @@ void AnimationBezierTrackEdit::set_timeline(AnimationTimelineEdit *p_timeline) { timeline = p_timeline; timeline->connect("zoom_changed", callable_mp(this, &AnimationBezierTrackEdit::_zoom_changed)); } + void AnimationBezierTrackEdit::set_editor(AnimationTrackEditor *p_editor) { editor = p_editor; connect_compat("clear_selection", editor, "_clear_selection", varray(false)); @@ -541,6 +542,7 @@ void AnimationBezierTrackEdit::update_play_position() { void AnimationBezierTrackEdit::set_root(Node *p_root) { root = p_root; } + void AnimationBezierTrackEdit::_zoom_changed() { update(); } diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 92879fb193..0808946b16 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -1684,6 +1684,7 @@ void AnimationTimelineEdit::set_use_fps(bool p_use_fps) { update_values(); update(); } + bool AnimationTimelineEdit::is_using_fps() const { return use_fps; } @@ -2066,6 +2067,7 @@ int AnimationTrackEdit::get_key_height() const { return type_icon->get_height(); } + Rect2 AnimationTrackEdit::get_key_rect(int p_index, float p_pixels_sec) { if (!animation.is_valid()) return Rect2(); @@ -2262,6 +2264,7 @@ void AnimationTrackEdit::set_timeline(AnimationTimelineEdit *p_timeline) { timeline->connect("zoom_changed", callable_mp(this, &AnimationTrackEdit::_zoom_changed)); timeline->connect("name_limit_changed", callable_mp(this, &AnimationTrackEdit::_zoom_changed)); } + void AnimationTrackEdit::set_editor(AnimationTrackEditor *p_editor) { editor = p_editor; } @@ -2761,6 +2764,7 @@ bool AnimationTrackEdit::can_drop_data(const Point2 &p_point, const Variant &p_d return true; } + void AnimationTrackEdit::drop_data(const Point2 &p_point, const Variant &p_data) { Dictionary d = p_data; if (!d.has("type")) { @@ -2844,6 +2848,7 @@ void AnimationTrackEdit::cancel_drop() { update(); } } + void AnimationTrackEdit::set_in_group(bool p_enable) { in_group = p_enable; update(); @@ -3135,6 +3140,7 @@ void AnimationTrackEditor::update_keying() { bool AnimationTrackEditor::has_keying() const { return keying; } + Dictionary AnimationTrackEditor::get_state() const { Dictionary state; state["fps_mode"] = timeline->is_using_fps(); @@ -3143,6 +3149,7 @@ Dictionary AnimationTrackEditor::get_state() const { state["v_scroll"] = scroll->get_v_scrollbar()->get_value(); return state; } + void AnimationTrackEditor::set_state(const Dictionary &p_state) { if (p_state.has("fps_mode")) { bool fps_mode = p_state["fps_mode"]; @@ -4076,6 +4083,7 @@ void AnimationTrackEditor::_update_step_spinbox() { step->set_block_signals(false); } + void AnimationTrackEditor::_animation_update() { timeline->update(); timeline->update_values(); @@ -4752,6 +4760,7 @@ void AnimationTrackEditor::_move_selection_commit() { _update_key_edit(); } + void AnimationTrackEditor::_move_selection_cancel() { moving_selection = false; for (int i = 0; i < track_edits.size(); i++) { @@ -4762,6 +4771,7 @@ void AnimationTrackEditor::_move_selection_cancel() { bool AnimationTrackEditor::is_moving_selection() const { return moving_selection; } + float AnimationTrackEditor::get_moving_selection_offset() const { return moving_selection_offset; } @@ -4953,6 +4963,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) { _update_key_edit(); } } + void AnimationTrackEditor::_edit_menu_pressed(int p_option) { last_menu_track_opt = p_option; switch (p_option) { diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp index 424c3db15f..ed64fb2415 100644 --- a/editor/animation_track_editor_plugins.cpp +++ b/editor/animation_track_editor_plugins.cpp @@ -44,6 +44,7 @@ int AnimationTrackEditBool::get_key_height() const { Ref<Texture2D> checked = get_theme_icon("checked", "CheckBox"); return checked->get_height(); } + Rect2 AnimationTrackEditBool::get_key_rect(int p_index, float p_pixels_sec) { Ref<Texture2D> checked = get_theme_icon("checked", "CheckBox"); return Rect2(-checked->get_width() / 2, 0, checked->get_width(), get_size().height); @@ -52,6 +53,7 @@ Rect2 AnimationTrackEditBool::get_key_rect(int p_index, float p_pixels_sec) { bool AnimationTrackEditBool::is_key_selectable_by_distance() const { return false; } + void AnimationTrackEditBool::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) { bool checked = get_animation()->track_get_key_value(get_track(), p_index); Ref<Texture2D> icon = get_theme_icon(checked ? "checked" : "unchecked", "CheckBox"); @@ -78,6 +80,7 @@ int AnimationTrackEditColor::get_key_height() const { Ref<Font> font = get_theme_font("font", "Label"); return font->get_height() * 0.8; } + Rect2 AnimationTrackEditColor::get_key_rect(int p_index, float p_pixels_sec) { Ref<Font> font = get_theme_font("font", "Label"); int fh = font->get_height() * 0.8; @@ -177,6 +180,7 @@ int AnimationTrackEditAudio::get_key_height() const { Ref<Font> font = get_theme_font("font", "Label"); return int(font->get_height() * 1.5); } + Rect2 AnimationTrackEditAudio::get_key_rect(int p_index, float p_pixels_sec) { Object *object = ObjectDB::get_instance(id); @@ -214,6 +218,7 @@ Rect2 AnimationTrackEditAudio::get_key_rect(int p_index, float p_pixels_sec) { bool AnimationTrackEditAudio::is_key_selectable_by_distance() const { return false; } + void AnimationTrackEditAudio::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) { Object *object = ObjectDB::get_instance(id); @@ -329,6 +334,7 @@ int AnimationTrackEditSpriteFrame::get_key_height() const { Ref<Font> font = get_theme_font("font", "Label"); return int(font->get_height() * 2); } + Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_sec) { Object *object = ObjectDB::get_instance(id); @@ -402,6 +408,7 @@ Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_se bool AnimationTrackEditSpriteFrame::is_key_selectable_by_distance() const { return false; } + void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) { Object *object = ObjectDB::get_instance(id); @@ -525,6 +532,7 @@ int AnimationTrackEditSubAnim::get_key_height() const { Ref<Font> font = get_theme_font("font", "Label"); return int(font->get_height() * 1.5); } + Rect2 AnimationTrackEditSubAnim::get_key_rect(int p_index, float p_pixels_sec) { Object *object = ObjectDB::get_instance(id); @@ -558,6 +566,7 @@ Rect2 AnimationTrackEditSubAnim::get_key_rect(int p_index, float p_pixels_sec) { bool AnimationTrackEditSubAnim::is_key_selectable_by_distance() const { return false; } + void AnimationTrackEditSubAnim::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) { Object *object = ObjectDB::get_instance(id); @@ -750,6 +759,7 @@ int AnimationTrackEditTypeAudio::get_key_height() const { Ref<Font> font = get_theme_font("font", "Label"); return int(font->get_height() * 1.5); } + Rect2 AnimationTrackEditTypeAudio::get_key_rect(int p_index, float p_pixels_sec) { Ref<AudioStream> stream = get_animation()->audio_track_get_key_stream(get_track(), p_index); @@ -783,6 +793,7 @@ Rect2 AnimationTrackEditTypeAudio::get_key_rect(int p_index, float p_pixels_sec) bool AnimationTrackEditTypeAudio::is_key_selectable_by_distance() const { return false; } + void AnimationTrackEditTypeAudio::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) { Ref<AudioStream> stream = get_animation()->audio_track_get_key_stream(get_track(), p_index); @@ -928,6 +939,7 @@ bool AnimationTrackEditTypeAudio::can_drop_data(const Point2 &p_point, const Var return AnimationTrackEdit::can_drop_data(p_point, p_data); } + void AnimationTrackEditTypeAudio::drop_data(const Point2 &p_point, const Variant &p_data) { if (p_point.x > get_timeline()->get_name_limit() && p_point.x < get_size().width - get_timeline()->get_buttons_width()) { Ref<AudioStream> stream; @@ -1076,6 +1088,7 @@ int AnimationTrackEditTypeAnimation::get_key_height() const { Ref<Font> font = get_theme_font("font", "Label"); return int(font->get_height() * 1.5); } + Rect2 AnimationTrackEditTypeAnimation::get_key_rect(int p_index, float p_pixels_sec) { Object *object = ObjectDB::get_instance(id); @@ -1109,6 +1122,7 @@ Rect2 AnimationTrackEditTypeAnimation::get_key_rect(int p_index, float p_pixels_ bool AnimationTrackEditTypeAnimation::is_key_selectable_by_distance() const { return false; } + void AnimationTrackEditTypeAnimation::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) { Object *object = ObjectDB::get_instance(id); diff --git a/editor/array_property_edit.cpp b/editor/array_property_edit.cpp index a239d2e909..3832a93360 100644 --- a/editor/array_property_edit.cpp +++ b/editor/array_property_edit.cpp @@ -50,6 +50,7 @@ Variant ArrayPropertyEdit::get_array() const { void ArrayPropertyEdit::_notif_change() { _change_notify(); } + void ArrayPropertyEdit::_notif_changev(const String &p_v) { _change_notify(p_v.utf8().get_data()); } diff --git a/editor/audio_stream_preview.cpp b/editor/audio_stream_preview.cpp index e0891e808b..e0d5184aac 100644 --- a/editor/audio_stream_preview.cpp +++ b/editor/audio_stream_preview.cpp @@ -35,6 +35,7 @@ float AudioStreamPreview::get_length() const { return length; } + float AudioStreamPreview::get_max(float p_time, float p_time_next) const { if (length == 0) return 0; @@ -60,6 +61,7 @@ float AudioStreamPreview::get_max(float p_time, float p_time_next) const { return (vmax / 255.0) * 2.0 - 1.0; } + float AudioStreamPreview::get_min(float p_time, float p_time_next) const { if (length == 0) return 0; diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index cacf5c744f..5f693fdbb6 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -482,6 +482,7 @@ void CreateDialog::set_preferred_search_result_type(const String &p_preferred_ty String CreateDialog::get_preferred_search_result_type() { return preferred_search_result_type; } + String CreateDialog::get_selected_type() { TreeItem *selected = search_options->get_selected(); if (selected) @@ -644,6 +645,7 @@ bool CreateDialog::can_drop_data_fw(const Point2 &p_point, const Variant &p_data return false; } + void CreateDialog::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) { Dictionary d = p_data; diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp index 3c9fd39069..76d1701372 100644 --- a/editor/debugger/editor_debugger_node.cpp +++ b/editor/debugger/editor_debugger_node.cpp @@ -549,41 +549,49 @@ void EditorDebuggerNode::set_live_debugging(bool p_enabled) { dbg->set_live_debugging(p_enabled); }); } + void EditorDebuggerNode::update_live_edit_root() { _for_all(tabs, [&](ScriptEditorDebugger *dbg) { dbg->update_live_edit_root(); }); } + void EditorDebuggerNode::live_debug_create_node(const NodePath &p_parent, const String &p_type, const String &p_name) { _for_all(tabs, [&](ScriptEditorDebugger *dbg) { dbg->live_debug_create_node(p_parent, p_type, p_name); }); } + void EditorDebuggerNode::live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name) { _for_all(tabs, [&](ScriptEditorDebugger *dbg) { dbg->live_debug_instance_node(p_parent, p_path, p_name); }); } + void EditorDebuggerNode::live_debug_remove_node(const NodePath &p_at) { _for_all(tabs, [&](ScriptEditorDebugger *dbg) { dbg->live_debug_remove_node(p_at); }); } + void EditorDebuggerNode::live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id) { _for_all(tabs, [&](ScriptEditorDebugger *dbg) { dbg->live_debug_remove_and_keep_node(p_at, p_keep_id); }); } + void EditorDebuggerNode::live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos) { _for_all(tabs, [&](ScriptEditorDebugger *dbg) { dbg->live_debug_restore_node(p_id, p_at, p_at_pos); }); } + void EditorDebuggerNode::live_debug_duplicate_node(const NodePath &p_at, const String &p_new_name) { _for_all(tabs, [&](ScriptEditorDebugger *dbg) { dbg->live_debug_duplicate_node(p_at, p_new_name); }); } + void EditorDebuggerNode::live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) { _for_all(tabs, [&](ScriptEditorDebugger *dbg) { dbg->live_debug_reparent_node(p_at, p_new_place, p_new_name, p_at_pos); diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index 5ac62bf0ba..867eef1c93 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -97,6 +97,7 @@ void ScriptEditorDebugger::debug_next() { _put_msg("next", Array()); _clear_execution(); } + void ScriptEditorDebugger::debug_step() { ERR_FAIL_COND(!breaked); @@ -1243,6 +1244,7 @@ void ScriptEditorDebugger::live_debug_instance_node(const NodePath &p_parent, co _put_msg("scene:live_instance_node", msg); } } + void ScriptEditorDebugger::live_debug_remove_node(const NodePath &p_at) { if (live_debug) { Array msg; @@ -1250,6 +1252,7 @@ void ScriptEditorDebugger::live_debug_remove_node(const NodePath &p_at) { _put_msg("scene:live_remove_node", msg); } } + void ScriptEditorDebugger::live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id) { if (live_debug) { Array msg; @@ -1258,6 +1261,7 @@ void ScriptEditorDebugger::live_debug_remove_and_keep_node(const NodePath &p_at, _put_msg("scene:live_remove_and_keep_node", msg); } } + void ScriptEditorDebugger::live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos) { if (live_debug) { Array msg; @@ -1267,6 +1271,7 @@ void ScriptEditorDebugger::live_debug_restore_node(ObjectID p_id, const NodePath _put_msg("scene:live_restore_node", msg); } } + void ScriptEditorDebugger::live_debug_duplicate_node(const NodePath &p_at, const String &p_new_name) { if (live_debug) { Array msg; @@ -1275,6 +1280,7 @@ void ScriptEditorDebugger::live_debug_duplicate_node(const NodePath &p_at, const _put_msg("scene:live_duplicate_node", msg); } } + void ScriptEditorDebugger::live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) { if (live_debug) { Array msg; diff --git a/editor/doc_data.cpp b/editor/doc_data.cpp index 99ebf16697..d45c9f5ff5 100644 --- a/editor/doc_data.cpp +++ b/editor/doc_data.cpp @@ -771,6 +771,7 @@ Error DocData::load_classes(const String &p_dir) { return OK; } + Error DocData::erase_classes(const String &p_dir) { Error err; DirAccessRef da = DirAccess::open(p_dir, &err); @@ -798,6 +799,7 @@ Error DocData::erase_classes(const String &p_dir) { return OK; } + Error DocData::_load(Ref<XMLParser> parser) { Error err = OK; diff --git a/editor/editor_atlas_packer.cpp b/editor/editor_atlas_packer.cpp index c2df1fd82a..469a6c6de1 100644 --- a/editor/editor_atlas_packer.cpp +++ b/editor/editor_atlas_packer.cpp @@ -79,6 +79,7 @@ void EditorAtlasPacker::_plot_triangle(Ref<BitMap> p_bitmap, Vector2i *vertices) xt += dx_low; } } + void EditorAtlasPacker::chart_pack(Vector<Chart> &charts, int &r_width, int &r_height, int p_atlas_max_size, int p_cell_resolution) { int divide_by = MIN(64, p_cell_resolution); Vector<PlottedBitmap> bitmaps; diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 8b5658423b..1114ae9bb5 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -409,6 +409,7 @@ void EditorAudioBus::_solo_toggled() { updating_bus = false; } + void EditorAudioBus::_mute_toggled() { updating_bus = true; @@ -422,6 +423,7 @@ void EditorAudioBus::_mute_toggled() { updating_bus = false; } + void EditorAudioBus::_bypass_toggled() { updating_bus = true; diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 6f6a863b70..45c44a3a2b 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -137,6 +137,7 @@ void EditorHistory::add_object(ObjectID p_object, int p_relevel) { int EditorHistory::get_history_len() { return history.size(); } + int EditorHistory::get_history_pos() { return current; } @@ -156,6 +157,7 @@ ObjectID EditorHistory::get_history_obj(int p_obj) const { bool EditorHistory::is_at_beginning() const { return current <= 0; } + bool EditorHistory::is_at_end() const { return ((current + 1) >= history.size()); } @@ -189,6 +191,7 @@ bool EditorHistory::is_current_inspector_only() const { const History &h = history[current]; return h.path[h.level].inspector_only; } + ObjectID EditorHistory::get_current() { if (current < 0 || current >= history.size()) return ObjectID(); @@ -424,6 +427,7 @@ void EditorData::add_editor_plugin(EditorPlugin *p_plugin) { int EditorData::get_editor_plugin_count() const { return editor_plugins.size(); } + EditorPlugin *EditorData::get_editor_plugin(int p_idx) { ERR_FAIL_INDEX_V(p_idx, editor_plugins.size(), nullptr); return editor_plugins[p_idx]; @@ -605,11 +609,13 @@ bool EditorData::check_and_update_scene(int p_idx) { int EditorData::get_edited_scene() const { return current_edited_scene; } + void EditorData::set_edited_scene(int p_idx) { ERR_FAIL_INDEX(p_idx, edited_scene.size()); current_edited_scene = p_idx; //swap } + Node *EditorData::get_edited_scene_root(int p_idx) { if (p_idx < 0) { ERR_FAIL_INDEX_V(current_edited_scene, edited_scene.size(), nullptr); @@ -619,6 +625,7 @@ Node *EditorData::get_edited_scene_root(int p_idx) { return edited_scene[p_idx].root; } } + void EditorData::set_edited_scene_root(Node *p_root) { ERR_FAIL_INDEX(current_edited_scene, edited_scene.size()); edited_scene.write[current_edited_scene].root = p_root; @@ -658,6 +665,7 @@ uint64_t EditorData::get_edited_scene_version() const { ERR_FAIL_INDEX_V(current_edited_scene, edited_scene.size(), 0); return edited_scene[current_edited_scene].version; } + uint64_t EditorData::get_scene_version(int p_idx) const { ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), 0); return edited_scene[p_idx].version; @@ -669,6 +677,7 @@ String EditorData::get_scene_type(int p_idx) const { return ""; return edited_scene[p_idx].root->get_class(); } + void EditorData::move_edited_scene_to_index(int p_idx) { ERR_FAIL_INDEX(current_edited_scene, edited_scene.size()); ERR_FAIL_INDEX(p_idx, edited_scene.size()); @@ -735,6 +744,7 @@ void EditorData::set_edited_scene_live_edit_root(const NodePath &p_root) { edited_scene.write[current_edited_scene].live_edit_root = p_root; } + NodePath EditorData::get_edited_scene_live_edit_root() { ERR_FAIL_INDEX_V(current_edited_scene, edited_scene.size(), String()); @@ -962,6 +972,7 @@ void EditorSelection::remove_node(Node *p_node) { p_node->disconnect("tree_exiting", callable_mp(this, &EditorSelection::_node_removed)); //emit_signal("selection_changed"); } + bool EditorSelection::is_selected(Node *p_node) const { return selection.has(p_node); } @@ -1068,6 +1079,7 @@ void EditorSelection::clear() { changed = true; nl_changed = true; } + EditorSelection::EditorSelection() { emitted = false; changed = false; diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index 476f9bcfea..46740a0f6d 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -190,6 +190,7 @@ void EditorExportPreset::set_patch(int p_index, const String &p_path) { patches.write[p_index] = p_path; EditorExport::singleton->save_presets(); } + String EditorExportPreset::get_patch(int p_index) { ERR_FAIL_INDEX_V(p_index, patches.size(), String()); return patches[p_index]; @@ -1082,6 +1083,7 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags r_flags.push_back("--debug-navigation"); } } + EditorExportPlatform::EditorExportPlatform() { } @@ -1375,6 +1377,7 @@ String EditorExportPlatformPC::get_name() const { String EditorExportPlatformPC::get_os_name() const { return os_name; } + Ref<Texture2D> EditorExportPlatformPC::get_logo() const { return logo; } @@ -1534,9 +1537,11 @@ void EditorExportPlatformPC::set_release_64(const String &p_file) { void EditorExportPlatformPC::set_release_32(const String &p_file) { release_file_32 = p_file; } + void EditorExportPlatformPC::set_debug_64(const String &p_file) { debug_file_64 = p_file; } + void EditorExportPlatformPC::set_debug_32(const String &p_file) { debug_file_32 = p_file; } diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp index 7c8d9ff08f..f8c1c490d5 100644 --- a/editor/editor_feature_profile.cpp +++ b/editor/editor_feature_profile.cpp @@ -100,6 +100,7 @@ void EditorFeatureProfile::set_disable_class_property(const StringName &p_class, } } } + bool EditorFeatureProfile::is_class_property_disabled(const StringName &p_class, const StringName &p_property) const { if (!disabled_properties.has(p_class)) { return false; @@ -120,6 +121,7 @@ void EditorFeatureProfile::set_disable_feature(Feature p_feature, bool p_disable ERR_FAIL_INDEX(p_feature, FEATURE_MAX); features_disabled[p_feature] = p_disable; } + bool EditorFeatureProfile::is_feature_disabled(Feature p_feature) const { ERR_FAIL_INDEX_V(p_feature, FEATURE_MAX, false); return features_disabled[p_feature]; diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 561ebb6298..3b1c4d380a 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -506,6 +506,7 @@ void EditorFileDialog::_push_history() { dir_next->set_disabled(true); } } + void EditorFileDialog::_item_dc_selected(int p_item) { int current = p_item; if (current < 0 || current >= item_list->get_item_count()) @@ -877,6 +878,7 @@ void EditorFileDialog::clear_filters() { update_filters(); invalidate(); } + void EditorFileDialog::add_filter(const String &p_filter) { filters.push_back(p_filter); update_filters(); @@ -886,12 +888,15 @@ void EditorFileDialog::add_filter(const String &p_filter) { String EditorFileDialog::get_current_dir() const { return dir_access->get_current_dir(); } + String EditorFileDialog::get_current_file() const { return file->get_text(); } + String EditorFileDialog::get_current_path() const { return dir_access->get_current_dir().plus_file(file->get_text()); } + void EditorFileDialog::set_current_dir(const String &p_dir) { if (p_dir.is_rel_path()) dir_access->change_dir(OS::get_singleton()->get_resource_dir()); @@ -899,6 +904,7 @@ void EditorFileDialog::set_current_dir(const String &p_dir) { update_dir(); invalidate(); } + void EditorFileDialog::set_current_file(const String &p_file) { file->set_text(p_file); update_dir(); @@ -912,6 +918,7 @@ void EditorFileDialog::set_current_file(const String &p_file) { if (is_visible()) _request_single_thumbnail(get_current_dir().plus_file(get_current_file())); } + void EditorFileDialog::set_current_path(const String &p_path) { if (!p_path.size()) return; @@ -1110,6 +1117,7 @@ void EditorFileDialog::_favorite_move_up() { update_file_list(); } } + void EditorFileDialog::_favorite_move_down() { int current = favorites->get_current(); @@ -1237,6 +1245,7 @@ void EditorFileDialog::_go_back() { dir_prev->set_disabled(local_history_pos == 0); dir_next->set_disabled(local_history_pos == local_history.size() - 1); } + void EditorFileDialog::_go_forward() { if (local_history_pos == local_history.size() - 1) { return; diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index acfb554766..77ba5b3f1d 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -56,6 +56,7 @@ int EditorFileSystemDirectory::find_file_index(const String &p_file) const { } return -1; } + int EditorFileSystemDirectory::find_dir_index(const String &p_dir) const { for (int i = 0; i < subdirs.size(); i++) { if (subdirs[i]->name == p_dir) @@ -1110,6 +1111,7 @@ void EditorFileSystem::_notification(int p_what) { bool EditorFileSystem::is_scanning() const { return scanning || scanning_changes; } + float EditorFileSystem::get_scanning_progress() const { return scan_total; } diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp index 270495ff55..a1d65ac739 100644 --- a/editor/editor_folding.cpp +++ b/editor/editor_folding.cpp @@ -127,6 +127,7 @@ void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p _fill_folds(p_root, p_node->get_child(i), p_folds, resource_folds, nodes_folded, resources); } } + void EditorFolding::save_scene_folding(const Node *p_scene, const String &p_path) { ERR_FAIL_NULL(p_scene); @@ -150,6 +151,7 @@ void EditorFolding::save_scene_folding(const Node *p_scene, const String &p_path file = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(file); config->save(file); } + void EditorFolding::load_scene_folding(Node *p_scene, const String &p_path) { Ref<ConfigFile> config; config.instance(); diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 31eead83de..16e49ad4e1 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -1474,6 +1474,7 @@ void EditorHelp::search_again(bool p_search_previous) { int EditorHelp::get_scroll() const { return class_desc->get_v_scroll()->get_value(); } + void EditorHelp::set_scroll(int p_scroll) { class_desc->get_v_scroll()->set_value(p_scroll); } diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index f7d92050e1..0e39d0f2ab 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -532,6 +532,7 @@ bool EditorProperty::use_keying_next() const { return false; } + void EditorProperty::set_checkable(bool p_checkable) { checkable = p_checkable; update(); @@ -737,9 +738,11 @@ void EditorProperty::_gui_input(const Ref<InputEvent> &p_event) { void EditorProperty::set_label_reference(Control *p_control) { label_reference = p_control; } + void EditorProperty::set_bottom_editor(Control *p_control) { bottom_editor = p_control; } + Variant EditorProperty::get_drag_data(const Point2 &p_point) { if (property == StringName()) return Variant(); @@ -898,6 +901,7 @@ EditorProperty::EditorProperty() { label_reference = nullptr; bottom_editor = nullptr; } + //////////////////////////////////////////////// //////////////////////////////////////////////// @@ -930,6 +934,7 @@ bool EditorInspectorPlugin::can_handle(Object *p_object) { } return false; } + void EditorInspectorPlugin::parse_begin(Object *p_object) { if (get_script_instance()) { get_script_instance()->call("parse_begin", p_object); @@ -956,6 +961,7 @@ bool EditorInspectorPlugin::parse_property(Object *p_object, Variant::Type p_typ } return false; } + void EditorInspectorPlugin::parse_end() { if (get_script_instance()) { get_script_instance()->call("parse_end"); @@ -1826,6 +1832,7 @@ void EditorInspector::update_tree() { //see if this property exists and should be kept } + void EditorInspector::update_property(const String &p_prop) { if (!editor_property_map.has(p_prop)) return; @@ -1884,6 +1891,7 @@ void EditorInspector::set_keying(bool p_active) { keying = p_active; update_tree(); } + void EditorInspector::set_read_only(bool p_read_only) { read_only = p_read_only; update_tree(); @@ -1892,6 +1900,7 @@ void EditorInspector::set_read_only(bool p_read_only) { bool EditorInspector::is_capitalize_paths_enabled() const { return capitalize_paths; } + void EditorInspector::set_enable_capitalize_paths(bool p_capitalize) { capitalize_paths = p_capitalize; update_tree(); @@ -1910,14 +1919,17 @@ void EditorInspector::set_use_doc_hints(bool p_enable) { use_doc_hints = p_enable; update_tree(); } + void EditorInspector::set_hide_script(bool p_hide) { hide_script = p_hide; update_tree(); } + void EditorInspector::set_use_filter(bool p_use) { use_filter = p_use; update_tree(); } + void EditorInspector::register_text_enter(Node *p_line_edit) { search_box = Object::cast_to<LineEdit>(p_line_edit); if (search_box) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index b975d555af..c8f07f4b8d 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3250,9 +3250,11 @@ ImportDock *EditorNode::get_import_dock() { FileSystemDock *EditorNode::get_filesystem_dock() { return filesystem_dock; } + SceneTreeDock *EditorNode::get_scene_tree_dock() { return scene_tree_dock; } + InspectorDock *EditorNode::get_inspector_dock() { return inspector_dock; } diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 7bffdc5744..f731a87cef 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -553,6 +553,7 @@ void EditorPlugin::forward_spatial_force_draw_over_viewport(Control *p_overlay) get_script_instance()->call("forward_spatial_force_draw_over_viewport", p_overlay); } } + String EditorPlugin::get_name() const { if (get_script_instance() && get_script_instance()->has_method("get_plugin_name")) { return get_script_instance()->call("get_plugin_name"); @@ -560,6 +561,7 @@ String EditorPlugin::get_name() const { return String(); } + const Ref<Texture2D> EditorPlugin::get_icon() const { if (get_script_instance() && get_script_instance()->has_method("get_plugin_icon")) { return get_script_instance()->call("get_plugin_icon"); @@ -567,6 +569,7 @@ const Ref<Texture2D> EditorPlugin::get_icon() const { return Ref<Texture2D>(); } + bool EditorPlugin::has_main_screen() const { if (get_script_instance() && get_script_instance()->has_method("has_main_screen")) { return get_script_instance()->call("has_main_screen"); @@ -574,6 +577,7 @@ bool EditorPlugin::has_main_screen() const { return false; } + void EditorPlugin::make_visible(bool p_visible) { if (get_script_instance() && get_script_instance()->has_method("make_visible")) { get_script_instance()->call("make_visible", p_visible); @@ -597,6 +601,7 @@ bool EditorPlugin::handles(Object *p_object) const { return false; } + Dictionary EditorPlugin::get_state() const { if (get_script_instance() && get_script_instance()->has_method("get_state")) { return get_script_instance()->call("get_state"); @@ -638,6 +643,7 @@ void EditorPlugin::get_breakpoints(List<String> *p_breakpoints) { p_breakpoints->push_back(arr[i]); } } + bool EditorPlugin::get_remove_list(List<Node *> *p_list) { return false; } diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 9bb20122c6..e5ca5d95e8 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -82,6 +82,7 @@ void EditorPropertyText::update_property() { void EditorPropertyText::set_string_name(bool p_enabled) { string_name = p_enabled; } + void EditorPropertyText::set_placeholder(const String &p_string) { text->set_placeholder(p_string); } @@ -209,12 +210,14 @@ EditorPropertyTextEnum::EditorPropertyTextEnum() { add_focusable(options); options->connect("item_selected", callable_mp(this, &EditorPropertyTextEnum::_option_selected)); } + ///////////////////// PATH ///////////////////////// void EditorPropertyPath::_path_selected(const String &p_path) { emit_changed(get_edited_property(), p_path); update_property(); } + void EditorPropertyPath::_path_pressed() { if (!dialog) { dialog = memnew(EditorFileDialog); @@ -1158,6 +1161,7 @@ void EditorPropertyRect2::update_property() { spin[3]->set_value(val.size.y); setting = false; } + void EditorPropertyRect2::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) { Color base = get_theme_color("accent_color", "Editor"); @@ -1168,6 +1172,7 @@ void EditorPropertyRect2::_notification(int p_what) { } } } + void EditorPropertyRect2::_bind_methods() { } @@ -1239,6 +1244,7 @@ void EditorPropertyVector3::update_property() { spin[2]->set_value(val.z); setting = false; } + void EditorPropertyVector3::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) { Color base = get_theme_color("accent_color", "Editor"); @@ -1249,6 +1255,7 @@ void EditorPropertyVector3::_notification(int p_what) { } } } + void EditorPropertyVector3::_bind_methods() { } @@ -1403,6 +1410,7 @@ void EditorPropertyRect2i::update_property() { spin[3]->set_value(val.size.y); setting = false; } + void EditorPropertyRect2i::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) { Color base = get_theme_color("accent_color", "Editor"); @@ -1413,6 +1421,7 @@ void EditorPropertyRect2i::_notification(int p_what) { } } } + void EditorPropertyRect2i::_bind_methods() { } @@ -1484,6 +1493,7 @@ void EditorPropertyVector3i::update_property() { spin[2]->set_value(val.z); setting = false; } + void EditorPropertyVector3i::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) { Color base = get_theme_color("accent_color", "Editor"); @@ -1494,6 +1504,7 @@ void EditorPropertyVector3i::_notification(int p_what) { } } } + void EditorPropertyVector3i::_bind_methods() { } @@ -1566,6 +1577,7 @@ void EditorPropertyPlane::update_property() { spin[3]->set_value(val.d); setting = false; } + void EditorPropertyPlane::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) { Color base = get_theme_color("accent_color", "Editor"); @@ -1576,6 +1588,7 @@ void EditorPropertyPlane::_notification(int p_what) { } } } + void EditorPropertyPlane::_bind_methods() { } @@ -1649,6 +1662,7 @@ void EditorPropertyQuat::update_property() { spin[3]->set_value(val.w); setting = false; } + void EditorPropertyQuat::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) { Color base = get_theme_color("accent_color", "Editor"); @@ -1659,6 +1673,7 @@ void EditorPropertyQuat::_notification(int p_what) { } } } + void EditorPropertyQuat::_bind_methods() { } @@ -1735,6 +1750,7 @@ void EditorPropertyAABB::update_property() { setting = false; } + void EditorPropertyAABB::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) { Color base = get_theme_color("accent_color", "Editor"); @@ -1745,6 +1761,7 @@ void EditorPropertyAABB::_notification(int p_what) { } } } + void EditorPropertyAABB::_bind_methods() { } @@ -1808,6 +1825,7 @@ void EditorPropertyTransform2D::update_property() { setting = false; } + void EditorPropertyTransform2D::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) { Color base = get_theme_color("accent_color", "Editor"); @@ -1818,6 +1836,7 @@ void EditorPropertyTransform2D::_notification(int p_what) { } } } + void EditorPropertyTransform2D::_bind_methods() { } @@ -1886,6 +1905,7 @@ void EditorPropertyBasis::update_property() { setting = false; } + void EditorPropertyBasis::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) { Color base = get_theme_color("accent_color", "Editor"); @@ -1896,6 +1916,7 @@ void EditorPropertyBasis::_notification(int p_what) { } } } + void EditorPropertyBasis::_bind_methods() { } @@ -1970,6 +1991,7 @@ void EditorPropertyTransform::update_property() { setting = false; } + void EditorPropertyTransform::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) { Color base = get_theme_color("accent_color", "Editor"); @@ -1980,6 +2002,7 @@ void EditorPropertyTransform::_notification(int p_what) { } } } + void EditorPropertyTransform::_bind_methods() { } @@ -2913,6 +2936,7 @@ bool EditorPropertyResource::_is_drop_valid(const Dictionary &p_drag_data) const bool EditorPropertyResource::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const { return _is_drop_valid(p_data); } + void EditorPropertyResource::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) { ERR_FAIL_COND(!_is_drop_valid(p_data)); diff --git a/editor/editor_scale.cpp b/editor/editor_scale.cpp index 6a26cc6401..450de75328 100644 --- a/editor/editor_scale.cpp +++ b/editor/editor_scale.cpp @@ -37,6 +37,7 @@ static float scale = 1.0; void editor_set_scale(float p_scale) { scale = p_scale; } + float editor_get_scale() { return scale; } diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp index 61860d2376..fb12c15913 100644 --- a/editor/export_template_manager.cpp +++ b/editor/export_template_manager.cpp @@ -382,6 +382,7 @@ void ExportTemplateManager::_http_download_mirror_completed(int p_status, int p_ return; } } + void ExportTemplateManager::_http_download_templates_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) { switch (p_status) { case HTTPRequest::RESULT_CANT_RESOLVE: { diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 0f3faf4189..54b4dc2972 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -1607,9 +1607,11 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones uint32_t EditorSceneImporterCollada::get_import_flags() const { return IMPORT_SCENE | IMPORT_ANIMATION; } + void EditorSceneImporterCollada::get_extensions(List<String> *r_extensions) const { r_extensions->push_back("dae"); } + Node *EditorSceneImporterCollada::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { ColladaImport state; uint32_t flags = Collada::IMPORT_FLAG_SCENE; diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index c4bf9189f1..3c9f04322e 100644 --- a/editor/import/editor_scene_importer_gltf.cpp +++ b/editor/import/editor_scene_importer_gltf.cpp @@ -46,6 +46,7 @@ uint32_t EditorSceneImporterGLTF::get_import_flags() const { return IMPORT_SCENE | IMPORT_ANIMATION; } + void EditorSceneImporterGLTF::get_extensions(List<String> *r_extensions) const { r_extensions->push_back("gltf"); r_extensions->push_back("glb"); @@ -874,6 +875,7 @@ Vector<Quat> EditorSceneImporterGLTF::_decode_accessor_as_quat(GLTFState &state, } return ret; } + Vector<Transform2D> EditorSceneImporterGLTF::_decode_accessor_as_xform2d(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) { const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex); Vector<Transform2D> ret; diff --git a/editor/import/resource_importer_bitmask.cpp b/editor/import/resource_importer_bitmask.cpp index 05a3bfc386..5e52a95e4e 100644 --- a/editor/import/resource_importer_bitmask.cpp +++ b/editor/import/resource_importer_bitmask.cpp @@ -44,9 +44,11 @@ String ResourceImporterBitMap::get_importer_name() const { String ResourceImporterBitMap::get_visible_name() const { return "BitMap"; } + void ResourceImporterBitMap::get_recognized_extensions(List<String> *p_extensions) const { ImageLoader::get_recognized_extensions(p_extensions); } + String ResourceImporterBitMap::get_save_extension() const { return "res"; } @@ -62,6 +64,7 @@ bool ResourceImporterBitMap::get_option_visibility(const String &p_option, const int ResourceImporterBitMap::get_preset_count() const { return 0; } + String ResourceImporterBitMap::get_preset_name(int p_idx) const { return String(); } diff --git a/editor/import/resource_importer_csv.cpp b/editor/import/resource_importer_csv.cpp index e56cb1d3a1..d29ba28a96 100644 --- a/editor/import/resource_importer_csv.cpp +++ b/editor/import/resource_importer_csv.cpp @@ -40,6 +40,7 @@ String ResourceImporterCSV::get_importer_name() const { String ResourceImporterCSV::get_visible_name() const { return "CSV"; } + void ResourceImporterCSV::get_recognized_extensions(List<String> *p_extensions) const { p_extensions->push_back("csv"); } @@ -59,6 +60,7 @@ bool ResourceImporterCSV::get_option_visibility(const String &p_option, const Ma int ResourceImporterCSV::get_preset_count() const { return 0; } + String ResourceImporterCSV::get_preset_name(int p_idx) const { return ""; } diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp index 09f2d691f0..04e20dee86 100644 --- a/editor/import/resource_importer_csv_translation.cpp +++ b/editor/import/resource_importer_csv_translation.cpp @@ -42,6 +42,7 @@ String ResourceImporterCSVTranslation::get_importer_name() const { String ResourceImporterCSVTranslation::get_visible_name() const { return "CSV Translation"; } + void ResourceImporterCSVTranslation::get_recognized_extensions(List<String> *p_extensions) const { p_extensions->push_back("csv"); } @@ -61,6 +62,7 @@ bool ResourceImporterCSVTranslation::get_option_visibility(const String &p_optio int ResourceImporterCSVTranslation::get_preset_count() const { return 0; } + String ResourceImporterCSVTranslation::get_preset_name(int p_idx) const { return ""; } diff --git a/editor/import/resource_importer_image.cpp b/editor/import/resource_importer_image.cpp index 927d911e94..885b00865b 100644 --- a/editor/import/resource_importer_image.cpp +++ b/editor/import/resource_importer_image.cpp @@ -42,6 +42,7 @@ String ResourceImporterImage::get_importer_name() const { String ResourceImporterImage::get_visible_name() const { return "Image"; } + void ResourceImporterImage::get_recognized_extensions(List<String> *p_extensions) const { ImageLoader::get_recognized_extensions(p_extensions); } @@ -61,6 +62,7 @@ bool ResourceImporterImage::get_option_visibility(const String &p_option, const int ResourceImporterImage::get_preset_count() const { return 0; } + String ResourceImporterImage::get_preset_name(int p_idx) const { return String(); } diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp index 18c6dc149b..2c9e7dcd3b 100644 --- a/editor/import/resource_importer_layered_texture.cpp +++ b/editor/import/resource_importer_layered_texture.cpp @@ -76,9 +76,11 @@ String ResourceImporterLayeredTexture::get_visible_name() const { ERR_FAIL_V(""); } + void ResourceImporterLayeredTexture::get_recognized_extensions(List<String> *p_extensions) const { ImageLoader::get_recognized_extensions(p_extensions); } + String ResourceImporterLayeredTexture::get_save_extension() const { switch (mode) { case MODE_CUBEMAP: { @@ -126,6 +128,7 @@ bool ResourceImporterLayeredTexture::get_option_visibility(const String &p_optio int ResourceImporterLayeredTexture::get_preset_count() const { return 0; } + String ResourceImporterLayeredTexture::get_preset_name(int p_idx) const { return ""; } diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp index 73150c8516..4316a9b512 100644 --- a/editor/import/resource_importer_obj.cpp +++ b/editor/import/resource_importer_obj.cpp @@ -435,6 +435,7 @@ Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, in return scene; } + Ref<Animation> EditorOBJImporter::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) { return Ref<Animation>(); } @@ -445,20 +446,25 @@ void EditorOBJImporter::get_extensions(List<String> *r_extensions) const { EditorOBJImporter::EditorOBJImporter() { } + //////////////////////////////////////////////////// String ResourceImporterOBJ::get_importer_name() const { return "wavefront_obj"; } + String ResourceImporterOBJ::get_visible_name() const { return "OBJ As Mesh"; } + void ResourceImporterOBJ::get_recognized_extensions(List<String> *p_extensions) const { p_extensions->push_back("obj"); } + String ResourceImporterOBJ::get_save_extension() const { return "mesh"; } + String ResourceImporterOBJ::get_resource_type() const { return "Mesh"; } @@ -466,6 +472,7 @@ String ResourceImporterOBJ::get_resource_type() const { int ResourceImporterOBJ::get_preset_count() const { return 0; } + String ResourceImporterOBJ::get_preset_name(int p_idx) const { return ""; } @@ -476,6 +483,7 @@ void ResourceImporterOBJ::get_import_options(List<ImportOption> *r_options, int r_options->push_back(ImportOption(PropertyInfo(Variant::VECTOR3, "offset_mesh"), Vector3(0, 0, 0))); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "optimize_mesh"), true)); } + bool ResourceImporterOBJ::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { return true; } diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 012e3e95a7..f4fb0f9f0c 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -53,6 +53,7 @@ uint32_t EditorSceneImporter::get_import_flags() const { ERR_FAIL_V(0); } + void EditorSceneImporter::get_extensions(List<String> *r_extensions) const { if (get_script_instance()) { Array arr = get_script_instance()->call("_get_extensions"); @@ -64,6 +65,7 @@ void EditorSceneImporter::get_extensions(List<String> *r_extensions) const { ERR_FAIL(); } + Node *EditorSceneImporter::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { if (get_script_instance()) { return get_script_instance()->call("_import_scene", p_path, p_flags, p_bake_fps); @@ -202,6 +204,7 @@ bool ResourceImporterScene::get_option_visibility(const String &p_option, const int ResourceImporterScene::get_preset_count() const { return PRESET_MAX; } + String ResourceImporterScene::get_preset_name(int p_idx) const { switch (p_idx) { case PRESET_SINGLE_SCENE: @@ -1520,14 +1523,17 @@ ResourceImporterScene *ResourceImporterScene::singleton = nullptr; ResourceImporterScene::ResourceImporterScene() { singleton = this; } + /////////////////////////////////////// uint32_t EditorSceneImporterESCN::get_import_flags() const { return IMPORT_SCENE; } + void EditorSceneImporterESCN::get_extensions(List<String> *r_extensions) const { r_extensions->push_back("escn"); } + Node *EditorSceneImporterESCN::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { Error error; Ref<PackedScene> ps = ResourceFormatLoaderText::singleton->load(p_path, p_path, &error); @@ -1538,6 +1544,7 @@ Node *EditorSceneImporterESCN::import_scene(const String &p_path, uint32_t p_fla return scene; } + Ref<Animation> EditorSceneImporterESCN::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) { ERR_FAIL_V(Ref<Animation>()); } diff --git a/editor/import/resource_importer_shader_file.cpp b/editor/import/resource_importer_shader_file.cpp index 0813bca6f1..a2e80dfa18 100644 --- a/editor/import/resource_importer_shader_file.cpp +++ b/editor/import/resource_importer_shader_file.cpp @@ -44,9 +44,11 @@ String ResourceImporterShaderFile::get_importer_name() const { String ResourceImporterShaderFile::get_visible_name() const { return "GLSL Shader File"; } + void ResourceImporterShaderFile::get_recognized_extensions(List<String> *p_extensions) const { p_extensions->push_back("glsl"); } + String ResourceImporterShaderFile::get_save_extension() const { return "res"; } @@ -58,6 +60,7 @@ String ResourceImporterShaderFile::get_resource_type() const { int ResourceImporterShaderFile::get_preset_count() const { return 0; } + String ResourceImporterShaderFile::get_preset_name(int p_idx) const { return String(); } @@ -68,6 +71,7 @@ void ResourceImporterShaderFile::get_import_options(List<ImportOption> *r_option bool ResourceImporterShaderFile::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { return true; } + static String _include_function(const String &p_path, void *userpointer) { Error err; diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index aeeae36f5b..ab23ab6db6 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -140,9 +140,11 @@ String ResourceImporterTexture::get_importer_name() const { String ResourceImporterTexture::get_visible_name() const { return "Texture2D"; } + void ResourceImporterTexture::get_recognized_extensions(List<String> *p_extensions) const { ImageLoader::get_recognized_extensions(p_extensions); } + String ResourceImporterTexture::get_save_extension() const { return "stex"; } @@ -181,6 +183,7 @@ bool ResourceImporterTexture::get_option_visibility(const String &p_option, cons int ResourceImporterTexture::get_preset_count() const { return 4; } + String ResourceImporterTexture::get_preset_name(int p_idx) const { static const char *preset_names[] = { "2D, Detect 3D", diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp index 314c27b8e4..0ef5d84eca 100644 --- a/editor/import/resource_importer_texture_atlas.cpp +++ b/editor/import/resource_importer_texture_atlas.cpp @@ -45,6 +45,7 @@ String ResourceImporterTextureAtlas::get_importer_name() const { String ResourceImporterTextureAtlas::get_visible_name() const { return "TextureAtlas"; } + void ResourceImporterTextureAtlas::get_recognized_extensions(List<String> *p_extensions) const { ImageLoader::get_recognized_extensions(p_extensions); } @@ -64,6 +65,7 @@ bool ResourceImporterTextureAtlas::get_option_visibility(const String &p_option, int ResourceImporterTextureAtlas::get_preset_count() const { return 0; } + String ResourceImporterTextureAtlas::get_preset_name(int p_idx) const { return String(); } diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp index 3ffc7b34af..eace84400a 100644 --- a/editor/import/resource_importer_wav.cpp +++ b/editor/import/resource_importer_wav.cpp @@ -45,9 +45,11 @@ String ResourceImporterWAV::get_importer_name() const { String ResourceImporterWAV::get_visible_name() const { return "Microsoft WAV"; } + void ResourceImporterWAV::get_recognized_extensions(List<String> *p_extensions) const { p_extensions->push_back("wav"); } + String ResourceImporterWAV::get_save_extension() const { return "sample"; } @@ -67,6 +69,7 @@ bool ResourceImporterWAV::get_option_visibility(const String &p_option, const Ma int ResourceImporterWAV::get_preset_count() const { return 0; } + String ResourceImporterWAV::get_preset_name(int p_idx) const { return String(); } diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp index 2d8069acea..4a3011086f 100644 --- a/editor/import_dock.cpp +++ b/editor/import_dock.cpp @@ -384,6 +384,7 @@ static bool _find_owners(EditorFileSystemDirectory *efsd, const String &p_path) return false; } + void ImportDock::_reimport_attempt() { bool need_restart = false; bool used_in_resources = false; @@ -484,6 +485,7 @@ void ImportDock::_property_toggled(const StringName &p_prop, bool p_checked) { params->checked.erase(p_prop); } } + void ImportDock::_bind_methods() { ClassDB::bind_method(D_METHOD("_reimport"), &ImportDock::_reimport); } diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp index ab425aab40..8ada7e9ba5 100644 --- a/editor/inspector_dock.cpp +++ b/editor/inspector_dock.cpp @@ -287,6 +287,7 @@ void InspectorDock::_edit_forward() { if (EditorNode::get_singleton()->get_editor_history()->next()) editor->edit_current(); } + void InspectorDock::_edit_back() { EditorHistory *editor_history = EditorNode::get_singleton()->get_editor_history(); if ((current && editor_history->previous()) || editor_history->get_path_size() == 1) diff --git a/editor/node_3d_editor_gizmos.cpp b/editor/node_3d_editor_gizmos.cpp index 2bdc0b12e9..20b84f9358 100644 --- a/editor/node_3d_editor_gizmos.cpp +++ b/editor/node_3d_editor_gizmos.cpp @@ -2117,6 +2117,7 @@ Variant VisibilityNotifier3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_g VisibilityNotifier3D *notifier = Object::cast_to<VisibilityNotifier3D>(p_gizmo->get_spatial_node()); return notifier->get_aabb(); } + void VisibilityNotifier3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { VisibilityNotifier3D *notifier = Object::cast_to<VisibilityNotifier3D>(p_gizmo->get_spatial_node()); @@ -2302,10 +2303,12 @@ String GPUParticles3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_giz return ""; } + Variant GPUParticles3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const { GPUParticles3D *particles = Object::cast_to<GPUParticles3D>(p_gizmo->get_spatial_node()); return particles->get_visibility_aabb(); } + void GPUParticles3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { GPUParticles3D *particles = Object::cast_to<GPUParticles3D>(p_gizmo->get_spatial_node()); @@ -2418,6 +2421,7 @@ void GPUParticles3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { p_gizmo->add_handles(handles, get_material("handles")); p_gizmo->add_unscaled_billboard(icon, 0.05); } + //// ReflectionProbeGizmoPlugin::ReflectionProbeGizmoPlugin() { @@ -2465,10 +2469,12 @@ String ReflectionProbeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gi return ""; } + Variant ReflectionProbeGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const { ReflectionProbe *probe = Object::cast_to<ReflectionProbe>(p_gizmo->get_spatial_node()); return AABB(probe->get_extents(), probe->get_origin_offset()); } + void ReflectionProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { ReflectionProbe *probe = Object::cast_to<ReflectionProbe>(p_gizmo->get_spatial_node()); Transform gt = probe->get_global_transform(); @@ -2604,6 +2610,7 @@ void ReflectionProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { p_gizmo->add_unscaled_billboard(icon, 0.05); p_gizmo->add_handles(handles, get_material("handles")); } + /////////////////////////////// //// @@ -2640,10 +2647,12 @@ String DecalGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p return ""; } + Variant DecalGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const { Decal *decal = Object::cast_to<Decal>(p_gizmo->get_spatial_node()); return decal->get_extents(); } + void DecalGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { Decal *decal = Object::cast_to<Decal>(p_gizmo->get_spatial_node()); Transform gt = decal->get_global_transform(); @@ -2778,10 +2787,12 @@ String GIProbeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int return ""; } + Variant GIProbeGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const { GIProbe *probe = Object::cast_to<GIProbe>(p_gizmo->get_spatial_node()); return probe->get_extents(); } + void GIProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { GIProbe *probe = Object::cast_to<GIProbe>(p_gizmo->get_spatial_node()); @@ -2935,9 +2946,11 @@ BakedLightmapGizmoPlugin::BakedLightmapGizmoPlugin() { String BakedLightmapGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const { return ""; } + Variant BakedLightmapGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const { return Variant(); } + void BakedLightmapGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { } @@ -3102,6 +3115,7 @@ void BakedLightmapGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { p_gizmo->add_mesh(mesh); } + ///////// LightmapProbeGizmoPlugin::LightmapProbeGizmoPlugin() { @@ -3114,9 +3128,11 @@ LightmapProbeGizmoPlugin::LightmapProbeGizmoPlugin() { String LightmapProbeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const { return ""; } + Variant LightmapProbeGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const { return Variant(); } + void LightmapProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { } @@ -3195,6 +3211,7 @@ void LightmapProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { p_gizmo->add_lines(lines, material_lines); } + //// CollisionShape3DGizmoPlugin::CollisionShape3DGizmoPlugin() { @@ -3282,6 +3299,7 @@ Variant CollisionShape3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo return Variant(); } + void CollisionShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node()); @@ -3389,6 +3407,7 @@ void CollisionShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_i cs2->set_height(d * 2.0); } } + void CollisionShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) { CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node()); @@ -3490,6 +3509,7 @@ void CollisionShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int ur->commit_action(); } } + void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node()); diff --git a/editor/pane_drag.cpp b/editor/pane_drag.cpp index 0f21a2af88..8cadc3925e 100644 --- a/editor/pane_drag.cpp +++ b/editor/pane_drag.cpp @@ -55,6 +55,7 @@ void PaneDrag::_notification(int p_what) { break; } } + Size2 PaneDrag::get_minimum_size() const { Ref<Texture2D> icon = get_theme_icon("PaneDrag", "EditorIcons"); if (!icon.is_null()) diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index aba2d53eba..28d0e113d4 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -237,6 +237,7 @@ void AnimationPlayerEditor::_play_bw_from_pressed() { //unstop stop->set_pressed(false); } + void AnimationPlayerEditor::_stop_pressed() { if (!player) { return; @@ -305,6 +306,7 @@ void AnimationPlayerEditor::_animation_new() { name->select_all(); name->grab_focus(); } + void AnimationPlayerEditor::_animation_rename() { if (animation->get_item_count() == 0) return; @@ -318,6 +320,7 @@ void AnimationPlayerEditor::_animation_rename() { name->select_all(); name->grab_focus(); } + void AnimationPlayerEditor::_animation_load() { ERR_FAIL_COND(!player); file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE); @@ -626,6 +629,7 @@ Dictionary AnimationPlayerEditor::get_state() const { return d; } + void AnimationPlayerEditor::set_state(const Dictionary &p_state) { if (!p_state.has("visible") || !p_state["visible"]) { return; diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index ce41be7f28..bcd393957c 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -1166,6 +1166,7 @@ void AnimationNodeStateMachineEditor::_end_selected() { state_machine_draw->update(); } } + void AnimationNodeStateMachineEditor::_update_mode() { if (tool_select->is_pressed()) { tool_erase_hb->show(); diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index 5ec76d8471..ad2164b719 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -72,6 +72,7 @@ void EditorAssetLibraryItem::_asset_clicked() { void EditorAssetLibraryItem::_category_clicked() { emit_signal("category_selected", category_id); } + void EditorAssetLibraryItem::_author_clicked() { emit_signal("author_selected", author_id); } @@ -297,6 +298,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() { get_ok()->set_text(TTR("Download")); get_cancel()->set_text(TTR("Close")); } + /////////////////////////////////////////////////////////////////////////////////// void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) { @@ -437,6 +439,7 @@ void EditorAssetLibraryItemDownload::_notification(int p_what) { } break; } } + void EditorAssetLibraryItemDownload::_close() { // Clean up downloaded file. DirAccess::remove_file_or_error(download->get_download_file()); @@ -650,6 +653,7 @@ void EditorAssetLibrary::_select_category(int p_id) { } } } + void EditorAssetLibrary::_select_asset(int p_id) { _api_request("asset/" + itos(p_id), REQUESTING_ASSET); } diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 0f794d0f48..2d7198bec8 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -4334,6 +4334,7 @@ void CanvasItemEditor::_button_toggle_grid_snap(bool p_status) { grid_snap_active = p_status; viewport->update(); } + void CanvasItemEditor::_button_override_camera(bool p_pressed) { EditorDebuggerNode *debugger = EditorDebuggerNode::get_singleton(); @@ -5762,6 +5763,7 @@ void CanvasItemEditorPlugin::make_visible(bool p_visible) { Dictionary CanvasItemEditorPlugin::get_state() const { return canvas_item_editor->get_state(); } + void CanvasItemEditorPlugin::set_state(const Dictionary &p_state) { canvas_item_editor->set_state(p_state); } diff --git a/editor/plugins/collision_polygon_3d_editor_plugin.cpp b/editor/plugins/collision_polygon_3d_editor_plugin.cpp index 9619a97807..920a7f195a 100644 --- a/editor/plugins/collision_polygon_3d_editor_plugin.cpp +++ b/editor/plugins/collision_polygon_3d_editor_plugin.cpp @@ -60,6 +60,7 @@ void CollisionPolygon3DEditor::_notification(int p_what) { } break; } } + void CollisionPolygon3DEditor::_node_removed(Node *p_node) { if (p_node == node) { node = nullptr; diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 4895696f36..0c0f014af6 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -183,6 +183,7 @@ EditorImagePreviewPlugin::EditorImagePreviewPlugin() { bool EditorImagePreviewPlugin::generate_small_preview_automatically() const { return true; } + //////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////// bool EditorBitmapPreviewPlugin::handles(const String &p_type) const { @@ -572,6 +573,7 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size EditorScriptPreviewPlugin::EditorScriptPreviewPlugin() { } + /////////////////////////////////////////////////////////////////// bool EditorAudioStreamPreviewPlugin::handles(const String &p_type) const { @@ -665,6 +667,7 @@ void EditorMeshPreviewPlugin::_preview_done(const Variant &p_udata) { void EditorMeshPreviewPlugin::_bind_methods() { ClassDB::bind_method("_preview_done", &EditorMeshPreviewPlugin::_preview_done); } + bool EditorMeshPreviewPlugin::handles(const String &p_type) const { return ClassDB::is_parent_class(p_type, "Mesh"); //any Mesh } diff --git a/editor/plugins/gradient_editor_plugin.cpp b/editor/plugins/gradient_editor_plugin.cpp index 6c0ce699ac..1ccfeccf7a 100644 --- a/editor/plugins/gradient_editor_plugin.cpp +++ b/editor/plugins/gradient_editor_plugin.cpp @@ -37,6 +37,7 @@ Size2 GradientEditor::get_minimum_size() const { return Size2(0, 60) * EDSCALE; } + void GradientEditor::_gradient_changed() { if (editing) return; diff --git a/editor/plugins/item_list_editor_plugin.cpp b/editor/plugins/item_list_editor_plugin.cpp index 77f60b6677..2829b9bd5b 100644 --- a/editor/plugins/item_list_editor_plugin.cpp +++ b/editor/plugins/item_list_editor_plugin.cpp @@ -96,6 +96,7 @@ bool ItemListPlugin::_get(const StringName &p_name, Variant &r_ret) const { return true; } + void ItemListPlugin::_get_property_list(List<PropertyInfo> *p_list) const { for (int i = 0; i < get_item_count(); i++) { String base = itos(i) + "/"; diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp index 2e61ff59fd..992f080cec 100644 --- a/editor/plugins/material_editor_plugin.cpp +++ b/editor/plugins/material_editor_plugin.cpp @@ -239,10 +239,12 @@ MaterialEditorPlugin::MaterialEditorPlugin(EditorNode *p_node) { String StandardMaterial3DConversionPlugin::converts_to() const { return "ShaderMaterial"; } + bool StandardMaterial3DConversionPlugin::handles(const Ref<Resource> &p_resource) const { Ref<StandardMaterial3D> mat = p_resource; return mat.is_valid(); } + Ref<Resource> StandardMaterial3DConversionPlugin::convert(const Ref<Resource> &p_resource) const { Ref<StandardMaterial3D> mat = p_resource; ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>()); @@ -281,10 +283,12 @@ Ref<Resource> StandardMaterial3DConversionPlugin::convert(const Ref<Resource> &p String ParticlesMaterialConversionPlugin::converts_to() const { return "ShaderMaterial"; } + bool ParticlesMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const { Ref<ParticlesMaterial> mat = p_resource; return mat.is_valid(); } + Ref<Resource> ParticlesMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const { Ref<ParticlesMaterial> mat = p_resource; ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>()); @@ -316,10 +320,12 @@ Ref<Resource> ParticlesMaterialConversionPlugin::convert(const Ref<Resource> &p_ String CanvasItemMaterialConversionPlugin::converts_to() const { return "ShaderMaterial"; } + bool CanvasItemMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const { Ref<CanvasItemMaterial> mat = p_resource; return mat.is_valid(); } + Ref<Resource> CanvasItemMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const { Ref<CanvasItemMaterial> mat = p_resource; ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>()); @@ -351,10 +357,12 @@ Ref<Resource> CanvasItemMaterialConversionPlugin::convert(const Ref<Resource> &p String ProceduralSkyMaterialConversionPlugin::converts_to() const { return "ShaderMaterial"; } + bool ProceduralSkyMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const { Ref<ProceduralSkyMaterial> mat = p_resource; return mat.is_valid(); } + Ref<Resource> ProceduralSkyMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const { Ref<ProceduralSkyMaterial> mat = p_resource; ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>()); @@ -386,10 +394,12 @@ Ref<Resource> ProceduralSkyMaterialConversionPlugin::convert(const Ref<Resource> String PanoramaSkyMaterialConversionPlugin::converts_to() const { return "ShaderMaterial"; } + bool PanoramaSkyMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const { Ref<PanoramaSkyMaterial> mat = p_resource; return mat.is_valid(); } + Ref<Resource> PanoramaSkyMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const { Ref<PanoramaSkyMaterial> mat = p_resource; ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>()); @@ -421,10 +431,12 @@ Ref<Resource> PanoramaSkyMaterialConversionPlugin::convert(const Ref<Resource> & String PhysicalSkyMaterialConversionPlugin::converts_to() const { return "ShaderMaterial"; } + bool PhysicalSkyMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const { Ref<PhysicalSkyMaterial> mat = p_resource; return mat.is_valid(); } + Ref<Resource> PhysicalSkyMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const { Ref<PhysicalSkyMaterial> mat = p_resource; ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>()); diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index fa600ad744..bfdd148e3f 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -395,9 +395,11 @@ int Node3DEditorViewport::get_selected_count() const { float Node3DEditorViewport::get_znear() const { return CLAMP(spatial_editor->get_znear(), MIN_Z, MAX_Z); } + float Node3DEditorViewport::get_zfar() const { return CLAMP(spatial_editor->get_zfar(), MIN_Z, MAX_Z); } + float Node3DEditorViewport::get_fov() const { return CLAMP(spatial_editor->get_fov(), MIN_FOV, MAX_FOV); } @@ -970,9 +972,11 @@ void Node3DEditorViewport::_surface_focus_enter() { void Node3DEditorViewport::_surface_focus_exit() { view_menu->set_disable_shortcuts(true); } + bool Node3DEditorViewport ::_is_node_locked(const Node *p_node) { return p_node->has_meta("_edit_lock_") && p_node->get_meta("_edit_lock_"); } + void Node3DEditorViewport::_list_select(Ref<InputEventMouseButton> b) { _find_items_at_pos(b->get_position(), clicked_includes_current, selection_results, b->get_shift()); @@ -3011,6 +3015,7 @@ void Node3DEditorViewport::_finish_gizmo_instances() { RS::get_singleton()->free(scale_plane_gizmo_instance[i]); } } + void Node3DEditorViewport::_toggle_camera_preview(bool p_activate) { ERR_FAIL_COND(p_activate && !preview); ERR_FAIL_COND(!p_activate && !previewing); @@ -4408,6 +4413,7 @@ Dictionary Node3DEditor::get_state() const { return d; } + void Node3DEditor::set_state(const Dictionary &p_state) { Dictionary d = p_state; @@ -5511,6 +5517,7 @@ void Node3DEditor::_unhandled_key_input(Ref<InputEvent> p_event) { snap_key_enabled = Input::get_singleton()->is_key_pressed(KEY_CONTROL); } + void Node3DEditor::_notification(int p_what) { if (p_what == NOTIFICATION_READY) { tool_button[Node3DEditor::TOOL_MODE_SELECT]->set_icon(get_theme_icon("ToolSelect", "EditorIcons")); @@ -6116,6 +6123,7 @@ void Node3DEditorPlugin::make_visible(bool p_visible) { spatial_editor->set_process(false); } } + void Node3DEditorPlugin::edit(Object *p_object) { spatial_editor->edit(Object::cast_to<Node3D>(p_object)); } diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp index 41011343c8..d4f49100d6 100644 --- a/editor/plugins/path_2d_editor_plugin.cpp +++ b/editor/plugins/path_2d_editor_plugin.cpp @@ -49,6 +49,7 @@ void Path2DEditor::_notification(int p_what) { } break; } } + void Path2DEditor::_node_removed(Node *p_node) { if (p_node == node) { node = nullptr; diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp index 0ed7995914..0aee064c41 100644 --- a/editor/plugins/path_3d_editor_plugin.cpp +++ b/editor/plugins/path_3d_editor_plugin.cpp @@ -55,6 +55,7 @@ String Path3DGizmo::get_handle_name(int p_idx) const { return n; } + Variant Path3DGizmo::get_handle_value(int p_idx) { Ref<Curve3D> c = path->get_curve(); if (c.is_null()) @@ -80,6 +81,7 @@ Variant Path3DGizmo::get_handle_value(int p_idx) { return ofs; } + void Path3DGizmo::set_handle(int p_idx, Camera3D *p_camera, const Point2 &p_point) { Ref<Curve3D> c = path->get_curve(); if (c.is_null()) diff --git a/editor/plugins/root_motion_editor_plugin.cpp b/editor/plugins/root_motion_editor_plugin.cpp index 12a2b4c2b7..37e779fbbb 100644 --- a/editor/plugins/root_motion_editor_plugin.cpp +++ b/editor/plugins/root_motion_editor_plugin.cpp @@ -268,6 +268,7 @@ EditorPropertyRootMotion::EditorPropertyRootMotion() { filters->connect("item_activated", callable_mp(this, &EditorPropertyRootMotion::_confirmed)); //filters->connect("item_edited", this, "_filter_edited"); } + ////////////////////////// bool EditorInspectorRootMotionPlugin::can_handle(Object *p_object) { diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index d1cadb6f67..e0748f5237 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -46,6 +46,7 @@ Ref<Shader> ShaderTextEditor::get_edited_shader() const { return shader; } + void ShaderTextEditor::set_edited_shader(const Ref<Shader> &p_shader) { if (shader == p_shader) { return; diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 4162778fb9..d869f9fcbc 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -98,6 +98,7 @@ void SpriteFramesEditor::_sheet_preview_draw() { split_sheet_dialog->get_ok()->set_disabled(false); split_sheet_dialog->get_ok()->set_text(vformat(TTR("Add %d Frame(s)"), frames_selected.size())); } + void SpriteFramesEditor::_sheet_preview_input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> mb = p_event; diff --git a/editor/plugins/style_box_editor_plugin.cpp b/editor/plugins/style_box_editor_plugin.cpp index 333d95196e..0d957bb101 100644 --- a/editor/plugins/style_box_editor_plugin.cpp +++ b/editor/plugins/style_box_editor_plugin.cpp @@ -43,9 +43,11 @@ void EditorInspectorPluginStyleBox::parse_begin(Object *p_object) { preview->edit(sb); add_custom_control(preview); } + bool EditorInspectorPluginStyleBox::parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide) { return false; //do not want } + void EditorInspectorPluginStyleBox::parse_end() { } diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp index 7c5a290537..bc4b97d40a 100644 --- a/editor/plugins/texture_editor_plugin.cpp +++ b/editor/plugins/texture_editor_plugin.cpp @@ -134,6 +134,7 @@ TextureEditor::~TextureEditor() { texture->remove_change_receptor(this); } } + // bool EditorInspectorPluginTexture::can_handle(Object *p_object) { return Object::cast_to<ImageTexture>(p_object) != nullptr || Object::cast_to<AtlasTexture>(p_object) != nullptr || Object::cast_to<StreamTexture2D>(p_object) != nullptr || Object::cast_to<LargeTexture>(p_object) != nullptr || Object::cast_to<AnimatedTexture>(p_object) != nullptr; diff --git a/editor/plugins/texture_layered_editor_plugin.cpp b/editor/plugins/texture_layered_editor_plugin.cpp index 24a6103450..e0e5bdb407 100644 --- a/editor/plugins/texture_layered_editor_plugin.cpp +++ b/editor/plugins/texture_layered_editor_plugin.cpp @@ -249,6 +249,7 @@ TextureLayeredEditor::~TextureLayeredEditor() { texture->remove_change_receptor(this); } } + // bool EditorInspectorPluginLayeredTexture::can_handle(Object *p_object) { return Object::cast_to<TextureLayered>(p_object) != nullptr; diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index e096ed933e..9ab7e7ae8a 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -2358,6 +2358,7 @@ void TileSetEditor::_zoom_in() { workspace_overlay->set_custom_minimum_size(workspace->get_rect().size * scale); } } + void TileSetEditor::_zoom_out() { float scale = workspace->get_scale().x; if (scale > min_scale) { @@ -2367,6 +2368,7 @@ void TileSetEditor::_zoom_out() { workspace_overlay->set_custom_minimum_size(workspace->get_rect().size * scale); } } + void TileSetEditor::_zoom_reset() { workspace->set_scale(Vector2(1, 1)); workspace_container->set_custom_minimum_size(workspace->get_rect().size); diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 2cf18a4d13..223cc249e1 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -3221,6 +3221,7 @@ bool EditorInspectorShaderModePlugin::parse_property(Object *p_object, Variant:: void EditorInspectorShaderModePlugin::parse_end() { //do none } + ////////////////////////////////// void VisualShaderNodePortPreview::_shader_changed() { diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp index 6060ef44bb..8487a3d1d2 100644 --- a/editor/progress_dialog.cpp +++ b/editor/progress_dialog.cpp @@ -83,6 +83,7 @@ void BackgroundProgress::_task_step(const String &p_task, int p_step) { else t.progress->set_value(p_step); } + void BackgroundProgress::_end_task(const String &p_task) { _THREAD_SAFE_METHOD_ @@ -103,6 +104,7 @@ void BackgroundProgress::_bind_methods() { void BackgroundProgress::add_task(const String &p_task, const String &p_label, int p_steps) { MessageQueue::get_singleton()->push_call(this, "_add_task", p_task, p_label, p_steps); } + void BackgroundProgress::task_step(const String &p_task, int p_step) { //this code is weird, but it prevents deadlock. bool no_updates = true; diff --git a/editor/project_export.cpp b/editor/project_export.cpp index 3b115d7427..bc4a1ee118 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -55,6 +55,7 @@ void ProjectExportDialog::_theme_changed() { if (panel) panel->add_theme_style_override("panel", patches->get_theme_stylebox("bg", "Tree")); } + void ProjectExportDialog::_notification(int p_what) { switch (p_what) { case NOTIFICATION_VISIBILITY_CHANGED: { diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 60b9902f68..4f9c6c2cf3 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -575,6 +575,7 @@ void ProjectSettingsEditor::_edit_item(Ref<InputEvent> p_exiting_event) { _add_item(ie_type, p_exiting_event); } + void ProjectSettingsEditor::_action_activated() { TreeItem *ti = input_editor->get_selected(); @@ -1259,6 +1260,7 @@ void ProjectSettingsEditor::_translation_res_add(const String &p_path) { void ProjectSettingsEditor::_translation_res_option_file_open() { translation_res_option_file_open->popup_centered_ratio(); } + void ProjectSettingsEditor::_translation_res_option_add(const String &p_path) { ERR_FAIL_COND(!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")); diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp index 37de0b51d9..870bf52a91 100644 --- a/editor/property_selector.cpp +++ b/editor/property_selector.cpp @@ -413,6 +413,7 @@ void PropertySelector::select_method_from_script(const Ref<Script> &p_script, co search_box->grab_focus(); _update_search(); } + void PropertySelector::select_method_from_basic_type(Variant::Type p_type, const String &p_current) { ERR_FAIL_COND(p_type == Variant::NIL); base_type = ""; diff --git a/editor/reparent_dialog.cpp b/editor/reparent_dialog.cpp index cfcb5234dd..e5ae09f5ff 100644 --- a/editor/reparent_dialog.cpp +++ b/editor/reparent_dialog.cpp @@ -47,6 +47,7 @@ void ReparentDialog::_notification(int p_what) { void ReparentDialog::_cancel() { hide(); } + void ReparentDialog::_reparent() { if (tree->get_selected()) { emit_signal("reparent", tree->get_selected()->get_path(), keep_transform->is_pressed()); diff --git a/editor/run_settings_dialog.cpp b/editor/run_settings_dialog.cpp index c113abb86d..e8c3c2065c 100644 --- a/editor/run_settings_dialog.cpp +++ b/editor/run_settings_dialog.cpp @@ -37,6 +37,7 @@ void RunSettingsDialog::popup_run_settings() { void RunSettingsDialog::set_custom_arguments(const String &p_arguments) { arguments->set_text(p_arguments); } + String RunSettingsDialog::get_custom_arguments() const { return arguments->get_text(); } diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index 7344c2b37e..757dff2552 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -144,6 +144,7 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i NodeDock::singleton->show_groups(); } } + void SceneTreeEditor::_toggle_visible(Node *p_node) { if (p_node->has_method("is_visible") && p_node->has_method("set_visible")) { bool v = bool(p_node->call("is_visible")); @@ -774,6 +775,7 @@ void SceneTreeEditor::set_display_foreign_nodes(bool p_display) { display_foreign = p_display; _update_tree(); } + bool SceneTreeEditor::get_display_foreign_nodes() const { return display_foreign; } @@ -961,6 +963,7 @@ bool SceneTreeEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_d return String(d["type"]) == "nodes"; } + void SceneTreeEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) { if (!can_drop_data_fw(p_point, p_data, p_from)) return; @@ -1145,6 +1148,7 @@ void SceneTreeDialog::_notification(int p_what) { void SceneTreeDialog::_cancel() { hide(); } + void SceneTreeDialog::_select() { if (tree->get_selected()) { emit_signal("selected", tree->get_selected()->get_path()); diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index 721384035f..d0346a6c3e 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -67,6 +67,7 @@ void ScriptCreateDialog::_theme_changed() { parent_search_button->set_icon(gc->get_theme_icon("ClassList", "EditorIcons")); status_panel->add_theme_style_override("panel", gc->get_theme_stylebox("bg", "Tree")); } + void ScriptCreateDialog::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp index de7a98535f..aa88b0ef39 100644 --- a/editor/shader_globals_editor.cpp +++ b/editor/shader_globals_editor.cpp @@ -472,6 +472,7 @@ ShaderGlobalsEditor::ShaderGlobalsEditor() { interface = memnew(ShaderGlobalsEditorInterface); interface->connect("var_changed", Callable(this, "_changed")); } + ShaderGlobalsEditor::~ShaderGlobalsEditor() { inspector->edit(nullptr); memdelete(interface); |