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>2014-01-09 23:45:53 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-01-13 13:57:51 +0400
commitf00f959d523dc9ae0fe60cf28367dbbe1464e232 (patch)
tree9fbdacd6b0885ac52607a03acdfa4c42000e58a8 /source/blender/blenkernel/intern/displist.c
parentf86fbc4ea31f743b8a28d4f91dc2eff209740507 (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/blenkernel/intern/displist.c')
-rw-r--r--source/blender/blenkernel/intern/displist.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index 402acf5806c..88791930e0e 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -1566,8 +1566,13 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba
curve_to_filledpoly(cu, &nubase, dispbase);
}
- if ((cu->flag & CU_PATH) && !forOrco)
- calc_curvepath(ob, &nubase);
+ if (!forOrco) {
+ if ((cu->flag & CU_PATH) ||
+ DAG_get_eval_flags_for_object(scene, ob) & DAG_EVAL_NEED_CURVE_PATH)
+ {
+ calc_curvepath(ob, &nubase);
+ }
+ }
if (!forOrco)
curve_calc_modifiers_post(scene, ob, &nubase, dispbase, derivedFinal, forRender, renderResolution);