@@ -2922,8 +2922,7 @@ void EditorPropertyNodePath::update_property() {
29222922 assign->set_icon (EditorNode::get_singleton ()->get_object_icon (target_node, " Node" ));
29232923}
29242924
2925- void EditorPropertyNodePath::setup (const NodePath &p_base_hint, const Vector<StringName> &p_valid_types, bool p_use_path_from_scene_root, bool p_editing_node) {
2926- base_hint = p_base_hint;
2925+ void EditorPropertyNodePath::setup (const Vector<StringName> &p_valid_types, bool p_use_path_from_scene_root, bool p_editing_node) {
29272926 valid_types = p_valid_types;
29282927 editing_node = p_editing_node;
29292928 use_path_from_scene_root = p_use_path_from_scene_root;
@@ -2943,10 +2942,6 @@ void EditorPropertyNodePath::_notification(int p_what) {
29432942}
29442943
29452944Node *EditorPropertyNodePath::get_base_node () {
2946- if (!base_hint.is_empty () && get_tree ()->get_root ()->has_node (base_hint)) {
2947- return get_tree ()->get_root ()->get_node (base_hint);
2948- }
2949-
29502945 Node *base_node = Object::cast_to<Node>(get_edited_object ());
29512946
29522947 if (!base_node) {
@@ -3800,7 +3795,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
38003795 if (p_hint == PROPERTY_HINT_NODE_PATH_VALID_TYPES && !p_hint_text.is_empty ()) {
38013796 Vector<String> types = p_hint_text.split (" ," , false );
38023797 Vector<StringName> sn = Variant (types); // convert via variant
3803- editor->setup (NodePath (), sn, (p_usage & PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT));
3798+ editor->setup (sn, (p_usage & PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT));
38043799 }
38053800 return editor;
38063801
@@ -3814,7 +3809,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
38143809 EditorPropertyNodePath *editor = memnew (EditorPropertyNodePath);
38153810 Vector<String> types = p_hint_text.split (" ," , false );
38163811 Vector<StringName> sn = Variant (types); // convert via variant
3817- editor->setup (NodePath (), sn, false , true );
3812+ editor->setup (sn, false , true );
38183813 return editor;
38193814 } else {
38203815 EditorPropertyResource *editor = memnew (EditorPropertyResource);
0 commit comments