diff --git a/README.md b/README.md index 4fe1b79..068206f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ -# NodeOSC +# NodeOSC 2.0 OSC support for nodes and general usage. +Please be aware: Version 2 is breaking NodeOsc settings from version 1. Pleas look at the wiki for more infos + This add-on does not require any other add-on to work. Currently it has node support for @@ -13,32 +15,33 @@ latest release from [here](https://github.com/maybites/blender.NodeOSC/releases/ ## Usage -Always restart the server after any changes to the settings. +please visit the [wiki](https://github.com/maybites/blender.NodeOSC/wiki) for more info. ### Video Tutorial NodeOSC Part One -see the [wiki](https://github.com/maybites/blender.NodeOSC/wiki) for more info. - -I think it is fairly self explanatory (with some intricacies). However, if you have questions please make an issue. This helps me to see where I should focus on the docs... - ## Credits -written by maybites (2020) +written by maybites (2021) -inspired by and code used from http://www.jpfep.net/pages/addosc/. +heavily inspired by and code used from http://www.jpfep.net/pages/addosc/ and http://www.jpfep.net/pages/addroutes/. NodeOSC relies on -* the pure [python module](https://pypi.python.org/pypi/python-osc/) [python-osc](https://github.com/attwad/python-osc) (by Attwad). -* the [pyliblo wrapper](http://das.nasophon.de/pyliblo/) for [liblo](http://liblo.sourceforge.net/) OSC library. +* the pure [python module](https://pypi.org/project/oscpy/) [oscPy](https://github.com/kivy/oscpy) (by Kivy). +* the pure [python module](https://pypi.org/project/python-osc/) [python-osc](https://github.com/attwad/python-osc) (by Attwad). -the addon contains the compiled pyliblo wrapper for windows and OSX, but not for linux. ## ChangeLog +### V2.0.0 +Added dynamic evaluation format functionality combined with loops. Inspired by functionality introduced in http://www.jpfep.net/pages/addroutes/. Code cleanup and improved user interface. + +### V1.0.9 +Added the neat operator I found in http://www.jpfep.net/pages/addroutes/ to create new osc handlers from the context menu while hovering over a user element. + ### V1.0.8 Allows to execute function calls with datapath. for example: bpy.ops.screen.animation_play(). values passed on with osc message are ignored. @@ -53,19 +56,3 @@ Moved the transformation of AnimationNodes datatype DoubleList into the node. ### V1.0.3 Added AnimationNodes datatype DoubleList to be able to send via OscNumber node. - -## Building - -### pyliblo on osx - -* download and install liblo via homebrew. - -* then download the [pyliblo](http://das.nasophon.de/pyliblo/) wrapper and build it. - -* the pyliblo library (**liblo.cpython-37m-darwin.so**) requires changes of the dynamic link library paths: (described [here](https://stackoverflow.com/questions/33991581/install-name-tool-to-update-a-executable-to-search-for-dylib-in-mac-os-x)). - - `install_name_tool -change /usr/local/opt/liblo/lib/liblo.7.dylib @loader_path/liblo.7.dylib liblo.cpython-37m-darwin.so` - - `install_name_tool -add_rpath @loader_path/. liblo.cpython-37m-darwin.so` - - this way it looks for the **liblo.7.dylib** next to itself and not inside the folder homebrew stored it. diff --git a/help/TestBed.blend b/help/TestBed.blend index 0661eb4..db9689b 100644 Binary files a/help/TestBed.blend and b/help/TestBed.blend differ diff --git a/help/TestBed.maxpat b/help/TestBed.maxpat index 17ebe58..4a772fe 100644 --- a/help/TestBed.maxpat +++ b/help/TestBed.maxpat @@ -10,7 +10,7 @@ } , "classnamespace" : "box", - "rect" : [ 1039.0, 79.0, 367.0, 382.0 ], + "rect" : [ 954.0, 79.0, 452.0, 382.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, @@ -40,10 +40,434 @@ "showontab" : 1, "assistshowspatchername" : 0, "boxes" : [ { + "box" : { + "id" : "obj-24", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 8, + "minor" : 2, + "revision" : 0, + "architecture" : "x64", + "modernui" : 1 + } +, + "classnamespace" : "box", + "rect" : [ 0.0, 26.0, 452.0, 356.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 1, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 1, + "objectsnaponopen" : 1, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "lefttoolbarpinned" : 0, + "toptoolbarpinned" : 0, + "righttoolbarpinned" : 0, + "bottomtoolbarpinned" : 0, + "toolbars_unpinned_last_save" : 0, + "tallnewobj" : 0, + "boxanimatetime" : 200, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "style" : "", + "subpatcher_template" : "", + "showontab" : 1, + "assistshowspatchername" : 0, + "boxes" : [ { + "box" : { + "comment" : "", + "id" : "obj-26", + "index" : 1, + "maxclass" : "inlet", + "numinlets" : 0, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 63.0, 26.0, 30.0, 30.0 ] + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-18", + "maxclass" : "flonum", + "maximum" : 2.0, + "minimum" : 0.0, + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 63.0, 188.0, 44.0, 22.0 ] + } + + } +, { + "box" : { + "id" : "obj-16", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 63.0, 223.0, 153.0, 22.0 ], + "text" : "/objects/Cube/location/x $1" + } + + } +, { + "box" : { + "comment" : "", + "id" : "obj-1", + "index" : 1, + "maxclass" : "outlet", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 63.0, 273.0, 30.0, 30.0 ] + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-16", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-16", 0 ], + "source" : [ "obj-18", 0 ] + } + + } + ] + } +, + "patching_rect" : [ 85.0, 94.0, 61.0, 22.0 ], + "presentation_linecount" : 2, + "saved_object_attributes" : { + "description" : "", + "digest" : "", + "globalpatchername" : "", + "tags" : "" + } +, + "text" : "p indexed" + } + + } +, { + "box" : { + "id" : "obj-23", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 8, + "minor" : 2, + "revision" : 0, + "architecture" : "x64", + "modernui" : 1 + } +, + "classnamespace" : "box", + "rect" : [ 0.0, 26.0, 452.0, 356.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 1, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 1, + "objectsnaponopen" : 1, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "lefttoolbarpinned" : 0, + "toptoolbarpinned" : 0, + "righttoolbarpinned" : 0, + "bottomtoolbarpinned" : 0, + "toolbars_unpinned_last_save" : 0, + "tallnewobj" : 0, + "boxanimatetime" : 200, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "style" : "", + "subpatcher_template" : "", + "showontab" : 1, + "assistshowspatchername" : 0, + "boxes" : [ { + "box" : { + "comment" : "", + "id" : "obj-26", + "index" : 1, + "maxclass" : "inlet", + "numinlets" : 0, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 63.0, 24.0, 30.0, 30.0 ] + } + + } +, { + "box" : { + "id" : "obj-13", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 63.0, 138.0, 34.0, 22.0 ], + "text" : "/play" + } + + } +, { + "box" : { + "comment" : "", + "id" : "obj-1", + "index" : 1, + "maxclass" : "outlet", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 63.0, 273.0, 30.0, 30.0 ] + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-13", 0 ] + } + + } + ] + } +, + "patching_rect" : [ 243.0, 94.0, 61.0, 22.0 ], + "presentation_linecount" : 2, + "saved_object_attributes" : { + "description" : "", + "digest" : "", + "globalpatchername" : "", + "tags" : "" + } +, + "text" : "p function" + } + + } +, { + "box" : { + "id" : "obj-22", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 8, + "minor" : 2, + "revision" : 0, + "architecture" : "x64", + "modernui" : 1 + } +, + "classnamespace" : "box", + "rect" : [ 0.0, 26.0, 452.0, 356.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 1, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 1, + "objectsnaponopen" : 1, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "lefttoolbarpinned" : 0, + "toptoolbarpinned" : 0, + "righttoolbarpinned" : 0, + "bottomtoolbarpinned" : 0, + "toolbars_unpinned_last_save" : 0, + "tallnewobj" : 0, + "boxanimatetime" : 200, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "style" : "", + "subpatcher_template" : "", + "showontab" : 1, + "assistshowspatchername" : 0, + "boxes" : [ { + "box" : { + "comment" : "", + "id" : "obj-26", + "index" : 1, + "maxclass" : "inlet", + "numinlets" : 0, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 63.0, 23.0, 30.0, 30.0 ] + } + + } +, { + "box" : { + "id" : "obj-15", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 63.0, 200.0, 244.0, 22.0 ], + "text" : "/objects/Variable/location/xyz Cube $1 $2 $3" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-12", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 162.0, 136.0, 44.0, 22.0 ] + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-11", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 112.5, 136.0, 44.0, 22.0 ] + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-9", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 63.0, 136.0, 44.0, 22.0 ] + } + + } +, { + "box" : { + "id" : "obj-7", + "maxclass" : "newobj", + "numinlets" : 3, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 63.0, 171.0, 118.0, 22.0 ], + "text" : "pak 0. 0. 0." + } + + } +, { + "box" : { + "comment" : "", + "id" : "obj-1", + "index" : 1, + "maxclass" : "outlet", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 63.0, 273.0, 30.0, 30.0 ] + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-7", 1 ], + "source" : [ "obj-11", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-7", 2 ], + "source" : [ "obj-12", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-15", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-15", 0 ], + "source" : [ "obj-7", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-7", 0 ], + "source" : [ "obj-9", 0 ] + } + + } + ] + } +, + "patching_rect" : [ 315.0, 94.0, 53.0, 22.0 ], + "saved_object_attributes" : { + "description" : "", + "digest" : "", + "globalpatchername" : "", + "tags" : "" + } +, + "text" : "p format" + } + + } +, { "box" : { "id" : "obj-21", "maxclass" : "newobj", - "numinlets" : 0, + "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patcher" : { @@ -57,7 +481,7 @@ } , "classnamespace" : "box", - "rect" : [ 1039.0, 105.0, 367.0, 356.0 ], + "rect" : [ 954.0, 105.0, 452.0, 356.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, @@ -88,129 +512,89 @@ "assistshowspatchername" : 0, "boxes" : [ { "box" : { - "id" : "obj-23", - "maxclass" : "swatch", - "numinlets" : 3, - "numoutlets" : 2, - "outlettype" : [ "", "float" ], - "parameter_enable" : 0, - "patching_rect" : [ 155.0, 229.0, 128.0, 32.0 ], - "saturation" : 1.0 - } - - } -, { - "box" : { - "id" : "obj-21", - "linecount" : 3, - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 155.0, 292.0, 205.0, 49.0 ], - "text" : "/materials/Material/nodes/Principled_BSDF/inputs/0/default_value $1 $2 $3 $4" - } - - } -, { - "box" : { - "format" : 6, - "id" : "obj-18", - "maxclass" : "flonum", - "maximum" : 2.0, - "minimum" : 0.0, - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 130.0, 134.0, 44.0, 22.0 ] - } - - } -, { - "box" : { - "id" : "obj-16", + "id" : "obj-28", + "linecount" : 2, "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 130.0, 169.0, 153.0, 22.0 ], - "text" : "/objects/Cube/location/x $1" + "patching_rect" : [ 361.0, 131.0, 85.0, 49.0 ], + "text" : "/objects/Text/name Text45\n" } } , { "box" : { - "id" : "obj-15", - "maxclass" : "message", - "numinlets" : 2, + "comment" : "", + "id" : "obj-26", + "index" : 1, + "maxclass" : "inlet", + "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 48.0, 98.0, 177.0, 22.0 ], - "text" : "/objects/Cube/location $1 $2 $3" + "patching_rect" : [ 321.0, 26.0, 30.0, 30.0 ] } } , { "box" : { - "id" : "obj-13", + "id" : "obj-25", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 240.0, 38.0, 34.0, 22.0 ], - "text" : "/play" + "patching_rect" : [ 253.0, 93.0, 121.0, 22.0 ], + "text" : "/objects/Text/body $1" } } , { "box" : { - "format" : 6, - "id" : "obj-8", - "maxclass" : "flonum", - "maximum" : 2.0, - "minimum" : 0.0, - "numinlets" : 1, + "id" : "obj-23", + "maxclass" : "swatch", + "numinlets" : 3, "numoutlets" : 2, - "outlettype" : [ "", "bang" ], + "outlettype" : [ "", "float" ], "parameter_enable" : 0, - "patching_rect" : [ 238.0, 67.0, 44.0, 22.0 ] + "patching_rect" : [ 185.0, 211.0, 174.0, 32.0 ], + "saturation" : 1.0 } } , { "box" : { - "id" : "obj-3", + "id" : "obj-21", + "linecount" : 3, "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 238.0, 98.0, 102.0, 22.0 ], - "text" : "/cube/property $1" + "patching_rect" : [ 185.0, 249.0, 184.0, 49.0 ], + "text" : "/materials/Material/nodes/Principled_BSDF/inputs/0/default_value $1 $2 $3 $4" } } , { "box" : { - "id" : "obj-19", + "id" : "obj-15", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 213.0, 121.0, 31.0, 22.0 ], - "text" : "siter" + "patching_rect" : [ 48.0, 98.0, 177.0, 22.0 ], + "text" : "/objects/Cube/location $1 $2 $3" } } , { "box" : { - "id" : "obj-17", - "maxclass" : "newobj", - "numinlets" : 1, + "id" : "obj-19", + "maxclass" : "message", + "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 213.0, 145.0, 152.0, 22.0 ], - "text" : "prepend /objects/Text/body" + "patching_rect" : [ 253.0, 54.0, 31.0, 22.0 ], + "text" : "siter" } } @@ -225,7 +609,7 @@ "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, - "patching_rect" : [ 77.5, 160.0, 44.0, 22.0 ] + "patching_rect" : [ 76.5, 131.0, 44.0, 22.0 ] } } @@ -236,7 +620,7 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 77.5, 200.0, 235.0, 22.0 ], + "patching_rect" : [ 76.5, 171.0, 235.0, 22.0 ], "text" : "/objects/Cube/modifiers/Bevel/width $1" } @@ -318,13 +702,6 @@ "source" : [ "obj-12", 0 ] } - } -, { - "patchline" : { - "destination" : [ "obj-1", 0 ], - "source" : [ "obj-13", 0 ] - } - } , { "patchline" : { @@ -335,50 +712,36 @@ } , { "patchline" : { - "destination" : [ "obj-1", 0 ], - "source" : [ "obj-16", 0 ] + "destination" : [ "obj-25", 0 ], + "source" : [ "obj-19", 0 ] } } , { "patchline" : { "destination" : [ "obj-1", 0 ], - "source" : [ "obj-17", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-16", 0 ], - "source" : [ "obj-18", 0 ] + "source" : [ "obj-21", 0 ] } } , { "patchline" : { - "destination" : [ "obj-17", 0 ], - "source" : [ "obj-19", 0 ] + "destination" : [ "obj-21", 0 ], + "source" : [ "obj-23", 0 ] } } , { "patchline" : { "destination" : [ "obj-1", 0 ], - "source" : [ "obj-21", 0 ] + "source" : [ "obj-25", 0 ] } } , { "patchline" : { - "destination" : [ "obj-21", 0 ], - "source" : [ "obj-23", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-1", 0 ], - "source" : [ "obj-3", 0 ] + "destination" : [ "obj-28", 1 ], + "source" : [ "obj-26", 0 ] } } @@ -402,13 +765,6 @@ "source" : [ "obj-7", 0 ] } - } -, { - "patchline" : { - "destination" : [ "obj-3", 0 ], - "source" : [ "obj-8", 0 ] - } - } , { "patchline" : { @@ -420,7 +776,7 @@ ] } , - "patching_rect" : [ 23.0, 119.0, 61.0, 22.0 ], + "patching_rect" : [ 23.0, 94.0, 61.0, 22.0 ], "saved_object_attributes" : { "description" : "", "digest" : "", @@ -436,7 +792,7 @@ "box" : { "id" : "obj-20", "maxclass" : "newobj", - "numinlets" : 0, + "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patcher" : { @@ -450,7 +806,7 @@ } , "classnamespace" : "box", - "rect" : [ 0.0, 26.0, 367.0, 356.0 ], + "rect" : [ 0.0, 26.0, 452.0, 356.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, @@ -481,65 +837,41 @@ "assistshowspatchername" : 0, "boxes" : [ { "box" : { - "id" : "obj-15", - "maxclass" : "message", - "numinlets" : 2, + "comment" : "", + "id" : "obj-26", + "index" : 1, + "maxclass" : "inlet", + "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 63.0, 153.0, 244.0, 22.0 ], - "presentation_linecount" : 2, - "text" : "/objects/Variable/location/xyz Cube $1 $2 $3" - } - - } -, { - "box" : { - "format" : 6, - "id" : "obj-12", - "maxclass" : "flonum", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 162.0, 45.0, 44.0, 22.0 ] - } - - } -, { - "box" : { - "format" : 6, - "id" : "obj-11", - "maxclass" : "flonum", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 112.5, 45.0, 44.0, 22.0 ] + "patching_rect" : [ 63.0, 22.0, 30.0, 30.0 ] } } , { "box" : { "format" : 6, - "id" : "obj-9", + "id" : "obj-8", "maxclass" : "flonum", + "maximum" : 2.0, + "minimum" : 0.0, "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, - "patching_rect" : [ 63.0, 45.0, 44.0, 22.0 ] + "patching_rect" : [ 63.0, 145.0, 44.0, 22.0 ] } } , { "box" : { - "id" : "obj-7", - "maxclass" : "newobj", - "numinlets" : 3, + "id" : "obj-3", + "maxclass" : "message", + "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 63.0, 80.0, 118.0, 22.0 ], - "text" : "pak 0. 0. 0." + "patching_rect" : [ 63.0, 176.0, 102.0, 22.0 ], + "text" : "/cube/property $1" } } @@ -557,44 +889,23 @@ } ], "lines" : [ { - "patchline" : { - "destination" : [ "obj-7", 1 ], - "source" : [ "obj-11", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-7", 2 ], - "source" : [ "obj-12", 0 ] - } - - } -, { "patchline" : { "destination" : [ "obj-1", 0 ], - "source" : [ "obj-15", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-15", 0 ], - "source" : [ "obj-7", 0 ] + "source" : [ "obj-3", 0 ] } } , { "patchline" : { - "destination" : [ "obj-7", 0 ], - "source" : [ "obj-9", 0 ] + "destination" : [ "obj-3", 0 ], + "source" : [ "obj-8", 0 ] } } ] } , - "patching_rect" : [ 92.0, 119.0, 89.0, 22.0 ], + "patching_rect" : [ 147.0, 94.0, 89.0, 22.0 ], "saved_object_attributes" : { "description" : "", "digest" : "", @@ -609,25 +920,13 @@ , { "box" : { "id" : "obj-3", - "linecount" : 2, "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 23.0, 322.0, 111.0, 35.0 ], + "patching_rect" : [ 23.0, 187.0, 165.0, 22.0 ], "text" : "udpsend 127.0.0.1 9001" } - } -, { - "box" : { - "id" : "obj-2", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 23.0, 65.0, 32.0, 22.0 ], - "text" : "print" - } - } , { "box" : { @@ -644,7 +943,40 @@ ], "lines" : [ { "patchline" : { - "destination" : [ "obj-2", 0 ], + "destination" : [ "obj-20", 0 ], + "order" : 0, + "source" : [ "obj-1", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 0 ], + "order" : 1, + "source" : [ "obj-1", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-22", 0 ], + "order" : 2, + "source" : [ "obj-1", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-23", 0 ], + "order" : 3, + "source" : [ "obj-1", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-24", 0 ], + "order" : 4, "source" : [ "obj-1", 0 ] } @@ -662,6 +994,27 @@ "source" : [ "obj-21", 0 ] } + } +, { + "patchline" : { + "destination" : [ "obj-3", 0 ], + "source" : [ "obj-22", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-3", 0 ], + "source" : [ "obj-23", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-3", 0 ], + "source" : [ "obj-24", 0 ] + } + } ], "dependency_cache" : [ ], diff --git a/server/_base.py b/server/_base.py index 1f0b000..240082c 100644 --- a/server/_base.py +++ b/server/_base.py @@ -31,7 +31,7 @@ def make_osc_messages(myOscKeys, myOscMsg): stringProp = str(prop) - if not (item.filter_repetition and envars.repeat_filter) or stringProp != item.value: + if not (item.filter_repetition and envars.repeat_filter) and stringProp != item.value: item.value = stringProp # make sure the osc indices are a tuple @@ -152,7 +152,7 @@ def execute(self, context): # register a message for executing if envars.node_update == "MESSAGE" and hasAnimationNodes(): - oscHandleList = (-1, None, None, None, None, 0) + oscHandleList = (-1, None, None, None, None, 0, '', '') self.addOscHandler(oscHandlerDict, envars.node_frameMessage, oscHandleList) for item in bpy.context.scene.NodeOSC_keys: diff --git a/server/server.py b/server/server.py index f093a47..632edf1 100644 --- a/server/server.py +++ b/server/server.py @@ -76,8 +76,12 @@ def sendingOSC(self, context, event): values = [] if isinstance(args, (tuple, list)): for argum in args: + if type(argum) == str: + argum = bytes(argum, encoding='utf-8') values.append(argum) else: + if type(args) == str: + args = bytes(args, encoding='utf-8') values.append(args) self.outputServer.send_message(bytes(key, encoding='utf-8'), values)