Blender Live Update

I’m doing some prototypes in a Playground and I needed to model a scene. As I’m a noob with Blender, I want fast iterations between modeling/editing/tweaking and testing the result.
So, I did a small script that runs a HTTP server and streams the Blender scene as a .gltf. Each time I press play in the PG, I see the updated result.

GitHub repo is here : GitHub - CedricGuillemet/BlenderLiveUpdate: Live HTTP/GLTF2 link between Blender and any tool that can stream assets like Babylon.js Playground

Let me know if it helps improving your workflow. PR/improvements are hugely welcome :slight_smile:

22 Likes

Not sure where but this should go in the doc :slight_smile: it is way too cool.

1 Like

Let’s ping @PirateJC

2 Likes

Thanks for sharing. I currently utilize Substance Painter in my workflow. Blender >> SP >> Babylon.js with a third-party Blender add-on (cost). I was utilizing a Blender add-on for texture painting. This makes me want to go back to that workflow.

2 Likes

I totally :heart: How you’ve addressed a dev/design source of friction this way!

3 Likes

What can I say. I’m just so happy that you are a noob with blender :smile: :heart_eyes:

3 Likes

Nice way to export the Blender scene only when a http request is done, congrats!

2 Likes

This is such a cool idea but havnt gotten it to work (im loading the script into Blender 3.1, pressing play, and then going to the playground mentioned in the Github docs and reloading)… Im not sure whether its something to do with the naming of the gltf, as the playground is looking for one called ‘Toto’, but the script is cycling through temp-names(?)
Hopefully i’ll get it soon (and your little dog too… :magic_wand: :dog: )

1 Like

Do you see this when opening the Window->System console ?

1 Like

And after loading the linked playground :

1 Like

ah im on Mac, where the terminal for Blender is annoyingly hidden, ill give it a go on Windows to check

2 Likes

Thanks, can confirm it works fine on Windows. Ill have a look again at whats going on on Mac later, but afaik to view the Blender console on Mac you need to open Blender from the command line (?) so makes debugging scripting stuff a bit more troublesome. Great script, this will make prototyping a lot more fun :mage:

3 Likes

@Chrisor9 I’ve updated the script and I’ve tested it successfully on mac.

3 Likes

Not to sidetrack to much. But on the one macOS machine I keep around I switched to iterm2 and created a shortcut using Raycast, and made sure it is top of the search window Raycast shows. You can use shortkeys as well.

1 Like

I’ve subsequently made an alias/shortcut to opening blender with the terminal at the same time, the rough steps were (for mac users needing terminal output):

  • find blender’s binary path in the scripting console using byp.app.binary_path
  • open the path it gives you in Finder (using ‘go to Folder…’)
  • make that into an alias and put it on your desktop, and use that icon to open blender with terminal on the side.
1 Like