Folowup for old fix for material animation

Need to update node trees, so cycles materials are also updating
when tweaking settings from dopesheet/graph editor.
This commit is contained in:
Sergey Sharybin 2014-05-13 15:19:49 +02:00
parent eed0c4d062
commit 9ae9c268ca
1 changed files with 14 additions and 1 deletions

View File

@ -1599,7 +1599,20 @@ void BKE_scene_update_tagged(EvaluationContext *eval_ctx, Main *bmain, Scene *sc
BKE_animsys_evaluate_animdata(scene, &material->id, adt, ctime, 0);
}
}
/* Also do the same for node trees. */
if (DAG_id_type_tagged(bmain, ID_NT)) {
float ctime = BKE_scene_frame_get(scene);
FOREACH_NODETREE(bmain, ntree, id)
{
AnimData *adt = BKE_animdata_from_id(&ntree->id);
if (adt && (adt->recalc & ADT_RECALC_ANIM))
BKE_animsys_evaluate_animdata(scene, &ntree->id, adt, ctime, 0);
}
FOREACH_NODETREE_END
}
/* notify editors and python about recalc */
BLI_callback_exec(bmain, &scene->id, BLI_CB_EVT_SCENE_UPDATE_POST);
DAG_ids_check_recalc(bmain, scene, false);