diff options
| author | Poommetee Ketson | 2018-04-01 22:06:47 +0700 |
|---|---|---|
| committer | Poommetee Ketson | 2018-04-01 22:06:47 +0700 |
| commit | a492d229529018f0277f75aa7b99661b5dd40420 (patch) | |
| tree | ca8d018d9671eba4fc1acd0ecad280637e8f4166 /editor/plugins/mesh_instance_editor_plugin.cpp | |
| parent | d2eb731878a4d660dd4a6babaea5967183b8f324 (diff) | |
| download | godot-a492d229529018f0277f75aa7b99661b5dd40420.tar.gz godot-a492d229529018f0277f75aa7b99661b5dd40420.tar.zst godot-a492d229529018f0277f75aa7b99661b5dd40420.zip | |
Diffstat (limited to 'editor/plugins/mesh_instance_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/mesh_instance_editor_plugin.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/plugins/mesh_instance_editor_plugin.cpp b/editor/plugins/mesh_instance_editor_plugin.cpp index cb5f7ba76..7ea2b2774 100644 --- a/editor/plugins/mesh_instance_editor_plugin.cpp +++ b/editor/plugins/mesh_instance_editor_plugin.cpp @@ -344,6 +344,10 @@ void MeshInstanceEditor::_create_outline_mesh() { err_dialog->set_text(TTR("Mesh has not surface to create outlines from!")); err_dialog->popup_centered_minsize(); return; + } else if (mesh->get_surface_count() == 1 && mesh->surface_get_primitive_type(0) != Mesh::PRIMITIVE_TRIANGLES) { + err_dialog->set_text(TTR("Mesh primitive type is not PRIMITIVE_TRIANGLES!")); + err_dialog->popup_centered_minsize(); + return; } Ref<Mesh> mesho = mesh->create_outline(outline_size->get_value()); |
