Page MenuHome

animated custom property does not change value when animation is rendered
Closed, ResolvedPublic


System Information
Operating system: Windows 10 Home 64 Bit
Graphics card: NVidia Geforce GTX 1050

Blender Version

When running the attached .blend file the custom property 'CustomProperty' of object 'Cube'
is always zero during render, but it is animated to go from 0.0 to 1.0 with keyframes.
With a pre frame change handler I print out the value (and change the cube material according to it),
and during render the value is always the last one dependeing on the frame currently selected in the scene.

Exact steps for others to reproduce the error
Based on the default startup or an attached .blend file (as simple as possible).

Load the attached .blend file

Make sure the script is executed at least once
open the system console
play animation to make sure the custom property of Cube is updated (Cube also changes color according to property).
Press Ctrl+F12 to render animation
Verify in the system console that custom property is not updated and sticks to last selected frame value.

Event Timeline

By all looks this seems to be a depsgraph / COW / Python API issue, not related to animation as such.

Sergey Sharybin (sergey) changed the task status from Unknown Status to Resolved.Sep 11 2019, 11:03 AM

What happens here is that you're accessing property from an original datablock, but it's actual value is only known at the evaluated version.

It is now possible to access evaluated datablock, read property value from it and modify original datablock based on that.

Attached modified version of the script to illustrate the difference.

See for more details.

Hitokage added a subscriber: Hitokage.EditedApr 21 2020, 7:20 PM

@Sergey Sharybin (sergey) Can be similar principle used for custom compositor node properties? The problem sounds quite similar.