From 0ce98d3af139c5fd8cc7272ac24aa8b80238104e Mon Sep 17 00:00:00 2001 From: Lyuma Date: Tue, 12 Oct 2021 12:21:03 -0700 Subject: [PATCH] Ignore format flags when validating the blend shape mask --- servers/rendering_server.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index b3efe840b6..0462b1d599 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -934,7 +934,8 @@ Error RenderingServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surfa } } - ERR_FAIL_COND_V_MSG((bsformat & RS::ARRAY_FORMAT_BLEND_SHAPE_MASK) != (format & RS::ARRAY_FORMAT_BLEND_SHAPE_MASK), ERR_INVALID_PARAMETER, "Blend shape format must match the main array format for Vertex, Normal and Tangent arrays."); + const uint32_t blend_format_mask = RS::ARRAY_FORMAT_VERTEX | RS::ARRAY_FORMAT_NORMAL | RS::ARRAY_FORMAT_TANGENT; + ERR_FAIL_COND_V_MSG((bsformat & blend_format_mask) != (format & blend_format_mask), ERR_INVALID_PARAMETER, "Blend shape format must match the main array format for Vertex, Normal and Tangent arrays."); } }