← All ideas
  • Published 28 Jun 2022

commandPort to execute code from outside Blender

Maya has a built-in commandPort mechanism which lets you inject and execute commands from outside the program. I wish the same existed as a builtin option/addon in Blender.

TL;DR.

My personal use-case for a commandPort is I'm using an Elgato Stream Deck XL , a device with LCD buttons which I've assigned to execute *.pyw scripts. That opens a world of possibilities (think buttons for sculpt brushes, workspaces, operations). But that's a niche case, I reckon, and it's not why I'm posting this here. I'm curious whether there's an actual demand for such a thing in larger settings, eg. studio environments: in pipelines that include automated workflows, etc.

Actually, someone did make a commandPort addon . With which I've had limited success in terms of not being able to make it activate itself automatically on program launch (can only activate it manually) which is a bit of a pain. But I won't digress into that (sorry). Anyway. If others would like to see this feature integrated as a built-in option in Blender, please vote up.

0%

Development Status: Open

Upvote 0 Downvote 0
hcederblad
28 Jun 2022

3 Comments

Lauloque

As explained on Command Line Arguments — Blender Manual :

You can run Blender in the background using command lines and have it run any python script of your liking. Now I think there are some limitations as to what you can do, I.E. I think Eevee just can't render headlessly, but isn't this what you are looking for?

hcederblad Author

That manual portion about commandline flags, isn't that just for startup, or can you send repeated commands to the same Blender instance using these switches? Well, in my case I just want to trigger operators using my Stream Deck.

Lauloque

What are you trying to do, use your streamdeck as an additional keyboard with custom shortcuts to use in Blender?