Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. mortenjust
    M
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Best 1
    • Controversial 0
    • Groups 0

    mortenjust

    @mortenjust

    2
    Reputation
    51
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    mortenjust Unfollow Follow

    Best posts made by mortenjust

    • RE: Move viewport camera from plugin

      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
      https://vimeo.com/album/5915686

      posted in General Talk
      M
      mortenjust

    Latest posts made by mortenjust

    • RE: Move viewport camera from plugin

      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
      https://vimeo.com/album/5915686

      posted in General Talk
      M
      mortenjust
    • RE: Move viewport camera from plugin

      So! It looks like this might work for the rotation part, as long as there is a rig node.

      import c4d
      obj = GetCameraRigNode()
      
       def rotate(eulerX, eulerY, eulerZ):
          rot = c4d.Vector(eulerX, eulerY, eulerZ)
          obj.SetAbsRot(rot)
      

      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.

      posted in General Talk
      M
      mortenjust
    • Move viewport camera from plugin

      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.

      1. Is that even possible? I looked at the docs, and I could only find direct dragging functions.

      2. 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.

      posted in General Talk
      M
      mortenjust