Regression: Missing update in custom Nodetree #96394
Labels
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#96394
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?
System Information
Operating system: Windows-10-10.0.19042-SP0 64 Bits
Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 461.40
Blender Version
Broken: version: 3.1.0, current master
Affected by
7e712b2d6a
Short description of error
If create custom node tree with name "CustomNodeTree" and try update node tree by script:
bpy.data.node_groups["CustomNodeTree"].interface_update(bpy.context)
- tree not updated. In version Blender 3.0 function works goodExact steps for others to reproduce the error
Download archive
batch_render_nodes.zip
Install zip-archive add-on in Blender 3.0 and Blender 3.1
Download test file
Batch_Render_Nodes_UPDATE_TREE_TEST.blend
Open test file in Blender 3.0
Try change sockets values
Sockets output values updated
Open same test file in Blender 3.1
Try change sockets values
Sockets output values not updated
For update sockets and all node tree i used function https://docs.blender.org/api/current/bpy.types.NodeTree.html#bpy.types.NodeTree.interface_update
batch_render_nodes.zip
Batch_Render_Nodes_UPDATE_TREE_TEST.blend
Added subscriber: @GregoryS
Added subscriber: @PratikPB2123
Changed status from 'Needs Triage' to: 'Needs User Info'
Hi, thanks for the report. You mean using default python template?
I don't think I understand steps for reproducing the problem. Are you using custom script? Can you attach that?
Also, please test again on latest 3.2 build: https://builder.blender.org/download/daily/
Similar reports I have seen where responsible commit was
7e712b2d6a
Thanks!
I codding add-on for batch rendering using node trees.
Steps:
Download archive batch_render_nodes.zip batch_render_nodes.zip
Install zip-archive add-on in Blender 3.0 and Blender 3.1
3.Download test file Batch_Render_Nodes_UPDATE_TREE_TEST.blend Batch_Render_Nodes_UPDATE_TREE_TEST.blend
Open test file Batch_Render_Nodes_UPDATE_TREE_TEST.blend in Blender 3.0
Try change sockets values
Sockets output values updated
Open test file Batch_Render_Nodes_UPDATE_TREE_TEST.blend in Blender 3.1
Try change sockets values
Sockets output values not updated
I try Blender 3.2. Sockets output information also not updated
For update sockets and all node tree i used function https://docs.blender.org/api/current/bpy.types.NodeTree.html#bpy.types.NodeTree.interface_update
Also i upload screen videocapture
Video_Blender_3_0.mp4
Video_Blender_3_1.mp4
Changed status from 'Needs User Info' to: 'Confirmed'
Added subscriber: @JacquesLucke
Thank you for the information :)
I can confirm now. This is got affected after the same commit. This one-
7e712b2d6a
@JacquesLucke ^
Function - interface_update(context) - from class NodeTree not work in Blender 3.1to Regression: Missing update in custom NodetreeI'm not 100%, but right now this does not feel like a bug in Blender to me.
It seems like you expect Blender to call the
update
method on every node when you callinterface_update
. However, there is no reason why it should do that.interface_update
is a method that was supposed to be called to force an update when the inputs or outputs of a node group changed. However, Blender never calls this function itself anymore, so maybe it should even be removed.From what I can tell, the current update-logic in the addon is very brittle. This is also shown by the fact that you always call
interface_update
three times, so that data can propagate for three nodes. This might give the illusion that it works, but is still unreliable when there are longer chains of nodes.A short term fix would be to just call
node.update()
for all the nodes manually.In addition you might have to loop over the different area/regions in the Blender UI and call
tag_redraw
on them.For a more complete example see P2851.
I highly recommend you to implement a system that gives you control over when and in what order nodes are executed.
Thanks !I have updated the code, thanks to your advice. Update nodes works
Changed status from 'Confirmed' to: 'Archived'