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

    Feature request: Quaternion Matrix Mix to XPresso "Mix" Node

    General Talk
    2
    2
    587
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jenandesignJ
      jenandesign
      last edited by ferdinand

      Hello, I would use it quite often if it could be added: a Quaternion rotation setting to the XPresso Mix node... much like there is in the c4d.BaseObject class as it is accessible through the GUI

      Attributes of a regular Null object showing Quaternion setting:
      Screen Shot 2020-11-17 at 11.07.11 AM.png

      Attributes of a Mix node in XPresso, where a boolean checkbox like above could live:
      Screen Shot 2020-11-17 at 11.08.59 AM.png

      I have constructed a Quaternion Matrix Mix using an XPresso Python node myself, but thought this would be a useful feature to be added in the default XPresso API for users who have not yet learned how to implement Quaternions in Python. Alternatively, perhaps other users will find the following code useful anyway 😁

      import c4d
      from c4d import utils
      #Welcome to the world of Python
      
      
      def main():
          global MatrixMix
      
          q1 = c4d.Quaternion()
          q1.SetMatrix(MatrixA)
      
          q2 = c4d.Quaternion()
          q2.SetMatrix(MatrixB)
      
          q = c4d.utils.QSlerp(q1, q2, Mix)
      
          MatrixMix = q.GetMatrix()
          MatrixMix.off = c4d.utils.MixVec(MatrixA.off, MatrixB.off, Mix)
      

      Screen Shot 2020-11-17 at 11.12.44 AM.png

      Cheers!
      -Leah

      Edit: also I am sorry if this is posted incorrectly. This seemed like the best place to put this post since there is usable Python code included 🙆

      1 Reply Last reply Reply Quote 1
      • ferdinandF
        ferdinand
        last edited by

        Hi @jenandesign,

        thank you for sharing your little setup. I think your suggestion is great, but the problem is: We cannot handle feature requests in the SDK-team which are not directly concerned with one of the APIs. And although Cinema's old node editor is kind of "coding-related", it is in the end not directly related to one of Cinema's SDKs, which is the ground we do cover here. So I would have to ask you kindly to bring up your suggestion with Maxon's end user support, as they do handle these kind of requests.

        Cheers and thank you for your understanding,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 1
        • First post
          Last post