-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider using Blender as a built Python module #9
Comments
FTR, looks like this person had tinkered with getting the rendered image using Viewer nodes, though it's unclear if that requires the GUI to be running: |
Oh neat. Hadn't found that first thing. I did look a bit, back when I first wrote this stuff, at trying to get direct data access to the rendered image (precisely to avoid the awkward file write/read), but I couldn't quite finangle it into working... I suspected doing things headless was the problem. That edit to the Blender source might be the trick required to get that working! About involving Blender as a module: considering Blender is GPL, maybe keeping it in a separate process is a little cleaner from that perspective? (I'm not super clear on where that boundary gets drawn.) |
Oh yeah, definitely would be keeping the overall rendering as a separate process for licensing concerns; namely it'd be for simplifying the execution of the scripts. In terms of editing the source, though, if it's already being recompiled, then perhaps adding in doing the standalone module as part of the source recompile (and possibly leveraging the system interpreter) could make things a bit simpler -- assuming it doesn't make the licensing too complicated. |
Was perusing some background stuff, and it looks like you could build Blender as a standalone Python module, rather than requiring it be the entry point:
https://wiki.blender.org/wiki/Building_Blender/Other/BlenderAsPyModule
Perhaps that, combined with permitting off-screen rendering (to avoid file write+read to access the bytes), could be useful?
https://blender.stackexchange.com/questions/69230/python-render-script-different-outcome-when-run-in-background/81240#81240
The text was updated successfully, but these errors were encountered: