Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2014-08-27 21:15:14 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-08-27 21:15:41 +0400
commit63b981bf9bae1ad6c3929a32107dcb09caf1ec45 (patch)
tree1c8aff2406cf1b1ce8d613ba58d720148188da50 /source/blender/blenkernel/intern
parentef2a38a9665c3f39ccdead8e1177f9b9c2e92538 (diff)
Changing render engine now refreshes the texture paint display better.
Also avoid looping over all objects for texture paint checks when a material changes, only check active object.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c11
-rw-r--r--source/blender/blenkernel/intern/material.c13
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) &&