diff options
| author | Juan Linietsky <reduzio@gmail.com> | 2020-03-27 13:47:15 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-27 13:47:15 -0300 |
| commit | 307b1b3a5835ecdb477859785c673a07e248f904 (patch) | |
| tree | cc0123bc7111e48775331d500452875c278cc13b /editor/plugins/mesh_editor_plugin.cpp | |
| parent | f48aeeeeefa73d4c6e58ee2934eaf16bc0408df0 (diff) | |
| parent | d1acbbce7f123c2b5fccdefc6417787dc91b6ced (diff) | |
Merge pull request #37340 from reduz/rename-3d-nodes
Make 2D and 3D node names more explicit
Diffstat (limited to 'editor/plugins/mesh_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/mesh_editor_plugin.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp index 352997d6fa..a8b455fdd2 100644 --- a/editor/plugins/mesh_editor_plugin.cpp +++ b/editor/plugins/mesh_editor_plugin.cpp @@ -116,30 +116,30 @@ void MeshEditor::_bind_methods() { MeshEditor::MeshEditor() { viewport = memnew(SubViewport); - Ref<World> world; + Ref<World3D> world; world.instance(); viewport->set_world(world); //use own world add_child(viewport); viewport->set_disable_input(true); viewport->set_msaa(Viewport::MSAA_2X); set_stretch(true); - camera = memnew(Camera); + camera = memnew(Camera3D); camera->set_transform(Transform(Basis(), Vector3(0, 0, 1.1))); camera->set_perspective(45, 0.1, 10); viewport->add_child(camera); - light1 = memnew(DirectionalLight); + light1 = memnew(DirectionalLight3D); light1->set_transform(Transform().looking_at(Vector3(-1, -1, -1), Vector3(0, 1, 0))); viewport->add_child(light1); - light2 = memnew(DirectionalLight); + light2 = memnew(DirectionalLight3D); light2->set_transform(Transform().looking_at(Vector3(0, 1, 0), Vector3(0, 0, 1))); light2->set_color(Color(0.7, 0.7, 0.7)); viewport->add_child(light2); - rotation = memnew(Spatial); + rotation = memnew(Node3D); viewport->add_child(rotation); - mesh_instance = memnew(MeshInstance); + mesh_instance = memnew(MeshInstance3D); rotation->add_child(mesh_instance); set_custom_minimum_size(Size2(1, 150) * EDSCALE); |