summaryrefslogtreecommitdiff
path: root/editor/plugins/multimesh_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/multimesh_editor_plugin.cpp')
-rw-r--r--editor/plugins/multimesh_editor_plugin.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp
index 9d4442174c..3904389e09 100644
--- a/editor/plugins/multimesh_editor_plugin.cpp
+++ b/editor/plugins/multimesh_editor_plugin.cpp
@@ -42,8 +42,9 @@ void MultiMeshEditor::_node_removed(Node *p_node) {
}
void MultiMeshEditor::_populate() {
- if (!node)
+ if (!node) {
return;
+ }
Ref<Mesh> mesh;
@@ -141,8 +142,9 @@ void MultiMeshEditor::_populate() {
Map<float, int> triangle_area_map;
for (int i = 0; i < facecount; i++) {
float area = r[i].get_area();
- if (area < CMP_EPSILON)
+ if (area < CMP_EPSILON) {
continue;
+ }
triangle_area_map[area_accum] = i;
area_accum += area;
}
@@ -214,10 +216,11 @@ void MultiMeshEditor::_populate() {
void MultiMeshEditor::_browsed(const NodePath &p_path) {
NodePath path = node->get_path_to(get_node(p_path));
- if (browsing_source)
+ if (browsing_source) {
mesh_source->set_text(path);
- else
+ } else {
surface_source->set_text(path);
+ }
}
void MultiMeshEditor::_menu_option(int p_option) {
@@ -249,10 +252,11 @@ void MultiMeshEditor::_browse(bool p_source) {
browsing_source = p_source;
std->get_scene_tree()->set_marked(node, false);
std->popup_centered_ratio();
- if (p_source)
+ if (p_source) {
std->set_title(TTR("Select a Source Mesh:"));
- else
+ } else {
std->set_title(TTR("Select a Target Surface:"));
+ }
}
void MultiMeshEditor::_bind_methods() {