diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-06-28 08:07:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-28 08:07:00 +0200 |
commit | 4c14bf74820a780d11c786cff8b935b2c64bf3bf (patch) | |
tree | 452562114221226f16ce214285fc20d37d39f2c5 /editor | |
parent | b863c40356b4b95192d1a1e2718db7d7aced4235 (diff) | |
parent | 9490146a164194bc45dfe26b43da1def60e773d9 (diff) |
Merge pull request #62470 from vnen/gdscript-export-nodes
GDScript: Enable exporting nodes to the inspector
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_properties.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index e5105fdedc..aff328bba7 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -3035,13 +3035,17 @@ String EditorPropertyNodePath::_get_meta_pointer_property() const { Variant EditorPropertyNodePath::_get_cache_value(const StringName &p_prop, bool &r_valid) const { if (p_prop == get_edited_property()) { r_valid = true; - return const_cast<EditorPropertyNodePath *>(this)->get_edited_object()->get(_get_meta_pointer_property(), &r_valid); + return const_cast<EditorPropertyNodePath *>(this)->get_edited_object()->get(pointer_mode ? StringName(_get_meta_pointer_property()) : get_edited_property(), &r_valid); } return Variant(); } StringName EditorPropertyNodePath::_get_revert_property() const { - return _get_meta_pointer_property(); + if (pointer_mode) { + return _get_meta_pointer_property(); + } else { + return get_edited_property(); + } } void EditorPropertyNodePath::_node_selected(const NodePath &p_path) { |