diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-04-06 15:47:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-06 15:47:20 +0200 |
commit | ac591d9904e4e5cf7841b3e79caabf558d37db0e (patch) | |
tree | 70f3bd487e91feb4ca777dba214a09b17041da97 /editor/plugins/material_editor_plugin.cpp | |
parent | 72407a9cfbd4f58102972c0910429f3ab7006f07 (diff) | |
parent | f851c4aa330e1064a66db50be62db2466f4fb768 (diff) |
Merge pull request #59911 from bruvzg/cppcheck_fixes
Diffstat (limited to 'editor/plugins/material_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/material_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp index daa864cfa1..eb004568d0 100644 --- a/editor/plugins/material_editor_plugin.cpp +++ b/editor/plugins/material_editor_plugin.cpp @@ -270,7 +270,7 @@ void EditorInspectorPluginMaterial::_undo_redo_inspector_callback(Object *p_undo Texture2D *texture = Object::cast_to<Texture2D>(p_new_value); if (texture) { if (p_property == "roughness_texture") { - if (base_material->get_texture(StandardMaterial3D::TEXTURE_ROUGHNESS).is_null() && texture) { + if (base_material->get_texture(StandardMaterial3D::TEXTURE_ROUGHNESS).is_null()) { undo_redo->add_do_property(p_edited, "roughness", 1.0); bool valid = false; @@ -280,7 +280,7 @@ void EditorInspectorPluginMaterial::_undo_redo_inspector_callback(Object *p_undo } } } else if (p_property == "metallic_texture") { - if (base_material->get_texture(StandardMaterial3D::TEXTURE_METALLIC).is_null() && texture) { + if (base_material->get_texture(StandardMaterial3D::TEXTURE_METALLIC).is_null()) { undo_redo->add_do_property(p_edited, "metallic", 1.0); bool valid = false; |