Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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
    • Recent
    • Tags
    • Users
    • Register
    • Login

    Is there a 2-input attribute type ?

    Scheduled Pinned Locked Moved Cinema 4D SDK
    python
    2 Posts 2 Posters 6 Views 1 Watching
    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.
    • D Offline
      Dimitris_Derm.
      last edited by

      A vector has 3 inputs
      07953d5e-b5eb-4dbd-bb15-eb921978d153-image.png
      A 2D vector unfortunately comes with a cursor panel
      701aee59-2780-4bd3-a989-61a2aca724c0-image.png
      I like the RSvector2
      but I'm afraid the name is instructive to be used only with RS data types... is it safe to use it in a non-RS context ?

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF Offline
        ferdinand @Dimitris_Derm.
        last edited by ferdinand

        Hey @Dimitris_Derm. ,

        Thank you for your question. It depends a bit on how you meant that question for what the answer would be. The Cinema and Maxon API contain multiple two component vector data types (of which not all are ported to Python) . But you show us here an image of a description. Descriptions are the GUI that wraps what Cinema calls parameters, the fields of entities such as objects or materials. Descriptions have their own data types, which means you cannot just use any data type for them; you need to use the data type that the description expects.

        On top of that exists the concept of custom GUIs. Each description data type has a default GUI representation, but developers can create custom GUIs to change how the data is presented and interacted with in the interface. This is here the case for both the 2D Vector and RSvector2 custom GUIs you showed us. They are both custom GUIs for the default (three component) vector data type of Cinema 4D, in Python c4d.Vector. So, long story short, in this case you can use the RS custom GUI, because it sits on top of one of the basic data types. Other RS Custom GUIs sit on top of specific RS data types which are then neither exposed to Python or C++. In some cases you can still sort of deal with these unexposed types, but that would be its on topic to discuss.

        So, when you only want a visual two component vector in the interface, you can use the RS custom GUI for that purpose. You would then just ignore the third component of the underlying c4d.Vector and work with the two components you care about. On a pure data level there is currently no two component vector data type for descriptions. You can indirectly store Maxon API two component vectors over containers, but such parameters would then have no GUI representation.

        ab182e9d-dcda-44f1-8805-c45ad835cd84-image.png

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

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