@@ -301,6 +301,10 @@ void EditorPropertyArray::_object_id_selected(const StringName &p_property, Obje
301301 emit_signal (SNAME (" object_id_selected" ), p_property, p_id);
302302}
303303
304+ void EditorPropertyArray::_resource_selected (const String &p_path, Ref<Resource> p_resource) {
305+ emit_signal (SNAME (" resource_selected" ), get_edited_property (), p_resource);
306+ }
307+
304308void EditorPropertyArray::_create_new_property_slot () {
305309 int idx = slots.size ();
306310 HBoxContainer *hbox = memnew (HBoxContainer);
@@ -516,6 +520,9 @@ void EditorPropertyArray::update_property() {
516520 new_prop->set_use_folding (is_using_folding ());
517521 new_prop->connect (SNAME (" property_changed" ), callable_mp (this , &EditorPropertyArray::_property_changed));
518522 new_prop->connect (SNAME (" object_id_selected" ), callable_mp (this , &EditorPropertyArray::_object_id_selected));
523+ if (value_type == Variant::OBJECT) {
524+ new_prop->connect (" resource_selected" , callable_mp (this , &EditorPropertyArray::_resource_selected), CONNECT_DEFERRED);
525+ }
519526 new_prop->set_h_size_flags (SIZE_EXPAND_FILL);
520527 new_prop->set_read_only (is_read_only ());
521528
@@ -1415,6 +1422,9 @@ void EditorPropertyDictionary::update_property() {
14151422 new_prop->set_use_folding (is_using_folding ());
14161423 new_prop->connect (SNAME (" property_changed" ), callable_mp (this , &EditorPropertyDictionary::_property_changed));
14171424 new_prop->connect (SNAME (" object_id_selected" ), callable_mp (this , &EditorPropertyDictionary::_object_id_selected));
1425+ if (value_type == Variant::OBJECT) {
1426+ new_prop->connect (" resource_selected" , callable_mp (this , &EditorPropertyDictionary::_resource_selected), CONNECT_DEFERRED);
1427+ }
14181428 new_prop->set_h_size_flags (SIZE_EXPAND_FILL);
14191429 if (slot.index != EditorPropertyDictionaryObject::NEW_KEY_INDEX && slot.index != EditorPropertyDictionaryObject::NEW_VALUE_INDEX) {
14201430 new_prop->set_label (" " );
@@ -1477,6 +1487,10 @@ void EditorPropertyDictionary::_object_id_selected(const StringName &p_property,
14771487 emit_signal (SNAME (" object_id_selected" ), p_property, p_id);
14781488}
14791489
1490+ void EditorPropertyDictionary::_resource_selected (const String &p_path, Ref<Resource> p_resource) {
1491+ emit_signal (SNAME (" resource_selected" ), get_edited_property (), p_resource);
1492+ }
1493+
14801494void EditorPropertyDictionary::_notification (int p_what) {
14811495 switch (p_what) {
14821496 case NOTIFICATION_THEME_CHANGED: {
0 commit comments