Fix T45241: New depsgraph was lacking update of python drivers on time change
It's quite tricky to see if the driver actually depends on time or not, so currently used approach when we'll be doing some extra updates. This seems to correspond to how old depsgraph was dealing with this.
This commit is contained in:
parent
c1d6a26842
commit
00bfca2178
Notes:
blender-bot
2023-02-14 08:56:52 +01:00
Referenced by issue #45241, New depsgraph: no py drivers? ('animation/pydrivers_flap.blend' regression file)
|
@ -892,6 +892,15 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
|
|||
}
|
||||
DRIVER_TARGETS_LOOPER_END
|
||||
}
|
||||
|
||||
/* It's quite tricky to detect if the driver actually depends on time or not,
|
||||
* so for now we'll be quite conservative here about optimization and consider
|
||||
* all python drivers to be depending on time.
|
||||
*/
|
||||
if (driver->type == DRIVER_TYPE_PYTHON) {
|
||||
TimeSourceKey time_src_key;
|
||||
add_relation(time_src_key, driver_key, DEPSREL_TYPE_TIME, "[TimeSrc -> Driver]");
|
||||
}
|
||||
}
|
||||
|
||||
void DepsgraphRelationBuilder::build_world(World *world)
|
||||
|
|
|
@ -93,13 +93,14 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
|
|||
static void updateDepsgraph(ModifierData *md,
|
||||
struct Main *UNUSED(bmain),
|
||||
struct Scene *UNUSED(scene),
|
||||
Object *UNUSED(ob),
|
||||
Object *ob,
|
||||
struct DepsNodeHandle *node)
|
||||
{
|
||||
MirrorModifierData *mmd = (MirrorModifierData *)md;
|
||||
if (mmd->mirror_ob != NULL) {
|
||||
DEG_add_object_relation(node, mmd->mirror_ob, DEG_OB_COMP_TRANSFORM, "Mirror Modifier");
|
||||
}
|
||||
DEG_add_object_relation(node, ob, DEG_OB_COMP_TRANSFORM, "Mirror Modifier");
|
||||
}
|
||||
|
||||
static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd,
|
||||
|
|
Loading…
Reference in New Issue