Переглянути джерело

Merge pull request #5326 from MarianoGnu/issues

Don't create outlines from dummy meshes. Fixes #4718
Rémi Verschelde 9 роки тому
батько
коміт
67a29bab74
1 змінених файлів з 6 додано та 0 видалено
  1. 6 0
      tools/editor/plugins/mesh_instance_editor_plugin.cpp

+ 6 - 0
tools/editor/plugins/mesh_instance_editor_plugin.cpp

@@ -183,6 +183,12 @@ void MeshInstanceEditor::_create_outline_mesh() {
 		return;
 	}
 
+	if (mesh->get_surface_count() == 0) {
+		err_dialog->set_text(TTR("Mesh has not surface to create outlines from!"));
+		err_dialog->popup_centered_minsize();
+		return;
+	}
+
 	Ref<Mesh> mesho = mesh->create_outline(outline_size->get_val());
 
 	if (mesho.is_null()) {