summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.clang-format1
-rw-r--r--doc/classes/ResourcePreloader.xml13
-rw-r--r--editor/editor_settings.cpp1
-rw-r--r--methods.py14
-rw-r--r--modules/gdnative/gdnative_builders.py2
-rw-r--r--modules/gdscript/gdscript_parser.cpp20
-rw-r--r--modules/mono/editor/GodotSharpTools/GodotSharpTools.csproj1
-rw-r--r--modules/mono/editor/mono_bottom_panel.cpp14
-rw-r--r--scene/register_scene_types.cpp4
-rw-r--r--scene/resources/environment.cpp2
-rw-r--r--scene/resources/visual_shader_nodes.cpp4
11 files changed, 51 insertions, 25 deletions
diff --git a/.clang-format b/.clang-format
index 3a2c39a174..237fd9ce30 100644
--- a/.clang-format
+++ b/.clang-format
@@ -116,6 +116,7 @@ Standard: Cpp03
---
### ObjC specific config ###
Language: ObjC
+Standard: Cpp03
ObjCBlockIndentWidth: 4
# ObjCSpaceAfterProperty: false
# ObjCSpaceBeforeProtocolList: true
diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml
index 002bcd891a..18d6e04d8e 100644
--- a/doc/classes/ResourcePreloader.xml
+++ b/doc/classes/ResourcePreloader.xml
@@ -4,7 +4,7 @@
Resource Preloader Node.
</brief_description>
<description>
- Resource Preloader Node. This node is used to preload sub-resources inside a scene, so when the scene is loaded all the resources are ready to use and be retrieved from here.
+ This node is used to preload sub-resources inside a scene, so when the scene is loaded, all the resources are ready to use and can be retrieved from the preloader.
</description>
<tutorials>
</tutorials>
@@ -19,6 +19,7 @@
<argument index="1" name="resource" type="Resource">
</argument>
<description>
+ Adds a resource to the preloader with the given [code]name[/code]. If a resource with the given [code]name[/code] already exists, the new resource will be renamed to "[code]name[/code] N" where N is an incrementing number starting from 2.
</description>
</method>
<method name="get_resource" qualifiers="const">
@@ -27,14 +28,14 @@
<argument index="0" name="name" type="String">
</argument>
<description>
- Return the resource given a text-id.
+ Returns the resource associated to [code]name[/code].
</description>
</method>
<method name="get_resource_list" qualifiers="const">
<return type="PoolStringArray">
</return>
<description>
- Return the list of resources inside the preloader.
+ Returns the list of resources inside the preloader.
</description>
</method>
<method name="has_resource" qualifiers="const">
@@ -43,7 +44,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
- Return true if the preloader has a given resource.
+ Returns true if the preloader contains a resource associated to [code]name[/code].
</description>
</method>
<method name="remove_resource">
@@ -52,7 +53,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
- Remove a resource from the preloader by text id.
+ Removes the resource associated to [code]name[/code] from the preloader.
</description>
</method>
<method name="rename_resource">
@@ -63,7 +64,7 @@
<argument index="1" name="newname" type="String">
</argument>
<description>
- Rename a resource inside the preloader, from a text-id to a new text-id.
+ Renames a resource inside the preloader from [code]name[/code] to [code]newname[/code].
</description>
</method>
</methods>
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 9973c7354e..cbd8df315a 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -575,6 +575,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("run/auto_save/save_before_running", true);
// Output
+ hints["run/output/font_size"] = PropertyInfo(Variant::INT, "run/output/font_size", PROPERTY_HINT_RANGE, "8,96,1", PROPERTY_USAGE_DEFAULT);
_initial_set("run/output/always_clear_output_on_play", true);
_initial_set("run/output/always_open_output_on_play", true);
_initial_set("run/output/always_close_output_on_stop", false);
diff --git a/methods.py b/methods.py
index f8fc6c64ef..42eac7ca75 100644
--- a/methods.py
+++ b/methods.py
@@ -61,14 +61,22 @@ def update_version(module_version_string=""):
# NOTE: It is safe to generate this file here, since this is still executed serially
fhash = open("core/version_hash.gen.h", "w")
githash = ""
- if os.path.isfile(".git/HEAD"):
- head = open(".git/HEAD", "r").readline().strip()
+ gitfolder = ".git"
+
+ if os.path.isfile(".git"):
+ module_folder = open(".git", "r").readline().strip()
+ if module_folder.startswith("gitdir: "):
+ gitfolder = module_folder[8:]
+
+ if os.path.isfile(os.path.join(gitfolder, "HEAD")):
+ head = open(os.path.join(gitfolder, "HEAD"), "r").readline().strip()
if head.startswith("ref: "):
- head = ".git/" + head[5:]
+ head = os.path.join(gitfolder, head[5:])
if os.path.isfile(head):
githash = open(head, "r").readline().strip()
else:
githash = head
+
fhash.write("#define VERSION_HASH \"" + githash + "\"")
fhash.close()
diff --git a/modules/gdnative/gdnative_builders.py b/modules/gdnative/gdnative_builders.py
index cd356ce513..5fd5971fd1 100644
--- a/modules/gdnative/gdnative_builders.py
+++ b/modules/gdnative/gdnative_builders.py
@@ -213,7 +213,7 @@ def _build_gdnative_api_struct_source(api):
'extern const godot_gdnative_core_api_struct api_struct = {',
'\tGDNATIVE_' + api['core']['type'] + ',',
'\t{' + str(api['core']['version']['major']) + ', ' + str(api['core']['version']['minor']) + '},',
- '\tNULL,',
+ '\t(const godot_gdnative_api_struct *)&api_1_1,',
'\t' + str(len(api['extensions'])) + ',',
'\tgdnative_extensions_pointers,',
]
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index af189fdb7e..7334e8a8cc 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -3494,16 +3494,20 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
tokenizer->advance();
if ((tokenizer->get_token() == GDScriptTokenizer::TK_CONSTANT && tokenizer->get_token_constant().get_type() == Variant::STRING)) {
- Variant constant = tokenizer->get_token_constant();
- String icon_path = constant.operator String();
+#ifdef TOOLS_ENABLED
+ if (Engine::get_singleton()->is_editor_hint()) {
+ Variant constant = tokenizer->get_token_constant();
+ String icon_path = constant.operator String();
- String abs_icon_path = icon_path.is_rel_path() ? self_path.get_base_dir().plus_file(icon_path).simplify_path() : icon_path;
- if (!FileAccess::exists(abs_icon_path)) {
- _set_error("No class icon found at: " + abs_icon_path);
- return;
- }
+ String abs_icon_path = icon_path.is_rel_path() ? self_path.get_base_dir().plus_file(icon_path).simplify_path() : icon_path;
+ if (!FileAccess::exists(abs_icon_path)) {
+ _set_error("No class icon found at: " + abs_icon_path);
+ return;
+ }
- p_class->icon_path = icon_path;
+ p_class->icon_path = icon_path;
+ }
+#endif
tokenizer->advance();
} else {
diff --git a/modules/mono/editor/GodotSharpTools/GodotSharpTools.csproj b/modules/mono/editor/GodotSharpTools/GodotSharpTools.csproj
index f9e9f41977..9a5dd24bb1 100644
--- a/modules/mono/editor/GodotSharpTools/GodotSharpTools.csproj
+++ b/modules/mono/editor/GodotSharpTools/GodotSharpTools.csproj
@@ -8,6 +8,7 @@
<RootNamespace>GodotSharpTools</RootNamespace>
<AssemblyName>GodotSharpTools</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <BaseIntermediateOutputPath>obj</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
diff --git a/modules/mono/editor/mono_bottom_panel.cpp b/modules/mono/editor/mono_bottom_panel.cpp
index d3efa288e9..cc9822e319 100644
--- a/modules/mono/editor/mono_bottom_panel.cpp
+++ b/modules/mono/editor/mono_bottom_panel.cpp
@@ -156,10 +156,20 @@ void MonoBottomPanel::_build_project_pressed() {
if (!FileAccess::exists(GodotSharpDirs::get_project_sln_path()))
return; // No solution to build
- String scripts_metadata_path = GodotSharpDirs::get_res_metadata_dir().plus_file("scripts_metadata.editor");
- Error metadata_err = CSharpProject::generate_scripts_metadata(GodotSharpDirs::get_project_csproj_path(), scripts_metadata_path);
+ String scripts_metadata_path_editor = GodotSharpDirs::get_res_metadata_dir().plus_file("scripts_metadata.editor");
+ String scripts_metadata_path_player = GodotSharpDirs::get_res_metadata_dir().plus_file("scripts_metadata.editor_player");
+
+ Error metadata_err = CSharpProject::generate_scripts_metadata(GodotSharpDirs::get_project_csproj_path(), scripts_metadata_path_editor);
ERR_FAIL_COND(metadata_err != OK);
+ if (FileAccess::exists(scripts_metadata_path_editor)) {
+ DirAccessRef da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
+ Error copy_err = da->copy(scripts_metadata_path_editor, scripts_metadata_path_player);
+
+ ERR_EXPLAIN("Failed to copy scripts metadata file");
+ ERR_FAIL_COND(copy_err != OK);
+ }
+
bool build_success = GodotSharpBuilds::get_singleton()->build_project_blocking("Tools");
if (build_success) {
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index a50a09f095..078d880d0e 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -145,6 +145,7 @@
#include "scene/resources/mesh_library.h"
#include "scene/resources/packed_scene.h"
#include "scene/resources/particles_material.h"
+#include "scene/resources/physics_material.h"
#include "scene/resources/plane_shape.h"
#include "scene/resources/polygon_path_finder.h"
#include "scene/resources/primitive_meshes.h"
@@ -207,7 +208,6 @@
#include "scene/3d/visibility_notifier.h"
#include "scene/animation/skeleton_ik.h"
#include "scene/resources/environment.h"
-#include "scene/resources/physics_material.h"
#endif
static Ref<ResourceFormatSaverText> resource_saver_text;
@@ -602,8 +602,8 @@ void register_scene_types() {
ClassDB::register_class<SpatialVelocityTracker>();
- ClassDB::register_class<PhysicsMaterial>();
#endif
+ ClassDB::register_class<PhysicsMaterial>();
ClassDB::register_class<World>();
ClassDB::register_class<Environment>();
ClassDB::register_class<World2D>();
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index a57b7bbb42..3c295267dc 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -303,7 +303,7 @@ Ref<Texture> Environment::get_adjustment_color_correction() const {
void Environment::_validate_property(PropertyInfo &property) const {
- if (property.name == "background_sky" || property.name == "background_sky_custom_fov" || property.name == "background_sky_orientation" || property.name == "ambient_light/sky_contribution") {
+ if (property.name == "background_sky" || property.name == "background_sky_custom_fov" || property.name == "background_sky_orientation" || property.name == "background_sky_rotation" || property.name == "background_sky_rotation_degrees" || property.name == "ambient_light/sky_contribution") {
if (bg_mode != BG_SKY && bg_mode != BG_COLOR_SKY) {
property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL;
}
diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp
index a89b70d1ea..d95e0e2da1 100644
--- a/scene/resources/visual_shader_nodes.cpp
+++ b/scene/resources/visual_shader_nodes.cpp
@@ -324,7 +324,7 @@ String VisualShaderNodeTexture::generate_global(Shader::Mode p_mode, VisualShade
String u = "uniform sampler2D " + make_unique_id(p_type, p_id, "tex");
switch (texture_type) {
case TYPE_DATA: break;
- case TYPE_COLOR: u += " : hint_color"; break;
+ case TYPE_COLOR: u += " : hint_albedo"; break;
case TYPE_NORMALMAP: u += " : hint_normal"; break;
}
return u + ";";
@@ -554,7 +554,7 @@ String VisualShaderNodeCubeMap::generate_global(Shader::Mode p_mode, VisualShade
String u = "uniform sampler2DCube " + make_unique_id(p_type, p_id, "cube");
switch (texture_type) {
case TYPE_DATA: break;
- case TYPE_COLOR: u += " : hint_color"; break;
+ case TYPE_COLOR: u += " : hint_albedo"; break;
case TYPE_NORMALMAP: u += " : hint_normal"; break;
}
return u + ";";