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.
This commit is contained in:
2010-06-07 18:20:59 +00:00
parent e012fc8107
commit 6a8bff9570
2 changed files with 3 additions and 3 deletions

View File

@@ -211,9 +211,9 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
/* 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);

View File

@@ -85,7 +85,7 @@ static DerivedMesh *applyModifier(
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)