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

    Query Morph Order Based on the UI Order?

    Cinema 4D SDK
    2024 python
    2
    3
    629
    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.
    • B
      bentraje
      last edited by

      Hi,

      By default when you perform morph.GetCount(), it returns a count based on the order they inserted.
      Is there a way to get the order based on the UI order?

      See illustration below:

      98988473-b3e7-46d3-a77a-8594be614c8a-image.png

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @bentraje
        last edited by ferdinand

        Hello @bentraje,

        Thank you for reaching out to us. Your posting is lacking a bit clarity as to regarding what you are doing. The image demonstrates your core problem but the rest is a bit hazy for us. I assume you are talking about c4d.modules.character.CAPoseMorphTag and its methods GetMorphCount and GetMorph.

        Generally, no, I do not think that this is possible. There are the morph DescID exposed by a morph tag in addition to the indices, but they will be out of order too when you manually mess with the morph order. I.e., both index and ID will reflect creation order and not arrangement order.
        18c5bf43-ad6f-4df3-bc66-bd7d7826d8ee-image.png

        The underlying problem is that the data type ItemTreeData of the Poses parameter is not exposed in Python (in C++ it is only semi-public too).

        >>> PoseMorph[c4d.ID_CA_POSE_MORPHS]
        Traceback (most recent call last):
          File "console", line 1, in <module>
        AttributeError: Parameter value not accessible (object unknown in Python)
        

        With that type you could do what you want to do here. In Python you are out of options here.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 0
        • B
          bentraje
          last edited by

          Hi @ferdinand

          Thanks for the response.
          Found a workaround it.
          Basically, just name the poses properly in a sorting order.
          Query the GetName() method and perform my own sorting.

          Regards,
          Ben

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