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
    • Login

    2 python effectors communicating [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    6 Posts 0 Posters 440 Views
    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.
    • H Offline
      Helper
      last edited by

      On 19/03/2015 at 11:03, xxxxxxxx wrote:

      Hello all,

      is it possible that 2 python effectors are exchanging data ?

      Example: the first effector will move clones while the second effector would stop them when the clones have reached the influence of the falloff of the second effector. How can I manage to signal the first effector to stop moving the clones ? I have tried to use global variables but this seems to work only inside the code of one effector. Another way would be user data, but how can I store a complete array (like the clones) as user data ?

      Would be great if anyone could give me any hint.

      regards,
      Jens

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 19/03/2015 at 11:19, xxxxxxxx wrote:

        You can use the R16 CallFunction to communicate ( and pass around MoData Arrays) between Effectors. check out the SDK ( modules/c4d/index.html#c4d.CallFunction )

        d

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 19/03/2015 at 11:44, xxxxxxxx wrote:

          Thanks a lot Douwe for your quick help !

          The R16 CallFunction sounds very promising ! I'm a bit confused after reading the parameter description for "op":

          op (BaseList2D) : the object to search the function within its script

          Hmm, which "object" is meant in case of effectors ?

          Maybe a little try and error will get me on the right track ...

          Thanks again for your help !

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            On 20/03/2015 at 02:59, xxxxxxxx wrote:

            Hi Jens,

            In your case op for CallFunction() is the Python effector that holds the function to call within its embedded script.

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              On 20/03/2015 at 12:45, xxxxxxxx wrote:

              Hi Yannick,

              ahh - now I get it.

              Have just tried it, works like a charm 🙂

              Thanks a lot !

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                On 23/03/2015 at 01:34, xxxxxxxx wrote:

                Hi,

                Glad to help!
                I'll tag the topic as solved.

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