Cleanup: Inline expand update flush function
No need to duplicate the switch here.
This commit is contained in:
@@ -1388,25 +1388,6 @@ static void sculpt_expand_colors_update_task(SculptSession *ss, PBVHNode *node)
|
||||
}
|
||||
}
|
||||
|
||||
static void sculpt_expand_flush_updates(bContext *C)
|
||||
{
|
||||
Object *ob = CTX_data_active_object(C);
|
||||
SculptSession *ss = ob->sculpt;
|
||||
switch (ss->expand_cache->target) {
|
||||
case SCULPT_EXPAND_TARGET_MASK:
|
||||
SCULPT_flush_update_step(C, SCULPT_UPDATE_MASK);
|
||||
break;
|
||||
case SCULPT_EXPAND_TARGET_FACE_SETS:
|
||||
SCULPT_flush_update_step(C, SCULPT_UPDATE_FACE_SET);
|
||||
break;
|
||||
case SCULPT_EXPAND_TARGET_COLORS:
|
||||
SCULPT_flush_update_step(C, SCULPT_UPDATE_COLOR);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Store the original mesh data state in the expand cache. */
|
||||
static void sculpt_expand_original_state_store(Object *ob, Cache *expand_cache)
|
||||
{
|
||||
@@ -1488,10 +1469,12 @@ static void sculpt_expand_update_for_vertex(bContext *C, Object *ob, const PBVHV
|
||||
sculpt_expand_mask_update_task(ss, mask_write, expand_cache->nodes[i]);
|
||||
}
|
||||
});
|
||||
SCULPT_flush_update_step(C, SCULPT_UPDATE_MASK);
|
||||
break;
|
||||
}
|
||||
case SCULPT_EXPAND_TARGET_FACE_SETS:
|
||||
sculpt_expand_face_sets_update(*ob, expand_cache);
|
||||
SCULPT_flush_update_step(C, SCULPT_UPDATE_FACE_SET);
|
||||
break;
|
||||
case SCULPT_EXPAND_TARGET_COLORS:
|
||||
threading::parallel_for(expand_cache->nodes.index_range(), 1, [&](const IndexRange range) {
|
||||
@@ -1499,10 +1482,9 @@ static void sculpt_expand_update_for_vertex(bContext *C, Object *ob, const PBVHV
|
||||
sculpt_expand_colors_update_task(ss, expand_cache->nodes[i]);
|
||||
}
|
||||
});
|
||||
SCULPT_flush_update_step(C, SCULPT_UPDATE_COLOR);
|
||||
break;
|
||||
}
|
||||
|
||||
sculpt_expand_flush_updates(C);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user