From 4a0f3bece31be4997dd19c8ee8faa5ae6a1914e3 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 3 Aug 2015 16:04:33 +0200 Subject: OpenSubdiv: Make new geometry relations ensures dependent data exists on CPU --- source/blender/blenkernel/intern/depsgraph.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/depsgraph.c') diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index b7ad43869b7..62491f1ff6e 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -1141,7 +1141,14 @@ void dag_add_relation(DagForest *forest, DagNode *fob1, DagNode *fob2, short rel /* TODO(sergey): Find a better place for this. */ #ifdef WITH_OPENSUBDIV if ((rel & DAG_RL_DATA_DATA) != 0) { - fob1->eval_flags |= DAG_EVAL_NEED_CPU; + if (fob1->type == ID_OB) { + if ((fob1->eval_flags & DAG_EVAL_NEED_CPU) == 0) { + Object *object = fob1->ob; + /* Make sure object has all the data on CPU. */ + object->recalc |= OB_RECALC_DATA; + fob1->eval_flags |= DAG_EVAL_NEED_CPU; + } + } } #endif -- cgit v1.2.3