custom property update function doesn't get called when property is animated #28286
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#28286
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
%%%Hi Campbell,
please see attached file.
The update function is only called if I change the property manually. If I animate it if does not call the update function.
Thanks
(also, why do we have a subtype 'UNSIGNED' if I still need to manually set min to 0?)%%%
Changed status to: 'Open'
%%%ps.: my real script is actually using a custom property for Textures, not object. In case the depsgraph problem is "deeper":
http://blenderecia.orgfree.com/blender/scripts/texture_imagechanger.py%%%
%%%quick notes:
(1) to test the sample file you need to run the script (forgot to toggle "register")
(1.1) also forgot to clean some junk on top of the script file, sorry
(2) this is not urgent (for me at least). I'm using a ScriptLink (the hack with a driver calling import(mymodule).func()) to set all props manually:
e.g. for ob in bpy.data.objects: ob.bugprop = ob.bugprop
it works like a charm (for animation, render, ... ;)%%%
%%%NOTE: RNA update functions are called by animsys for properties now in Pepper. Whether this applies for custom properties I'm not sure.
Unless I'm misreading this report, I think we can just mark this as "fixed" in the meantime.%%%
%%%Hi Joshua, it's not fixed in pepper.
What's happening is:
I created a custom property via python. While doing it I created a function to be called whenever the property is updated.
If I change the property in the ui my update function get called.
If I change the property via "playback" (or render animation) - assuming I keyframed different values for the prop - the update function doesn't get called.
I seems like a depsgraph problem to me. Re-opening ....%%%
%%%The problem is that Blender handles these kinds of animation system updates different than what you are expecting, and there's no python hook for it...
Property update function are never called on e.g. frame change for animation, only when changing the property in the UI, editing the fcurve, etc. The update function is intended to be quick, and builtin properties usually will tag the datablock for update in the depsgraph, and then the actual update will be done delayed before the next redraw in object_handle_update. Not sure how to solve this..%%%
%%%The problem is generic - and has been reported many times before. I'll add this report to the long list of similar ones in wiki:
http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Animation#Dependency_Graph
(no cheap excuse - this needs to be tackled!)%%%
Changed status from 'Open' to: 'Archived'
Changed status from 'Archived' to: 'Duplicate'
✘ Merged into blender/blender#37473.
Added subscriber: @RomboutVersluijs
I know this is an old post, but why do custom properties dont update when doing animation render?
This add; https://blenderartists.org/t/a-text-counter-plugin/601171/21?u=rombout
With this test file show fine in viewport, shows fine when doing single renders. But doing a render animation its static?
textcounter-bug.blend