BpyOSC

Howdy, Blenderheads.

A long time ago, in 2009, I started doing research with OSC in Blender. At the time, I was focused on digital puppetry applications and gave a talk on it at Blender Conference. (seen here: https://vimeo.com/65315584)

Now, five years later, Blender’s come a long way, python3 came along way, i came a long way, and source code sharing came a long way. All those things combined brought me to a python project night this week where I sat down and within a few hours figured out how to hook up OSC to Blender’s python API. It’s rather incredible!

https://vine.co/v/OIm0J5u5v5Q Demo of suzanne being moved around with an x/y pad.

https://vine.co/v/OIHB2dFaBnq Demo of a jog wheel controlling the timeline.

There’s a lot more that can be done with this, but I need a little help. python-osc works by mapping specific strings to specific functions. What I need to know at this junction is the following

  • a right-click menu item for any Blender GUI element that says “Connect to OSC”.
  • a tools palette that collects a list of all things “connected” to OSC so you can add something manually, remove things, et cetera…
  • a method for saving the connected things in your .blend

And to make this more useful for digital puppetry and motion capture types of uses…

  • a method for recording graphs for use in the NLA and graph editor
  • a method for arming and disarming things for recording

Lastly a few housekeeping things…

  • I need to shut down the server when the plugin is deactivated, but i don’t know how
  • I need to shut down the server when Blender is closed, but i don’t know how

This is all stuff I’m trying to figure out on my own and am very much in the dark about. Help is appreciated. Resources are appreciated. Expressions of excitement are appreciated. blah blah blah.

Writing this was surprisingly simple, so I expect we can make something very nice, robust, and stable by springtime this year.

Awesome! I found the python UI templates that come shipped with Blender. The list and simplified list examples aren’t abundantly clear how i’ll be able to add items… but maybe i can work it out. I think i’ll need just the name of the thing being targeted, and the rest of the options can be viewable as a details view? That sort of workflow can be really tedious though. columns would be better for quick copy/pasting of values.

it would be sweet if blender came with an OSC implementation which didn’t rely on external modules (python-osc, etc) . Having said that setting up a modal operators as a Server / Client is pretty easy. (I say easy, … i mean… it took a while to get my head around how the modal operator should work as part of a PyNode system : FLOW)

python-osc is quite small, I found. So I really don’t mind using it.

Thanks for the tip on the modal UI, zeffii!