Maniphest T63548

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

Assigned To
Sergey Sharybin (sergey)
Authored By
Hans Baier (hansfbaier)
Apr 13 2019, 12:33 AM
Tags
  • Animation & Rigging
  • BF Blender
  • Dependency Graph
Subscribers
Alexander Gavrilov (angavrilov)
Hans Baier (hansfbaier)
Hitokage
Sebastian Parborg (zeddb)
Sergey Sharybin (sergey)
takeshi funahashi (waitinfuture)

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.

Event Timeline

Hans Baier (hansfbaier) created this task.Apr 13 2019, 12:33 AM
Hans Baier (hansfbaier) updated the task description.Apr 13 2019, 12:40 AM
Hans Baier (hansfbaier) edited projects, added Animation & Rigging; removed Add-ons (Community).
Hans Baier (hansfbaier) added projects: BF Blender, BF Blender: 2.8.Apr 13 2019, 1:06 AM
Sebastian Parborg (zeddb) assigned this task to Alexander Gavrilov (angavrilov).Apr 14 2019, 1:26 PM
Sebastian Parborg (zeddb) lowered the priority of this task from 90 to 50.
Sebastian Parborg (zeddb) added subscribers: Alexander Gavrilov (angavrilov), Sebastian Parborg (zeddb).

@Alexander Gavrilov (angavrilov) do you want to take a look at the cause of this?

Alexander Gavrilov (angavrilov) removed Alexander Gavrilov (angavrilov) as the assignee of this task.Apr 16 2019, 1:52 PM

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

takeshi funahashi (waitinfuture) added a subscriber: takeshi funahashi (waitinfuture).Apr 19 2019, 11:25 AM
Philipp Oeser (lichtwerk) edited projects, added Dependency Graph; removed BF Blender: 2.8.Jul 4 2019, 10:06 AM
Sebastian Parborg (zeddb) assigned this task to Sergey Sharybin (sergey).Jul 4 2019, 10:15 AM
Sebastian Parborg (zeddb) added a subscriber: Sergey Sharybin (sergey).

@Sergey Sharybin (sergey) do you want to take a look at this?

Sergey Sharybin (sergey) mentioned this in rBa650258158dd: Python handlers: Pass depsgraph to events where it makes sense.Sep 11 2019, 10:59 AM
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 https://wiki.blender.org/wiki/Reference/Release_Notes/2.81/Python_API#Handlers 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.