On 18/07/2013 at 11:44, xxxxxxxx wrote:
Cinema 4D Version: R13
Platform: Windows ;
Language(s) : C++ ;
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?
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().
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?