diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-01-09 23:45:53 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-01-13 13:57:51 +0400 |
commit | f00f959d523dc9ae0fe60cf28367dbbe1464e232 (patch) | |
tree | 9fbdacd6b0885ac52607a03acdfa4c42000e58a8 /source/blender/modifiers | |
parent | f86fbc4ea31f743b8a28d4f91dc2eff209740507 (diff) |
Remove direct displist creation from curve deform
This solves threading conflict which happens when having
multiple objects using Curve Deform modifier with the same
curve datablock. This conflict was caused by the fact that
curve_deform_verts() used to temporary override curve's
flags to make it path is there.
Actually, it was setting CU_FOLLOW flag temporary which
was only used where_on_path() (only in terms that this
temporary assignment only affected this function) but it
is now commented out for a while, so no reason to set
this flag temporary, If it's ever to be done, we'll need
to pass flags as an additional function argument.
For the path creation i've extended DegNode structure
which now holds extra bits which indicates what additional
data depending on the graph topology is to be evaluated.
Currently this is only used to indicate that curve needs
path to be evaluated regardless to cu->flag state. This
is so Curve Deform modifier is always happy.
In the future this flag might also be used to indicate
whether bmesh verts are to update (see recent commit to
3-vertex parent crash fix) or to indicate that the object
is the motherball etc.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_curve.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_curve.c b/source/blender/modifiers/intern/MOD_curve.c index 28042185de0..a6ea9920e78 100644 --- a/source/blender/modifiers/intern/MOD_curve.c +++ b/source/blender/modifiers/intern/MOD_curve.c @@ -103,6 +103,7 @@ static void updateDepgraph(ModifierData *md, DagForest *forest, if (cmd->object) { DagNode *curNode = dag_get_node(forest, cmd->object); + curNode->eval_flags |= DAG_EVAL_NEED_CURVE_PATH; dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Curve Modifier"); @@ -119,7 +120,7 @@ static void deformVerts(ModifierData *md, Object *ob, /* silly that defaxis and curve_deform_verts are off by 1 * but leave for now to save having to call do_versions */ - curve_deform_verts(md->scene, cmd->object, ob, derivedData, vertexCos, numVerts, + curve_deform_verts(cmd->object, ob, derivedData, vertexCos, numVerts, cmd->name, cmd->defaxis - 1); } |