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

    Errors in python effector falloffs

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 331 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 20/01/2014 at 13:45, xxxxxxxx wrote:

      Hi guys,

      i've reported this to Maxon but they sent me here since they say its not a bug anymore but a programming error inside the python code.  So thought i'd try here instead.

      The problem i'm having is with a python effector set to full control with a falloff.  I'm just using the default code that comes in with the python effector yet when you set the falloff to linear, you definately don't get linear falloff.

      Before the last R15 update, falloff didn't seem to work at all.  In the update it got looked at but still seems incorrect.  I'm wondering if theres an error in the MoData.GetFalloffs() function.

      Heres a file showing the default python effector with the falloff problem
      http://d.pr/f/ATLm

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

        On 20/01/2014 at 14:25, xxxxxxxx wrote:

        Hey Rich,

        the default code in the Python Effector for the "Full Control" mode is not quite right. The falloff is
        automatically computed and does not need to be respected in the calculation (ok, well, that doesn't
        sound like Full Control, right?). Anyway, just replace the line

                marr[i].off = marr[i].off+fall[i]*100.0
        

        with

                marr[i].off = marr[i].off + 100.0
        

        Best,
        -Niklas

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

          On 20/01/2014 at 14:34, xxxxxxxx wrote:

          Wow, thanks Niklas.  Didn't realise it was that simple.  So with full control mode falloff is always added to the effect your code produces?

          Thanks very much

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

            On 20/01/2014 at 14:40, xxxxxxxx wrote:

            nice one, niklas.
            that seems to do the trick, until this is fixed.

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