diff --git a/library/voxel_library_merger_pcm.cpp b/library/voxel_library_merger_pcm.cpp index 3a63ca9..9689f84 100644 --- a/library/voxel_library_merger_pcm.cpp +++ b/library/voxel_library_merger_pcm.cpp @@ -120,7 +120,7 @@ void VoxelLibraryMergerPCM::_material_cache_get_key(Ref chunk) { //print_error("New cache: " + hstr); Ref cache; - cache.instance(); + cache.instantiate(); cache->inc_ref_count(); cache->set_texture_flags(get_texture_flags()); @@ -295,7 +295,7 @@ void VoxelLibraryMergerPCM::_prop_material_cache_get_key(Ref chunk) //print_error("New prop cache: " + hstr); Ref cache; - cache.instance(); + cache.instantiate(); cache->inc_ref_count(); cache->set_texture_flags(get_texture_flags()); @@ -514,7 +514,7 @@ void VoxelLibraryMergerPCM::set_prop(const int index, const Ref &value void VoxelLibraryMergerPCM::remove_prop(const int index) { ERR_FAIL_INDEX(index, _props.size()); - _props.remove(index); + _props.remove_at(index); } int VoxelLibraryMergerPCM::get_num_props() const { return _props.size(); @@ -708,7 +708,7 @@ void VoxelLibraryMergerPCM::_setup_material_albedo(const int material_index, con } VoxelLibraryMergerPCM::VoxelLibraryMergerPCM() { - _packer.instance(); + _packer.instantiate(); #if GODOT4 #warning implement @@ -720,7 +720,7 @@ VoxelLibraryMergerPCM::VoxelLibraryMergerPCM() { _packer->set_keep_original_atlases(false); _packer->set_margin(0); - _prop_packer.instance(); + _prop_packer.instantiate(); #if GODOT4 #warning implement diff --git a/library/voxel_material_cache_pcm.cpp b/library/voxel_material_cache_pcm.cpp index c64c2bc..36e9003 100644 --- a/library/voxel_material_cache_pcm.cpp +++ b/library/voxel_material_cache_pcm.cpp @@ -179,7 +179,7 @@ void VoxelMaterialCachePCM::_setup_material_albedo(Ref texture) { } VoxelMaterialCachePCM::VoxelMaterialCachePCM() { - _packer.instance(); + _packer.instantiate(); #if GODOT4 #warning implement diff --git a/world/blocky/voxel_world_blocky.cpp b/world/blocky/voxel_world_blocky.cpp index 3a3b3f8..99121e5 100644 --- a/world/blocky/voxel_world_blocky.cpp +++ b/world/blocky/voxel_world_blocky.cpp @@ -48,26 +48,26 @@ Ref VoxelWorldBlocky::_create_chunk(int x, int y, int z, Ref s; - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL); tj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_DROP_UV2); tj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS); tj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE); tj->add_jobs_step(s); #ifdef MESH_UTILS_PRESENT - s.instance(); + s.instantiate(); Ref fqms; - fqms.instance(); + fqms.instantiate(); s->set_fqms(fqms); s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH); s->set_simplification_step_ratio(0.8); @@ -83,22 +83,22 @@ Ref VoxelWorldBlocky::_create_chunk(int x, int y, int z, Refset_prop_mesher(Ref(memnew(VoxelMesherBlocky))); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL); pj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS); pj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE); pj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH); #ifdef MESH_UTILS_PRESENT - fqms.instance(); + fqms.instantiate(); s->set_fqms(fqms); s->set_simplification_steps(2); #endif diff --git a/world/cubic/voxel_world_cubic.cpp b/world/cubic/voxel_world_cubic.cpp index cf6db86..2f75637 100644 --- a/world/cubic/voxel_world_cubic.cpp +++ b/world/cubic/voxel_world_cubic.cpp @@ -46,26 +46,26 @@ Ref VoxelWorldCubic::_create_chunk(int x, int y, int z, Ref s; - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL); tj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_DROP_UV2); tj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS); tj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE); tj->add_jobs_step(s); #ifdef MESH_UTILS_PRESENT - s.instance(); + s.instantiate(); Ref fqms; - fqms.instance(); + fqms.instantiate(); s->set_fqms(fqms); s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH); s->set_simplification_step_ratio(0.8); @@ -84,22 +84,22 @@ Ref VoxelWorldCubic::_create_chunk(int x, int y, int z, Refset_prop_mesher(Ref(memnew(VoxelMesherCubic))); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL); pj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS); pj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE); pj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH); #ifdef MESH_UTILS_PRESENT - fqms.instance(); + fqms.instantiate(); s->set_fqms(fqms); s->set_simplification_steps(2); #endif diff --git a/world/default/voxel_world_default.cpp b/world/default/voxel_world_default.cpp index 9a4c37b..5e999d2 100644 --- a/world/default/voxel_world_default.cpp +++ b/world/default/voxel_world_default.cpp @@ -194,32 +194,32 @@ Ref VoxelWorldDefault::_create_chunk(int x, int y, int z, Refjob_get_count() == 0) { Ref lj; - lj.instance(); + lj.instantiate(); Ref tj; - tj.instance(); + tj.instantiate(); Ref s; - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL); tj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_DROP_UV2); tj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS); tj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE); tj->add_jobs_step(s); #ifdef MESH_UTILS_PRESENT - s.instance(); + s.instantiate(); Ref fqms; - fqms.instance(); + fqms.instantiate(); s->set_fqms(fqms); s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH); s->set_simplification_step_ratio(0.8); @@ -232,25 +232,25 @@ Ref VoxelWorldDefault::_create_chunk(int x, int y, int z, Refadd_liquid_mesher(Ref(memnew(VoxelMesherDefault()))); Ref pj; - pj.instance(); + pj.instantiate(); pj->set_prop_mesher(Ref(memnew(VoxelMesherDefault))); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL); pj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS); pj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE); pj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH); #ifdef MESH_UTILS_PRESENT - fqms.instance(); + fqms.instantiate(); s->set_fqms(fqms); s->set_simplification_steps(2); #endif diff --git a/world/marching_cubes/voxel_world_marching_cubes.cpp b/world/marching_cubes/voxel_world_marching_cubes.cpp index b6d263b..8a5aca8 100644 --- a/world/marching_cubes/voxel_world_marching_cubes.cpp +++ b/world/marching_cubes/voxel_world_marching_cubes.cpp @@ -46,26 +46,26 @@ Ref VoxelWorldMarchingCubes::_create_chunk(int x, int y, int z, Ref< tj.INSTANCE(); Ref s; - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL); tj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_DROP_UV2); tj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS); tj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE); tj->add_jobs_step(s); #ifdef MESH_UTILS_PRESENT - s.instance(); + s.instantiate(); Ref fqms; - fqms.instance(); + fqms.instantiate(); s->set_fqms(fqms); s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH); s->set_simplification_step_ratio(0.8); @@ -85,22 +85,22 @@ Ref VoxelWorldMarchingCubes::_create_chunk(int x, int y, int z, Ref< pj.INSTANCE(); pj->set_prop_mesher(Ref(memnew(VoxelMesherMarchingCubes))); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL); pj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS); pj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE); pj->add_jobs_step(s); - s.instance(); + s.instantiate(); s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH); #ifdef MESH_UTILS_PRESENT - fqms.instance(); + fqms.instantiate(); s->set_fqms(fqms); s->set_simplification_steps(2); #endif diff --git a/world/voxel_world.cpp b/world/voxel_world.cpp index e55979f..55ae6c1 100644 --- a/world/voxel_world.cpp +++ b/world/voxel_world.cpp @@ -413,7 +413,7 @@ void VoxelWorld::chunk_setup(Ref chunk) { Ref VoxelWorld::_create_chunk(const int x, const int y, const int z, Ref chunk) { if (!chunk.is_valid()) { #if VERSION_MAJOR < 4 - chunk.instance(); + chunk.instantiate(); #else chunk.instantiate(); #endif @@ -668,7 +668,7 @@ void VoxelWorld::prop_add(Transform tarnsform, const Ref &prop, const if (light_data.is_valid()) { Ref light; #if VERSION_MAJOR < 4 - light.instance(); + light.instantiate(); #else light.instantiate(); #endif diff --git a/world/voxel_world_editor.cpp b/world/voxel_world_editor.cpp index 1643f22..dff709b 100644 --- a/world/voxel_world_editor.cpp +++ b/world/voxel_world_editor.cpp @@ -253,7 +253,7 @@ VoxelWorldEditor::VoxelWorldEditor(EditorNode *p_editor) { SpatialEditor::get_singleton()->add_control_to_menu_panel(spatial_editor_hb); #if VERSION_MAJOR < 4 - _tool_button_group.instance(); + _tool_button_group.instantiate(); #else _tool_button_group.instantiate(); #endif @@ -329,7 +329,7 @@ VoxelWorldEditor::VoxelWorldEditor(EditorNode *p_editor) { _surfaces_vbox_container->set_h_size_flags(SIZE_EXPAND_FILL); #if VERSION_MAJOR < 4 - _surfaces_button_group.instance(); + _surfaces_button_group.instantiate(); #else _surfaces_button_group.instantiate(); #endif