Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-11-20 14:37:11 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-11-21 16:23:57 +0300
commit528841ba9016be4af4d2c8dd472e627aee719edf (patch)
tree53ce577ba7dd9c9eeadcde6bfcf787ae826ee2d7 /source/blender/modifiers/intern/MOD_array.c
parentd3fc5919f854eb7710c78b77549d8c677e0efd9e (diff)
Depsgraph: Remove workarounds used for cyclic dependencies
This was dangerous to do such calculations, and now it is solvable by making dependency graph more granular in this case. Removing the workaround also saves us a hassle of passing lots of extra arguments down the evaluation routines. In theory, we can also remove EvaluationCOntext from constraints evaluation as well now. But probably better to wait with such removal for now. This commit effectively reverts 1130c53. Will do a proper fix in dependency graph itself.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_array.c')
-rw-r--r--source/blender/modifiers/intern/MOD_array.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c
index 66ff1fe0a85..81ace75f2b1 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -56,12 +56,6 @@
#include "DEG_depsgraph.h"
-/* Due to cyclic dependencies it's possible that curve used for
- * deformation here is not evaluated at the time of evaluating
- * this modifier.
- */
-#define CYCLIC_DEPENDENCY_WORKAROUND
-
static void initData(ModifierData *md)
{
ArrayModifierData *amd = (ArrayModifierData *) md;
@@ -356,8 +350,7 @@ static void dm_merge_transform(
}
static DerivedMesh *arrayModifier_doArray(
- ArrayModifierData *amd, const EvaluationContext *eval_ctx,
- Scene *scene, Object *ob, DerivedMesh *dm,
+ ArrayModifierData *amd, Object *ob, DerivedMesh *dm,
ModifierApplyFlag flag)
{
const float eps = 1e-6f;
@@ -460,12 +453,6 @@ static DerivedMesh *arrayModifier_doArray(
if (amd->fit_type == MOD_ARR_FITCURVE && amd->curve_ob) {
Curve *cu = amd->curve_ob->data;
if (cu) {
-#ifdef CYCLIC_DEPENDENCY_WORKAROUND
- if (amd->curve_ob->curve_cache == NULL) {
- BKE_displist_make_curveTypes(eval_ctx, scene, amd->curve_ob, false);
- }
-#endif
-
if (amd->curve_ob->curve_cache && amd->curve_ob->curve_cache->path) {
float scale_fac = mat4_to_scale(amd->curve_ob->obmat);
length = scale_fac * amd->curve_ob->curve_cache->path->totdist;
@@ -725,12 +712,12 @@ static DerivedMesh *arrayModifier_doArray(
}
-static DerivedMesh *applyModifier(ModifierData *md, const EvaluationContext *eval_ctx,
+static DerivedMesh *applyModifier(ModifierData *md, const EvaluationContext *UNUSED(eval_ctx),
Object *ob, DerivedMesh *dm,
ModifierApplyFlag flag)
{
ArrayModifierData *amd = (ArrayModifierData *) md;
- return arrayModifier_doArray(amd, eval_ctx, md->scene, ob, dm, flag);
+ return arrayModifier_doArray(amd, ob, dm, flag);
}