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

    Turbulence parameters error

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 397 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 03/05/2015 at 11:52, xxxxxxxx wrote:

      I have thess lines of code:

        
      w_variation=C4DNoise(seed)   
      rotw=w_variation.Turbulence(c4d.Vector(step,step_br,0),3,True,overtime+step_br)   
      

      and I'm getting the error:

      /Users/ruibatista/Second Drive/Development/R15/plugins/Arbor/Arbor.pyp:303: DeprecationWarning: integer argument expected, got float

      I just checked the SDK and the only parameter that is required to be integer is the octaves and I'm providing 3, not 3.0
      So, what must I do to prevent this error to occur?

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

        On 03/05/2015 at 12:44, xxxxxxxx wrote:

        I just read on the last update of the SDK the following:
        **
        C4DNoise.Turbulence(p, rOctaves, bAsolute[, t=0.0])

        Generate a turbulence value, this is a sum of multiple noises with different frequency.

        Parameters:     
        p (Vector) – Turbulence coordinate
        rOctaves (float) – The number of octaves.
        bAbsolute (bool) – True for absolute values.
        t (float) – The time.

        Return type: float
        Returns: Noise sample.
        **
        So, none of the parameters is required to be integer. So, why am I getting that error?

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

          On 03/05/2015 at 13:41, xxxxxxxx wrote:

          The way I found to avoid the error was to explicitly define all parameter names, like this:

          rotw=w_variation.Turbulence(p=c4d.Vector(step_br,step,0.0),rOctaves=3.0,bAbsolute=True,lRepeat=1023,t=overtime+step_br)

          However, in the SDK, the Turbulence has no lRepeat parameter. Is the SDK wrong?

          p.s. I only added the lRepeat parameter because I got an error message stating that it was missing.

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

            On 03/05/2015 at 22:44, xxxxxxxx wrote:

            The parameter is indeed missing in the docs. By simply adding "t=overtime+step_br" to your first function call the error should be gone.

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