Fix (unreported) crash when rendering hairs from edit mode (own regression in recent particle edit fix).

*sigh* hope we fix some day that recursion issue that makes it such a PITA to generate DM of other targets from DM stack...
This commit is contained in:
2016-01-06 20:20:50 +01:00
parent 4acf0f05a1
commit 31e6978066

View File

@@ -162,7 +162,12 @@ static void deformVerts(ModifierData *md, Object *ob,
if (!psmd->dm_final->deformedOnly) {
/* XXX Think we can assume here that if current DM is not only-deformed, ob->deformedOnly has been set.
* This is awfully weak though. :| */
psmd->dm_deformed = CDDM_copy(ob->derivedDeform);
dm = ob->derivedDeform;
if (!dm) {
/* Can happen, e.g. when rendering from Edit mode... */
dm = get_dm(ob, NULL, NULL, vertexCos, false, true);
}
psmd->dm_deformed = CDDM_copy(dm);
DM_ensure_tessface(psmd->dm_deformed);
}