summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/import/resource_importer_texture.cpp2
-rw-r--r--editor/plugins/mesh_instance_3d_editor_plugin.cpp7
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp3
3 files changed, 4 insertions, 8 deletions
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index c218697423..c92251ca60 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -424,7 +424,7 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
String normal_map = p_options["roughness/src_normal"];
Ref<Image> normal_image;
- Image::RoughnessChannel roughness_channel;
+ Image::RoughnessChannel roughness_channel = Image::ROUGHNESS_CHANNEL_R;
if (mipmaps && roughness > 1 && FileAccess::exists(normal_map)) {
normal_image.instance();
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
index f7a90b8ab3..ccefdcd28f 100644
--- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
@@ -337,18 +337,15 @@ void MeshInstance3DEditor::_create_uv_lines(int p_layer) {
const Vector2 *r = uv.ptr();
Vector<int> indices = a[Mesh::ARRAY_INDEX];
- const int *ri;
+ const int *ri = NULL;
int ic;
- bool use_indices;
if (indices.size()) {
ic = indices.size();
ri = indices.ptr();
- use_indices = true;
} else {
ic = uv.size();
- use_indices = false;
}
for (int j = 0; j < ic; j += 3) {
@@ -356,7 +353,7 @@ void MeshInstance3DEditor::_create_uv_lines(int p_layer) {
for (int k = 0; k < 3; k++) {
MeshInstance3DEditorEdgeSort edge;
- if (use_indices) {
+ if (ri) {
edge.a = r[ri[j + k]];
edge.b = r[ri[j + ((k + 1) % 3)]];
} else {
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index f570baa885..a5bd5aed6b 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -1031,7 +1031,7 @@ void Polygon2DEditor::_uv_draw() {
uvs = node->get_polygon();
}
- const float *weight_r;
+ const float *weight_r = NULL;
if (uv_edit_mode[3]->is_pressed()) {
int bone_selected = -1;
@@ -1044,7 +1044,6 @@ void Polygon2DEditor::_uv_draw() {
}
if (bone_selected != -1 && node->get_bone_weights(bone_selected).size() == uvs.size()) {
-
weight_r = node->get_bone_weights(bone_selected).ptr();
}
}