Bug fix, own collection.
Shapekey drivers were executed for every call to derivedmesh, which shouldn't happen. It now only runs on the object_update() function, once for every depsgraph change. Error was found while testing preview render in viewport. On each render, the animsys sent a 'changed data' because of the shapekey drivers being called, causing eternal re-render loops (without showing anything).
This commit is contained in:
@@ -1389,10 +1389,6 @@ float *BKE_key_evaluate_object(Scene *scene, Object *ob, int *r_totelem)
|
||||
cp_cu_key(ob->data, key, actkb, kb, 0, tot, out, tot);
|
||||
}
|
||||
else {
|
||||
/* do shapekey local drivers */
|
||||
float ctime = BKE_scene_frame_get(scene);
|
||||
|
||||
BKE_animsys_evaluate_animdata(scene, &key->id, key->adt, ctime, ADT_RECALC_DRIVERS);
|
||||
|
||||
if (ob->type == OB_MESH) do_mesh_key(scene, ob, key, out, tot);
|
||||
else if (ob->type == OB_LATTICE) do_latt_key(scene, ob, key, out, tot);
|
||||
|
||||
@@ -2621,6 +2621,7 @@ void BKE_object_handle_update_ex(Scene *scene, Object *ob,
|
||||
if (ob->recalc & OB_RECALC_DATA) {
|
||||
ID *data_id = (ID *)ob->data;
|
||||
AnimData *adt = BKE_animdata_from_id(data_id);
|
||||
Key *key;
|
||||
float ctime = BKE_scene_frame_get(scene);
|
||||
|
||||
if (G.debug & G_DEBUG)
|
||||
@@ -2631,6 +2632,12 @@ void BKE_object_handle_update_ex(Scene *scene, Object *ob,
|
||||
/* XXX: for mesh types, should we push this to derivedmesh instead? */
|
||||
BKE_animsys_evaluate_animdata(scene, data_id, adt, ctime, ADT_RECALC_DRIVERS);
|
||||
}
|
||||
|
||||
key = BKE_key_from_object(ob);
|
||||
if (key && key->block.first) {
|
||||
if (!(ob->shapeflag & OB_SHAPE_LOCK))
|
||||
BKE_animsys_evaluate_animdata(scene, &key->id, key->adt, ctime, ADT_RECALC_DRIVERS);
|
||||
}
|
||||
|
||||
/* includes all keys and modifiers */
|
||||
switch (ob->type) {
|
||||
|
||||
Reference in New Issue
Block a user