[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29077] trunk/blender/source/blender/ blenkernel/intern/depsgraph.c: Fix #22446: "Delayed" modifier preview with linked curves
Sergey Sharybin
g.ulairi at gmail.com
Sun May 30 16:05:24 CEST 2010
Revision: 29077
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29077
Author: nazgul
Date: 2010-05-30 16:05:24 +0200 (Sun, 30 May 2010)
Log Message:
-----------
Fix #22446: "Delayed" modifier preview with linked curves
Since curve objects could have constructive modifiers, we can't
always avoid setting OB_RECALC_DATA to linked objects (displist
recalculation wouldn't enough for curves with such modifiers)
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/depsgraph.c
Modified: trunk/blender/source/blender/blenkernel/intern/depsgraph.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/depsgraph.c 2010-05-30 13:58:17 UTC (rev 29076)
+++ trunk/blender/source/blender/blenkernel/intern/depsgraph.c 2010-05-30 14:05:24 UTC (rev 29077)
@@ -2286,11 +2286,7 @@
/* no point in trying in this cases */
if(!id || id->us <= 1)
id= NULL;
- /* curves and surfaces only need to mark one object, since
- otherwise cu->displist would be computed multiple times */
- else if(ob->type==OB_CURVE || ob->type==OB_SURF)
- id= NULL;
- /* also for locked shape keys we make an exception */
+ /* for locked shape keys we make an exception */
else if(ob_get_key(ob) && (ob->shapeflag & OB_SHAPE_LOCK))
id= NULL;
}
@@ -2301,15 +2297,23 @@
idtype= GS(id->name);
if(ELEM7(idtype, ID_ME, ID_CU, ID_MB, ID_LA, ID_LT, ID_CA, ID_AR)) {
+ int first_ob= 1;
for(obt=bmain->object.first; obt; obt= obt->id.next) {
if(!(ob && obt == ob) && obt->data == id) {
+
+ /* try to avoid displist recalculation for linked curves */
+ if (!first_ob && ELEM(obt->type, OB_CURVE, OB_SURF)) {
+ /* if curve object has got derivedFinal it means this
+ object has got constructive modifiers and object
+ should be recalculated anyhow */
+ if (!obt->derivedFinal)
+ continue;
+ }
+
obt->recalc |= OB_RECALC_DATA;
BKE_ptcache_object_reset(sce, obt, PTCACHE_RESET_DEPSGRAPH);
- /* for these we only flag one object, otherwise cu->displist
- would be computed multiple times */
- if(obt->type==OB_CURVE || obt->type==OB_SURF)
- break;
+ first_ob= 0;
}
}
}
More information about the Bf-blender-cvs
mailing list