Selecting points [SOLVED]



  • On 16/11/2015 at 07:55, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   17 
    Platform:    Mac  ;  
    Language(s) :       PYTHON  ;

    ---------
    Hi everyone,

    I would like to select every ninth point of an object and save it in a selection tag. So far I managed to save points, which I selected with the live selection tool, in a selection tag.

    Where I am struggling is to do the selection with python. I looked through the SDK but cannot really find the command for selecting points by index. I thought I might find it in the PointObject area, but it doesn't seem so, it is always regarding to already selected points. Could anyone give me a little hint?

    Thanks a lot for your help

    Anna



  • On 16/11/2015 at 08:00, xxxxxxxx wrote:

    python tag on a spline object

      
    sp = op.GetObject()  
    points = sp.GetPointS()  
    points.Select(8)  
    


  • On 17/11/2015 at 01:33, xxxxxxxx wrote:

    Hello,

    please post Python related question in the proper sub-forum. We will move this thread.

    As shown by Mohamed, the (point) selection properties of an object are stored in a BaseSelect object that is accessed with GetPointS(). This object stores for each selectable element if it is selected or not. A element of a certain index can be selected with Select().

    Best wishes,
    Sebastian



  • On 17/11/2015 at 01:46, xxxxxxxx wrote:

    Hey,

    thanks a lot for your help 🙂 I'll already tried it on a spline and it works. Now I will try the rest of it.

    @ Sebastian, sorry, I didn't mean to post it in the wrong sub forum. Thanks for removing it.

    Have a nice day

    Anna


Log in to reply