summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/editor_node.cpp2
-rw-r--r--tools/editor/editor_plugin.cpp19
-rw-r--r--tools/editor/editor_plugin.h4
-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
10 files changed, 146 insertions, 16 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index dc1f20d619..1ee0b93114 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -3016,7 +3016,7 @@ 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()) {
memdelete( singleton->main_editor_buttons[i] );
singleton->main_editor_buttons.remove(i);
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/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");