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/depsgraph.c
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/depsgraph.c')
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c11
1 files changed, 5 insertions, 6 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);
}
}