Pass EvaluationContext instead of bContext

2.8x branch added bContext arg in many places,
pass eval-context instead since its not simple to reason about what
what nested functions do when they can access and change almost anything.

Also use const to prevent unexpected modifications.

This fixes crash loading files with shadows,
since off-screen buffers use a NULL context for rendering.
This commit is contained in:
2017-08-16 12:45:11 +10:00
parent b68b26c265
commit 1b462e5a51
185 changed files with 1291 additions and 1040 deletions

View File

@@ -133,7 +133,7 @@ static void copyData(ModifierData *md, ModifierData *target)
modifier_copyData_generic(md, target);
}
static DerivedMesh *applyModifier(ModifierData *md, struct EvaluationContext *UNUSED(eval_ctx),
static DerivedMesh *applyModifier(ModifierData *md, const struct EvaluationContext *UNUSED(eval_ctx),
Object *ob, DerivedMesh *derivedData,
ModifierApplyFlag flag)
{