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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Frame based SplineGUI?

    SDK Help
    0
    3
    265
    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
      Helper
      last edited by

      On 18/07/2013 at 11:44, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R13 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi,
      I've created a tag plugin with a splineGUI in it. And I want to use the spline to control the rotation speed of the object the tag is on. Similar to the CMotion object.

      -I can make the object rotate based on the first knot's Y value (or any one single knot's values).
      -I can make the object rotation ramp up or ramp down using the Y values of the first and second knots

      But how do I loop through the splineGUI in a frame-by-frame fashion like the CMotion splineGUI does. And then set the rotation speed of the object based on the spline's Y value at that specific frame?

      -ScottA

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

        On 18/07/2013 at 12:56, xxxxxxxx wrote:

        well, in python we have utils.RangeMap() for that, which to my  knowledge does not exist for cpp, so you have to stick with the more basic c4d_tools.CalcSpline().

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

          On 18/07/2013 at 13:22, xxxxxxxx wrote:

          The spline values I think I can get ok.
          The problem I'm having is how to apply these values to the object in a frame based manner.

          The CMotion splineGUI is doing what I want.
          When the time scrubber is running. There is a green line that moves across the splineGUI. And grabs the spline's current Y value.
          When it gets to the end. It loops and starts over again.

          Can we do this kind of thing ourselves in our own plugins. Or is this something special that only the CMotion object has built into it?

          -ScottA

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