Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge from Godot #185

Merged
merged 52 commits into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
e1cb65b
Apply `WS_MINIMIZE` style on window creation
shatyuka May 2, 2024
14f6c81
Offset drag instantiated scenes that result in a collision by its bou…
ryevdokimov Feb 18, 2024
2470eed
Call restart_editor() in RUN_PROJECT_MANAGER
KoBeWi Jul 28, 2024
e2c0346
Close expanded tile editor when inspector updates
KoBeWi Aug 1, 2024
5cf9afb
Don't fold resources when child of main inspector exits
KoBeWi Aug 4, 2024
b67eb68
Misc code cleanup in EditorFileDialog
KoBeWi Aug 15, 2024
42e5c5b
Allow horizontal scrolling in Tree using Shift
KoBeWi Aug 21, 2024
b01c2ef
Globally remember advanced toggle in project settings
KoBeWi Sep 5, 2024
971e154
GDExtension: Allow directly getting `ObjectID` from `Variant`
dsnopek Sep 17, 2024
22ccfc5
Print error on invalid call_group() calls
KoBeWi Sep 20, 2024
59c6658
Fix ScrollContainer configuration warnings
KoBeWi Sep 21, 2024
866c50a
Add submenu support to EditorContextMenuPlugin
KoBeWi Sep 21, 2024
0ad1820
Metal: implement texture_create_from_extension
kroketio Sep 21, 2024
abf9d24
Make internal unique scene resource ID deterministic
reduz Sep 23, 2024
66d2b0f
Fix closing Theme Editor not actually closing it
KoBeWi Sep 27, 2024
4c5094a
Use dedicated `print_error` method for colored output for unsupported…
dustdfg Sep 27, 2024
1abcfdd
Replace comments with printed warning for Metal on x86_64
dustdfg Sep 28, 2024
c1dc59f
Disable unused Basis Universal features to reduce binary size
Calinou May 14, 2022
f84f734
Expose `LineEdit` `edit` and `unedit` methods.
WhalesState Oct 4, 2024
de07df5
Merge pull request #85321 from Calinou/basis-universal-disable-unused…
akien-mga Oct 4, 2024
36837bf
Merge pull request #91487 from shatyuka/window-style
akien-mga Oct 4, 2024
f032af7
Merge pull request #97304 from kroketio/metal-return-logical-device-h…
akien-mga Oct 4, 2024
4c520e9
[iOS] Add support for dark and tinted icon versions.
bruvzg Oct 3, 2024
975e7c8
[GraphEdit] Only print warning for connection layer deletion when jus…
Geometror Oct 4, 2024
fa1aacb
Configure MSAA properly in canvas renderer's pipelines.
DarioSamo Oct 4, 2024
35b3999
Make the "Quick Open" dialog available via EditorInterface
ydeltastar Sep 30, 2024
d11f203
Merge pull request #97094 from WhalesState/expose-edit-unedit
akien-mga Oct 4, 2024
4dd812f
Merge pull request #97119 from dsnopek/gdextension-object-instance-id
akien-mga Oct 4, 2024
6c15d59
Merge pull request #97362 from reduz/make-unique-scene-id-deterministic
akien-mga Oct 4, 2024
c46d1e4
Merge pull request #97552 from dustdfg/drivers/use_dedicated_print_error
akien-mga Oct 4, 2024
428c4a6
Merge pull request #97633 from ydeltastar/quickly-quick-open
akien-mga Oct 4, 2024
3576e84
Merge pull request #97789 from bruvzg/ios_icons
akien-mga Oct 4, 2024
794920b
Partially revert 96780, remove warnings from project/editor settings …
bruvzg Oct 4, 2024
08af57f
Fix quick open background panel style
passivestar Oct 4, 2024
4a747bd
Add _resource_changed() helper method to EditorResourcePicker
KoBeWi Aug 31, 2024
2135346
Merge pull request #88511 from ryevdokimov/offset-drag-to-instantiate…
akien-mga Oct 4, 2024
aa40773
Merge pull request #94880 from KoBeWi/never-before-seen_way_to_restar…
akien-mga Oct 4, 2024
fe31ede
Merge pull request #95034 from KoBeWi/take_a_problem_and_make_it_wors…
akien-mga Oct 4, 2024
b08a3d8
Merge pull request #95149 from KoBeWi/inspector_mains
akien-mga Oct 4, 2024
0d1873d
Merge pull request #95544 from KoBeWi/clean_code™
akien-mga Oct 4, 2024
19081a8
Merge pull request #95889 from KoBeWi/tree_growing_sideways
akien-mga Oct 4, 2024
c36c153
Merge pull request #96379 from KoBeWi/wind_of_resource_changes
akien-mga Oct 4, 2024
0c3ff56
Merge pull request #96615 from KoBeWi/run_as_administrator
akien-mga Oct 4, 2024
14eee2b
Merge pull request #97240 from KoBeWi/wrong_number
akien-mga Oct 4, 2024
9108c62
Merge pull request #97291 from KoBeWi/visible_in_tree_was_a_billion_d…
akien-mga Oct 4, 2024
e5688f5
Merge pull request #97292 from KoBeWi/infinite_submenus_in_your_editor
akien-mga Oct 4, 2024
def5a04
Merge pull request #97543 from KoBeWi/to_edit_or_not_to_edit
akien-mga Oct 4, 2024
b0d5126
Merge pull request #97570 from dustdfg/ios_macos/print_warning_instea…
akien-mga Oct 4, 2024
f6dbc04
Merge pull request #97809 from Geometror/fix-ge-conn-layer-warning
akien-mga Oct 4, 2024
41c55f0
Merge pull request #97811 from DarioSamo/2d-msaa-fix
akien-mga Oct 4, 2024
aaffffc
Merge pull request #97817 from bruvzg/prop_warn_remove
akien-mga Oct 4, 2024
db66bd3
Merge pull request #97820 from passivestar/quick-open-bg
akien-mga Oct 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion core/config/project_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ bool ProjectSettings::_get(const StringName &p_name, Variant &r_ret) const {
_THREAD_SAFE_METHOD_

if (!props.has(p_name)) {
WARN_PRINT("Property not found: " + String(p_name));
return false;
}
r_ret = props[p_name].variant;
Expand Down
9 changes: 9 additions & 0 deletions core/extension/gdextension_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,14 @@ static GDExtensionBool gdextension_variant_has_key(GDExtensionConstVariantPtr p_
return ret;
}

static GDObjectInstanceID gdextension_variant_get_object_instance_id(GDExtensionConstVariantPtr p_self) {
const Variant *self = (const Variant *)p_self;
if (likely(self->get_type() == Variant::OBJECT)) {
return self->operator ObjectID();
}
return 0;
}

static void gdextension_variant_get_type_name(GDExtensionVariantType p_type, GDExtensionUninitializedVariantPtr r_ret) {
String name = Variant::get_type_name((Variant::Type)p_type);
memnew_placement(r_ret, String(name));
Expand Down Expand Up @@ -1610,6 +1618,7 @@ void gdextension_setup_interface() {
REGISTER_INTERFACE_FUNC(variant_has_method);
REGISTER_INTERFACE_FUNC(variant_has_member);
REGISTER_INTERFACE_FUNC(variant_has_key);
REGISTER_INTERFACE_FUNC(variant_get_object_instance_id);
REGISTER_INTERFACE_FUNC(variant_get_type_name);
REGISTER_INTERFACE_FUNC(variant_can_convert);
REGISTER_INTERFACE_FUNC(variant_can_convert_strict);
Expand Down
15 changes: 15 additions & 0 deletions core/extension/gdextension_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,21 @@ typedef GDExtensionBool (*GDExtensionInterfaceVariantHasMember)(GDExtensionVaria
*/
typedef GDExtensionBool (*GDExtensionInterfaceVariantHasKey)(GDExtensionConstVariantPtr p_self, GDExtensionConstVariantPtr p_key, GDExtensionBool *r_valid);

/**
* @name variant_get_object_instance_id
* @since 4.4
*
* Gets the object instance ID from a variant of type GDEXTENSION_VARIANT_TYPE_OBJECT.
*
* If the variant isn't of type GDEXTENSION_VARIANT_TYPE_OBJECT, then zero will be returned.
* The instance ID will be returned even if the object is no longer valid - use `object_get_instance_by_id()` to check if the object is still valid.
*
* @param p_self A pointer to the Variant.
*
* @return The instance ID for the contained object.
*/
typedef GDObjectInstanceID (*GDExtensionInterfaceVariantGetObjectInstanceId)(GDExtensionConstVariantPtr p_self);

/**
* @name variant_get_type_name
* @since 4.1
Expand Down
33 changes: 22 additions & 11 deletions core/io/resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,31 +99,42 @@ void Resource::set_path_cache(const String &p_path) {
GDVIRTUAL_CALL(_set_path_cache, p_path);
}

static thread_local RandomPCG unique_id_gen(0, RandomPCG::DEFAULT_INC);

void Resource::seed_scene_unique_id(uint32_t p_seed) {
unique_id_gen.seed(p_seed);
}

String Resource::generate_scene_unique_id() {
// Generate a unique enough hash, but still user-readable.
// If it's not unique it does not matter because the saver will try again.
OS::DateTime dt = OS::get_singleton()->get_datetime();
uint32_t hash = hash_murmur3_one_32(OS::get_singleton()->get_ticks_usec());
hash = hash_murmur3_one_32(dt.year, hash);
hash = hash_murmur3_one_32(dt.month, hash);
hash = hash_murmur3_one_32(dt.day, hash);
hash = hash_murmur3_one_32(dt.hour, hash);
hash = hash_murmur3_one_32(dt.minute, hash);
hash = hash_murmur3_one_32(dt.second, hash);
hash = hash_murmur3_one_32(Math::rand(), hash);
if (unique_id_gen.get_seed() == 0) {
OS::DateTime dt = OS::get_singleton()->get_datetime();
uint32_t hash = hash_murmur3_one_32(OS::get_singleton()->get_ticks_usec());
hash = hash_murmur3_one_32(dt.year, hash);
hash = hash_murmur3_one_32(dt.month, hash);
hash = hash_murmur3_one_32(dt.day, hash);
hash = hash_murmur3_one_32(dt.hour, hash);
hash = hash_murmur3_one_32(dt.minute, hash);
hash = hash_murmur3_one_32(dt.second, hash);
hash = hash_murmur3_one_32(Math::rand(), hash);
unique_id_gen.seed(hash);
}

uint32_t random_num = unique_id_gen.rand();

static constexpr uint32_t characters = 5;
static constexpr uint32_t char_count = ('z' - 'a');
static constexpr uint32_t base = char_count + ('9' - '0');
String id;
for (uint32_t i = 0; i < characters; i++) {
uint32_t c = hash % base;
uint32_t c = random_num % base;
if (c < char_count) {
id += String::chr('a' + c);
} else {
id += String::chr('0' + (c - char_count));
}
hash /= base;
random_num /= base;
}

return id;
Expand Down
1 change: 1 addition & 0 deletions core/io/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class Resource : public RefCounted {
virtual void set_path_cache(const String &p_path); // Set raw path without involving resource cache.
_FORCE_INLINE_ bool is_built_in() const { return path_cache.is_empty() || path_cache.contains("::") || path_cache.begins_with("local://"); }

static void seed_scene_unique_id(uint32_t p_seed);
static String generate_scene_unique_id();
void set_scene_unique_id(const String &p_id);
String get_scene_unique_id() const;
Expand Down
40 changes: 20 additions & 20 deletions core/io/resource_format_binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,29 +845,27 @@ Error ResourceLoaderBinary::load() {
}
}

if (ClassDB::has_property(res->get_class_name(), name)) {
if (value.get_type() == Variant::ARRAY) {
Array set_array = value;
bool is_get_valid = false;
Variant get_value = res->get(name, &is_get_valid);
if (is_get_valid && get_value.get_type() == Variant::ARRAY) {
Array get_array = get_value;
if (!set_array.is_same_typed(get_array)) {
value = Array(set_array, get_array.get_typed_builtin(), get_array.get_typed_class_name(), get_array.get_typed_script());
}
if (value.get_type() == Variant::ARRAY) {
Array set_array = value;
bool is_get_valid = false;
Variant get_value = res->get(name, &is_get_valid);
if (is_get_valid && get_value.get_type() == Variant::ARRAY) {
Array get_array = get_value;
if (!set_array.is_same_typed(get_array)) {
value = Array(set_array, get_array.get_typed_builtin(), get_array.get_typed_class_name(), get_array.get_typed_script());
}
}
}

if (value.get_type() == Variant::DICTIONARY) {
Dictionary set_dict = value;
bool is_get_valid = false;
Variant get_value = res->get(name, &is_get_valid);
if (is_get_valid && get_value.get_type() == Variant::DICTIONARY) {
Dictionary get_dict = get_value;
if (!set_dict.is_same_typed(get_dict)) {
value = Dictionary(set_dict, get_dict.get_typed_key_builtin(), get_dict.get_typed_key_class_name(), get_dict.get_typed_key_script(),
get_dict.get_typed_value_builtin(), get_dict.get_typed_value_class_name(), get_dict.get_typed_value_script());
}
if (value.get_type() == Variant::DICTIONARY) {
Dictionary set_dict = value;
bool is_get_valid = false;
Variant get_value = res->get(name, &is_get_valid);
if (is_get_valid && get_value.get_type() == Variant::DICTIONARY) {
Dictionary get_dict = get_value;
if (!set_dict.is_same_typed(get_dict)) {
value = Dictionary(set_dict, get_dict.get_typed_key_builtin(), get_dict.get_typed_key_class_name(), get_dict.get_typed_key_script(),
get_dict.get_typed_value_builtin(), get_dict.get_typed_value_class_name(), get_dict.get_typed_value_script());
}
}
}
Expand Down Expand Up @@ -2136,6 +2134,8 @@ static String _resource_get_class(Ref<Resource> p_resource) {
}

Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) {
Resource::seed_scene_unique_id(p_path.hash());

Error err;
Ref<FileAccess> f;
if (p_flags & ResourceSaver::FLAG_COMPRESS) {
Expand Down
18 changes: 18 additions & 0 deletions doc/classes/EditorContextMenuPlugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,24 @@
[/codeblock]
</description>
</method>
<method name="add_context_submenu_item">
<return type="void" />
<param index="0" name="name" type="String" />
<param index="1" name="menu" type="PopupMenu" />
<param index="2" name="icon" type="Texture2D" default="null" />
<description>
Add a submenu to the context menu of the plugin's specified slot. The submenu is not automatically handled, you need to connect to its signals yourself. Also the submenu is freed on every popup, so provide a new [PopupMenu] every time.
[codeblock]
func _popup_menu(paths):
var popup_menu = PopupMenu.new()
popup_menu.add_item("Blue")
popup_menu.add_item("White")
popup_menu.id_pressed.connect(_on_color_submenu_option)

add_context_menu_item("Set Node Color", popup_menu)
[/codeblock]
</description>
</method>
<method name="add_menu_shortcut">
<return type="void" />
<param index="0" name="shortcut" type="Shortcut" />
Expand Down
8 changes: 8 additions & 0 deletions doc/classes/EditorInterface.xml
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,14 @@
[/codeblock]
</description>
</method>
<method name="popup_quick_open">
<return type="void" />
<param index="0" name="callback" type="Callable" />
<param index="1" name="base_types" type="StringName[]" default="[]" />
<description>
Pops up an editor dialog for quick selecting a resource file. The [param callback] must take a single argument of type [String] which will contain the path of the selected resource or be empty if the dialog is canceled. If [param base_types] is provided, the dialog will only show resources that match these types. Only types deriving from [Resource] are supported.
</description>
</method>
<method name="reload_scene_from_path">
<return type="void" />
<param index="0" name="scene_filepath" type="String" />
Expand Down
15 changes: 14 additions & 1 deletion doc/classes/LineEdit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- When the [LineEdit] control is focused using the keyboard arrow keys, it will only gain focus and not enter edit mode.
- To enter edit mode, click on the control with the mouse or press the [code]ui_text_submit[/code] action (by default [kbd]Enter[/kbd] or [kbd]Kp Enter[/kbd]).
- To exit edit mode, press [code]ui_text_submit[/code] or [code]ui_cancel[/code] (by default [kbd]Escape[/kbd]) actions.
- Check [method is_editing] and [signal editing_toggled] for more information.
- Check [method edit], [method unedit], [method is_editing], and [signal editing_toggled] for more information.
[b]Important:[/b]
- Focusing the [LineEdit] with [code]ui_focus_next[/code] (by default [kbd]Tab[/kbd]) or [code]ui_focus_prev[/code] (by default [kbd]Shift + Tab[/kbd]) or [method Control.grab_focus] still enters edit mode (for compatibility).
[LineEdit] features many built-in shortcuts that are always available ([kbd]Ctrl[/kbd] here maps to [kbd]Cmd[/kbd] on macOS):
Expand Down Expand Up @@ -75,6 +75,13 @@
Clears the current selection.
</description>
</method>
<method name="edit">
<return type="void" />
<description>
Allows entering edit mode whether the [LineEdit] is focused or not.
Use [method Callable.call_deferred] if you want to enter edit mode on [signal text_submitted].
</description>
</method>
<method name="get_menu" qualifiers="const">
<return type="PopupMenu" />
<description>
Expand Down Expand Up @@ -223,6 +230,12 @@
Selects the whole [String].
</description>
</method>
<method name="unedit">
<return type="void" />
<description>
Allows exiting edit mode while preserving focus.
</description>
</method>
</methods>
<members>
<member name="alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
Expand Down
8 changes: 5 additions & 3 deletions drivers/SCsub
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python
from misc.utility.scons_hints import *

from methods import print_error

Import("env")

env.drivers_sources = []
Expand All @@ -20,7 +22,7 @@ if env["platform"] == "windows":
SConscript("backtrace/SCsub")
if env["xaudio2"]:
if "xaudio2" not in supported:
print("Target platform '{}' does not support the XAudio2 audio driver. Aborting.".format(env["platform"]))
print_error("Target platform '{}' does not support the XAudio2 audio driver".format(env["platform"]))
Exit(255)
SConscript("xaudio2/SCsub")

Expand All @@ -34,7 +36,7 @@ if env["vulkan"]:
SConscript("vulkan/SCsub")
if env["d3d12"]:
if "d3d12" not in supported:
print("Target platform '{}' does not support the D3D12 rendering driver. Aborting.".format(env["platform"]))
print_error("Target platform '{}' does not support the D3D12 rendering driver".format(env["platform"]))
Exit(255)
SConscript("d3d12/SCsub")
if env["opengl3"]:
Expand All @@ -43,7 +45,7 @@ if env["opengl3"]:
SConscript("egl/SCsub")
if env["metal"]:
if "metal" not in supported:
print("Target platform '{}' does not support the Metal rendering driver. Aborting.".format(env["platform"]))
print_error("Target platform '{}' does not support the Metal rendering driver".format(env["platform"]))
Exit(255)
SConscript("metal/SCsub")

Expand Down
6 changes: 5 additions & 1 deletion drivers/metal/rendering_device_driver_metal.mm
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,11 @@ _FORCE_INLINE_ MTLSize mipmapLevelSizeFromSize(MTLSize p_size, NSUInteger p_leve
}

RDD::TextureID RenderingDeviceDriverMetal::texture_create_from_extension(uint64_t p_native_texture, TextureType p_type, DataFormat p_format, uint32_t p_array_layers, bool p_depth_stencil) {
ERR_FAIL_V_MSG(RDD::TextureID(), "not implemented");
id<MTLTexture> obj = (__bridge id<MTLTexture>)(void *)(uintptr_t)p_native_texture;

// We only need to create a RDD::TextureID for an existing, natively-provided texture.

return rid::make(obj);
}

RDD::TextureID RenderingDeviceDriverMetal::texture_create_shared(TextureID p_original_texture, const TextureView &p_view) {
Expand Down
2 changes: 2 additions & 0 deletions editor/code_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,8 @@ void FindReplaceBar::_search_text_submitted(const String &p_text) {
} else {
search_next();
}

callable_mp(search_text, &LineEdit::edit).call_deferred();
}

void FindReplaceBar::_replace_text_submitted(const String &p_text) {
Expand Down
26 changes: 26 additions & 0 deletions editor/editor_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/filesystem_dock.h"
#include "editor/gui/editor_quick_open_dialog.h"
#include "editor/gui/editor_run_bar.h"
#include "editor/gui/editor_scene_tabs.h"
#include "editor/gui/scene_tree_editor.h"
Expand Down Expand Up @@ -336,6 +337,24 @@ void EditorInterface::popup_property_selector(Object *p_object, const Callable &
property_selector->connect(SNAME("canceled"), canceled_callback, CONNECT_DEFERRED);
}

void EditorInterface::popup_quick_open(const Callable &p_callback, const TypedArray<StringName> &p_base_types) {
StringName required_type = SNAME("Resource");
Vector<StringName> base_types;
if (p_base_types.is_empty()) {
base_types.append(required_type);
} else {
for (int i = 0; i < p_base_types.size(); i++) {
StringName type = p_base_types[i];
ERR_FAIL_COND_MSG(!(ClassDB::is_parent_class(type, required_type) || EditorNode::get_editor_data().script_class_is_parent(type, required_type)), "Only types deriving from Resource are supported in the quick open dialog.");
base_types.append(type);
}
}

EditorQuickOpenDialog *quick_open = EditorNode::get_singleton()->get_quick_open_dialog();
quick_open->connect(SNAME("canceled"), callable_mp(this, &EditorInterface::_quick_open).bind(String(), p_callback));
quick_open->popup_dialog(base_types, callable_mp(this, &EditorInterface::_quick_open).bind(p_callback));
}

void EditorInterface::_node_selected(const NodePath &p_node_path, const Callable &p_callback) {
const NodePath path = get_edited_scene_root()->get_path().rel_path_to(p_node_path);
_call_dialog_callback(p_callback, path, "node selected");
Expand All @@ -353,6 +372,12 @@ void EditorInterface::_property_selection_canceled(const Callable &p_callback) {
_call_dialog_callback(p_callback, NodePath(), "property selection canceled");
}

void EditorInterface::_quick_open(const String &p_file_path, const Callable &p_callback) {
EditorQuickOpenDialog *quick_open = EditorNode::get_singleton()->get_quick_open_dialog();
quick_open->disconnect(SNAME("canceled"), callable_mp(this, &EditorInterface::_quick_open));
_call_dialog_callback(p_callback, p_file_path, "quick open");
}

void EditorInterface::_call_dialog_callback(const Callable &p_callback, const Variant &p_selected, const String &p_context) {
Callable::CallError ce;
Variant ret;
Expand Down Expand Up @@ -568,6 +593,7 @@ void EditorInterface::_bind_methods() {

ClassDB::bind_method(D_METHOD("popup_node_selector", "callback", "valid_types", "current_value"), &EditorInterface::popup_node_selector, DEFVAL(TypedArray<StringName>()), DEFVAL(Variant()));
ClassDB::bind_method(D_METHOD("popup_property_selector", "object", "callback", "type_filter", "current_value"), &EditorInterface::popup_property_selector, DEFVAL(PackedInt32Array()), DEFVAL(String()));
ClassDB::bind_method(D_METHOD("popup_quick_open", "callback", "base_types"), &EditorInterface::popup_quick_open, DEFVAL(TypedArray<StringName>()));

// Editor docks.

Expand Down
2 changes: 2 additions & 0 deletions editor/editor_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class EditorInterface : public Object {
void _node_selection_canceled(const Callable &p_callback);
void _property_selected(const String &p_property_name, const Callable &p_callback);
void _property_selection_canceled(const Callable &p_callback);
void _quick_open(const String &p_file_path, const Callable &p_callback);
void _call_dialog_callback(const Callable &p_callback, const Variant &p_selected, const String &p_context);

// Editor tools.
Expand Down Expand Up @@ -138,6 +139,7 @@ class EditorInterface : public Object {
void popup_node_selector(const Callable &p_callback, const TypedArray<StringName> &p_valid_types = TypedArray<StringName>(), Node *p_current_value = nullptr);
// Must use Vector<int> because exposing Vector<Variant::Type> is not supported.
void popup_property_selector(Object *p_object, const Callable &p_callback, const PackedInt32Array &p_type_filter = PackedInt32Array(), const String &p_current_value = String());
void popup_quick_open(const Callable &p_callback, const TypedArray<StringName> &p_base_types = TypedArray<StringName>());

// Editor docks.

Expand Down
Loading
Loading