You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-27 15:57:02 +00:00
Hint fallback property as node when it is a node
(cherry picked from commit e7c90e0884)
This commit is contained in:
committed by
Rémi Verschelde
parent
d0a36f8111
commit
630b0a00e2
@@ -694,7 +694,12 @@ void PlaceHolderScriptInstance::property_set_fallback(const StringName &p_name,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!found) {
|
if (!found) {
|
||||||
properties.push_back(PropertyInfo(p_value.get_type(), p_name, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_SCRIPT_VARIABLE));
|
PropertyHint hint = PROPERTY_HINT_NONE;
|
||||||
|
const Object *obj = p_value.get_validated_object();
|
||||||
|
if (obj && obj->is_class("Node")) {
|
||||||
|
hint = PROPERTY_HINT_NODE_TYPE;
|
||||||
|
}
|
||||||
|
properties.push_back(PropertyInfo(p_value.get_type(), p_name, hint, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_SCRIPT_VARIABLE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user