Open betstick opened 1 year ago
Hello, I can confirm, but not sure to understand why you are trying to use a render engine to export files. What is your use case? Why not creating a custom operator to export your file?
Currently, export uses various attributes that are not available in rendering context.
I've opted to use the GLTF export as it is robust, compatible with multiple systems, and fast. I measured the GLTF exporter to be one of the fastest in Blender (with compression turned off). When I hit F12 to render my scene with my custom engine, I need a way to get the finalized mesh data into my engine. My engine can import from just about any pre-existing format, and I'd rather keep it that way as opposed to writing a custom mesh interface just for Blender.
I've opted to write a Python exporter for the time being. I don't strictly have need of being able to call the exporter from the RenderEngine context anymore. If it doesn't seem like anyone else would need this, I think the issue can be closed.
What is your use case? Why not creating a custom operator to export your file?
Would the custom operator be able to get the output from a custom renderer into the viewport, the render window and the various preview panes?
If that's not possible, then being able to call the export inside a render context (with RenderEngine) is to allow custom renderers to really be integrated into Blender and work just like Cycles/EEVEE instead of requiring their own panels.
Describe the bug When trying to use the export within a bpy RenderEngine render function results in a context error in the console and the export does not occur.
To Reproduce Steps to reproduce the behavior: gltf_error_addon.zip Copy the attached code directory into the addons folder for Blender to install it Open Blender via a terminal, enable the Error Engine addon in preferences and select Error from the render engine menu Hit F12 to render Check the console logs to see the error messages
Expected behavior The scene should be exported to the specified files/directories.
Screenshots
Version