Skip to content

Conversation

@BigRoy
Copy link
Contributor

@BigRoy BigRoy commented Dec 1, 2025

Changelog Description

Add support for Blender 5.0

Additional review information

For reference, see: https://developer.blender.org/docs/release_notes/5.0/python_api

  • Fix PySide install for Blender 5.0+
  • Access comp node tree via bpy.context.scene.compositing_node_group now
  • Refactor usd export argument that has been replaced in API.
  • Refactor filepath logic for CompositorNodeOutputFile since API changes.

Fix: #203
Fix: #201

Testing notes:

  1. Integration should work with Blender 5.0
  2. Integration should still work with Blender 4.5

@BigRoy BigRoy requested a review from LiborBatek December 1, 2025 23:32
@BigRoy BigRoy self-assigned this Dec 1, 2025
@BigRoy BigRoy added type: enhancement Improvement of existing functionality or minor addition sponsored This is directly sponsored by a client or community member labels Dec 1, 2025
@BigRoy BigRoy marked this pull request as draft December 2, 2025 08:00
@BigRoy
Copy link
Contributor Author

BigRoy commented Dec 2, 2025

Couldn't load user scripts "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\5.0\scripts"
Traceback (most recent call last):
  File "F:\dev\ayon-blender\client\ayon_blender\api\lib.py", line 141, in append_user_scripts
    load_scripts(user_scripts.split(os.pathsep))
  File "F:\dev\ayon-blender\client\ayon_blender\api\lib.py", line 30, in load_scripts
    import bpy_types
ModuleNotFoundError: No module named 'bpy_types'

I do still get this at startup in Blender 5.0 - but I'm not sure what we want to do there. I'm a bit at loss why we are still in need to even manage Blender's users scripts paths, etc. Does anyone remember? @LiborBatek @moonyuet @antirotor perhaps?

@BigRoy BigRoy marked this pull request as ready for review December 2, 2025 10:54
@moonyuet
Copy link
Member

moonyuet commented Dec 2, 2025

Couldn't load user scripts "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\5.0\scripts"
Traceback (most recent call last):
  File "F:\dev\ayon-blender\client\ayon_blender\api\lib.py", line 141, in append_user_scripts
    load_scripts(user_scripts.split(os.pathsep))
  File "F:\dev\ayon-blender\client\ayon_blender\api\lib.py", line 30, in load_scripts
    import bpy_types
ModuleNotFoundError: No module named 'bpy_types'

I do still get this at startup in Blender 5.0 - but I'm not sure what we want to do there. I'm a bit at loss why we are still in need to even manage Blender's users scripts paths, etc. Does anyone remember? @LiborBatek @moonyuet @antirotor perhaps?

I guess it has gone as I can't even search bpy_types? https://docs.blender.org/api/current/search.html?q=bpy_types&check_keywords=yes&area=default
Have you tried to switch import bpy_types to import bpy or just remove it in

?

@BigRoy
Copy link
Contributor Author

BigRoy commented Dec 2, 2025

Have you tried to switch import bpy_types to import bpy or just remove it in

Well, I know how I can avoid the issue by removing the troubling code. My question mostly is, why is the code there, what did it try to solve? And if I do remove it, what does that mean that I should be fixing instead? But I suppose I could completely bypass the bpy_types check in Blender 5.0 - yet I still wouldn't know what it should actually be doing?

Like, why can't we rely on Blender just loading user scripts? 🗡️

@MilaKudr
Copy link

MilaKudr commented Dec 3, 2025

Ayon menu is integrated, for now I only tested workfiles area. Found this in the process monitor:

Traceback (most recent call last):
  File "C:\Users\mila\AppData\Local\Ynput\AYON\addons\blender_1.0.10+dev\ayon_blender\api\lib.py", line 141, in append_user_scripts
    load_scripts(user_scripts.split(os.pathsep))
  File "C:\Users\mila\AppData\Local\Ynput\AYON\addons\blender_1.0.10+dev\ayon_blender\api\lib.py", line 30, in load_scripts
    import bpy_types
ModuleNotFoundError: No module named 'bpy_types'
>>> [  Installed event handler _on_save_pre...  ] 
>>> [  Installed event handler _on_save_post...  ] 
>>> [  Installed event handler _on_load_post...  ] 
qt.qpa.window: SetProcessDpiAwarenessContext() failed: The operation completed successfully.
Qt's default DPI awareness context is DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2. If you know what you are doing, you can overwrite this default using qt.conf (https://doc.qt.io/qt-6/highdpi.html#configuring-windows).
>>> [ *** Discovered 2 abstract plugins
- AutoCreator
- BlenderCreator ] 
>>> [  Auto-creating workfile instance...  ] 

@BigRoy
Copy link
Contributor Author

BigRoy commented Dec 3, 2025

Thanks @MilaKudr - that error there is indeed the above ongoing conversation I had with Kayla. I'll need to look into a suitable 'fix' still. Will let you know when it's there.

Co-authored-by: Kayla Man <64118225+moonyuet@users.noreply.github.com>
@MilaKudr
Copy link

MilaKudr commented Dec 8, 2025

The user and system addons, as well as the custom splash screen, are loading properly. I have tested the work files by loading and saving them, and this also works. There are no errors in the console. (publishing not tested.)
Screenshot 2025-12-08 112242
Screenshot 2025-12-08 112258

@MilaKudr
Copy link

MilaKudr commented Dec 8, 2025

I've tested publishing of workfile, rig and model. More advanced stuff is waiting for @LiborBatek.
image

@iLLiCiTiT
Copy link
Member

So, does this need more attention? I guess @LiborBatek was testing it?

@LiborBatek
Copy link
Member

@iLLiCiTiT yes indeed still need refactoring , publishing works and the rest of tools also ... but renders are not functional due to massive changes in the blender 5.0

I will report more specificaly on rendering issues soon...sry been off for a while

Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall Blender 5.0 and Ayon integration works with all product types

all been tested and also Managing tools.

However rendering has issues due to changes in this blender version.

Here is compositor with tree in blender 4.5.3

Screenshot 2025-12-11 175440

Note correctly connected Composite node out into File Output Node used for rendering.

while in blender 5.0 it completely lacks Compositor node and using Group Out node instead so our Ayon integration fail connecting such input into File Output Node marked by red:

Screenshot 2025-12-11 175820

However it seems that its working also with multiple ViewLayers aka render layers but just not with compositor out which is still unconnected.

Screenshot 2025-12-11 180127

And lastly I had issues with rendered frames which are empty and has no any AOVs...but that could also be my legacy scene configuration and need to be revisited more...

Screenshot 2025-12-11 150138

It also seems that even the File Output Node of new version changed too...

@BigRoy
Copy link
Contributor Author

BigRoy commented Dec 11, 2025

@LiborBatek I've disabled the "Composite" option in Blender 5.0 because it does not have a "Composite" node.

Was there still anything else?

@LiborBatek
Copy link
Member

@LiborBatek I've disabled the "Composite" option in Blender 5.0 because it does not have a "Composite" node.

Was there still anything else?

I will give it another testing round and see if Im able to produce "working" aka correct rendered images...and let you know!

@BigRoy
Copy link
Contributor Author

BigRoy commented Dec 17, 2025

@LiborBatek you didn't have any additional feedback yet, right? Still need to test?

@LiborBatek
Copy link
Member

@BigRoy well I suppose rendering changes need to be first introduced, no? the rest of toolset working ok.

or?

@BigRoy
Copy link
Contributor Author

BigRoy commented Dec 18, 2025

@BigRoy well I suppose rendering changes need to be first introduced, no? the rest of toolset working ok.

or?

The way I understood the real issue was with the Composite node - that should be solved since:
#204 (comment)

@LiborBatek LiborBatek self-requested a review December 19, 2025 14:32
Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im now getting error while trying to create Render publish instance (with 'Create Render Setup` enabled btw)

Traceback (most recent call last):
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\core_1.6.13\ayon_core\pipeline\create\context.py", line 2314, in _create_with_unified_error
    result = creator.create(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\blender_1.0.12+dev\ayon_blender\plugins\create\create_render.py", line 77, in create
    node = render_lib.prepare_rendering(variant_name=variant)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\blender_1.0.12+dev\ayon_blender\api\render_lib.py", line 439, in prepare_rendering
    set_render_format(ext, multilayer)
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\blender_1.0.12+dev\ayon_blender\api\render_lib.py", line 62, in set_render_format
    image_settings.file_format = (
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: bpy_struct: item.attr = val: enum "OPEN_EXR_MULTILAYER" not found in ('JPEG', 'OPEN_EXR', 'PNG', 'WEBP', 'BMP', 'CINEON', 'DPX', 'IRIS', 'JPEG2000', 'HDR', 'TARGA', 'TARGA_RAW', 'TIFF')

its weird but by default the Compositor does not have any Input Scene aka Render Layers node...

so its mostly due to this

image

@LiborBatek
Copy link
Member

if my scene having the Input Scene then it partially works and Render instance got created but the output node is not anyhow connected and without any reasonable inputs...again failure.

image

@LiborBatek
Copy link
Member

Once manually configured composting tree with output node for rendering (as now Ayon integration fails to do so) it can be published to DL for rendering...

however more issues arises as the rendered images ends up in wrong folders etc. I rather provide all logs possible (publish log from blender host, DL finnished rendered batch log and metadata.json) ....it seems a lot have changed from blender 4.5.x as its malfunction on many fronts :-(

B3d-5-publish-report-251219-16-15.json.txt

DL-Render-Job_2025-12-19_16-17-33_69456c8d2d345570ad1214df.txt

renderLightingFileOutput_metadata.json.txt

And couple of scrnshots of my out dir (staging work render directory with some renders in wrong place)

Screenshot 2025-12-19 162156 Screenshot 2025-12-19 162208

And lastly my comp tree for your awarness...

image

@BigRoy
Copy link
Contributor Author

BigRoy commented Dec 19, 2025

IMB_exr_begin_write: ERROR: Cannot open image file "C:\projects\Blender\Shots\sh040\work\lighting\renders\blender\Blnd_sh040_lighting_v0031005.exr". Missing or empty channel list in header

That in your render logs doesn't seem too optimal. Unrelated?


And couple of scrnshots of my out dir (staging work render directory with some renders in wrong place)

@LiborBatek can you share the logs of the Publish job in Deadline? Did it try to run once? If so, can you get me the log of the first run? I have a vague feeling it did end up publishing, but errored due to something else... so the files in the v003 render folder got removed but job still failed due to something else?

If that's not the case and it is actually rendering to the wrong folder - can you pass me that workfile? This I seem to have a hard time reproducing.

The rest preparing render setup I've now fixed.

@LiborBatek
Copy link
Member

I did try it again...so here are the logs...

btw the Publish DL job even do not start due to expected fies aka asset dependencies as those files arent present (as they ended up in different folder location)
B3D-publish-report-251223-12-22.json.txt

DL-Job_2025-12-23_12-24-25_694a7be9635b18e67e87a276.txt

renderLightingMain_metadata.json.txt

There is also issue when hitting Auto create render setup that it keeps the inputs of the file output node in default state float which is not matching corresponding inputs (e.g. color, vector etc)
Screenshot 2025-12-23 122003

Here is a staging folder with files rendered into root instead of v04 as highlighted on the pic

Screenshot 2025-12-23 123349

also these having zero size /been blank, however the renders in the tmp subfolder of v004 having all in (AOVs etc)

Screenshot 2025-12-23 124821

and lastly the asset dependencies on Publish DL job which seems correct but those arent present atm:

Screenshot 2025-12-23 123458

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sponsored This is directly sponsored by a client or community member type: enhancement Improvement of existing functionality or minor addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

YN-0246: Blender 5.0 compatibility Publisher - bpy.context.scene.node_tree removed in blender 5.0.0

6 participants