Hi Nicholas, This is not the right fix, the dependency graph should ensure that ob->derivedFinal is created before this modifier runs. Previously modifiers called mesh_get_derived_final, but with dependency cycles this can hang.
Thanks, Brecht. On Mon, Jun 7, 2010 at 8:21 PM, Nicholas Bishop <[email protected]> wrote: > Revision: 29315 > > http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29315 > Author: nicholasbishop > Date: 2010-06-07 20:20:59 +0200 (Mon, 07 Jun 2010) > > Log Message: > ----------- > Fixed bug #21540, Array Modifier Capping refresh on open problem. > > * Problem was that the modifier directly accessed ob->derivedFinal, but that > wasn't being built if the object was on a different layer. Changed to > mesh_get_derived_final. > > Notes: > * I fixed this for array and boolean, reported in the bug; there might be > other places affected by this mistake. It's an easy fix if so. > * The datamask being passed in isn't especially correct. Possibly we should > be accessing the datamask being used to build the array modifier DerivedMesh? > Anyway, at least this will get the mesh to show up in the viewport. > > Modified Paths: > -------------- > trunk/blender/source/blender/modifiers/intern/MOD_array.c > trunk/blender/source/blender/modifiers/intern/MOD_boolean.c > > Modified: trunk/blender/source/blender/modifiers/intern/MOD_array.c > =================================================================== > --- trunk/blender/source/blender/modifiers/intern/MOD_array.c 2010-06-07 > 17:38:52 UTC (rev 29314) > +++ trunk/blender/source/blender/modifiers/intern/MOD_array.c 2010-06-07 > 18:20:59 UTC (rev 29315) > @@ -211,9 +211,9 @@ > > /* need to avoid infinite recursion here */ > if(amd->start_cap && amd->start_cap != ob) > - start_cap = amd->start_cap->derivedFinal; > + start_cap = mesh_get_derived_final(scene, amd->start_cap, 0); > if(amd->end_cap && amd->end_cap != ob) > - end_cap = amd->end_cap->derivedFinal; > + end_cap = mesh_get_derived_final(scene, amd->end_cap, 0); > > unit_m4(offset); > > > Modified: trunk/blender/source/blender/modifiers/intern/MOD_boolean.c > =================================================================== > --- trunk/blender/source/blender/modifiers/intern/MOD_boolean.c 2010-06-07 > 17:38:52 UTC (rev 29314) > +++ trunk/blender/source/blender/modifiers/intern/MOD_boolean.c 2010-06-07 > 18:20:59 UTC (rev 29315) > @@ -85,7 +85,7 @@ > int useRenderParams, int isFinalCalc) > { > BooleanModifierData *bmd = (BooleanModifierData*) md; > - DerivedMesh *dm = bmd->object->derivedFinal; > + DerivedMesh *dm = mesh_get_derived_final(md->scene, bmd->object, 0); > > /* we do a quick sanity check */ > if(dm && (derivedData->getNumFaces(derivedData) > 3) > > > _______________________________________________ > Bf-blender-cvs mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-blender-cvs > _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
