Rename instance()->instantiate() when it's a verb
This commit is contained in:
parent
60dcc4f39c
commit
e28fd07b2b
371 changed files with 1318 additions and 1318 deletions
|
|
@ -65,7 +65,7 @@ Error ResourceLoaderText::_parse_sub_resource_dummy(DummyReadData *p_data, Varia
|
|||
|
||||
if (!p_data->resource_map.has(index)) {
|
||||
Ref<DummyResource> dr;
|
||||
dr.instance();
|
||||
dr.instantiate();
|
||||
dr->set_subindex(index);
|
||||
p_data->resource_map[index] = dr;
|
||||
p_data->resource_set.insert(dr);
|
||||
|
|
@ -183,7 +183,7 @@ Error ResourceLoaderText::_parse_ext_resource(VariantParser::Stream *p_stream, R
|
|||
|
||||
Ref<PackedScene> ResourceLoaderText::_parse_node_tag(VariantParser::ResourceParser &parser) {
|
||||
Ref<PackedScene> packed_scene;
|
||||
packed_scene.instance();
|
||||
packed_scene.instantiate();
|
||||
|
||||
while (true) {
|
||||
if (next_tag.name == "node") {
|
||||
|
|
@ -208,7 +208,7 @@ Ref<PackedScene> ResourceLoaderText::_parse_node_tag(VariantParser::ResourcePars
|
|||
if (next_tag.fields.has("type")) {
|
||||
type = packed_scene->get_state()->add_name(next_tag.fields["type"]);
|
||||
} else {
|
||||
type = SceneState::TYPE_INSTANCED; //no type? assume this was instanced
|
||||
type = SceneState::TYPE_INSTANCED; //no type? assume this was instantiated
|
||||
}
|
||||
|
||||
if (next_tag.fields.has("instance")) {
|
||||
|
|
@ -522,7 +522,7 @@ Error ResourceLoaderText::load() {
|
|||
} else {
|
||||
//create
|
||||
|
||||
Object *obj = ClassDB::instance(type);
|
||||
Object *obj = ClassDB::instantiate(type);
|
||||
if (!obj) {
|
||||
error_text += "Can't create sub resource of type: " + type;
|
||||
_printerr();
|
||||
|
|
@ -604,7 +604,7 @@ Error ResourceLoaderText::load() {
|
|||
}
|
||||
|
||||
if (!resource.is_valid()) {
|
||||
Object *obj = ClassDB::instance(res_type);
|
||||
Object *obj = ClassDB::instantiate(res_type);
|
||||
if (!obj) {
|
||||
error_text += "Can't create sub resource of type: " + res_type;
|
||||
_printerr();
|
||||
|
|
@ -1022,7 +1022,7 @@ Error ResourceLoaderText::save_as_binary(FileAccess *p_f, const String &p_path)
|
|||
|
||||
int lindex = dummy_read.external_resources.size();
|
||||
Ref<DummyResource> dr;
|
||||
dr.instance();
|
||||
dr.instantiate();
|
||||
dr->set_path("res://dummy" + itos(lindex)); //anything is good to detect it for saving as external
|
||||
dummy_read.external_resources[dr] = lindex;
|
||||
dummy_read.rev_external_resources[index] = dr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue