20 Replies
A bit of additional context:
Radamés Ajna was trying the same thing with Gradio and said:
"It won't work well on a shared web env due to a single Blender context, so set I set Gradio concurrency_count=1." https://twitter.com/radamar/status/1701348276853960908
Is this the same reason here?
Also, When I work locally, for each notebook a separate Python symbol is showing in my task bar:
and last but not least, here's the link to my project:
https://huggingface.co/spaces/kolibril13/blender-with-solara
yes, i think the same is happening in solara
Yes, the code is interacting and modifying the global state of the Blender scene via the bpy module like this
is there no way around that?
there is no 'context' or 'scene' object to isolatie all the settings
I'm really new to that API, I'll check!
And another question to another scenario:
Now, I've got a new solara project with only one notebook that renders a protein.
It runs totally fine in a normal notebook environment (see screen recording).
But as soon as I run
solara run pages/.
and click the "Start Rendering" Button in my Solara App, I get the error. Any ideas why this might happen?
seems like there is some default context in jupyter
yes, I think so too!
Can I get this default context somehow to solara?
i don't know how their notebook integration works
can't even find their github pages, or anything about notebook integration
is this very new?
It's just a few months since the blender py module
bpy
is pip-installable.
I achieved the notebook integration only a few weeks ago via
So there's no documentation about blender in notebook around yet.
Converting this to a solara component works fine both in notebook and in the solara server:
Then, importing the molecule model works fine in Jupyter, but fails in the solara server with the "context is incorrect" error.
this is deftly not related to solara, when I try to run this script with Gradio, I get the same error
https://github.com/radames/Gradio-Blender-bpy/issues/1
so I will reach out and ask in the blender community next 🙂
GitHub
Making molecularnodes a stand-alone web app with gradio 🧬 · Issue #...
hi @radames thanks for creating this project, which converts python blender pipelines to stand-alone web apps. I want to share an idea for a follow-up project: @BradyAJohnston just created "mo...
keep me up to date on this!
Hi @MaartenBreddels,
the issue is solved now and was related to
bpy
context handling, the full conversation that solved this issue is here: https://github.com/radames/Gradio-Blender-bpy/issues/1
I've now hosted a solara app on huggingface (code is only a very quick write-up, nothing too pretty):
https://huggingface.co/spaces/kolibril13/solara-bpy
The solara app is very performant when I run it on my MAC M1 (rendering the molecule takes only 1 second).
Rendering on the huggingface free plan is a bit slower, takes 40 seconds.
Here's a screenshot:very cool
i couldn't install it, because it needs a specific python version
you might be interested in this 'pattern':
oh yes, it runs only on python3.10
should work
I've just tested your snippet, what a cute surprise 🐱✨
Very useful indeed!
Is there also a way to show a progress bar to run from 0 to 2 seconds? All renderings will approx. take the same time, so that would give the user even a better estimate how to long to wait.
hmm, not easily
also not that important⏳
And another thought:
ipyMolecularNodes is a proof of concept that blender models can be turned into notebooks for the scientific python visualization workflow.
That means that for every blender model ever created, and all future models that will be created, this is theoretically possible as well.
With solara, these notebooks can then even be turned into standalone-zero-install web apps.
I don't know yet where this can be of practical use, but I see huge potential for this pipeline!