For ease of use we can have the RPC use a custom encoder and decoder that understands how to transform Cells and Branches into JSON and back. This should also clean up the code avoiding type checking things like coords (as the novice user would be going through the sanitizing RPC, and the advanced "in Blender" use case assumes the Python zen of "responsible adults" that can try to pass whatever they want into our functions and see if it works).
It should also make it easier to keep both sides of the interface in sync as they'd be using the same classes, transparently sending them across to the other environment.
For ease of use we can have the RPC use a custom encoder and decoder that understands how to transform
Cell
s andBranch
es into JSON and back. This should also clean up the code avoiding type checking things likecoords
(as the novice user would be going through the sanitizing RPC, and the advanced "in Blender" use case assumes the Python zen of "responsible adults" that can try to pass whatever they want into our functions and see if it works).It should also make it easier to keep both sides of the interface in sync as they'd be using the same classes, transparently sending them across to the other environment.