Spline knots

On 26/04/2015 at 08:14, xxxxxxxx wrote:

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

Hi folks,

I'm a little confused by the docs regarding SplineData and knots. I'm needing to be able to do things like select knots and change positions of selected knots etc without the interface. But the docs say the following on the knots' selection state:

"Bool bSelect

Internal select state. Don't change this."

How are we suppose to change knot selection status', and how are we meant to be working with knot selection status' and changing something like their position if we're not suppose to change their selection status!?


On 28/04/2015 at 00:56, xxxxxxxx wrote:


I spoke with the developers and indeed the selection status of a knot cannot be properly handled with the API. You might try to use bSelect and to update the custom GUI element with Redraw() but updating the external window or the GUI may be problematic. If it doesn't work it is considered a limitation of the API.

best wishes,

On 28/04/2015 at 02:17, xxxxxxxx wrote:

Hi Sebastian,

thanks for finding that out. I've built my own spline gui interface to try step around some of the limitations of the normal spline gui. But of course I've made it difficult in that I have to handle all the gui-interaction and operational stuff myself. It works (so far..) minus a few things I haven't implemented yet. But I did try dealing with the selection state with that flag, and I noticed some odd behaviour and that probably explains why.

I might need to look at making an array of bools (a bool for each knot) to carry along with the SplineData object and do the selection status manually. No harm, just a quirk to deal with.

Is it still 'safe' to be working with the other knot attributes like point position and tangent values?


On 28/04/2015 at 10:13, xxxxxxxx wrote:


since you are actually writing your own custom GUI you might have more success using an own data structure. Then all you would need is a proper converter to the original SplineData class. You might try to use the original data structure in that context but the developers cannot guarantee that it will work without problems.

Best wishes,