Regression: Compositor render layer node's outputs no longer update when modified from python #114234

Open
opened 2023-10-28 19:40:42 +02:00 by michael campbell · 10 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 537.58

Blender Version
Broken: version: 4.1.0 Alpha, branch: main, commit date: 2023-10-27 00:53, hash: ce027579e02f
Worked: (previous 4.1.0 build and all builds before that)

Short description of error
Enabling passes of another scene via python no longer results in the current scene's render layers node for that scene getting the new output sockets.

It's strange, but it only appears to be an issue with the Vector pass, other passes that are updated via python get a socket on the render layer node without issue.

Exact steps for others to reproduce the error

  1. open attached blend file ensuring load UI is ticked
  2. go to scripting workspace (top left panel should be a compositor if you used load UI when opening the file)
  3. pay attention to the output sockets on the render layer nodes (neither have vector pass)
  4. run the script
  5. the render layer node that represents the current scene now has the vector output socket, but the render layer node that represents scene.001 has not updated.
  6. on the render layer node that failed to update, click it's scene dropdown and click scene.001 again.
  7. now the output shows, indicating python was successful, but the UI didn't update.

Forcing region redraw with region.tag_redraw() does not resolve.

I've found that I can force the render layer node to update by assigning the same scene back to itself before trying to create links from the missing socket:

bpy.data.scenes[scene_name].node_tree.nodes[n].scene = bpy.data.scenes[scene_name].node_tree.nodes[n].scene
**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 537.58 **Blender Version** Broken: version: 4.1.0 Alpha, branch: main, commit date: 2023-10-27 00:53, hash: `ce027579e02f` Worked: (previous 4.1.0 build and all builds before that) **Short description of error** Enabling passes of another scene via python no longer results in the current scene's render layers node for that scene getting the new output sockets. It's strange, but it only appears to be an issue with the Vector pass, other passes that are updated via python get a socket on the render layer node without issue. **Exact steps for others to reproduce the error** 1. open attached blend file ensuring load UI is ticked 2. go to scripting workspace (top left panel should be a compositor if you used load UI when opening the file) 3. pay attention to the output sockets on the render layer nodes (neither have vector pass) 4. run the script 5. the render layer node that represents the current scene now has the vector output socket, but the render layer node that represents scene.001 has not updated. 6. on the render layer node that failed to update, click it's scene dropdown and click scene.001 again. 7. now the output shows, indicating python was successful, but the UI didn't update. Forcing region redraw with region.tag_redraw() does not resolve. I've found that I can force the render layer node to update by assigning the same scene back to itself before trying to create links from the missing socket: ``` bpy.data.scenes[scene_name].node_tree.nodes[n].scene = bpy.data.scenes[scene_name].node_tree.nodes[n].scene ```
michael campbell added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-10-28 19:40:43 +02:00
michael campbell changed title from (URGENT) - Compositor render layer node's outputs no longer update when modified from python to Compositor render layer node's outputs no longer update when modified from python 2023-10-28 19:56:14 +02:00
Iliya Katushenock changed title from Compositor render layer node's outputs no longer update when modified from python to Regression: Compositor render layer node's outputs no longer update when modified from python 2023-10-28 19:59:47 +02:00
Iliya Katushenock added the
Interest
Compositing
Interest
Nodes & Physics
labels 2023-10-28 19:59:55 +02:00
michael campbell changed title from Regression: Compositor render layer node's outputs no longer update when modified from python to (URGENT) Compositor render layer node's outputs no longer update when modified from python 2023-10-28 20:00:58 +02:00
michael campbell changed title from (URGENT) Compositor render layer node's outputs no longer update when modified from python to Regression: (URGENT) Compositor render layer node's outputs no longer update when modified from python 2023-10-28 20:05:38 +02:00
michael campbell changed title from Regression: (URGENT) Compositor render layer node's outputs no longer update when modified from python to Regression: Compositor render layer node's outputs no longer update when modified from python 2023-10-29 01:50:22 +02:00
Member

I can confirm the missing UI update, however (before diving deeper), I'd like to check on the following:

Worked: (previous 4.1.0 build and all builds before that)

I cannot confirm that, I get the same (wrong) behavior in 3.6.5 even
@3di : Could you re-check?

I can confirm the missing UI update, however (before diving deeper), I'd like to check on the following: > Worked: (previous 4.1.0 build and all builds before that) I cannot confirm that, I get the same (wrong) behavior in 3.6.5 even @3di : Could you re-check?
Philipp Oeser added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-10-30 14:34:24 +01:00

Hi, thanks for looking. Yes I can confirm that the issue has never arisen prior to my first noticing it with 4.1.0. If it's now happening with 3.65 then that would indicate whatever code change has caused it, was also backported.

My addon was working without issue with all builds between 2.93 and 4.1 Alpha previously 👍 I was a bit stressed initially, because the addon is used by thousands of users, and is even in use by NASA and some major studios . I've managed to workaround it for now though, but would still be great if it could be fixed.

Hi, thanks for looking. Yes I can confirm that the issue has never arisen prior to my first noticing it with 4.1.0. If it's now happening with 3.65 then that would indicate whatever code change has caused it, was also backported. My addon was working without issue with all builds between 2.93 and 4.1 Alpha previously 👍 I was a bit stressed initially, because the addon is used by thousands of users, and is even in use by NASA and some major studios . I've managed to workaround it for now though, but would still be great if it could be fixed.
Member

I get the behavior in 3.5.1 even...

I get the behavior in 3.5.1 even...
Philipp Oeser added
Status
Needs Triage
and removed
Status
Needs Information from User
labels 2023-10-30 15:20:51 +01:00

I remade this file from scratch and i not able to reproduce this bug.

I remade this file from scratch and i not able to reproduce this bug.

hmm, perhaps it previously was evident in the UI but python was still able to access the sockets. I'll do some further testing and create a new example file if necessary.

hmm, perhaps it previously was evident in the UI but python was still able to access the sockets. I'll do some further testing and create a new example file if necessary.

This is extremely strange.

I'm now not getting the issue with virtually identical code in the attached blend file, but I'm still getting the problem in the blend file I originally attached above.

bizarre!

This is extremely strange. I'm now not getting the issue with virtually identical code in the attached blend file, but I'm still getting the problem in the blend file I originally attached above. bizarre!

Can you check if that is related with order of creating nodes/scene/something other?

Can you check if that is related with order of creating nodes/scene/something other?

I'm wondering if it might be an issue if the blend file was originally created in a different version of Blender. I can't remember if I had done that or not.

I'm wondering if it might be an issue if the blend file was originally created in a different version of Blender. I can't remember if I had done that or not.

OK, I've been wracking my brain cell, and no matter what I do, I can't replicate the issue from script which is run from Blender's script editor.

So to demonstrate the problem, I've cut down my addon from 10,000 lines of code to around 200 (guessing).

  1. Open the attached blend file, and install the attached addon. I've tested on 4.1 alpha (same hash as above).
  2. go to the compositor and press 'ctrl alt shift K'
  3. You'll get an error saying the key 'Vector' is missing.
  4. On the bottom render layers node (for scene.001), click the little scene icon on the node, and choose scene.001 from the dropdown (same one that's already in use), now the vector pass will show up.
  5. press ctrl z to undo until the vector pass disappears from the nodes.
  6. In the addon, uncomment line 18 of setup.py
  7. re-install the addon (or update if you're debugging from vs code with Jacques Luckes blender extension (ctrl shift p 'Blender: Reload Addons' )
  8. open the blend file again, go to the compositor and press 'ctrl alt shift K'
  9. Now it will work.

Possibly caused by e4ad58114b ?

OK, I've been wracking my brain cell, and no matter what I do, I can't replicate the issue from script which is run from Blender's script editor. So to demonstrate the problem, I've cut down my addon from 10,000 lines of code to around 200 (guessing). 1. Open the attached blend file, and install the attached addon. I've tested on 4.1 alpha (same hash as above). 2. go to the compositor and press 'ctrl alt shift K' 3. You'll get an error saying the key 'Vector' is missing. 4. On the bottom render layers node (for scene.001), click the little scene icon on the node, and choose scene.001 from the dropdown (same one that's already in use), now the vector pass will show up. 5. press ctrl z to undo until the vector pass disappears from the nodes. 6. In the addon, uncomment line 18 of setup.py 7. re-install the addon (or update if you're debugging from vs code with Jacques Luckes blender extension (ctrl shift p 'Blender: Reload Addons' ) 8. open the blend file again, go to the compositor and press 'ctrl alt shift K' 9. Now it will work. Possibly caused by https://projects.blender.org/blender/blender/commit/e4ad58114b9d56fe838396a97fe09aff32c79c6a ?

by the way, if you add a breakpoint prior to the line that throws the error, checking the render layer node for scene.001 will show you that according to python there is a socket present with name 'Vector' and also identifier 'Vector', so the commit above should find it via the identifier initially.

by the way, if you add a breakpoint prior to the line that throws the error, checking the render layer node for scene.001 will show you that according to python there is a socket present with name 'Vector' and also identifier 'Vector', so the commit above should find it via the identifier initially.
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
3 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#114234
No description provided.