Changing Renderlayer Compositor node Layer does not update enabled outputs until script is finished #48760
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#48760
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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
GNU/Linux 64 bit (Fedora 23), Intel CPU, Nvidia GPU
Blender Version
Broken: 2.77.1 2af4c80
Worked: maybe never
Short description of error
If you add change a renderlayer node's scene layer, the enabled output sockets change to reflect the scene layer's enabled passes. But if you do this within a python script or function, this does not happen until after the script has finished running, making it extremely cumbersome to use this node in your script (scene layer passes are not 1 to 1 the same as node layer output names, e.g. Combined -> Image, Alpha, Object Index ->IndexOB etc.)
Exact steps for others to reproduce the error
Note that the two renderlayers in the scene (A and B) have different passes
What I Expect to Happen
At least with some type of refreshing (note the overkill_update() function in the script) I would expect the output to change on the second print_enabled_sockets() command to reflect the renderlayer change.
Changed status to: 'Open'
Added subscriber: @BassamKurdali
bug2.blend
I added a bpy.context.scene.node_tree.update_tag()
bpy.context.scene.update()
just in case, to the overkill_update() function. Same result.
Added subscribers: @monique, @Sergey, @Jeroen-Bakker, @mont29
Can confirm the issue, it comes from the fact that your newly added node has no output (
ED_node_tag_update_nodetree
is called from RNA update callback, but does nothing in case node is not connected somehow to output - i.e. node has no effect on result). And RenderLayer node has no update() callback registered either, afaict.Not sure how to handle this, @Jeroen-Bakker, @monique, @Sergey?
@mont29,
ED_node_tag_update_nodetree
updates nodetree itself (aka, executes the tree to get new result).The actual issue here is that currently sockets gets hidden on every redraw of compositor. This is weak, but it is how it is. Tweaking render passes forces updates of hidden sockets, so guess it'll be fine to do same for layer in Image and Scene compositor nodes.
This issue was referenced by blender/blender@ae881ddf43
Changed status from 'Open' to: 'Resolved'
wow! thanks sergey and mont, that was an interesting/ difficult case!