{
SculptSession *ss = ob->sculpt;
- if (ss->modifiers_active) {
+ if (ss->kb || ss->modifiers_active) {
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
Brush *brush = BKE_paint_brush(&sd->paint);
*
* Could be optimized later, but currently don't think it's so
* much common scenario.
- **
- ** Same applies to the DAG_id_tag_update() invoked from
+ *
+ * Same applies to the DAG_id_tag_update() invoked from
* sculpt_flush_update().
*/
- if (ss->kb || ss->modifiers_active) {
+ if (ss->modifiers_active) {
sculpt_flush_stroke_deform(sd, ob);
}
+ else if (ss->kb) {
+ sculpt_update_keyblock(ob);
+ }
ss->cache->first_time = false;
}
if (update || rebuild) {
- int tag_update = 0;
+ bool tag_update = false;
/* we update all nodes still, should be more clever, but also
* needs to work correct when exiting/entering sculpt mode and
* the nodes get recreated, though in that case it could do all */
multires_mark_as_modified(ob, MULTIRES_COORDS_MODIFIED);
}
- tag_update = ((Mesh *)ob->data)->id.us > 1;
+ tag_update |= ((Mesh *)ob->data)->id.us > 1;
- if (ss->modifiers_active) {
+ if (ss->kb || ss->modifiers_active) {
Mesh *mesh = ob->data;
BKE_mesh_calc_normals_tessface(mesh->mvert, mesh->totvert,
mesh->mface, mesh->totface, NULL);
free_sculptsession_deformMats(ss);
- tag_update |= 1;
+ tag_update |= true;
}
if (tag_update) {