Fix #108034: Multires simple subdivide crash
Before 9f78530d80, the -1 coarse_edge_index values in the
foreach_edge calls would return false in BLI_BITMAP_TEST_BOOL,
which made them look like loose edges. BitSpan doesn't have this
problem, so the return for negative indices must be explicit.
This commit is contained in:
@@ -822,18 +822,15 @@ static void foreach_edge(const SubdivForeachContext *foreach_context,
|
||||
return;
|
||||
}
|
||||
|
||||
/* Ignore all inner face edges as they have sharpness of zero when using Catmull-Clark mode. In
|
||||
* simple mode, all edges have maximum sharpness, so they can't be skipped. */
|
||||
if (coarse_edge_index == ORIGINDEX_NONE &&
|
||||
reshape_smooth_context->smoothing_type != MULTIRES_SUBDIVIDE_SIMPLE)
|
||||
{
|
||||
/* Ignore all inner face edges as they have sharpness of zero. */
|
||||
if (coarse_edge_index == ORIGINDEX_NONE) {
|
||||
return;
|
||||
}
|
||||
/* Ignore all loose edges as well, as they are not communicated to the OpenSubdiv. */
|
||||
if (!reshape_smooth_context->loose_base_edges.is_empty() &&
|
||||
reshape_smooth_context->loose_base_edges[coarse_edge_index])
|
||||
{
|
||||
return;
|
||||
if (!reshape_smooth_context->loose_base_edges.is_empty()) {
|
||||
if (reshape_smooth_context->loose_base_edges[coarse_edge_index]) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* Edges without crease are to be ignored as well. */
|
||||
const float crease = get_effective_crease(reshape_smooth_context, coarse_edge_index);
|
||||
|
||||
Reference in New Issue
Block a user