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

    PoseMorph Tag question

    Cinema 4D SDK
    3
    5
    1.4k
    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.
    • chuanzhenC
      chuanzhen
      last edited by

      Hi
      I want to print PoseMorphTag Values(like point relative position),but seem to have some problems。
      code:

      def main():
          m_tag = op.GetTag(c4d.Tposemorph)
          mor = m_tag.GetMorph(1)
          node = mor.GetFirst()
          cnt = node.GetPointCount()
          print cnt
          for i in xrange(cnt):
              print i,":",node.GetPoint(i)
      

      0_1549855694156_question.png

      I want to get point(index: 167 or >12),but i don't know how to get?

      Thanks for anyone help!

      相信我,可以的!

      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by m_adam

        Hi @chuanzhen,

        In its "normal" state, a CAMorphNode only store modified point and not all the points. So if you want to access all the points, you should call SetMode with flags c4d.CAMORPH_MODE_FLAGS_ALL | c4d.CAMORPH_MODE_FLAGS_EXPAND, do not forget to collapse it after any usage.
        I know you are developing in Python, but the C++ document is way more relevant in this regards, so please take a look at the CAMorphNode::SetMode or even the CAMorphNode Manual.

        Improvement of the python doc will be done.
        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        chuanzhenC jenandesignJ 2 Replies Last reply Reply Quote 2
        • chuanzhenC
          chuanzhen @m_adam
          last edited by

          @m_adam Thanks for your help and look forward to the improvement of python doc☺

          相信我,可以的!

          1 Reply Last reply Reply Quote 0
          • jenandesignJ
            jenandesign @m_adam
            last edited by

            @m_adam Hello thank you for the quick fix, but do you have any further explanation about what the flags and modes specify? The documentation still has no information.

            Thank you in advance for "expanding" on this topic. 😉

            1 Reply Last reply Reply Quote 0
            • M
              m_adam
              last edited by

              The mode specifies how data can be read from the Morph Tag.
              By default, they are presented in a compact way (aka only modified points are stored for some internal optimization).

              But if you SetMode with c4d.CAMORPH_MODE_FLAGS_ALL | c4d.CAMORPH_MODE_FLAGS_EXPAND then all the points are then readable from outside of the morph Tag.

              I adapted the Python documentation to match the C++ documentation so it will be available in the next documentation update. But I would say the C++ documentation for SetMode is pretty self-explanatory, what is the part you don't understand?

              Cheers,
              Maxime.

              MAXON SDK Specialist

              Development Blog, MAXON Registered Developer

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