Selecting spline segments

On 31/01/2018 at 09:07, xxxxxxxx wrote:

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


I need to use the selection tools to select individual spline segments from an object.  About a decade ago someone needed something similar and there was no way back then.

Since it seems that I can't select edges of a spline, only points, I'm creating several splines, one for each selectable segment. Each spline is an object based on the Double Circle example, with GetContour().

But now this is getting too messy on complex objects, and I have to manage temporary splines created only to be selected. Is there a better way to do that?

Mabe a mesh without polygons, only edges and points, is it possible?

On 01/02/2018 at 05:22, xxxxxxxx wrote:


Cinema 4D has no selection tool to select the segment of a spline. Also C4D has no real concept of edges, edges do get implicitly defined by the polygons of a polygon object. So a polygon object with just points and edges is not possible either.

I guess, what you could do is write your custom spline segment selection tool, which would select all points of a segment upon selection of one of its points. But on the other hand, I'm not sure, I fully understood what you are actually trying to achieve. In what way does the spline generator come into play here? Perhaps you can provide us with more details, maybe we can then come up with alternative solutions.

On 06/02/2018 at 06:07, xxxxxxxx wrote:

Hi Andreas,

Our plugin draws several procedural splines that we want to manipulate with transform tools. I would like to use the native move/rotate/scale tools, if possible.

I already achieved that creating an object with the individual splines (custom objects with GetContour)., each one listening to NOTIFY_EVENT_SELECTIONBIT, MSG_MOVE_START and MSG_MOVE_END. I show and hide them when I enable the user to transform.

It's working fine, I just would like to hide them in the Object Manager to avoid confusion and have full control of their state. I know it's doable but haven't tried yet.

On 20/02/2018 at 19:12, xxxxxxxx wrote:

I got it working fine, hiding my selectable splines in a new layer with manager off.

But I have a small problem.
I create the temporary selectable splines I when I select a specific tag, edit them, and when the tag is no longer active I can delete them.
Works fine for live selection, but when a rectangle, lasso or polygon selection ends, it automatically unselects any selected tag, deleting my splines before I can use them.
if I knew any selection tool is active AND actually selecting something I could avoid that, so is there any event for the start and end of a angle, lasso and polygon selection? Or to query if they are in use atm?

On 22/02/2018 at 02:06, xxxxxxxx wrote:


no, the selection tools to not post any events, when they are actually selecting something.
But instead you could listen to EVMSG_TOOLCHANGED and then check with GetAction() (or GetActiveTool()), which tool is currently active.

On 22/02/2018 at 15:40, xxxxxxxx wrote:

Maybe I can do that with a Scene Hook plugin?

On 23/02/2018 at 08:18, xxxxxxxx wrote:

I'm sorry, because I actually had planned to provide that information...
A simple MessageData plugin would do the trick already.