Fix binding some core API methods only in tools builds
This commit is contained in:
@@ -2567,18 +2567,21 @@ Array Node::_get_children() const {
|
||||
return arr;
|
||||
}
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
void Node::set_import_path(const NodePath &p_import_path) {
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
data.import_path = p_import_path;
|
||||
#endif
|
||||
}
|
||||
|
||||
NodePath Node::get_import_path() const {
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
return data.import_path;
|
||||
}
|
||||
|
||||
#else
|
||||
return NodePath();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void _add_nodes_to_options(const Node *p_base, const Node *p_node, List<String> *r_options) {
|
||||
|
||||
@@ -2737,13 +2740,10 @@ void Node::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("rpc_config", "method", "mode"), &Node::rpc_config);
|
||||
ClassDB::bind_method(D_METHOD("rset_config", "property", "mode"), &Node::rset_config);
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
ClassDB::bind_method(D_METHOD("_set_import_path", "import_path"), &Node::set_import_path);
|
||||
ClassDB::bind_method(D_METHOD("_get_import_path"), &Node::get_import_path);
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::NODE_PATH, "_import_path", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_import_path", "_get_import_path");
|
||||
|
||||
#endif
|
||||
|
||||
{
|
||||
MethodInfo mi;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user