Sorry if I did something wrong in my post, and thanks for the pointers.
I made it work using Websocket. It's using augmented reality to orbit the camera live in Cinema. Here's a couple of videos if anyone's interested
So! It looks like this might work for the rotation part, as long as there is a rig node.
obj = GetCameraRigNode()
def rotate(eulerX, eulerY, eulerZ):
rot = c4d.Vector(eulerX, eulerY, eulerZ)
For the transport I'm thinking about running a websockets server which the Python app will connect to and listen for rotation events.
Unless there's something simpler I could do, like calling a url scheme, or passing parameters to C4D from cocoa.
I'm playing around with an idea for a 3D mouse.
I have this working Mouse > USB > my macOS app - and just need the last few steps: > Cinema 4D plug-in > Cinema 4D camera/rig rotation
I'm wondering if I can write a plug-in that takes a set of rotation parameters (in any format, really, quarternion, euler angles, transform) and rotate the camera (or its rig parent node) to look from that angle.
Is that even possible? I looked at the docs, and I could only find direct dragging functions.
Also, what would be a good way to pass in the rotation parameters from my macOS app to the plugin? I'm thinking maybe a websocket. Ideally I'd pass in the rotation 60 times per second, but 15 could probably work, too.