diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-06-20 09:39:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-20 09:39:29 +0200 |
commit | 4fcc5891450a7dca9c8ebae6ff3765f5f060c442 (patch) | |
tree | d10b935e7a77774960fefd93ac306db447cc2bfd /editor/import/resource_importer_obj.cpp | |
parent | 60dcc4f39c0e6289dba691225c002cd6e77be6ba (diff) | |
parent | e28fd07b2bbe78db0f286604a6eb469d8a0664be (diff) |
Merge pull request #49693 from LightningAA/instance-is-not-a-verb
Rename `instance()`->`instantiate()` when it's a verb
Diffstat (limited to 'editor/import/resource_importer_obj.cpp')
-rw-r--r-- | editor/import/resource_importer_obj.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp index 3aa17ee581..01603c0a6a 100644 --- a/editor/import/resource_importer_obj.cpp +++ b/editor/import/resource_importer_obj.cpp @@ -57,7 +57,7 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Stand //vertex current_name = l.replace("newmtl", "").strip_edges(); - current.instance(); + current.instantiate(); current->set_name(current_name); material_map[current_name] = current; } else if (l.begins_with("Ka ")) { @@ -207,7 +207,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_ ERR_FAIL_COND_V_MSG(!f, ERR_CANT_OPEN, vformat("Couldn't open OBJ file '%s', it may not exist or not be readable.", p_path)); Ref<ArrayMesh> mesh; - mesh.instance(); + mesh.instantiate(); bool generate_tangents = p_generate_tangents; Vector3 scale_mesh = p_scale_mesh; @@ -378,7 +378,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_ if (!p_single_mesh) { mesh->set_name(name); r_meshes.push_back(mesh); - mesh.instance(); + mesh.instantiate(); current_group = ""; current_material = ""; } @@ -440,7 +440,7 @@ Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, in for (List<Ref<Mesh>>::Element *E = meshes.front(); E; E = E->next()) { Ref<EditorSceneImporterMesh> mesh; - mesh.instance(); + mesh.instantiate(); Ref<Mesh> m = E->get(); for (int i = 0; i < m->get_surface_count(); i++) { mesh->add_surface(m->surface_get_primitive_type(i), m->surface_get_arrays(i), Array(), Dictionary(), m->surface_get_material(i)); |