Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (25 sloc) 1.84 KB

Generic OSC Panel

The add-on adds the "Generic OSC Panel" to TextEditor sidebar.

During the startup (and while the underlying modal operator is not running) you get a chance to add paths to the listener.

Set up

set the local IP and port to listen on.

image

Adding Paths

  • Add circle if you want to listen to /circle
  • Add circle/damn/rock if you want to listen to /circle/damn/rock (untested.. but should work)

you can add any number of paths, notice that the first / is added by the operator automatically, just less typing..and it would always start with a slash anyway.

image

press the little plus

image

notice how it now says 'listening on /circle', this doesn't mean it is currently listening, but it will be listening on that path in the future.

Add a function to call when a Path receives a new value

When you add something like circle you should add a bpy.data.texts called do_circle. Then the modal operator will execute whatever is inside bpy.data.texts['do_circle']

Path function file explained.

an example of what you might write in do_circle

bpy.data.objects['Cube'].location.z = value

in this case value is supplied as a local variable (magic!) and you can assign its value to anything in bpy.

ps. I haven't tried to do complicated stuff with that as I don't have a multi output OSC controller attached, but I've tested with Supercollider sending rapid OSC signals and it seems to work.

Then press start.

And the modal operator shall try to update as often as possible.