summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/OS.xml13
-rw-r--r--editor/create_dialog.cpp5
-rw-r--r--modules/mono/mono_gd/gd_mono_property.cpp2
-rw-r--r--scene/3d/collision_object.cpp2
-rw-r--r--scene/resources/dynamic_font.cpp11
-rw-r--r--scene/resources/dynamic_font.h16
6 files changed, 29 insertions, 20 deletions
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 522a00385a..89b33b3c1c 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -87,7 +87,18 @@
<argument index="3" name="output" type="Array" default="[ ]">
</argument>
<description>
- Execute the binary file in given path, optionally blocking until it returns. A process ID is returned.
+ Execute the file at the given path, optionally blocking until it returns.
+ Platform path resolution will take place. The resolved file must exist and be executable.
+ Returns a process id.
+ For example:
+ [codeblock]
+ var output = []
+ var pid = OS.execute('ls', [], true, output)
+ [/codeblock]
+ If you wish to access a shell built-in or perform a composite command, a platform specific shell can be invoked. For example:
+ [codeblock]
+ var pid = OS.execute('CMD.exe', ['/C', 'cd %TEMP% &amp;&amp; dir'], true, output)
+ [/codeblock]
</description>
</method>
<method name="find_scancode_from_string" qualifiers="const">
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index d26bdad899..48ceb82dc3 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -255,8 +255,9 @@ void CreateDialog::_update_search() {
if (base_type == "Node" && type.begins_with("Editor"))
continue; // do not show editor nodes
- if (base_type == "Resource" && ClassDB::is_parent_class(type, "Script"))
- continue; // do not show script nodes
+ if (base_type == "Resource" && ClassDB::is_parent_class(type, "PluginScript"))
+ // PluginScript must be initialized before use, which is not possible here
+ continue;
if (!ClassDB::can_instance(type))
continue; // can't create what can't be instanced
diff --git a/modules/mono/mono_gd/gd_mono_property.cpp b/modules/mono/mono_gd/gd_mono_property.cpp
index bc5a1d3a39..0fe527b199 100644
--- a/modules/mono/mono_gd/gd_mono_property.cpp
+++ b/modules/mono/mono_gd/gd_mono_property.cpp
@@ -139,7 +139,7 @@ bool GDMonoProperty::has_setter() {
}
void GDMonoProperty::set_value(MonoObject *p_object, MonoObject *p_value, MonoObject **r_exc) {
- MonoMethod *prop_method = mono_property_get_get_method(mono_property);
+ MonoMethod *prop_method = mono_property_get_set_method(mono_property);
MonoArray *params = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(MonoObject), 1);
mono_array_set(params, MonoObject *, 0, p_value);
diff --git a/scene/3d/collision_object.cpp b/scene/3d/collision_object.cpp
index 73770a2dd2..07235b3da4 100644
--- a/scene/3d/collision_object.cpp
+++ b/scene/3d/collision_object.cpp
@@ -373,7 +373,7 @@ String CollisionObject::get_configuration_warning() const {
if (warning == String()) {
warning += "\n";
}
- warning += TTR("This node has no children shapes, so it can't interact with the space.\nConsider adding CollisionShape or CollisionPolygon children nodes to define it's shape.");
+ warning += TTR("This node has no children shapes, so it can't interact with the space.\nConsider adding CollisionShape or CollisionPolygon children nodes to define its shape.");
}
return warning;
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index b35a9ae963..e9d5ca969e 100644
--- a/scene/resources/dynamic_font.cpp
+++ b/scene/resources/dynamic_font.cpp
@@ -35,13 +35,7 @@
bool DynamicFontData::CacheID::operator<(CacheID right) const {
- if (size < right.size)
- return true;
- if (mipmaps != right.mipmaps)
- return right.mipmaps;
- if (filter != right.filter)
- return right.filter;
- return false;
+ return key < right.key;
}
Ref<DynamicFontAtSize> DynamicFontData::_get_dynamic_font_at_size(CacheID p_cache_id) {
@@ -654,6 +648,7 @@ DynamicFontAtSize::~DynamicFontAtSize() {
FT_Done_FreeType(library);
}
font->size_cache.erase(id);
+ font.unref();
}
/////////////////////////
@@ -983,7 +978,7 @@ void DynamicFont::update_oversampling() {
while (E) {
if (E->self()->data_at_size.is_valid() && E->self()->data_at_size->update_oversampling()) {
- changed.push_back(E->self());
+ changed.push_back(Ref<DynamicFont>(E->self()));
}
E = E->next();
}
diff --git a/scene/resources/dynamic_font.h b/scene/resources/dynamic_font.h
index a949892086..92bb77bed3 100644
--- a/scene/resources/dynamic_font.h
+++ b/scene/resources/dynamic_font.h
@@ -50,15 +50,17 @@ class DynamicFontData : public Resource {
public:
struct CacheID {
- int size;
- bool mipmaps;
- bool filter;
-
+ union {
+ struct {
+ uint32_t size : 16;
+ bool mipmaps : 1;
+ bool filter : 1;
+ };
+ uint32_t key;
+ };
bool operator<(CacheID right) const;
CacheID() {
- size = 16;
- mipmaps = false;
- filter = false;
+ key = 0;
}
};