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

    Getting the offset of MoGraph clones

    General Talk
    3
    6
    1.1k
    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.
    • R
      rui_mac
      last edited by

      I'm trying to get the position of MoGraph clones (in my case, from a Matrix object) that has a Random effector that randomises the positions of the clones.
      However, the list that I get from md.GetArray(c4d.MODATA_MATRIX) always returns the original position of the clones, not the position that is the result of the Random effector.
      I'm coding inside a Python effector (that is AFTER the Random effector, in the Object Manager).
      So, how can I get the position of the clones AFTER they are adjusted by the Random effector?
      Thank you very much in advance.

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        Hi,

        Could you follow our forum guidelines? Please use the tag and mark your thread as a question.
        Using tags, you could have provided your c4d version and language (python in that case but it's not always obvious)

        Could you please share a scene to reproduce the issue because I'm not able to reproduce the issue? In both parameter and full control mode, my python effector retrieves the modified position.

        Could you provide the c4d version you are using?

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        R 1 Reply Last reply Reply Quote 0
        • R
          rui_mac @Manuel
          last edited by rui_mac

          @m_magalhaes , I tried to edit the post but it told me that I can only do it until one hour after posting 😞

          The file I include creates a Matrix with 20x20 clones and randomises their positions.
          Then, a Python effector reads the positions of all the clones and adds their indexes and distances to a list, if their distances are less than a threshold amount.
          However, the distance that is stored is always the same, as all the clones were evenly distributed and not randomly placed.
          I'm using r20.

          MoGraph Particles.c4d

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

            Hi @rui_mac ,

            the order of your effectors matters, you have the Python effector before the Random effector in your file, and then your Python effector will of course retrieve the 'vanilla' MoData of the matrix. The gif below demonstrates the effect. Does the order have no effect for you? Your file came at least in the incorrect order, with the Python effector being evaluated first.

            clones.gif

            Cheers,
            Ferdinand

            MAXON SDK Specialist
            developers.maxon.net

            R 1 Reply Last reply Reply Quote 0
            • R
              rui_mac @ferdinand
              last edited by

              @ferdinand, YES!!!
              That solved it. Thank you so much.
              Forgot about the effectors order inside the Matrix. I was only changing the order in the Object Manager.

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

                Hello @rui_mac,

                without any further questions or replies, we will consider this thread as solved by Monday the 20th and flag it accordingly.

                Thank you for your understanding,
                Ferdinand

                MAXON SDK Specialist
                developers.maxon.net

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