diff options
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/depsgraph.c | 11 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/material.c | 13 |
2 files changed, 5 insertions, 19 deletions
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 895e542ca52..eecc04c1e72 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -2497,12 +2497,11 @@ static void dag_id_flush_update(Main *bmain, Scene *sce, ID *id) } if (ELEM(idtype, ID_MA, ID_TE)) { - for (obt = bmain->object.first; obt; obt = obt->id.next) { - if (obt->mode & OB_MODE_TEXTURE_PAINT) { - obt->recalc |= OB_RECALC_DATA; - BKE_texpaint_slots_refresh_object(sce, obt); - lib_id_recalc_data_tag(bmain, &obt->id); - } + obt = sce->basact ? sce->basact->object : NULL; + if (obt && obt->mode & OB_MODE_TEXTURE_PAINT) { + obt->recalc |= OB_RECALC_DATA; + BKE_texpaint_slots_refresh_object(sce, obt); + lib_id_recalc_data_tag(bmain, &obt->id); } } diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 81b93a47917..7565703358e 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -1307,19 +1307,6 @@ bool object_remove_material_slot(Object *ob) return true; } -void BKE_texpaint_slots_clear(struct Material *ma) -{ - - if (ma->texpaintslot) { - MEM_freeN(ma->texpaintslot); - ma->texpaintslot = NULL; - } - ma->tot_slots = 0; - ma->paint_active_slot = 0; - ma->paint_clone_slot = 0; -} - - static bool get_mtex_slot_valid_texpaint(struct MTex *mtex) { return (mtex && (mtex->texco == TEXCO_UV) && |