Custom Prop Does Not Fire Update When Driven By F-Curve #37473

Closed
opened 2013-11-15 15:43:34 +01:00 by Atomic · 20 comments

System Information
Windows 7 x64 8GB
nVidia 460gtx 1GB

Blender Version
2.69 official release

Short description of error
Custom Prop Does Not Fire Update When Driven By F-Curve
My guess is that only a draw() event is being issued and not and update() behind the scenes.

Exact steps for others to reproduce the error
custom_node_update_issue.zip
I have attached a custom node AddOn and a BLEND file that uses that AddOn.
Drop the AddOn into your AddOn folder and activate "test_node" under User Preferences. Then open the BLEND file.
You should see a series of three Float nodes.
Put Blender and the Console side by side so you can view the AddOn output.

The first node is animated. Scrub the Node Property Value directly to observe that the node does correctly send an update to all nodes downstream of it's output. It also generated print statements in the console as events are fired.

Scrub the Timeline and you will see that while the animated node and the next companion node do update, the third node does not. This is because the update=updateProperty def is not being fired when it is driven by an f-curve. This should happen. When I place a custom property under the object panel and animate it I do get an update event fired by the property. Also you will notice that not a single print statement is generated by the AddOn when you scrub the timeline even though the property value does change. This is the result of what I am calling a "fake" update event.

value = bpy.props.FloatProperty(name = "Float", default=DEFAULT_FLOAT, update=updateProperty)

Theupdate() event of the node itself is not firing when you scrub the animation or render the animation via F12.

The only reason we see the second node update when we scrub the timeline is because there is some kind of special code in Blender that forces this "fake" update to only the first node connected. This "fake" update event should be removed from the system.

My guess is that only a draw() event is being issued and not and update() behind the scenes.

I know this is kind of a complex issue and please point out if my code is wrong. I hope this is enough info to describe the bug

**System Information** Windows 7 x64 8GB nVidia 460gtx 1GB **Blender Version** 2.69 official release **Short description of error** Custom Prop Does Not Fire Update When Driven By F-Curve **My guess is that only a draw() event is being issued and not and update() behind the scenes.** **Exact steps for others to reproduce the error** [custom_node_update_issue.zip](https://archive.blender.org/developer/F27573/custom_node_update_issue.zip) I have attached a custom node AddOn and a BLEND file that uses that AddOn. Drop the AddOn into your AddOn folder and activate "test_node" under *User Preferences*. Then open the BLEND file. You should see a series of three Float nodes. Put Blender and the Console side by side so you can view the AddOn output. The first node is animated. **Scrub the Node Property Value** directly to observe that the node does correctly send an update to all nodes downstream of it's output. It also generated print statements in the console as events are fired. **Scrub the Timeline** and you will see that while the animated node and the next companion node do update, the third node does not. This is because the *update=updateProperty* def is not being fired when it is driven by an f-curve. This should happen. When I place a custom property under the object panel and animate it I do get an update event fired by the property. Also you will notice that not a single print statement is generated by the AddOn when you scrub the timeline even though the property value does change. This is the result of what I am calling a "fake" update event. ``` value = bpy.props.FloatProperty(name = "Float", default=DEFAULT_FLOAT, update=updateProperty) ``` The*update()* event of the node itself is not firing when you scrub the animation or render the animation via F12. The only reason we see the second node update when we scrub the timeline is because there is some kind of special code in Blender that forces this "fake" update to only the first node connected. This "fake" update event should be removed from the system. My guess is that only a draw() event is being issued and not and update() behind the scenes. I know this is kind of a complex issue and please point out if my code is wrong. I hope this is enough info to describe the bug
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @AtomP

Added subscriber: @AtomP

#95642 was marked as duplicate of this issue

#95642 was marked as duplicate of this issue

#86675 was marked as duplicate of this issue

#86675 was marked as duplicate of this issue

blender/blender-addons#48285 was marked as duplicate of this issue

blender/blender-addons#48285 was marked as duplicate of this issue

blender/blender-addons#28286 was marked as duplicate of this issue

blender/blender-addons#28286 was marked as duplicate of this issue
Lukas Tönne was assigned by Bastien Montagne 2013-11-15 19:57:30 +01:00

Added subscriber: @mont29

Added subscriber: @mont29

Assigning to Lukas to make the final decision, but I think this is a known limitation of our current depsgraph…

Assigning to Lukas to make the final decision, but I think this is a known limitation of our current depsgraph…
Member

Added subscribers: @ideasman42, @dfelinto, @JoshuaLeung, @brecht, @Ton

Added subscribers: @ideasman42, @dfelinto, @JoshuaLeung, @brecht, @Ton
Member

◀ Merged tasks: blender/blender-addons#28286.

◀ Merged tasks: blender/blender-addons#28286.
Member

Indeed this is a general limitation of the animation system: it doesn't execute update callbacks of properties. This has been discussed several times, but doesn't look like it's simple to implement, mostly because it would add overhead and slow down animation playback significantly (see duplicates and blog post by Joshua )

Indeed this is a general limitation of the animation system: it doesn't execute update callbacks of properties. This has been discussed several times, but doesn't look like it's simple to implement, mostly because it would add overhead and slow down animation playback significantly (see duplicates and [blog post by Joshua ](http://aligorith.blogspot.de/2011/07/gsoc11-rna-property-updates-working-for.html))
Member

For your specific case i would suggest using a frame update handler and do an evaluation of the node tree data there. Using update callbacks for evaluating nodes is generally not the best way to handle it, they are intended for handling updates locally.

For your specific case i would suggest using a [frame update handler ](http://www.blender.org/documentation/blender_python_api_2_69_1/bpy.app.handlers.html#bpy.app.handlers.frame_change_post) and do an evaluation of the node tree data there. Using update callbacks for evaluating nodes is generally not the best way to handle it, they are intended for handling updates locally.
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Added subscriber: @kpghost

Added subscriber: @kpghost

It's been a while since this bug was opened. Is using a frame update handler (as mentioned by lukastoenne) still the recommended way to process updates to custom properties while animating? Or is there a better/simpler way now?

It's been a while since this bug was opened. Is using a frame update handler (as mentioned by lukastoenne) still the recommended way to process updates to custom properties while animating? Or is there a better/simpler way now?

The situation here has not changed, as far as I know.

The situation here has not changed, as far as I know.

Added subscriber: @JulienDuroure

Added subscriber: @JulienDuroure

Added subscriber: @StanislasPaillereau

Added subscriber: @StanislasPaillereau
Member

Added subscribers: @dodododorian, @lichtwerk, @JaumeBellet

Added subscribers: @dodododorian, @lichtwerk, @JaumeBellet
Member

Added subscriber: @karab44

Added subscriber: @karab44
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
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
9 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#37473
No description provided.