diff options
Diffstat (limited to 'editor')
49 files changed, 453 insertions, 462 deletions
diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp index c6757ba98f..c6381864b3 100644 --- a/editor/animation_editor.cpp +++ b/editor/animation_editor.cpp @@ -324,7 +324,7 @@ public: int existing = animation->track_find_key(track, new_time, true); setting = true; - undo_redo->create_action(TTR("Move Add Key"), UndoRedo::MERGE_ENDS); + undo_redo->create_action(TTR("Anim Change Keyframe Time"), UndoRedo::MERGE_ENDS); Variant val = animation->track_get_key_value(track, key); float trans = animation->track_get_key_transition(track, key); @@ -391,7 +391,7 @@ public: } setting = true; - undo_redo->create_action(TTR("Anim Change Value"), UndoRedo::MERGE_ENDS); + undo_redo->create_action(TTR("Anim Change Keyframe Value"), UndoRedo::MERGE_ENDS); Variant prev = animation->track_get_key_value(track, key); undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, value); undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, prev); diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index cd60455f4f..c095229374 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -88,12 +88,6 @@ public: void ConnectDialog::_notification(int p_what) { - if (p_what == NOTIFICATION_DRAW) { - - //RID ci = get_canvas_item(); - //get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size())); - } - if (p_what == NOTIFICATION_ENTER_TREE) { bind_editor->edit(cdbinds); } @@ -117,11 +111,6 @@ void ConnectDialog::_tree_node_selected() { dst_path->set_text(node->get_path_to(current)); } -void ConnectDialog::_dst_method_list_selected(int p_idx) { - - //dst_method->set_text( dst_method_list->get_popup()->get_item_text(p_idx)); -} - void ConnectDialog::edit(Node *p_node) { node = p_node; @@ -247,9 +236,7 @@ void ConnectDialog::set_dst_method(const StringName &p_method) { void ConnectDialog::_bind_methods() { - //ClassDB::bind_method("_ok",&ConnectDialog::_ok_pressed); ClassDB::bind_method("_cancel", &ConnectDialog::_cancel_pressed); - //ClassDB::bind_method("_dst_method_list_selected",&ConnectDialog::_dst_method_list_selected); ClassDB::bind_method("_tree_node_selected", &ConnectDialog::_tree_node_selected); ClassDB::bind_method("_add_bind", &ConnectDialog::_add_bind); @@ -355,18 +342,6 @@ ConnectDialog::ConnectDialog() { oneshot->set_text(TTR("Oneshot")); dstm_hb->add_child(oneshot); - /* - realtime = memnew( CheckButton ); - realtime->set_anchor( MARGIN_TOP, ANCHOR_END ); - realtime->set_anchor( MARGIN_BOTTOM, ANCHOR_END ); - realtime->set_anchor( MARGIN_RIGHT, ANCHOR_END ); - realtime->set_begin( Point2( 120, button_margin-10 ) ); - realtime->set_end( Point2( 80, margin ) ); - realtime->set_text("Realtime"); - add_child(realtime); -*/ - - //dst_method_list->get_popup()->connect("id_pressed", this,"_dst_method_list_selected"); tree->connect("node_selected", this, "_tree_node_selected"); set_as_toplevel(true); @@ -377,7 +352,6 @@ ConnectDialog::ConnectDialog() { add_child(error); error->get_ok()->set_text(TTR("Close")); get_ok()->set_text(TTR("Connect")); - //error->get_cancel()->set_text("Close"); } ConnectDialog::~ConnectDialog() { @@ -386,12 +360,6 @@ ConnectDialog::~ConnectDialog() { void ConnectionsDock::_notification(int p_what) { - if (p_what == NOTIFICATION_DRAW) { - - //RID ci = get_canvas_item(); - //get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size())); - } - if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) { update_tree(); } @@ -478,7 +446,7 @@ void ConnectionsDock::_connect_pressed() { Connection c = item->get_metadata(0); ERR_FAIL_COND(c.source != node); //shouldn't happen but...bugcheck - undo_redo->create_action(TTR("Create Subscription")); + undo_redo->create_action(vformat(TTR("Disconnect '%s' from '%s'"), c.signal, c.method)); undo_redo->add_do_method(node, "disconnect", c.signal, c.target, c.method); undo_redo->add_undo_method(node, "connect", c.signal, c.target, c.method, Vector<Variant>(), c.flags); undo_redo->add_do_method(this, "update_tree"); @@ -491,42 +459,6 @@ void ConnectionsDock::_connect_pressed() { update_tree(); } } -/* -void ConnectionsDock::_remove() { - - if (!tree->get_selected()) - return; - - TreeItem *selected=tree->get_selected(); - if (!selected) - return; - - Dictionary meta=selected->get_metadata(0); - - remove_confirm->set_text(String()+"Remove Connection \""+meta["from_event"].operator String()+"\" ?"); - remove_confirm->popup_centered(Size2(340,80)); -} -*/ -/* -void ConnectionsDock::_remove_confirm() { - - if (!tree->get_selected()) - return; - TreeItem *selected=tree->get_selected(); - if (!selected) - return; - - Dictionary meta=selected->get_metadata(0); - - undo_redo->create_action("Remove Subscription"); - undo_redo->add_do_method(node,"unsubscribe_path_event",meta["from_event"].operator String(),meta["from_path"].operator NodePath(),meta["to_method"].operator String()); - undo_redo->add_undo_method(node,"subscribe_path_event_persist",meta["from_event"].operator String(),meta["from_path"].operator NodePath(),meta["to_method"].operator String(),Array(),false); - undo_redo->add_do_method(this,"update_tree"); - undo_redo->add_undo_method(this,"update_tree"); - undo_redo->commit_action(); - -} -*/ struct _ConnectionsDockMethodInfoSort { diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h index 53f4d857bf..99a83ff599 100644 --- a/editor/connections_dialog.h +++ b/editor/connections_dialog.h @@ -55,7 +55,6 @@ class ConnectDialog : public ConfirmationDialog { LineEdit *dst_path; LineEdit *dst_method; SceneTreeEditor *tree; - //MenuButton *dst_method_list; OptionButton *type_list; CheckButton *deferred; CheckButton *oneshot; @@ -66,7 +65,6 @@ class ConnectDialog : public ConfirmationDialog { void ok_pressed(); void _cancel_pressed(); void _tree_node_selected(); - void _dst_method_list_selected(int p_idx); void _add_bind(); void _remove_bind(); @@ -84,8 +82,6 @@ public: void set_dst_method(const StringName &p_method); void set_dst_node(Node *p_node); - //Button *get_ok() { return ok; } - //Button *get_cancel() { return cancel; } void edit(Node *p_node); ConnectDialog(); diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index c058d290bf..2584d26fc4 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -370,7 +370,7 @@ void CreateDialog::_notification(int p_what) { void CreateDialog::set_base_type(const String &p_base) { base_type = p_base; - set_title(TTR("Create New") + " " + p_base); + set_title(vformat(TTR("Create New %s"), p_base)); _update_search(); } diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index ec0ca3add5..f357f1e51f 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -678,7 +678,7 @@ bool OrphanResourcesDialog::_fill_owners(EditorFileSystemDirectory *efsd, HashMa int ds = efsd->get_file_deps(i).size(); ti->set_text(1, itos(ds)); if (ds) { - ti->add_button(1, get_icon("Visible", "EditorIcons")); + ti->add_button(1, get_icon("GuiVisibilityVisible", "EditorIcons")); } ti->set_metadata(0, path); has_childs = true; diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index 3f618c3199..b330f5d177 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -39,10 +39,10 @@ #include "io/zip_io.h" #include "os/file_access.h" #include "project_settings.h" +#include "scene/resources/scene_format_text.h" #include "script_language.h" -#include "version.h" - #include "thirdparty/misc/md5.h" +#include "version.h" static int _get_pad(int p_alignment, int p_n) { @@ -1399,3 +1399,30 @@ EditorExportPlatformPC::EditorExportPlatformPC() { chmod_flags = -1; } + +/////////////////////// + +void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, const String &p_type, const Set<String> &p_features) { + + String extension = p_path.get_extension().to_lower(); + if (extension != "tres" && extension != "tscn") { + return; + } + + print_line("exporting " + p_path); + + bool convert = GLOBAL_GET("editor/convert_text_resources_to_binary_on_export"); + if (!convert) + return; + String tmp_path = EditorSettings::get_singleton()->get_cache_dir().plus_file("file.res"); + Error err = ResourceFormatLoaderText::convert_file_to_binary(p_path, tmp_path); + ERR_FAIL_COND(err != OK); + Vector<uint8_t> data = FileAccess::get_file_as_array(tmp_path); + ERR_FAIL_COND(data.size() == 0); + add_file(p_path + ".converted.res", data, true); +} + +EditorExportTextSceneToBinaryPlugin::EditorExportTextSceneToBinaryPlugin() { + + GLOBAL_DEF("editor/convert_text_resources_to_binary_on_export", false); +} diff --git a/editor/editor_export.h b/editor/editor_export.h index 215a770a12..8b1cf4bcff 100644 --- a/editor/editor_export.h +++ b/editor/editor_export.h @@ -408,4 +408,13 @@ public: EditorExportPlatformPC(); }; +class EditorExportTextSceneToBinaryPlugin : public EditorExportPlugin { + + GDCLASS(EditorExportTextSceneToBinaryPlugin, EditorExportPlugin) + +public: + virtual void _export_file(const String &p_path, const String &p_type, const Set<String> &p_features); + EditorExportTextSceneToBinaryPlugin(); +}; + #endif // EDITOR_IMPORT_EXPORT_H diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 27ed53bb42..cb8407386d 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -67,6 +67,7 @@ #include "editor/plugins/animation_player_editor_plugin.h" #include "editor/plugins/animation_tree_editor_plugin.h" #include "editor/plugins/asset_library_editor_plugin.h" +#include "editor/plugins/baked_lightmap_editor_plugin.h" #include "editor/plugins/camera_editor_plugin.h" #include "editor/plugins/canvas_item_editor_plugin.h" #include "editor/plugins/collision_polygon_2d_editor_plugin.h" @@ -3384,14 +3385,14 @@ void EditorNode::stop_child_process() { _menu_option_confirm(RUN_STOP, false); } -void EditorNode::progress_add_task(const String &p_task, const String &p_label, int p_steps) { +void EditorNode::progress_add_task(const String &p_task, const String &p_label, int p_steps, bool p_can_cancel) { - singleton->progress_dialog->add_task(p_task, p_label, p_steps); + singleton->progress_dialog->add_task(p_task, p_label, p_steps, p_can_cancel); } -void EditorNode::progress_task_step(const String &p_task, const String &p_state, int p_step, bool p_force_refresh) { +bool EditorNode::progress_task_step(const String &p_task, const String &p_state, int p_step, bool p_force_refresh) { - singleton->progress_dialog->task_step(p_task, p_state, p_step, p_force_refresh); + return singleton->progress_dialog->task_step(p_task, p_state, p_step, p_force_refresh); } void EditorNode::progress_end_task(const String &p_task) { @@ -4707,6 +4708,7 @@ EditorNode::EditorNode() { EditorHelp::generate_doc(); //before any editor classes are crated SceneState::set_disable_placeholders(true); ResourceLoader::clear_translation_remaps(); //no remaps using during editor + ResourceLoader::clear_path_remaps(); editor_initialize_certificates(); //for asset sharing InputDefault *id = Object::cast_to<InputDefault>(Input::get_singleton()); @@ -5659,6 +5661,7 @@ EditorNode::EditorNode() { add_editor_plugin(memnew(TextureRegionEditorPlugin(this))); add_editor_plugin(memnew(Particles2DEditorPlugin(this))); add_editor_plugin(memnew(GIProbeEditorPlugin(this))); + add_editor_plugin(memnew(BakedLightmapEditorPlugin(this))); add_editor_plugin(memnew(Path2DEditorPlugin(this))); add_editor_plugin(memnew(PathEditorPlugin(this))); add_editor_plugin(memnew(Line2DEditorPlugin(this))); @@ -5715,6 +5718,11 @@ EditorNode::EditorNode() { editor_plugins_force_over = memnew(EditorPluginList); editor_plugins_force_input_forwarding = memnew(EditorPluginList); + Ref<EditorExportTextSceneToBinaryPlugin> export_text_to_binary_plugin; + export_text_to_binary_plugin.instance(); + + EditorExport::get_singleton()->add_export_plugin(export_text_to_binary_plugin); + _edit_current(); current = NULL; diff --git a/editor/editor_node.h b/editor/editor_node.h index 658d5dc0ae..e7ef9eefb5 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -745,8 +745,8 @@ public: static void add_io_error(const String &p_error); - static void progress_add_task(const String &p_task, const String &p_label, int p_steps); - static void progress_task_step(const String &p_task, const String &p_state, int p_step = -1, bool p_force_refresh = true); + static void progress_add_task(const String &p_task, const String &p_label, int p_steps, bool p_can_cancel = false); + static bool progress_task_step(const String &p_task, const String &p_state, int p_step = -1, bool p_force_refresh = true); static void progress_end_task(const String &p_task); static void progress_add_task_bg(const String &p_task, const String &p_label, int p_steps); @@ -807,9 +807,9 @@ public: struct EditorProgress { String task; - void step(const String &p_state, int p_step = -1, bool p_force_refresh = true) { EditorNode::progress_task_step(task, p_state, p_step, p_force_refresh); } - EditorProgress(const String &p_task, const String &p_label, int p_amount) { - EditorNode::progress_add_task(p_task, p_label, p_amount); + bool step(const String &p_state, int p_step = -1, bool p_force_refresh = true) { return EditorNode::progress_task_step(task, p_state, p_step, p_force_refresh); } + EditorProgress(const String &p_task, const String &p_label, int p_amount, bool p_can_cancel = false) { + EditorNode::progress_add_task(p_task, p_label, p_amount, p_can_cancel); task = p_task; } ~EditorProgress() { EditorNode::progress_end_task(task); } diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp index 2aad4774b0..cdb7256329 100644 --- a/editor/export_template_manager.cpp +++ b/editor/export_template_manager.cpp @@ -385,7 +385,7 @@ void ExportTemplateManager::_http_download_templates_completed(int p_status, int template_list_state->set_text(TTR("No response.")); } break; case HTTPRequest::RESULT_REQUEST_FAILED: { - template_list_state->set_text(TTR("Req. Failed.")); + template_list_state->set_text(TTR("Request Failed.")); } break; case HTTPRequest::RESULT_REDIRECT_LIMIT_REACHED: { template_list_state->set_text(TTR("Redirect Loop.")); @@ -465,7 +465,7 @@ void ExportTemplateManager::_notification(int p_what) { break; case HTTPClient::STATUS_CONNECTING: status = TTR("Connecting.."); break; case HTTPClient::STATUS_CANT_CONNECT: - status = TTR("Can't Conect"); + status = TTR("Can't Connect"); errored = true; break; case HTTPClient::STATUS_CONNECTED: status = TTR("Connected"); break; diff --git a/editor/icons/icon_GUI_visibility_hidden.svg b/editor/icons/icon_GUI_visibility_hidden.svg index 2add2e9eb8..61131c77c8 100644 --- a/editor/icons/icon_GUI_visibility_hidden.svg +++ b/editor/icons/icon_GUI_visibility_hidden.svg @@ -1,55 +1,3 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="16" - height="16" - version="1.1" - viewBox="0 0 16 16" - id="svg2" - inkscape:version="0.91 r13725" - sodipodi:docname="icon_GUI_visibility_hidden.svg"> - <metadata - id="metadata12"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title /> - </cc:Work> - </rdf:RDF> - </metadata> - <defs - id="defs10" /> - <sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="1920" - inkscape:window-height="1027" - id="namedview8" - showgrid="false" - inkscape:zoom="14.75" - inkscape:cx="18.882384" - inkscape:cy="7.2939487" - inkscape:window-x="-8" - inkscape:window-y="-8" - inkscape:window-maximized="1" - inkscape:current-layer="svg2" /> - <path - style="color:#000000;text-indent:0;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;text-transform:none;white-space:normal;isolation:auto;mix-blend-mode:normal;solid-color:#000000;fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;color-rendering:auto;image-rendering:auto;shape-rendering:auto" - d="M 8.3320312 2.1328125 C 8.1166713 2.129146 7.900423 2.1368613 7.6855469 2.1542969 C 4.8418629 2.3850399 2.1034153 4.4237115 1.0449219 7.5722656 C 0.98765482 7.7577705 0.9856205 7.9559357 1.0390625 8.1425781 C 1.2458895 8.8664725 1.5352035 9.5092453 1.8730469 10.089844 L 12.501953 3.7890625 C 11.256805 2.6845102 9.797893 2.1577685 8.3320312 2.1328125 z M 14.554688 3.3046875 L 0.7421875 11.507812 L 1.4453125 12.695312 L 15.257812 4.4921875 L 14.554688 3.3046875 z M 14.169922 5.8847656 L 3.6171875 12.140625 C 4.9944165 13.294116 6.6188565 13.867188 8 13.867188 C 10.5 13.867188 13.836536 12.077978 14.960938 8.1425781 C 15.012856 7.9619931 15.012856 7.7704285 14.960938 7.5898438 C 14.731965 6.9583712 14.46336 6.3981967 14.169922 5.8847656 z " - id="path6" /> +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<path d="m7.9998 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.00586 0.5703c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246s5.8365-1.7892 6.9609-5.7246a1.0001 1.0001 0 0 0 0 -0.5527c-1.1003-3.7876-4.4066-5.7227-6.9609-5.7227zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4zm0 2a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2z" color="#000000" color-rendering="auto" fill="#e0e0e0" fill-opacity=".39216" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/> </svg> diff --git a/editor/icons/icon_GUI_visibility_visible.svg b/editor/icons/icon_GUI_visibility_visible.svg index 11ae563779..e3aff37058 100644 --- a/editor/icons/icon_GUI_visibility_visible.svg +++ b/editor/icons/icon_GUI_visibility_visible.svg @@ -1,63 +1,3 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="16" - height="16" - version="1.1" - viewBox="0 0 16 16" - id="svg2" - inkscape:version="0.91 r13725" - sodipodi:docname="icon_visibility_visible.svg"> - <metadata - id="metadata12"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> - </cc:Work> - </rdf:RDF> - </metadata> - <defs - id="defs10" /> - <sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="1920" - inkscape:window-height="1027" - id="namedview8" - showgrid="false" - inkscape:zoom="14.75" - inkscape:cx="15.823281" - inkscape:cy="12.108563" - inkscape:window-x="-8" - inkscape:window-y="-8" - inkscape:window-maximized="1" - inkscape:current-layer="svg2" /> - <g - transform="translate(0 -1036.4)" - id="g4" - style="fill:#e0e0e0;fill-opacity:1"> - <path - transform="translate(0,1036.4)" - d="M 8,2 C 5.4433,2 2.2093,3.9477 1.0449,7.7051 c -0.0572671,0.1855049 -0.059303,0.3836676 -0.00586,0.57031 1.1244,3.9354 4.4609,5.7246 6.9609,5.7246 2.5000004,0 5.8365004,-1.7892 6.9609004,-5.7246 0.05192,-0.180585 0.05192,-0.372145 0,-0.55273 -1.1003,-3.7876 -4.4066,-5.7227 -6.9609004,-5.7227 z m 0,2 c 2.209139,0 4,1.790861 4,4 0,2.209139 -1.790861,4 -4,4 C 5.790861,12 4,10.209139 4,8 4,5.790861 5.790861,4 8,4 Z M 8,6 C 6.8954305,6 6,6.8954305 6,8 6,9.1045695 6.8954305,10 8,10 9.1045695,10 10,9.1045695 10,8 10,6.8954305 9.1045695,6 8,6 Z" - style="color:#000000;text-indent:0;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;text-transform:none;white-space:normal;isolation:auto;mix-blend-mode:normal;solid-color:#000000;fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;color-rendering:auto;image-rendering:auto;shape-rendering:auto" - id="path6" - inkscape:connector-curvature="0" - sodipodi:nodetypes="cccsccccssssssssss" /> - </g> +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<path d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.00586 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246s5.8365-1.7892 6.9609-5.7246a1.0001 1.0001 0 0 0 0 -0.55273c-1.1003-3.7876-4.4066-5.7227-6.9609-5.7227zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4zm0 2a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2z" color="#000000" color-rendering="auto" fill="#e0e0e0" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/> </svg> diff --git a/editor/icons/icon_GUI_visibility_xray.svg b/editor/icons/icon_GUI_visibility_xray.svg index 1fd9fcf1b5..b78709821f 100644 --- a/editor/icons/icon_GUI_visibility_xray.svg +++ b/editor/icons/icon_GUI_visibility_xray.svg @@ -1,61 +1,6 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="16" - height="16" - version="1.1" - viewBox="0 0 16 16" - id="svg2" - inkscape:version="0.91 r13725" - sodipodi:docname="icon_GUI_visibility_xray.svg"> - <metadata - id="metadata12"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title /> - </cc:Work> - </rdf:RDF> - </metadata> - <defs - id="defs10" /> - <sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="1920" - inkscape:window-height="1027" - id="namedview8" - showgrid="false" - inkscape:zoom="7.375" - inkscape:cx="43.019438" - inkscape:cy="-8.9853027" - inkscape:window-x="-8" - inkscape:window-y="-8" - inkscape:window-maximized="1" - inkscape:current-layer="svg2" /> - <g - transform="translate(0.20338214,-1036.671)" - id="g4" - style="fill:#e0e0e0;fill-opacity:1" /> - <path - id="path4154" - style="opacity:1;fill:#e0e0e0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.42799997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - d="m 5.0107427,7.1191578 c -0.084872,0.2859445 -0.1282828,0.5825859 -0.128907,0.8808593 8.579e-4,0.263009 0.034983,0.5248532 0.101563,0.7792969 l 6.0312493,0 C 11.081887,8.5249547 11.116668,8.2631092 11.118164,8.0000171 11.11754,7.7017437 11.074129,7.4051023 10.989257,7.1191578 Z M 7.9999096,2.000005 c -2.5567,0 -5.7907,1.9477 -6.9551,5.7051 -0.057267,0.1855049 -0.059303,0.3836676 -0.00586,0.57031 1.1244,3.9354 4.4609,5.7246 6.9609,5.7246 2.4999994,0 5.8364994,-1.7892 6.9608994,-5.7246 0.05192,-0.180585 0.05192,-0.372145 0,-0.55273 -1.1003,-3.7876 -4.4066,-5.7227 -6.9608994,-5.7227 z m 0,2 c 2.2091384,0 3.9999994,1.790861 3.9999994,4 0,2.209139 -1.790861,4 -3.9999994,4 -2.209139,0 -4,-1.790861 -4,-4 0,-2.209139 1.790861,-4 4,-4 z" - inkscape:connector-curvature="0" - sodipodi:nodetypes="ccccccccccsccccsssss" /> +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<g fill="#e0e0e0" fill-rule="evenodd" shape-rendering="auto"> +<path d="m7.9998 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.00586 0.5703c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246s5.8365-1.7892 6.9609-5.7246a1.0001 1.0001 0 0 0 0 -0.5527c-1.1003-3.7876-4.4066-5.7227-6.9609-5.7227zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4zm0 2a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2z" color="#000000" color-rendering="auto" fill-opacity=".39216" image-rendering="auto" solid-color="#000000" style="isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/> +<path d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.00586 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246v-2a4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4zm0 4a2 2 0 0 0 -2 2 2 2 0 0 0 2 2z" color="#000000" color-rendering="auto" fill-opacity=".99608" image-rendering="auto" solid-color="#000000" style="isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/> +</g> </svg> diff --git a/editor/icons/icon_bake.svg b/editor/icons/icon_bake.svg index 4a9ccfed12..ca5245da10 100644 --- a/editor/icons/icon_bake.svg +++ b/editor/icons/icon_bake.svg @@ -1,5 +1,3 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" d="m2 1v2h12v-2h-12zm-1 3v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-9h-14zm2 1h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm-9 2h10v6h-10v-6zm3 1v1h4v-1h-4z" fill="#e0e0e0"/> -</g> +<path d="m2 1v2h12v-2h-12zm-1 3v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-9h-14zm2 1h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm-9 2h10v6h-10v-6zm3 1v1h4v-1h-4z" fill="#e0e0e0"/> </svg> diff --git a/editor/icons/icon_baked_light.svg b/editor/icons/icon_baked_light.svg deleted file mode 100644 index f5bf07a444..0000000000 --- a/editor/icons/icon_baked_light.svg +++ /dev/null @@ -1,5 +0,0 @@ -<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" d="m2 1v2h12v-2h-12zm-1 3v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-9h-14zm2 1h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm-9 2h10v6h-10v-6zm3 1v1h4v-1h-4z" fill="#fc9c9c"/> -</g> -</svg> diff --git a/editor/icons/icon_baked_light_instance.svg b/editor/icons/icon_baked_light_instance.svg deleted file mode 100644 index f5bf07a444..0000000000 --- a/editor/icons/icon_baked_light_instance.svg +++ /dev/null @@ -1,5 +0,0 @@ -<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" d="m2 1v2h12v-2h-12zm-1 3v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-9h-14zm2 1h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm-9 2h10v6h-10v-6zm3 1v1h4v-1h-4z" fill="#fc9c9c"/> -</g> -</svg> diff --git a/editor/icons/icon_baked_light_sampler.svg b/editor/icons/icon_baked_light_sampler.svg deleted file mode 100644 index 0bf630039d..0000000000 --- a/editor/icons/icon_baked_light_sampler.svg +++ /dev/null @@ -1,5 +0,0 @@ -<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" d="m2 1v2h12v-2h-12zm-1 3v9a2 2 0 0 0 2 2h4v-2h-4v-6h4 6 2v-3h-14zm2 1h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm-6 3v1h1v-1h-1zm4 1a1 1 0 0 0 -1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1 -1v-4a1 1 0 0 0 -1 -1h-4zm3 1a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm-2 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#fc9c9c"/> -</g> -</svg> diff --git a/editor/icons/icon_baked_lightmap.svg b/editor/icons/icon_baked_lightmap.svg new file mode 100644 index 0000000000..6c6586244e --- /dev/null +++ b/editor/icons/icon_baked_lightmap.svg @@ -0,0 +1,3 @@ +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<path d="m2 1v2h12v-2h-12zm-1 3v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-9h-14zm2 1h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm-9 2h10v6h-10v-6zm3 1v1h4v-1h-4z" fill="#fc9c9c"/> +</svg> diff --git a/editor/icons/icon_baked_lightmap_data.svg b/editor/icons/icon_baked_lightmap_data.svg new file mode 100644 index 0000000000..b5ddd24680 --- /dev/null +++ b/editor/icons/icon_baked_lightmap_data.svg @@ -0,0 +1,3 @@ +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<path d="m1 1v2h2v-2h-2zm3 0v2h2v-2h-2zm4 0v2h6v-2h-6zm-7 3v2h2v-2h-2zm3 0v2h2v-2h-2zm4 0v3h5v6h-5v2h5a2 2 0 0 0 2 -2v-9h-7zm1 1h1v1h-1v-1zm3 0h1v1h-1v-1zm-11 2v2h2v-2h-2zm3 0v2h2v-2h-2zm4 1v1h2v-1h-2zm-7 2v2h2v-2h-2zm3 0v2h2v-2h-2zm-3 3v2h2v-2h-2zm3 0v2h2v-2h-2z" fill="#e0e0e0"/> +</svg> diff --git a/editor/icons/icon_editor_handle.svg b/editor/icons/icon_editor_handle.svg index 05f3e2f2cc..f215820ddc 100644 --- a/editor/icons/icon_editor_handle.svg +++ b/editor/icons/icon_editor_handle.svg @@ -1,7 +1,5 @@ <svg width="10" height="10" version="1.1" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1042.4)"> -<ellipse cx="5" cy="1047.4" rx="5" ry="5" fill-opacity=".29412"/> -<ellipse cx="5" cy="1047.4" rx="4" ry="4" fill="#fff"/> -<ellipse cx="5" cy="1047.4" rx="3" ry="3" fill="#ff8484"/> -</g> +<circle cx="5" cy="5" r="5" fill-opacity=".29412"/> +<circle cx="5" cy="5" r="4" fill="#fff"/> +<circle cx="5" cy="5" r="3" fill="#ff8484"/> </svg> diff --git a/editor/icons/icon_editor_handle_add.svg b/editor/icons/icon_editor_handle_add.svg index be61cd53f9..a8bc1fdc9b 100644 --- a/editor/icons/icon_editor_handle_add.svg +++ b/editor/icons/icon_editor_handle_add.svg @@ -1,5 +1,5 @@ <svg width="10" height="10" version="1.1" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> - <circle cx="5" cy="5" r="5" fill-opacity=".29412"/> - <circle cx="5" cy="5" r="4" fill="#474747"/> - <path d="m4 2v2h-2v2h2v2h2v-2h2v-2h-2v-2z" fill="#84ffb1"/> +<circle cx="5" cy="5" r="5" fill-opacity=".29412"/> +<circle cx="5" cy="5" r="4" fill="#474747"/> +<path d="m4 2v2h-2v2h2v2h2v-2h2v-2h-2v-2z" fill="#84ffb1"/> </svg> diff --git a/editor/icons/icon_editor_plugin.svg b/editor/icons/icon_editor_plugin.svg index 528a583a04..e68d787bd3 100644 --- a/editor/icons/icon_editor_plugin.svg +++ b/editor/icons/icon_editor_plugin.svg @@ -1,9 +1,3 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)" fill="#e0e0e0" fill-opacity=".99608"> -<path d="m2 1038.4v8h8v-8z" fill-rule="evenodd" stroke="#e0e0e0" stroke-linejoin="round" stroke-opacity=".99608" stroke-width="2"/> -<circle cx="13" cy="1042.4" r="2"/> -<circle cx="6" cy="1049.4" r="2"/> -<rect x="5" y="1046.4" width="2" height="2"/> -<rect x="10" y="1041.4" width="2" height="2"/> -</g> +<path d="m2 1c-0.55226 1e-4 -0.99994 0.4477-1 1v8c5.52e-5 0.5523 0.44774 0.9999 1 1h3v0.27148a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -1 -1.7305v-0.26953h3c0.55226-1e-4 0.99994-0.4477 1-1v-3h0.27148a2 2 0 0 0 1.7285 1 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-0.26953v-3c-5.5e-5 -0.5523-0.44774-0.9999-1-1h-8z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> </svg> diff --git a/editor/icons/icon_gizmo_baked_lightmap.svg b/editor/icons/icon_gizmo_baked_lightmap.svg new file mode 100644 index 0000000000..cc21b7c1c5 --- /dev/null +++ b/editor/icons/icon_gizmo_baked_lightmap.svg @@ -0,0 +1,4 @@ +<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> +<path d="m18 8c-2.209 2.2e-4 -3.9998 1.791-4 4l0.01563 20h-6.0156c-2.209 2.2e-4 -3.9998 1.791-4 4v71.076c0 9.3065 7.6174 16.924 16.924 16.924h61.076c2.209-2e-4 3.9998-1.791 4-4v-12c-2.21e-4 -2.209-1.791-3.9998-4-4h-58v-40h20v12c2.21e-4 2.209 1.791 3.9998 4 4h32c2.209-2e-4 3.9998-1.791 4-4v-12h20v4c2e-3 0.72576 0.20093 1.4374 0.57617 2.0586-0.19584-6e-3 -0.37901-0.058594-0.57617-0.058594-10.998 0-20 9.0016-20 20-4e-6 0-4e-6 0.0098 0 0.0098 0.0088 6.2734 3.0833 12.01 8 15.756v2.2383c0 2.8834 1.66 5.3456 4 6.75v5.2461c2.21e-4 2.209 1.791 3.9998 4 4h8c2.209-2e-4 3.9998-1.791 4-4v-5.248c2.3405-1.4043 4-3.8682 4-6.752v-2.2344c4.9179-3.7475 7.9931-9.4866 8-15.762 0-7.935-4.7186-14.774-11.459-18h7.459c2.209-2.2e-4 3.9998-1.791 4-4v-32c-2.2e-4 -2.209-1.791-3.9998-4-4l-6-0.003906v-19.996c-2.2e-4 -2.209-1.791-3.9998-4-4zm8 38c1.1519 0 2 0.84806 2 2 3e-6 1.1519-0.84806 2-2 2s-2-0.84806-2-2c-3e-6 -1.1519 0.84806-2 2-2zm25 0c1.1519 0 2 0.84806 2 2 3e-6 1.1519-0.84806 2-2 2s-2-0.84806-2-2c-3e-6 -1.1519 0.84806-2 2-2zm26 0c1.1519 0 2 0.84806 2 2 3e-6 1.1519-0.84806 2-2 2s-2-0.84806-2-2c-3e-6 -1.1519 0.84806-2 2-2zm25 0c1.1519 0 2 0.84806 2 2s-0.84806 2-2 2-2-0.84806-2-2c-3e-6 -1.1519 0.84806-2 2-2zm2 38c3.3611 0 6 2.6388 6 6 0 3.361-2.639 6-6 6-3.361 0-6-2.639-6-6 0-3.3612 2.6389-6 6-6z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill-opacity=".29412" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> +<path d="m18 12v16h92v-16zm-10 24v71.076c0 7.1594 5.7644 12.924 12.924 12.924h61.076v-12h-62v-48h88v8h12v-32zm18 6c3.3137-1e-5 6 2.6863 6 6 9e-6 3.3137-2.6863 6-6 6-3.3137 1e-5 -6-2.6863-6-6-9e-6 -3.3137 2.6863-6 6-6zm25 0c3.3137-1e-5 6 2.6863 6 6 9e-6 3.3137-2.6863 6-6 6-3.3137 1e-5 -6-2.6863-6-6-9e-6 -3.3137 2.6863-6 6-6zm26 0c3.3137-1e-5 6 2.6863 6 6 9e-6 3.3137-2.6863 6-6 6-3.3137 1e-5 -6-2.6863-6-6-9e-6 -3.3137 2.6863-6 6-6zm25 0c3.3137-1e-5 6 2.6863 6 6 1e-5 3.3137-2.6863 6-6 6-3.3137 1e-5 -6-2.6863-6-6-9e-6 -3.3137 2.6863-6 6-6zm-54 26v8h32v-8zm56 6c-8.8365 0-16 7.1634-16 16 8e-3 5.7082 3.0565 10.98 8 13.834v4.166c0 2.216 1.784 4 4 4h8c2.216 0 4-1.784 4-4v-4.1602c4.945-2.855 7.9937-8.1299 8-13.84 0-8.8366-7.1635-16-16-16zm0 6c5.5228 0 10 4.4771 10 10 0 5.5228-4.4772 10-10 10-5.5228 0-10-4.4772-10-10 0-5.5229 4.4772-10 10-10zm-4 36v4h8v-4z" fill="#f7f5cf"/> +</svg> diff --git a/editor/icons/icon_hidden.svg b/editor/icons/icon_hidden.svg deleted file mode 100644 index 8328156e76..0000000000 --- a/editor/icons/icon_hidden.svg +++ /dev/null @@ -1,5 +0,0 @@ -<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" d="m2.9609 7.7266l-1.9219 0.54883c0.31999 1.12 0.8236 2.0593 1.4316 2.8398l-0.83398 0.83398 1.4141 1.4141 0.84375-0.84375c0.98585 0.74762 2.0766 1.2067 3.1055 1.3867v1.0938h2v-1.0938c1.0288-0.17998 2.1196-0.6391 3.1055-1.3867l0.84375 0.84375 1.4141-1.4141-0.83398-0.83398c0.60804-0.78055 1.1117-1.7199 1.4316-2.8398l-1.9219-0.54883c-0.8756 3.0646-3.5391 4.2734-5.0391 4.2734s-4.1635-1.2088-5.0391-4.2734z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> -</g> -</svg> diff --git a/editor/icons/icon_kinematic_body_2d.svg b/editor/icons/icon_kinematic_body_2d.svg index 51026e5f28..0441e499c0 100644 --- a/editor/icons/icon_kinematic_body_2d.svg +++ b/editor/icons/icon_kinematic_body_2d.svg @@ -1,7 +1,7 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -1036.4)"> -<g transform="translate(.49212 -.0044019)" fill="#a5b7f5" fill-opacity=".98824"> -<path transform="translate(0 1036.4)" d="m6 1c-0.55401 0-1 0.44599-1 1v3c0 0.55401 0.44599 1 1 1h1v0.99023a1.0001 1.0001 0 0 0 -0.31641 0.0625l-2.0508 0.68359-0.68359-2.0508a1.0001 1.0001 0 0 0 -0.99023 -0.69727 1.0001 1.0001 0 0 0 -0.9082 1.3281l1 3a1.0001 1.0001 0 0 0 1.2656 0.63281l1.6836-0.56055v0.61133c0 0.04088 0.018715 0.07566 0.023437 0.11523l-4.5781 3.0527a1.0001 1.0001 0 1 0 1.1094 1.6641l5.0566-3.3711 1.4941 2.9863a1.0001 1.0001 0 0 0 1.2109 0.50195l3-1a1.0001 1.0001 0 1 0 -0.63281 -1.8965l-2.1777 0.72461-0.97461-1.9512c0.2759-0.17764 0.46875-0.47227 0.46875-0.82617v-1h1.3828l0.72266 1.4473a1.0001 1.0001 0 1 0 1.7891 -0.89453l-1-2a1.0001 1.0001 0 0 0 -0.89453 -0.55273h-3v-1h1c0.55401 0 1-0.44599 1-1v-3c0-0.55401-0.44599-1-1-1zm0 2h1v2h-1z" fill="#a5b7f5" fill-opacity=".98824"/> +<g transform="translate(.49212 -.0044019)" fill="#a5b7f3"> +<path transform="translate(0 1036.4)" d="m6 1c-0.55401 0-1 0.44599-1 1v3c0 0.55401 0.44599 1 1 1h1v0.99023a1.0001 1.0001 0 0 0 -0.31641 0.0625l-2.0508 0.68359-0.68359-2.0508a1.0001 1.0001 0 0 0 -0.99023 -0.69727 1.0001 1.0001 0 0 0 -0.9082 1.3281l1 3a1.0001 1.0001 0 0 0 1.2656 0.63281l1.6836-0.56055v0.61133c0 0.04088 0.018715 0.07566 0.023437 0.11523l-4.5781 3.0527a1.0001 1.0001 0 1 0 1.1094 1.6641l5.0566-3.3711 1.4941 2.9863a1.0001 1.0001 0 0 0 1.2109 0.50195l3-1a1.0001 1.0001 0 1 0 -0.63281 -1.8965l-2.1777 0.72461-0.97461-1.9512c0.2759-0.17764 0.46875-0.47227 0.46875-0.82617v-1h1.3828l0.72266 1.4473a1.0001 1.0001 0 1 0 1.7891 -0.89453l-1-2a1.0001 1.0001 0 0 0 -0.89453 -0.55273h-3v-1h1c0.55401 0 1-0.44599 1-1v-3c0-0.55401-0.44599-1-1-1zm0 2h1v2h-1z" fill="#a5b7f3"/> </g> </g> </svg> diff --git a/editor/icons/icon_plugin_script.svg b/editor/icons/icon_plugin_script.svg new file mode 100644 index 0000000000..763cca3a92 --- /dev/null +++ b/editor/icons/icon_plugin_script.svg @@ -0,0 +1,3 @@ +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<path d="m7 1l-0.56445 2.2578c-0.23643 0.075851-0.46689 0.16921-0.68945 0.2793l-1.9883-1.1934-1.4141 1.4141 1.1953 1.9941c-0.11191 0.22113-0.20723 0.45028-0.28516 0.68555l-2.2539 0.5625v2l2.2578 0.56445c0.048141 0.14946 0.11579 0.29137 0.17773 0.43555h0.58789c0.51595-0.6841 1.1988-1.2456 2.0195-1.5957-0.028019-0.13296-0.042416-0.26842-0.042969-0.4043 9.6e-6 -1.1046 0.89543-2 2-2 1.1046 9.6e-6 2 0.89543 2 2-1.737e-4 0.1345-0.013915 0.26865-0.041016 0.40039 0.82295 0.35108 1.509 0.91301 2.0254 1.5996h0.58008c0.063668-0.14463 0.13192-0.2874 0.18164-0.4375l2.2539-0.5625v-2l-2.2578-0.56445c-0.075942-0.23577-0.1693-0.46557-0.2793-0.6875l1.1934-1.9902-1.4141-1.4141-1.9941 1.1953c-0.22113-0.11191-0.45028-0.20723-0.68555-0.28516l-0.5625-2.2539h-2zm1 6a1 1 0 0 0 -0.99805 0.92969 1 1 0 0 0 -0.0019531 0.070312v2.1738a3 3 0 0 0 -2 2.8262h1v2h1v-2h2v2h1v-2h1a3 3 0 0 0 -0.015625 -0.29883 3 3 0 0 0 -1.9844 -2.5254v-2.1758a1 1 0 0 0 -1 -1z" fill="#e0e0e0"/> +</svg> diff --git a/editor/icons/icon_proxy_texture.svg b/editor/icons/icon_proxy_texture.svg new file mode 100644 index 0000000000..15ed5e7f2b --- /dev/null +++ b/editor/icons/icon_proxy_texture.svg @@ -0,0 +1,5 @@ +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m1 1v4h4v-4h-4zm6 0v2h6v8h-6v4h7a1 1 0 0 0 1 -1v-12a1 1 0 0 0 -1 -1h-7zm2 4v1h-1v1h-1v3h1 2 2v-2h-1v-2h-1v-1h-1zm-8 1v4h4v-4h-4zm0 5v4h4v-4h-4z" fill="#e0e0e0" fill-opacity=".99608"/> +</g> +</svg> diff --git a/editor/icons/icon_sprite.svg b/editor/icons/icon_sprite.svg index 09fc2f0979..11ad42ec98 100644 --- a/editor/icons/icon_sprite.svg +++ b/editor/icons/icon_sprite.svg @@ -1,3 +1,3 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<path d="m5 1c-2.216 0-4 1.784-4 4v6c0 2.216 1.784 4 4 4h6c2.216 0 4-1.784 4-4v-6c0-2.216-1.784-4-4-4h-6zm-1 5c0.554 0 1 0.446 1 1v2c0 0.554-0.446 1-1 1s-1-0.446-1-1v-2c0-0.554 0.446-1 1-1zm8 0c0.554 0 1 0.446 1 1v2c0 0.554-0.446 1-1 1s-1-0.446-1-1v-2c0-0.554 0.446-1 1-1zm-1.8887 5.1074a1.0001 1.0001 0 0 1 0.7168 1.7207c-0.74987 0.74987-1.7676 1.1719-2.8281 1.1719s-2.0783-0.422-2.8281-1.1719a1.0001 1.0001 0 0 1 0.69727 -1.7168 1.0001 1.0001 0 0 1 0.7168 0.30273c0.37534 0.37535 0.88325 0.58594 1.4141 0.58594s1.0387-0.21059 1.4141-0.58594a1.0001 1.0001 0 0 1 0.69727 -0.30664z" fill="#a5b7f6" fill-opacity=".98824"/> +<path d="m5 1c-2.216 0-4 1.784-4 4v6c0 2.216 1.784 4 4 4h6c2.216 0 4-1.784 4-4v-6c0-2.216-1.784-4-4-4h-6zm-1 5c0.554 0 1 0.446 1 1v2c0 0.554-0.446 1-1 1s-1-0.446-1-1v-2c0-0.554 0.446-1 1-1zm8 0c0.554 0 1 0.446 1 1v2c0 0.554-0.446 1-1 1s-1-0.446-1-1v-2c0-0.554 0.446-1 1-1zm-1.8887 5.1074a1.0001 1.0001 0 0 1 0.7168 1.7207c-0.74987 0.74987-1.7676 1.1719-2.8281 1.1719s-2.0783-0.422-2.8281-1.1719a1.0001 1.0001 0 0 1 0.69727 -1.7168 1.0001 1.0001 0 0 1 0.7168 0.30273c0.37534 0.37535 0.88325 0.58594 1.4141 0.58594s1.0387-0.21059 1.4141-0.58594a1.0001 1.0001 0 0 1 0.69727 -0.30664z" fill="#a5b7f3"/> </svg> diff --git a/editor/icons/icon_visible.svg b/editor/icons/icon_visible.svg deleted file mode 100644 index 7d157d7b7f..0000000000 --- a/editor/icons/icon_visible.svg +++ /dev/null @@ -1,5 +0,0 @@ -<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246s5.8365-1.7892 6.9609-5.7246a1.0001 1.0001 0 0 0 0 -0.55273c-1.1003-3.7876-4.4066-5.7227-6.9609-5.7227zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4zm0 2a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2z" color="#000000" color-rendering="auto" fill="#e0e0e0" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/> -</g> -</svg> diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 08d2897250..ed7c6dba79 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -1165,8 +1165,8 @@ void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, in r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "meshes/compress"), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "meshes/ensure_tangents"), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "meshes/storage", PROPERTY_HINT_ENUM, "Built-In,Files"), meshes_out ? 1 : 0)); - r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "meshes/light_baking", PROPERTY_HINT_ENUM, "Disabled,Enable,Gen Lightmaps"), 0)); - r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "meshes/lightmap_texel_size", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 0.05)); + r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "meshes/light_baking", PROPERTY_HINT_ENUM, "Disabled,Enable,Gen Lightmaps", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0)); + r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "meshes/lightmap_texel_size", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 0.1)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "external_files/store_in_subdir"), false)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/import", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "animation/fps", PROPERTY_HINT_RANGE, "1,120,1"), 15)); diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index 3ab8f318a7..f04bc04d92 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -340,7 +340,7 @@ void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int } break; case HTTPRequest::RESULT_REQUEST_FAILED: { error_text = TTR("Request failed, return code:") + " " + itos(p_code); - status->set_text(TTR("Req. Failed.")); + status->set_text(TTR("Request Failed.")); } break; case HTTPRequest::RESULT_REDIRECT_LIMIT_REACHED: { error_text = TTR("Request failed, too many redirects"); diff --git a/editor/plugins/baked_lightmap_editor_plugin.cpp b/editor/plugins/baked_lightmap_editor_plugin.cpp new file mode 100644 index 0000000000..08f4d06ef7 --- /dev/null +++ b/editor/plugins/baked_lightmap_editor_plugin.cpp @@ -0,0 +1,95 @@ +#include "baked_lightmap_editor_plugin.h" + +void BakedLightmapEditorPlugin::_bake() { + + if (lightmap) { + BakedLightmap::BakeError err; + if (get_tree()->get_edited_scene_root() && get_tree()->get_edited_scene_root() == lightmap) { + err = lightmap->bake(lightmap); + } else { + err = lightmap->bake(lightmap->get_parent()); + } + + switch (err) { + case BakedLightmap::BAKE_ERROR_NO_SAVE_PATH: + EditorNode::get_singleton()->show_warning(TTR("Can't determine a save path for lightmap images.\nSave your scene (for images to be saved in the same dir), or pick a save path from the BakedLightmap properties.")); + break; + case BakedLightmap::BAKE_ERROR_NO_MESHES: + EditorNode::get_singleton()->show_warning(TTR("No meshes to bake. Make sure they contain an UV2 channel and that the 'Bake Light' flag is on.")); + break; + case BakedLightmap::BAKE_ERROR_CANT_CREATE_IMAGE: + EditorNode::get_singleton()->show_warning(TTR("Failed creating lightmap images, make sure path is writable.")); + break; + defaut : {} + } + } +} + +void BakedLightmapEditorPlugin::edit(Object *p_object) { + + BakedLightmap *s = Object::cast_to<BakedLightmap>(p_object); + if (!s) + return; + + lightmap = s; +} + +bool BakedLightmapEditorPlugin::handles(Object *p_object) const { + + return p_object->is_class("BakedLightmap"); +} + +void BakedLightmapEditorPlugin::make_visible(bool p_visible) { + + if (p_visible) { + bake->show(); + } else { + + bake->hide(); + } +} + +EditorProgress *BakedLightmapEditorPlugin::tmp_progress = NULL; + +void BakedLightmapEditorPlugin::bake_func_begin(int p_steps) { + + ERR_FAIL_COND(tmp_progress != NULL); + + tmp_progress = memnew(EditorProgress("bake_lightmaps", TTR("Bake Lightmaps"), p_steps, true)); +} + +bool BakedLightmapEditorPlugin::bake_func_step(int p_step, const String &p_description) { + + ERR_FAIL_COND_V(tmp_progress == NULL, false); + return tmp_progress->step(p_description, p_step); +} + +void BakedLightmapEditorPlugin::bake_func_end() { + ERR_FAIL_COND(tmp_progress == NULL); + memdelete(tmp_progress); + tmp_progress = NULL; +} + +void BakedLightmapEditorPlugin::_bind_methods() { + + ClassDB::bind_method("_bake", &BakedLightmapEditorPlugin::_bake); +} + +BakedLightmapEditorPlugin::BakedLightmapEditorPlugin(EditorNode *p_node) { + + editor = p_node; + bake = memnew(Button); + bake->set_icon(editor->get_gui_base()->get_icon("Bake", "EditorIcons")); + bake->set_text(TTR("Bake Lightmaps")); + bake->hide(); + bake->connect("pressed", this, "_bake"); + add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU, bake); + lightmap = NULL; + + BakedLightmap::bake_begin_function = bake_func_begin; + BakedLightmap::bake_step_function = bake_func_step; + BakedLightmap::bake_end_function = bake_func_end; +} + +BakedLightmapEditorPlugin::~BakedLightmapEditorPlugin() { +} diff --git a/editor/plugins/baked_lightmap_editor_plugin.h b/editor/plugins/baked_lightmap_editor_plugin.h new file mode 100644 index 0000000000..d64c33884a --- /dev/null +++ b/editor/plugins/baked_lightmap_editor_plugin.h @@ -0,0 +1,39 @@ +#ifndef BAKED_LIGHTMAP_EDITOR_PLUGIN_H +#define BAKED_LIGHTMAP_EDITOR_PLUGIN_H + +#include "editor/editor_node.h" +#include "editor/editor_plugin.h" +#include "scene/3d/baked_lightmap.h" +#include "scene/resources/material.h" + +class BakedLightmapEditorPlugin : public EditorPlugin { + + GDCLASS(BakedLightmapEditorPlugin, EditorPlugin); + + BakedLightmap *lightmap; + + Button *bake; + EditorNode *editor; + + static EditorProgress *tmp_progress; + static void bake_func_begin(int p_steps); + static bool bake_func_step(int p_step, const String &p_description); + static void bake_func_end(); + + void _bake(); + +protected: + static void _bind_methods(); + +public: + virtual String get_name() const { return "BakedLightmap"; } + bool has_main_screen() const { return false; } + virtual void edit(Object *p_object); + virtual bool handles(Object *p_object) const; + virtual void make_visible(bool p_visible); + + BakedLightmapEditorPlugin(EditorNode *p_node); + ~BakedLightmapEditorPlugin(); +}; + +#endif // BAKED_LIGHTMAP_EDITOR_PLUGIN_H diff --git a/editor/plugins/gi_probe_editor_plugin.cpp b/editor/plugins/gi_probe_editor_plugin.cpp index 443cd2e41f..416b0edb20 100644 --- a/editor/plugins/gi_probe_editor_plugin.cpp +++ b/editor/plugins/gi_probe_editor_plugin.cpp @@ -90,7 +90,7 @@ GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) { editor = p_node; bake = memnew(Button); - bake->set_icon(editor->get_gui_base()->get_icon("BakedLight", "EditorIcons")); + bake->set_icon(editor->get_gui_base()->get_icon("Bake", "EditorIcons")); bake->set_text(TTR("Bake GI Probe")); bake->hide(); bake->connect("pressed", this, "_bake"); diff --git a/editor/plugins/particles_2d_editor_plugin.cpp b/editor/plugins/particles_2d_editor_plugin.cpp index 5eaa248224..ff8a9f93d6 100644 --- a/editor/plugins/particles_2d_editor_plugin.cpp +++ b/editor/plugins/particles_2d_editor_plugin.cpp @@ -77,11 +77,6 @@ void Particles2DEditorPlugin::_menu_callback(int p_idx) { case MENU_CLEAR_EMISSION_MASK: { emission_mask->popup_centered_minsize(); - - /*undo_redo->create_action(TTR("Clear Emission Mask")); - undo_redo->add_do_method(particles, "set_emission_points", PoolVector<Vector2>()); - undo_redo->add_undo_method(particles, "set_emission_points", particles->get_emission_points()); - undo_redo->commit_action();*/ } break; } } @@ -309,14 +304,6 @@ void Particles2DEditorPlugin::_generate_emission_mask() { } else { pm->set_emission_shape(ParticlesMaterial::EMISSION_SHAPE_POINTS); } - - /*undo_redo->create_action(TTR("Set Emission Mask")); - undo_redo->add_do_method(particles, "set_emission_points", epoints); - undo_redo->add_do_method(particles, "set_emission_half_extents", extents); - undo_redo->add_undo_method(particles, "set_emission_points", particles->get_emission_points()); - undo_redo->add_undo_method(particles, "set_emission_half_extents", particles->get_emission_half_extents()); - undo_redo->commit_action(); - */ } void Particles2DEditorPlugin::_notification(int p_what) { diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp index f4a9960087..52eba099c6 100644 --- a/editor/plugins/particles_editor_plugin.cpp +++ b/editor/plugins/particles_editor_plugin.cpp @@ -40,11 +40,6 @@ void ParticlesEditor::_node_removed(Node *p_node) { } } -void ParticlesEditor::_resource_seleted(const String &p_res) { - - //print_line("selected resource path: "+p_res); -} - void ParticlesEditor::_node_selected(const NodePath &p_path) { Node *sel = get_node(p_path); @@ -84,23 +79,6 @@ void ParticlesEditor::_node_selected(const NodePath &p_path) { emission_dialog->popup_centered(Size2(300, 130)); } -/* - -void ParticlesEditor::_populate() { - - if(!node) - return; - - - if (node->get_particles().is_null()) - return; - - node->get_particles()->set_instance_count(populate_amount->get_text().to_int()); - node->populate_parent(populate_rotate_random->get_val(),populate_tilt_random->get_val(),populate_scale_random->get_text().to_double(),populate_scale->get_text().to_double()); - -} -*/ - void ParticlesEditor::_notification(int p_notification) { if (p_notification == NOTIFICATION_ENTER_TREE) { @@ -132,13 +110,7 @@ void ParticlesEditor::_menu_option(int p_option) { EditorNode::get_singleton()->show_warning(TTR("A processor material of type 'ParticlesMaterial' is required.")); return; } - /* - Node *root = get_scene()->get_root_node(); - ERR_FAIL_COND(!root); - EditorNode *en = Object::cast_to<EditorNode>(root); - ERR_FAIL_COND(!en); - Node * node = en->get_edited_scene(); -*/ + emission_tree_dialog->popup_centered_ratio(); } break; @@ -365,20 +337,14 @@ void ParticlesEditor::_generate_emission_points() { material->set_emission_point_count(point_count); material->set_emission_point_texture(tex); } - - //print_line("point count: "+itos(points.size())); - //node->set_emission_points(points); } void ParticlesEditor::_bind_methods() { ClassDB::bind_method("_menu_option", &ParticlesEditor::_menu_option); - ClassDB::bind_method("_resource_seleted", &ParticlesEditor::_resource_seleted); ClassDB::bind_method("_node_selected", &ParticlesEditor::_node_selected); ClassDB::bind_method("_generate_emission_points", &ParticlesEditor::_generate_emission_points); ClassDB::bind_method("_generate_aabb", &ParticlesEditor::_generate_aabb); - - //ClassDB::bind_method("_populate",&ParticlesEditor::_populate); } ParticlesEditor::ParticlesEditor() { @@ -394,8 +360,6 @@ ParticlesEditor::ParticlesEditor() { options->get_popup()->add_separator(); options->get_popup()->add_item(TTR("Create Emission Points From Mesh"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH); options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE); - // options->get_popup()->add_item(TTR("Clear Emitter"), MENU_OPTION_CLEAR_EMISSION_VOLUME); - options->get_popup()->connect("id_pressed", this, "_menu_option"); emission_dialog = memnew(ConfirmationDialog); @@ -420,7 +384,6 @@ ParticlesEditor::ParticlesEditor() { emission_dialog->connect("confirmed", this, "_generate_emission_points"); err_dialog = memnew(ConfirmationDialog); - //err_dialog->get_cancel()->hide(); add_child(err_dialog); emission_file_dialog = memnew(EditorFileDialog); @@ -454,9 +417,6 @@ ParticlesEditor::ParticlesEditor() { add_child(generate_aabb); generate_aabb->connect("confirmed", this, "_generate_aabb"); - - //options->set_anchor(MARGIN_LEFT,Control::ANCHOR_END); - //options->set_anchor(MARGIN_RIGHT,Control::ANCHOR_END); } void ParticlesEditorPlugin::edit(Object *p_object) { diff --git a/editor/plugins/particles_editor_plugin.h b/editor/plugins/particles_editor_plugin.h index 2c8ce88eb2..a65538c7fa 100644 --- a/editor/plugins/particles_editor_plugin.h +++ b/editor/plugins/particles_editor_plugin.h @@ -73,7 +73,6 @@ class ParticlesEditor : public Control { void _generate_aabb(); void _generate_emission_points(); - void _resource_seleted(const String &p_res); void _node_selected(const NodePath &p_path); void _menu_option(int); diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 95f2739927..17b0e986e7 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -924,26 +924,7 @@ void ScriptTextEditor::_edit_option(int p_op) { if (scr.is_null()) return; - tx->begin_complex_operation(); - if (tx->is_selection_active()) { - tx->indent_selection_left(); - } else { - int begin = tx->cursor_get_line(); - String line_text = tx->get_line(begin); - // begins with tab - if (line_text.begins_with("\t")) { - line_text = line_text.substr(1, line_text.length()); - tx->set_line(begin, line_text); - } - // begins with 4 spaces - else if (line_text.begins_with(" ")) { - line_text = line_text.substr(4, line_text.length()); - tx->set_line(begin, line_text); - } - } - tx->end_complex_operation(); - tx->update(); - //tx->deselect(); + tx->indent_left(); } break; case EDIT_INDENT_RIGHT: { @@ -951,18 +932,7 @@ void ScriptTextEditor::_edit_option(int p_op) { if (scr.is_null()) return; - tx->begin_complex_operation(); - if (tx->is_selection_active()) { - tx->indent_selection_right(); - } else { - int begin = tx->cursor_get_line(); - String line_text = tx->get_line(begin); - line_text = '\t' + line_text; - tx->set_line(begin, line_text); - } - tx->end_complex_operation(); - tx->update(); - //tx->deselect(); + tx->indent_right(); } break; case EDIT_DELETE_LINE: { @@ -1503,14 +1473,15 @@ void ScriptTextEditor::_make_context_menu(bool p_selection, bool p_color, bool p context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/select_all"), EDIT_SELECT_ALL); context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo"), EDIT_UNDO); context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/redo"), EDIT_REDO); + context_menu->add_separator(); + context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left"), EDIT_INDENT_LEFT); + context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right"), EDIT_INDENT_RIGHT); + context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT); if (p_selection) { context_menu->add_separator(); context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_to_uppercase"), EDIT_TO_UPPERCASE); context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_to_lowercase"), EDIT_TO_LOWERCASE); - context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left"), EDIT_INDENT_LEFT); - context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right"), EDIT_INDENT_RIGHT); - context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT); } if (p_can_fold || p_is_folded) context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_fold_line"), EDIT_TOGGLE_FOLD_LINE); diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index b390070b4a..3e00776dfd 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -161,7 +161,7 @@ void ShaderTextEditor::_load_theme_settings() { for (const Map<StringName, ShaderLanguage::FunctionInfo>::Element *E = ShaderTypes::get_singleton()->get_functions(VisualServer::ShaderMode(shader->get_mode())).front(); E; E = E->next()) { - for (const Map<StringName, ShaderLanguage::DataType>::Element *F = E->get().built_ins.front(); F; F = F->next()) { + for (const Map<StringName, ShaderLanguage::BuiltInInfo>::Element *F = E->get().built_ins.front(); F; F = F->next()) { keywords.push_back(F->key()); } } @@ -379,26 +379,7 @@ void ShaderEditor::_menu_option(int p_option) { if (shader.is_null()) return; - tx->begin_complex_operation(); - if (tx->is_selection_active()) { - tx->indent_selection_left(); - } else { - int begin = tx->cursor_get_line(); - String line_text = tx->get_line(begin); - // begins with tab - if (line_text.begins_with("\t")) { - line_text = line_text.substr(1, line_text.length()); - tx->set_line(begin, line_text); - } - // begins with 4 spaces - else if (line_text.begins_with(" ")) { - line_text = line_text.substr(4, line_text.length()); - tx->set_line(begin, line_text); - } - } - tx->end_complex_operation(); - tx->update(); - //tx->deselect(); + tx->indent_left(); } break; case EDIT_INDENT_RIGHT: { @@ -407,18 +388,7 @@ void ShaderEditor::_menu_option(int p_option) { if (shader.is_null()) return; - tx->begin_complex_operation(); - if (tx->is_selection_active()) { - tx->indent_selection_right(); - } else { - int begin = tx->cursor_get_line(); - String line_text = tx->get_line(begin); - line_text = '\t' + line_text; - tx->set_line(begin, line_text); - } - tx->end_complex_operation(); - tx->update(); - //tx->deselect(); + tx->indent_right(); } break; case EDIT_DELETE_LINE: { diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index 4d06342fe0..40abc4026a 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -751,6 +751,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) { if (id != TileMap::INVALID_CELL) { + _set_cell(over_tile, id, flip_h, flip_v, transpose); undo_redo->add_do_method(node, "set", "tile_data", node->get("tile_data")); undo_redo->commit_action(); diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index b8c57fd959..ae726b69ef 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -244,7 +244,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { MenuButton *options = memnew(MenuButton); panel->add_child(options); options->set_position(Point2(1, 1)); - options->set_text("Theme"); + options->set_text(TTR("Tile Set")); options->get_popup()->add_item(TTR("Add Item"), MENU_OPTION_ADD_ITEM); options->get_popup()->add_item(TTR("Remove Item"), MENU_OPTION_REMOVE_ITEM); options->get_popup()->add_separator(); diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp index 09f5375bb4..2c2e5a7c9b 100644 --- a/editor/progress_dialog.cpp +++ b/editor/progress_dialog.cpp @@ -163,7 +163,7 @@ void ProgressDialog::_popup() { popup_centered(ms); } -void ProgressDialog::add_task(const String &p_task, const String &p_label, int p_steps) { +void ProgressDialog::add_task(const String &p_task, const String &p_label, int p_steps, bool p_can_cancel) { ERR_FAIL_COND(tasks.has(p_task)); Task t; @@ -180,17 +180,24 @@ void ProgressDialog::add_task(const String &p_task, const String &p_label, int p main->add_child(t.vb); tasks[p_task] = t; + if (p_can_cancel) { + cancel_hb->show(); + } else { + cancel_hb->hide(); + } + cancel_hb->raise(); + cancelled = false; _popup(); } -void ProgressDialog::task_step(const String &p_task, const String &p_state, int p_step, bool p_force_redraw) { +bool ProgressDialog::task_step(const String &p_task, const String &p_state, int p_step, bool p_force_redraw) { - ERR_FAIL_COND(!tasks.has(p_task)); + ERR_FAIL_COND_V(!tasks.has(p_task), cancelled); if (!p_force_redraw) { uint64_t tus = OS::get_singleton()->get_ticks_usec(); if (tus - last_progress_tick < 50000) //50ms - return; + return cancelled; } Task &t = tasks[p_task]; @@ -201,7 +208,11 @@ void ProgressDialog::task_step(const String &p_task, const String &p_state, int t.state->set_text(p_state); last_progress_tick = OS::get_singleton()->get_ticks_usec(); + if (cancel_hb->is_visible()) { + OS::get_singleton()->force_process_input(); + } Main::iteration(); // this will not work on a lot of platforms, so it's only meant for the editor + return cancelled; } void ProgressDialog::end_task(const String &p_task) { @@ -218,6 +229,14 @@ void ProgressDialog::end_task(const String &p_task) { _popup(); } +void ProgressDialog::_cancel_pressed() { + cancelled = true; +} + +void ProgressDialog::_bind_methods() { + ClassDB::bind_method("_cancel_pressed", &ProgressDialog::_cancel_pressed); +} + ProgressDialog::ProgressDialog() { main = memnew(VBoxContainer); @@ -226,4 +245,13 @@ ProgressDialog::ProgressDialog() { set_exclusive(true); last_progress_tick = 0; singleton = this; + cancel_hb = memnew(HBoxContainer); + main->add_child(cancel_hb); + cancel_hb->hide(); + cancel = memnew(Button); + cancel_hb->add_spacer(); + cancel_hb->add_child(cancel); + cancel->set_text(TTR("Cancel")); + cancel_hb->add_spacer(); + cancel->connect("pressed", this, "_cancel_pressed"); } diff --git a/editor/progress_dialog.h b/editor/progress_dialog.h index 8ac0907145..b13ea606bc 100644 --- a/editor/progress_dialog.h +++ b/editor/progress_dialog.h @@ -31,6 +31,7 @@ #define PROGRESS_DIALOG_H #include "scene/gui/box_container.h" +#include "scene/gui/button.h" #include "scene/gui/label.h" #include "scene/gui/popup.h" #include "scene/gui/progress_bar.h" @@ -76,6 +77,8 @@ class ProgressDialog : public Popup { ProgressBar *progress; Label *state; }; + HBoxContainer *cancel_hb; + Button *cancel; Map<String, Task> tasks; VBoxContainer *main; @@ -84,13 +87,17 @@ class ProgressDialog : public Popup { static ProgressDialog *singleton; void _popup(); + void _cancel_pressed(); + bool cancelled; + protected: void _notification(int p_what); + static void _bind_methods(); public: static ProgressDialog *get_singleton() { return singleton; } - void add_task(const String &p_task, const String &p_label, int p_steps); - void task_step(const String &p_task, const String &p_state, int p_step = -1, bool p_force_redraw = true); + void add_task(const String &p_task, const String &p_label, int p_steps, bool p_can_cancel = false); + bool task_step(const String &p_task, const String &p_state, int p_step = -1, bool p_force_redraw = true); void end_task(const String &p_task); ProgressDialog(); diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 76fd20ca12..1a7b7f3575 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -531,7 +531,7 @@ void ProjectSettingsEditor::_action_button_pressed(Object *p_obj, int p_column, Variant old_val = ProjectSettings::get_singleton()->get(name); int order = ProjectSettings::get_singleton()->get_order(name); - undo_redo->create_action(TTR("Add Input Action")); + undo_redo->create_action(TTR("Erase Input Action")); undo_redo->add_do_method(ProjectSettings::get_singleton(), "clear", name); undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set", name, old_val); undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_order", name, order); @@ -852,7 +852,7 @@ void ProjectSettingsEditor::_action_add() { Array va; String name = "input/" + action_name->get_text(); - undo_redo->create_action(TTR("Add Input Action Event")); + undo_redo->create_action(TTR("Add Input Action")); undo_redo->add_do_method(ProjectSettings::get_singleton(), "set", name, va); undo_redo->add_undo_method(ProjectSettings::get_singleton(), "clear", name); undo_redo->add_do_method(this, "_update_actions"); diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 59acd9ded9..d22bee40d9 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -900,10 +900,10 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: int id = TYPE_BASE_ID + idx; if (has_icon(t, "EditorIcons")) { - menu->add_icon_item(get_icon(t, "EditorIcons"), TTR("New") + " " + t, id); + menu->add_icon_item(get_icon(t, "EditorIcons"), vformat(TTR("New %s"), t), id); } else { - menu->add_item(TTR("New") + " " + t, id); + menu->add_item(vformat(TTR("New %s"), t), id); } idx++; @@ -2831,7 +2831,7 @@ void PropertyEditor::update_tree() { class_descr_cache[type] = descr.word_wrap(80); } - sep->set_tooltip(0, TTR("Class:") + " " + p.name + ":\n\n" + class_descr_cache[type]); + sep->set_tooltip(0, TTR("Class:") + " " + p.name + (class_descr_cache[type] == "" ? "" : "\n\n" + class_descr_cache[type])); } continue; @@ -2963,7 +2963,7 @@ void PropertyEditor::update_tree() { descr_cache[classname][propname] = descr; } - item->set_tooltip(0, TTR("Property:") + " " + p.name + "\n\n" + descr); + item->set_tooltip(0, TTR("Property:") + " " + p.name + (descr == "" ? "" : "\n\n" + descr)); } Dictionary d; diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index 25924212fd..827e8d9ee4 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -256,9 +256,9 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) { bool v = p_node->call("is_visible"); if (v) - item->add_button(0, get_icon("Visible", "EditorIcons"), BUTTON_VISIBILITY, false, TTR("Toggle Visibility")); + item->add_button(0, get_icon("GuiVisibilityVisible", "EditorIcons"), BUTTON_VISIBILITY, false, TTR("Toggle Visibility")); else - item->add_button(0, get_icon("Hidden", "EditorIcons"), BUTTON_VISIBILITY, false, TTR("Toggle Visibility")); + item->add_button(0, get_icon("GuiVisibilityHidden", "EditorIcons"), BUTTON_VISIBILITY, false, TTR("Toggle Visibility")); if (!p_node->is_connected("visibility_changed", this, "_node_visibility_changed")) p_node->connect("visibility_changed", this, "_node_visibility_changed", varray(p_node)); @@ -272,9 +272,9 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) { bool v = p_node->call("is_visible"); if (v) - item->add_button(0, get_icon("Visible", "EditorIcons"), BUTTON_VISIBILITY, false, TTR("Toggle Visibility")); + item->add_button(0, get_icon("GuiVisibilityVisible", "EditorIcons"), BUTTON_VISIBILITY, false, TTR("Toggle Visibility")); else - item->add_button(0, get_icon("Hidden", "EditorIcons"), BUTTON_VISIBILITY, false, TTR("Toggle Visibility")); + item->add_button(0, get_icon("GuiVisibilityHidden", "EditorIcons"), BUTTON_VISIBILITY, false, TTR("Toggle Visibility")); if (!p_node->is_connected("visibility_changed", this, "_node_visibility_changed")) p_node->connect("visibility_changed", this, "_node_visibility_changed", varray(p_node)); @@ -337,9 +337,9 @@ void SceneTreeEditor::_node_visibility_changed(Node *p_node) { } if (visible) - item->set_button(0, idx, get_icon("Visible", "EditorIcons")); + item->set_button(0, idx, get_icon("GuiVisibilityVisible", "EditorIcons")); else - item->set_button(0, idx, get_icon("Hidden", "EditorIcons")); + item->set_button(0, idx, get_icon("GuiVisibilityHidden", "EditorIcons")); _update_visibility_color(p_node, item); } @@ -774,9 +774,11 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from Node *n = get_node(np); if (n) { - - selected.push_back(n); - icons.push_back(next->get_icon(0)); + // Only allow selection if not part of an instanced scene. + if (!n->get_owner() || n->get_owner() == get_scene_node() || n->get_owner()->get_filename() == String()) { + selected.push_back(n); + icons.push_back(next->get_icon(0)); + } } next = tree->get_next_selected(next); } diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index 3cab14b0c4..25e63319d0 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -331,6 +331,12 @@ void ScriptCreateDialog::_file_selected(const String &p_file) { } else { file_path->set_text(p); _path_changed(p); + + String filename = p.get_file().get_basename(); + int select_start = p.find_last(filename); + file_path->select(select_start, select_start + filename.length()); + file_path->set_cursor_position(select_start + filename.length()); + file_path->grab_focus(); } } @@ -459,7 +465,7 @@ void ScriptCreateDialog::_update_dialog() { script_ok = false; } } - if (has_named_classes && (!is_class_name_valid)) { + if (has_named_classes && (is_new_script_created && !is_class_name_valid)) { _msg_script_valid(false, TTR("Invalid class name")); script_ok = false; } diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp index f785b3e198..f0e8d438fa 100644 --- a/editor/spatial_editor_gizmos.cpp +++ b/editor/spatial_editor_gizmos.cpp @@ -2753,7 +2753,122 @@ GIProbeGizmo::GIProbeGizmo(GIProbe *p_probe) { } //////// +//////// + +/// + +String BakedIndirectLightGizmo::get_handle_name(int p_idx) const { + + switch (p_idx) { + case 0: return "Extents X"; + case 1: return "Extents Y"; + case 2: return "Extents Z"; + } + + return ""; +} +Variant BakedIndirectLightGizmo::get_handle_value(int p_idx) const { + + return baker->get_extents(); +} +void BakedIndirectLightGizmo::set_handle(int p_idx, Camera *p_camera, const Point2 &p_point) { + + Transform gt = baker->get_global_transform(); + //gt.orthonormalize(); + Transform gi = gt.affine_inverse(); + + Vector3 extents = baker->get_extents(); + + Vector3 ray_from = p_camera->project_ray_origin(p_point); + Vector3 ray_dir = p_camera->project_ray_normal(p_point); + + Vector3 sg[2] = { gi.xform(ray_from), gi.xform(ray_from + ray_dir * 16384) }; + + Vector3 axis; + axis[p_idx] = 1.0; + + Vector3 ra, rb; + Geometry::get_closest_points_between_segments(Vector3(), axis * 16384, sg[0], sg[1], ra, rb); + float d = ra[p_idx]; + if (d < 0.001) + d = 0.001; + + extents[p_idx] = d; + baker->set_extents(extents); +} + +void BakedIndirectLightGizmo::commit_handle(int p_idx, const Variant &p_restore, bool p_cancel) { + + Vector3 restore = p_restore; + + if (p_cancel) { + baker->set_extents(restore); + return; + } + + UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo(); + ur->create_action(TTR("Change Probe Extents")); + ur->add_do_method(baker, "set_extents", baker->get_extents()); + ur->add_undo_method(baker, "set_extents", restore); + ur->commit_action(); +} +void BakedIndirectLightGizmo::redraw() { + + Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/baked_indirect_light"); + Ref<Material> material = create_material("baked_indirect_light_material", gizmo_color); + Ref<Material> icon = create_icon_material("baked_indirect_light_icon", SpatialEditor::get_singleton()->get_icon("GizmoBakedLightmap", "EditorIcons")); + Color gizmo_color_internal = gizmo_color; + gizmo_color_internal.a = 0.1; + Ref<Material> material_internal = create_material("baked_indirect_light_internal_material", gizmo_color_internal); + + clear(); + + Vector<Vector3> lines; + Vector3 extents = baker->get_extents(); + + static const int subdivs[BakedLightmap::SUBDIV_MAX] = { 64, 128, 256, 512 }; + + AABB aabb = AABB(-extents, extents * 2); + int subdiv = subdivs[baker->get_bake_subdiv()]; + float cell_size = aabb.get_longest_axis_size() / subdiv; + + for (int i = 0; i < 12; i++) { + Vector3 a, b; + aabb.get_edge(i, a, b); + lines.push_back(a); + lines.push_back(b); + } + + add_lines(lines, material); + add_collision_segments(lines); + + Vector<Vector3> handles; + + for (int i = 0; i < 3; i++) { + + Vector3 ax; + ax[i] = aabb.position[i] + aabb.size[i]; + handles.push_back(ax); + } + + if (is_selected()) { + + gizmo_color.a = 0.1; + Ref<Material> solid_material = create_material("baked_indirect_light_solid_material", gizmo_color); + add_solid_box(solid_material, aabb.get_size()); + } + + add_unscaled_billboard(icon, 0.05); + add_handles(handles); +} +BakedIndirectLightGizmo::BakedIndirectLightGizmo(BakedLightmap *p_baker) { + + baker = p_baker; + set_spatial_node(p_baker); +} + +//////// void NavigationMeshSpatialGizmo::redraw() { Ref<Material> edge_material = create_material("navigation_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/navigation_edge")); @@ -3409,6 +3524,11 @@ Ref<SpatialEditorGizmo> SpatialEditorGizmos::get_gizmo(Spatial *p_spatial) { Ref<GIProbeGizmo> misg = memnew(GIProbeGizmo(Object::cast_to<GIProbe>(p_spatial))); return misg; } + if (Object::cast_to<BakedLightmap>(p_spatial)) { + + Ref<BakedIndirectLightGizmo> misg = memnew(BakedIndirectLightGizmo(Object::cast_to<BakedLightmap>(p_spatial))); + return misg; + } if (Object::cast_to<VehicleWheel>(p_spatial)) { @@ -3495,6 +3615,7 @@ SpatialEditorGizmos::SpatialEditorGizmos() { EDITOR_DEF("editors/3d_gizmos/gizmo_colors/particles", Color(0.8, 0.7, 0.4)); EDITOR_DEF("editors/3d_gizmos/gizmo_colors/reflection_probe", Color(0.6, 1, 0.5)); EDITOR_DEF("editors/3d_gizmos/gizmo_colors/gi_probe", Color(0.5, 1, 0.6)); + EDITOR_DEF("editors/3d_gizmos/gizmo_colors/baked_indirect_light", Color(0.5, 0.6, 1)); EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1)); EDITOR_DEF("editors/3d_gizmos/gizmo_colors/joint", Color(0.5, 0.8, 1)); EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_edge", Color(0.5, 1, 1)); diff --git a/editor/spatial_editor_gizmos.h b/editor/spatial_editor_gizmos.h index 751bad2b13..ea8a33d2c6 100644 --- a/editor/spatial_editor_gizmos.h +++ b/editor/spatial_editor_gizmos.h @@ -32,6 +32,7 @@ #include "editor/plugins/spatial_editor_plugin.h" #include "scene/3d/audio_stream_player_3d.h" +#include "scene/3d/baked_lightmap.h" #include "scene/3d/camera.h" #include "scene/3d/collision_polygon.h" #include "scene/3d/collision_shape.h" @@ -288,6 +289,22 @@ public: GIProbeGizmo(GIProbe *p_probe = NULL); }; +class BakedIndirectLightGizmo : public EditorSpatialGizmo { + + GDCLASS(BakedIndirectLightGizmo, EditorSpatialGizmo); + + BakedLightmap *baker; + +public: + virtual String get_handle_name(int p_idx) const; + virtual Variant get_handle_value(int p_idx) const; + virtual void set_handle(int p_idx, Camera *p_camera, const Point2 &p_point); + virtual void commit_handle(int p_idx, const Variant &p_restore, bool p_cancel = false); + + void redraw(); + BakedIndirectLightGizmo(BakedLightmap *p_baker = NULL); +}; + class CollisionShapeSpatialGizmo : public EditorSpatialGizmo { GDCLASS(CollisionShapeSpatialGizmo, EditorSpatialGizmo); |