diff options
-rw-r--r-- | doc/classes/Environment.xml | 7 | ||||
-rw-r--r-- | drivers/gles2/rasterizer_scene_gles2.h | 6 | ||||
-rw-r--r-- | editor/code_editor.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/shader_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | misc/dist/html/fixed-size.html | 3 | ||||
-rw-r--r-- | misc/dist/html/full-size.html | 3 | ||||
-rw-r--r-- | misc/scripts/sort-demos.sh | 29 | ||||
-rw-r--r-- | modules/gdscript/editor/gdscript_highlighter.cpp | 28 | ||||
-rw-r--r-- | modules/jsonrpc/jsonrpc.cpp | 10 | ||||
-rw-r--r-- | platform/javascript/engine.js | 13 | ||||
-rw-r--r-- | scene/3d/camera.cpp | 6 | ||||
-rw-r--r-- | scene/animation/animation_blend_tree.cpp | 4 | ||||
-rw-r--r-- | scene/resources/environment.cpp | 5 |
14 files changed, 48 insertions, 76 deletions
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 9a943aba51..2b44eb81b1 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -177,6 +177,7 @@ Enables fog's light transmission. If enabled, lets reflections light to be transmitted by the fog. </member> <member name="glow_bicubic_upscale" type="bool" setter="set_glow_bicubic_upscale" getter="is_glow_bicubic_upscale_enabled" default="false"> + Smooths out blockiness created by sampling higher levels. </member> <member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode" default="2"> Glow blending mode. @@ -193,10 +194,10 @@ Bleed scale of the HDR glow. </member> <member name="glow_hdr_threshold" type="float" setter="set_glow_hdr_bleed_threshold" getter="get_glow_hdr_bleed_threshold" default="1.0"> - Bleed threshold of the HDR glow. + Bleed threshold of the HDR glow. In GLES2, this needs to be below 1.0 in order for glow to be visible, a default value of 0.9 works well. </member> <member name="glow_intensity" type="float" setter="set_glow_intensity" getter="get_glow_intensity" default="0.8"> - Glow intensity. + Glow intensity. In GLES2, this should be increased to 1.5 by default to compensate for not using HDR. </member> <member name="glow_levels/1" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> First level of glow (most local). @@ -220,7 +221,7 @@ Seventh level of glow (most global). </member> <member name="glow_strength" type="float" setter="set_glow_strength" getter="get_glow_strength" default="1.0"> - Glow strength. + Glow strength. In GLES2, this should be increased to 1.3 by default to compensate for not using HDR. </member> <member name="ss_reflections_depth_tolerance" type="float" setter="set_ssr_depth_tolerance" getter="get_ssr_depth_tolerance" default="0.2"> </member> diff --git a/drivers/gles2/rasterizer_scene_gles2.h b/drivers/gles2/rasterizer_scene_gles2.h index 366a9020fc..7babcfeed1 100644 --- a/drivers/gles2/rasterizer_scene_gles2.h +++ b/drivers/gles2/rasterizer_scene_gles2.h @@ -420,11 +420,11 @@ public: canvas_max_layer(0), glow_enabled(false), glow_levels((1 << 2) | (1 << 4)), - glow_intensity(1.5), - glow_strength(1.3), + glow_intensity(0.8), + glow_strength(1.0), glow_bloom(0.0), glow_blend_mode(VS::GLOW_BLEND_MODE_SOFTLIGHT), - glow_hdr_bleed_threshold(0.9), + glow_hdr_bleed_threshold(1.0), glow_hdr_bleed_scale(2.0), glow_hdr_luminance_cap(12.0), glow_bicubic_upscale(false), diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index b6cd69c3cd..4c31797c50 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -456,10 +456,10 @@ void FindReplaceBar::_show_search(bool p_focus_replace, bool p_show_only) { void FindReplaceBar::popup_search(bool p_show_only) { - if (!is_visible()) - replace_text->hide(); + replace_text->hide(); hbc_button_replace->hide(); hbc_option_replace->hide(); + _show_search(false, p_show_only); } diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 9d3c580f02..ecb2354aa1 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -814,7 +814,7 @@ void ScriptTextEditor::_code_complete_script(const String &p_code, List<ScriptCo } String hint; Error err = script->get_language()->complete_code(p_code, script->get_path(), base, r_options, r_force, hint); - if (err == OK && hint != "") { + if (err == OK) { code_editor->get_text_edit()->set_code_hint(hint); } } diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index df3e23a9e9..80f63b4f48 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -202,9 +202,7 @@ void ShaderTextEditor::_code_complete_script(const String &p_code, List<ScriptCo if (err != OK) ERR_PRINT("Shaderlang complete failed"); - if (calltip != "") { - get_text_edit()->set_code_hint(calltip); - } + get_text_edit()->set_code_hint(calltip); } void ShaderTextEditor::_validate_script() { diff --git a/misc/dist/html/fixed-size.html b/misc/dist/html/fixed-size.html index 14766e8239..1cc6fd715e 100644 --- a/misc/dist/html/fixed-size.html +++ b/misc/dist/html/fixed-size.html @@ -229,6 +229,7 @@ $GODOT_HEAD_INCLUDE (function() { + const EXECUTABLE_NAME = '$GODOT_BASENAME'; const MAIN_PACK = '$GODOT_BASENAME.pck'; const DEBUG_ENABLED = $GODOT_DEBUG_ENABLED; const INDETERMINATE_STATUS_STEP_MS = 100; @@ -380,7 +381,7 @@ $GODOT_HEAD_INCLUDE } else { setStatusMode('indeterminate'); engine.setCanvas(canvas); - engine.startGame(MAIN_PACK).then(() => { + engine.startGame(EXECUTABLE_NAME, MAIN_PACK).then(() => { setStatusMode('hidden'); initializing = false; }, displayFailureNotice); diff --git a/misc/dist/html/full-size.html b/misc/dist/html/full-size.html index 12b9af21e5..9269227d02 100644 --- a/misc/dist/html/full-size.html +++ b/misc/dist/html/full-size.html @@ -142,6 +142,7 @@ $GODOT_HEAD_INCLUDE (function() { + const EXECUTABLE_NAME = '$GODOT_BASENAME'; const MAIN_PACK = '$GODOT_BASENAME.pck'; const INDETERMINATE_STATUS_STEP_MS = 100; @@ -254,7 +255,7 @@ $GODOT_HEAD_INCLUDE } else { setStatusMode('indeterminate'); engine.setCanvas(canvas); - engine.startGame(MAIN_PACK).then(() => { + engine.startGame(EXECUTABLE_NAME, MAIN_PACK).then(() => { setStatusMode('hidden'); initializing = false; }, displayFailureNotice); diff --git a/misc/scripts/sort-demos.sh b/misc/scripts/sort-demos.sh deleted file mode 100644 index 5e01b86b46..0000000000 --- a/misc/scripts/sort-demos.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# When scanning for demos, the project manager sorts them based on their -# timestamp, i.e. last modification date. This can make for a pretty -# messy output, so this script 'touches' each project.godot file in reverse -# alphabetical order to ensure a nice listing. -# -# It's good practice to run it once before packaging demos on the build -# server. - -if [ ! -d "demos" ]; then - echo "Run this script from the root directory where 'demos/' is contained." - exit 1 -fi - -if [ -e demos.list ]; then - rm -f demos.list -fi - -for dir in 2d 3d gui misc viewport; do - find "demos/$dir" -name "project.godot" |sort >> demos.list -done -cat demos.list |sort -r > demos_r.list - -while read line; do - touch $line - sleep 0.2 -done < demos_r.list - -#rm -f demos.list demos_r.list diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp index ee7313957c..4d6279074c 100644 --- a/modules/gdscript/editor/gdscript_highlighter.cpp +++ b/modules/gdscript/editor/gdscript_highlighter.cpp @@ -364,20 +364,28 @@ void GDScriptSyntaxHighlighter::_update_cache() { number_color = text_editor->get_color("number_color"); member_color = text_editor->get_color("member_variable_color"); - EditorSettings *settings = EditorSettings::get_singleton(); - String text_editor_color_theme = settings->get("text_editor/theme/color_theme"); - - bool default_theme = text_editor_color_theme == "Default"; - bool dark_theme = settings->is_dark_theme(); - - function_definition_color = default_theme ? Color(0.0, 0.88, 1.0) : dark_theme ? Color(0.0, 0.88, 1.0) : Color(0.0, 0.65, 0.73); - node_path_color = default_theme ? Color(0.39, 0.76, 0.35) : dark_theme ? Color(0.39, 0.76, 0.35) : Color(0.32, 0.55, 0.29); + const String text_editor_color_theme = EditorSettings::get_singleton()->get("text_editor/theme/color_theme"); + const bool default_theme = text_editor_color_theme == "Default"; + + if (default_theme || EditorSettings::get_singleton()->is_dark_theme()) { + function_definition_color = Color(0.4, 0.9, 1.0); + node_path_color = Color(0.39, 0.76, 0.35); + } else { + function_definition_color = Color(0.0, 0.65, 0.73); + node_path_color = Color(0.32, 0.55, 0.29); + } EDITOR_DEF("text_editor/highlighting/gdscript/function_definition_color", function_definition_color); EDITOR_DEF("text_editor/highlighting/gdscript/node_path_color", node_path_color); if (text_editor_color_theme == "Adaptive" || default_theme) { - settings->set_initial_value("text_editor/highlighting/gdscript/function_definition_color", function_definition_color, true); - settings->set_initial_value("text_editor/highlighting/gdscript/node_path_color", node_path_color, true); + EditorSettings::get_singleton()->set_initial_value( + "text_editor/highlighting/gdscript/function_definition_color", + function_definition_color, + true); + EditorSettings::get_singleton()->set_initial_value( + "text_editor/highlighting/gdscript/node_path_color", + node_path_color, + true); } function_definition_color = EDITOR_GET("text_editor/highlighting/gdscript/function_definition_color"); diff --git a/modules/jsonrpc/jsonrpc.cpp b/modules/jsonrpc/jsonrpc.cpp index e1bba60f2f..ea90cce83d 100644 --- a/modules/jsonrpc/jsonrpc.cpp +++ b/modules/jsonrpc/jsonrpc.cpp @@ -47,11 +47,11 @@ void JSONRPC::_bind_methods() { ClassDB::bind_method(D_METHOD("make_notification", "method", "params"), &JSONRPC::make_notification); ClassDB::bind_method(D_METHOD("make_response_error", "code", "message", "id"), &JSONRPC::make_response_error, DEFVAL(Variant())); - BIND_ENUM_CONSTANT(PARSE_ERROR) - BIND_ENUM_CONSTANT(INVALID_REQUEST) - BIND_ENUM_CONSTANT(METHOD_NOT_FOUND) - BIND_ENUM_CONSTANT(INVALID_PARAMS) - BIND_ENUM_CONSTANT(INTERNAL_ERROR) + BIND_ENUM_CONSTANT(PARSE_ERROR); + BIND_ENUM_CONSTANT(INVALID_REQUEST); + BIND_ENUM_CONSTANT(METHOD_NOT_FOUND); + BIND_ENUM_CONSTANT(INVALID_PARAMS); + BIND_ENUM_CONSTANT(INTERNAL_ERROR); } Dictionary JSONRPC::make_response_error(int p_code, const String &p_message, const Variant &p_id) const { diff --git a/platform/javascript/engine.js b/platform/javascript/engine.js index 860d6707ff..1f78aa672d 100644 --- a/platform/javascript/engine.js +++ b/platform/javascript/engine.js @@ -94,6 +94,7 @@ return new Promise(function(resolve, reject) { rtenvProps.onRuntimeInitialized = resolve; rtenvProps.onAbort = reject; + rtenvProps.thisProgram = executableName; rtenvProps.engine.rtenv = Engine.RuntimeEnvironment(rtenvProps, LIBS); }); } @@ -130,13 +131,11 @@ ); }; - this.startGame = function(mainPack) { + this.startGame = function(execName, mainPack) { + + executableName = execName; + var mainArgs = [ '--main-pack', mainPack ]; - executableName = getBaseName(mainPack); - var mainArgs = []; - if (!getPathLeaf(mainPack).endsWith('.pck')) { - mainArgs = ['--main-pack', getPathLeaf(mainPack)]; - } return Promise.all([ // Load from directory, this.init(getBasePath(mainPack)), @@ -187,8 +186,6 @@ this.rtenv.locale = this.rtenv.locale.split('.')[0]; this.rtenv.resizeCanvasOnStart = resizeCanvasOnStart; - this.rtenv.thisProgram = executableName || getBaseName(basePath); - preloadedFiles.forEach(function(file) { var dir = LIBS.PATH.dirname(file.path); try { diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp index 9f8510248c..9797b5f3ab 100644 --- a/scene/3d/camera.cpp +++ b/scene/3d/camera.cpp @@ -548,9 +548,9 @@ void Camera::_bind_methods() { BIND_ENUM_CONSTANT(KEEP_WIDTH); BIND_ENUM_CONSTANT(KEEP_HEIGHT); - BIND_ENUM_CONSTANT(DOPPLER_TRACKING_DISABLED) - BIND_ENUM_CONSTANT(DOPPLER_TRACKING_IDLE_STEP) - BIND_ENUM_CONSTANT(DOPPLER_TRACKING_PHYSICS_STEP) + BIND_ENUM_CONSTANT(DOPPLER_TRACKING_DISABLED); + BIND_ENUM_CONSTANT(DOPPLER_TRACKING_IDLE_STEP); + BIND_ENUM_CONSTANT(DOPPLER_TRACKING_PHYSICS_STEP); } float Camera::get_fov() const { diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp index 20a09696e1..6f67d01a1c 100644 --- a/scene/animation/animation_blend_tree.cpp +++ b/scene/animation/animation_blend_tree.cpp @@ -350,8 +350,8 @@ void AnimationNodeOneShot::_bind_methods() { ADD_GROUP("", ""); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sync"), "set_use_sync", "is_using_sync"); - BIND_ENUM_CONSTANT(MIX_MODE_BLEND) - BIND_ENUM_CONSTANT(MIX_MODE_ADD) + BIND_ENUM_CONSTANT(MIX_MODE_BLEND); + BIND_ENUM_CONSTANT(MIX_MODE_ADD); } AnimationNodeOneShot::AnimationNodeOneShot() { diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp index 2817ec4eb0..bc96b5e9f3 100644 --- a/scene/resources/environment.cpp +++ b/scene/resources/environment.cpp @@ -1374,11 +1374,6 @@ Environment::Environment() : glow_hdr_luminance_cap = 12.0; glow_hdr_bleed_scale = 2.0; glow_bicubic_upscale = false; - if (VisualServer::get_singleton()->is_low_end()) { - glow_hdr_bleed_threshold = 0.9; - glow_intensity = 1.5; - glow_strength = 1.3; - } dof_blur_far_enabled = false; dof_blur_far_distance = 10; |