Page MenuHome

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

Description

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

Blender Version
Broken:
2.80-009dbc2bc9fb-win64

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.

Details

Type
Bug

Event Timeline

Hans Baier (hansfbaier) edited projects, added Animation; removed Add-ons.

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

Sergey Sharybin (sergey) closed this task as Resolved.Wed, Sep 11, 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 https://wiki.blender.org/wiki/Reference/Release_Notes/2.81/Python_API#Handlers for more details.