summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/editor_node.cpp12
-rw-r--r--tools/editor/editor_node.h1
-rw-r--r--tools/editor/editor_plugin.cpp19
-rw-r--r--tools/editor/editor_plugin.h4
-rw-r--r--tools/editor/editor_run.cpp4
-rw-r--r--tools/editor/editor_run.h2
-rw-r--r--tools/editor/icons/2x/icon_distraction_free.pngbin0 -> 575 bytes
-rw-r--r--tools/editor/icons/2x/icon_remote_transform.pngbin1435 -> 1140 bytes
-rw-r--r--tools/editor/icons/icon_distraction_free.pngbin224 -> 397 bytes
-rw-r--r--tools/editor/icons/icon_remote_transform.pngbin680 -> 530 bytes
-rw-r--r--tools/editor/icons/source/icon_distraction_free.svg104
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp31
-rw-r--r--tools/editor/plugins/shader_graph_editor_plugin.cpp2
-rw-r--r--tools/editor/property_editor.cpp4
-rw-r--r--tools/editor/scene_tree_editor.cpp2
-rw-r--r--tools/editor/script_editor_debugger.cpp2
16 files changed, 165 insertions, 22 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 3b1e90a907..fe97fe2881 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -3016,7 +3016,11 @@ void EditorNode::remove_editor_plugin(EditorPlugin *p_editor) {
for(int i=0;i<singleton->main_editor_buttons.size();i++) {
- if (p_editor->get_name()==singleton->main_editor_buttons[i]->get_name()) {
+ if (p_editor->get_name()==singleton->main_editor_buttons[i]->get_text()) {
+
+ if (singleton->main_editor_buttons[i]->is_pressed()) {
+ singleton->_editor_select(EDITOR_SCRIPT);
+ }
memdelete( singleton->main_editor_buttons[i] );
singleton->main_editor_buttons.remove(i);
@@ -6254,9 +6258,9 @@ EditorNode::EditorNode() {
overridden_default_layout=-1;
default_layout.instance();
- default_layout->set_value(docks_section, "dock_3", TTR("Scene"));
- default_layout->set_value(docks_section, "dock_4", TTR("FileSystem"));
- default_layout->set_value(docks_section, "dock_5", TTR("Inspector"));
+ default_layout->set_value(docks_section, "dock_3", TTR("FileSystem"));
+ default_layout->set_value(docks_section, "dock_5", TTR("Scene"));
+ default_layout->set_value(docks_section, "dock_6", TTR("Inspector")+","+TTR("Node"));
for(int i=0;i<DOCK_SLOT_MAX/2;i++)
default_layout->set_value(docks_section, "dock_hsplit_"+itos(i+1), 0);
diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h
index 2fae5daced..0393cd19a9 100644
--- a/tools/editor/editor_node.h
+++ b/tools/editor/editor_node.h
@@ -700,6 +700,7 @@ public:
void notify_child_process_exited();
+ OS::ProcessID get_child_process_id() const { return editor_run.get_pid(); }
void stop_child_process();
Ref<Theme> get_editor_theme() const { return theme; }
diff --git a/tools/editor/editor_plugin.cpp b/tools/editor/editor_plugin.cpp
index 55f0e52c88..4b82d5e59c 100644
--- a/tools/editor/editor_plugin.cpp
+++ b/tools/editor/editor_plugin.cpp
@@ -71,6 +71,11 @@ void EditorPlugin::remove_control_from_bottom_panel(Control *p_control) {
}
+Control * EditorPlugin::get_editor_viewport() {
+
+ return EditorNode::get_singleton()->get_viewport();
+}
+
void EditorPlugin::add_control_to_container(CustomControlContainer p_location,Control *p_control) {
switch(p_location) {
@@ -315,6 +320,16 @@ Control *EditorPlugin::get_base_control() {
return EditorNode::get_singleton()->get_gui_base();
}
+void EditorPlugin::make_bottom_panel_item_visible(Control * p_item) {
+
+ EditorNode::get_singleton()->make_bottom_panel_item_visible(p_item);
+}
+
+void EditorPlugin::hide_bottom_panel() {
+
+ EditorNode::get_singleton()->hide_bottom_panel();
+}
+
void EditorPlugin::inspect_object(Object *p_obj,const String& p_for_property) {
EditorNode::get_singleton()->push_item(p_obj,p_for_property);
@@ -333,6 +348,7 @@ void EditorPlugin::_bind_methods() {
ObjectTypeDB::bind_method(_MD("remove_control_from_bottom_panel","control:Control"),&EditorPlugin::remove_control_from_bottom_panel);
ObjectTypeDB::bind_method(_MD("add_custom_type","type","base","script:Script","icon:Texture"),&EditorPlugin::add_custom_type);
ObjectTypeDB::bind_method(_MD("remove_custom_type","type"),&EditorPlugin::remove_custom_type);
+ ObjectTypeDB::bind_method(_MD("get_editor_viewport:Control"), &EditorPlugin::get_editor_viewport);
ObjectTypeDB::bind_method(_MD("add_import_plugin","plugin:EditorImportPlugin"),&EditorPlugin::add_import_plugin);
ObjectTypeDB::bind_method(_MD("remove_import_plugin","plugin:EditorImportPlugin"),&EditorPlugin::remove_import_plugin);
@@ -346,6 +362,9 @@ void EditorPlugin::_bind_methods() {
ObjectTypeDB::bind_method(_MD("inspect_object","object","for_property"),&EditorPlugin::inspect_object,DEFVAL(String()));
ObjectTypeDB::bind_method(_MD("update_canvas"),&EditorPlugin::update_canvas);
+ ObjectTypeDB::bind_method(_MD("make_bottom_panel_item_visible","item:Control"), &EditorPlugin::make_bottom_panel_item_visible);
+ ObjectTypeDB::bind_method(_MD("hide_bottom_panel"), &EditorPlugin::hide_bottom_panel);
+
ObjectTypeDB::bind_method(_MD("get_base_control:Control"),&EditorPlugin::get_base_control);
ObjectTypeDB::bind_method(_MD("get_undo_redo:UndoRedo"),&EditorPlugin::_get_undo_redo);
ObjectTypeDB::bind_method(_MD("get_selection:EditorSelection"),&EditorPlugin::get_selection);
diff --git a/tools/editor/editor_plugin.h b/tools/editor/editor_plugin.h
index 5b944cc27a..2700c49a6c 100644
--- a/tools/editor/editor_plugin.h
+++ b/tools/editor/editor_plugin.h
@@ -100,6 +100,7 @@ public:
void add_control_to_dock(DockSlot p_slot,Control *p_control);
void remove_control_from_docks(Control *p_control);
void remove_control_from_bottom_panel(Control *p_control);
+ Control* get_editor_viewport();
virtual Ref<SpatialEditorGizmo> create_spatial_gizmo(Spatial* p_spatial);
virtual bool forward_canvas_input_event(const Matrix32& p_canvas_xform, const InputEvent& p_event);
@@ -130,6 +131,9 @@ public:
Control *get_base_control();
+ void make_bottom_panel_item_visible(Control *p_item);
+ void hide_bottom_panel();
+
void add_import_plugin(const Ref<EditorImportPlugin>& p_editor_import);
void remove_import_plugin(const Ref<EditorImportPlugin>& p_editor_import);
diff --git a/tools/editor/editor_run.cpp b/tools/editor/editor_run.cpp
index fb0f24c084..5fbb4ae2a0 100644
--- a/tools/editor/editor_run.cpp
+++ b/tools/editor/editor_run.cpp
@@ -52,6 +52,9 @@ Error EditorRun::run(const String& p_scene,const String p_custom_args,const List
args.push_back("localhost:"+String::num(GLOBAL_DEF("debug/debug_port", 6007)));
}
+ args.push_back("-epid");
+ args.push_back(String::num(OS::get_singleton()->get_process_ID()));
+
if (p_custom_args!="") {
Vector<String> cargs=p_custom_args.split(" ",false);
@@ -132,6 +135,7 @@ Error EditorRun::run(const String& p_scene,const String p_custom_args,const List
}
+
if (p_breakpoints.size()) {
args.push_back("-bp");
diff --git a/tools/editor/editor_run.h b/tools/editor/editor_run.h
index 0b96a2c91c..5aa2adf801 100644
--- a/tools/editor/editor_run.h
+++ b/tools/editor/editor_run.h
@@ -53,6 +53,8 @@ public:
void run_native_notify() { status=STATUS_PLAY; }
void stop();
+ OS::ProcessID get_pid() const { return pid; }
+
void set_debug_collisions(bool p_debug);
bool get_debug_collisions() const;
diff --git a/tools/editor/icons/2x/icon_distraction_free.png b/tools/editor/icons/2x/icon_distraction_free.png
new file mode 100644
index 0000000000..034239a4e7
--- /dev/null
+++ b/tools/editor/icons/2x/icon_distraction_free.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_remote_transform.png b/tools/editor/icons/2x/icon_remote_transform.png
index 9ee66bc70c..dad528615a 100644
--- a/tools/editor/icons/2x/icon_remote_transform.png
+++ b/tools/editor/icons/2x/icon_remote_transform.png
Binary files differ
diff --git a/tools/editor/icons/icon_distraction_free.png b/tools/editor/icons/icon_distraction_free.png
index 5896de6044..c6f8a08874 100644
--- a/tools/editor/icons/icon_distraction_free.png
+++ b/tools/editor/icons/icon_distraction_free.png
Binary files differ
diff --git a/tools/editor/icons/icon_remote_transform.png b/tools/editor/icons/icon_remote_transform.png
index deff925b53..2a8b5f4d0e 100644
--- a/tools/editor/icons/icon_remote_transform.png
+++ b/tools/editor/icons/icon_remote_transform.png
Binary files differ
diff --git a/tools/editor/icons/source/icon_distraction_free.svg b/tools/editor/icons/source/icon_distraction_free.svg
new file mode 100644
index 0000000000..4ae48b2fb6
--- /dev/null
+++ b/tools/editor/icons/source/icon_distraction_free.svg
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<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"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_add_track.png"
+ inkscape:export-xdpi="45"
+ inkscape:export-ydpi="45"
+ sodipodi:docname="icon_distraction_free.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="32.000001"
+ inkscape:cx="10.344519"
+ inkscape:cy="8.9631686"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="false"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:snap-midpoints="true"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:object-nodes="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <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>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 3.7578125 2.34375 L 2.34375 3.7578125 L 5.2929688 6.7070312 L 6.7070312 5.2929688 L 3.7578125 2.34375 z M 12.242188 2.34375 L 9.2929688 5.2929688 L 10.707031 6.7070312 L 13.65625 3.7578125 L 12.242188 2.34375 z M 5.2929688 9.2929688 L 2.34375 12.242188 L 3.7578125 13.65625 L 6.7070312 10.707031 L 5.2929688 9.2929688 z M 10.707031 9.2929688 L 9.2929688 10.707031 L 12.242188 13.65625 L 13.65625 12.242188 L 10.707031 9.2929688 z "
+ transform="translate(0,1036.3622)"
+ id="rect4137" />
+ <path
+ style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 1,1051.3622 0,-5 5,5 z"
+ id="path4155"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccc" />
+ <path
+ sodipodi:nodetypes="cccc"
+ inkscape:connector-curvature="0"
+ id="path4158"
+ d="m 15,1051.3622 0,-5 -5,5 z"
+ style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 15,1037.3622 0,5 -5,-5 z"
+ id="path4160"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccc" />
+ <path
+ sodipodi:nodetypes="cccc"
+ inkscape:connector-curvature="0"
+ id="path4162"
+ d="m 1,1037.3622 0,5 5,-5 z"
+ style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+</svg>
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index 522ceba1dc..fd25843de9 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -1362,10 +1362,8 @@ struct _ScriptEditorItemData {
void ScriptEditor::_update_script_colors() {
- bool enabled = EditorSettings::get_singleton()->get("text_editor/script_temperature_enabled");
+ bool script_temperature_enabled = EditorSettings::get_singleton()->get("text_editor/script_temperature_enabled");
bool highlight_current = EditorSettings::get_singleton()->get("text_editor/highlight_current_script");
- if (!enabled)
- return;
int hist_size = EditorSettings::get_singleton()->get("text_editor/script_temperature_history_size");
Color hot_color=EditorSettings::get_singleton()->get("text_editor/script_temperature_hot_color");
@@ -1379,22 +1377,25 @@ void ScriptEditor::_update_script_colors() {
continue;
script_list->set_item_custom_bg_color(i,Color(0,0,0,0));
- if (!n->has_meta("__editor_pass")) {
- continue;
- }
-
- int pass=n->get_meta("__editor_pass");
- int h = edit_pass - pass;
- if (h>hist_size) {
- continue;
- }
- int non_zero_hist_size = ( hist_size == 0 ) ? 1 : hist_size;
- float v = Math::ease((edit_pass-pass)/float(non_zero_hist_size),0.4);
bool current = tab_container->get_current_tab() == c;
if (current && highlight_current) {
script_list->set_item_custom_bg_color(i, EditorSettings::get_singleton()->get("text_editor/current_script_background_color"));
- } else {
+
+ } else if (script_temperature_enabled) {
+
+ if (!n->has_meta("__editor_pass")) {
+ continue;
+ }
+
+ int pass=n->get_meta("__editor_pass");
+ int h = edit_pass - pass;
+ if (h>hist_size) {
+ continue;
+ }
+ int non_zero_hist_size = ( hist_size == 0 ) ? 1 : hist_size;
+ float v = Math::ease((edit_pass-pass)/float(non_zero_hist_size),0.4);
+
script_list->set_item_custom_bg_color(i,hot_color.linear_interpolate(cold_color,v));
}
}
diff --git a/tools/editor/plugins/shader_graph_editor_plugin.cpp b/tools/editor/plugins/shader_graph_editor_plugin.cpp
index aa66a2e0d9..3ab906f84e 100644
--- a/tools/editor/plugins/shader_graph_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_graph_editor_plugin.cpp
@@ -2422,6 +2422,7 @@ void ShaderGraphView::_create_node(int p_id) {
colors.push_back("Color");
colors.push_back("LightColor");
colors.push_back("Light");
+ colors.push_back("ShadowColor");
colors.push_back("Diffuse");
colors.push_back("Specular");
colors.push_back("Emmision");
@@ -2434,6 +2435,7 @@ void ShaderGraphView::_create_node(int p_id) {
reals.push_back("ShadeParam");
reals.push_back("SpecularExp");
reals.push_back("LightAlpha");
+ reals.push_back("ShadowAlpha");
reals.push_back("PointSize");
reals.push_back("Discard");
diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp
index 1a8d373f7f..6641297491 100644
--- a/tools/editor/property_editor.cpp
+++ b/tools/editor/property_editor.cpp
@@ -3049,7 +3049,7 @@ void PropertyEditor::update_tree() {
if (E) {
descr=E->get().brief_description;
}
- class_descr_cache[type]=descr.world_wrap(80);
+ class_descr_cache[type]=descr.word_wrap(80);
}
@@ -3142,7 +3142,7 @@ void PropertyEditor::update_tree() {
if (E) {
for(int i=0;i<E->get().methods.size();i++) {
if (E->get().methods[i].name==setter.operator String()) {
- descr=E->get().methods[i].description.strip_edges().world_wrap(80);
+ descr=E->get().methods[i].description.strip_edges().word_wrap(80);
}
}
}
diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp
index e5a97fa26e..53bfe8cc57 100644
--- a/tools/editor/scene_tree_editor.cpp
+++ b/tools/editor/scene_tree_editor.cpp
@@ -254,7 +254,7 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item,int p_column,int p_id)
String config_err = n->get_configuration_warning();
if (config_err==String())
return;
- config_err=config_err.world_wrap(80);
+ config_err=config_err.word_wrap(80);
warning->set_text(config_err);
warning->popup_centered_minsize();
diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp
index 7fba73ca08..c8170ca9a3 100644
--- a/tools/editor/script_editor_debugger.cpp
+++ b/tools/editor/script_editor_debugger.cpp
@@ -216,6 +216,8 @@ void ScriptEditorDebugger::debug_continue() {
ERR_FAIL_COND(connection.is_null());
ERR_FAIL_COND(!connection->is_connected());
+ OS::get_singleton()->enable_for_stealing_focus(EditorNode::get_singleton()->get_child_process_id());
+
Array msg;
msg.push_back("continue");
ppeer->put_var(msg);