diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-02 23:03:46 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-02 23:03:46 -0300 |
commit | 118eed485e8f928a5a0dab530ae93211afa10525 (patch) | |
tree | 83efb5cbcebb7046e5b64dfe1712475a7d3b7f14 /scene/resources/scene_preloader.cpp | |
parent | ce26eb74bca48f16e9a34b4eb1c34e50dfc5daae (diff) |
ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant.
All usages of "type" to refer to classes were renamed to "class"
ClassDB has been exposed to GDScript.
OBJ_TYPE() macro is now GDCLASS()
Diffstat (limited to 'scene/resources/scene_preloader.cpp')
-rw-r--r-- | scene/resources/scene_preloader.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/scene/resources/scene_preloader.cpp b/scene/resources/scene_preloader.cpp index 6fa4e059e1..575c188009 100644 --- a/scene/resources/scene_preloader.cpp +++ b/scene/resources/scene_preloader.cpp @@ -60,12 +60,12 @@ Node *ScenePreloader::instance() const { const NodeData &n=nd[i]; - if (!ObjectTypeDB::is_type_enabled(snames[n.type])) { + if (!ClassDB::is_class_enabled(snames[n.type])) { ret_nodes[i]=NULL; continue; } - Object * obj = ObjectTypeDB::instance(snames[ n.type ]); + Object * obj = ClassDB::instance(snames[ n.type ]); ERR_FAIL_COND_V(!obj,NULL); Node *node = obj->cast_to<Node>(); ERR_FAIL_COND_V(!node,NULL); @@ -149,7 +149,7 @@ void ScenePreloader::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Ma NodeData nd; nd.name=_nm_get_string(p_node->get_name(),name_map); - nd.type=_nm_get_string(p_node->get_type(),name_map); + nd.type=_nm_get_string(p_node->get_class(),name_map); nd.parent=p_parent_idx; List<PropertyInfo> plist; @@ -423,12 +423,12 @@ Dictionary ScenePreloader::_get_bundled_scene() const { void ScenePreloader::_bind_methods() { - ObjectTypeDB::bind_method(_MD("load_scene","path"),&ScenePreloader::load_scene); - ObjectTypeDB::bind_method(_MD("get_scene_path"),&ScenePreloader::get_scene_path); - ObjectTypeDB::bind_method(_MD("instance:Node"),&ScenePreloader::instance); - ObjectTypeDB::bind_method(_MD("can_instance"),&ScenePreloader::can_instance); - ObjectTypeDB::bind_method(_MD("_set_bundled_scene"),&ScenePreloader::_set_bundled_scene); - ObjectTypeDB::bind_method(_MD("_get_bundled_scene"),&ScenePreloader::_get_bundled_scene); + ClassDB::bind_method(_MD("load_scene","path"),&ScenePreloader::load_scene); + ClassDB::bind_method(_MD("get_scene_path"),&ScenePreloader::get_scene_path); + ClassDB::bind_method(_MD("instance:Node"),&ScenePreloader::instance); + ClassDB::bind_method(_MD("can_instance"),&ScenePreloader::can_instance); + ClassDB::bind_method(_MD("_set_bundled_scene"),&ScenePreloader::_set_bundled_scene); + ClassDB::bind_method(_MD("_get_bundled_scene"),&ScenePreloader::_get_bundled_scene); ADD_PROPERTY( PropertyInfo(Variant::DICTIONARY,"_bundled",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_BUNDLE),_SCS("_set_bundled_scene"),_SCS("_get_bundled_scene")); #if 0 |