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

    Selecting points [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 354 Views
    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 Offline
      Helper
      last edited by

      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

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

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

        python tag on a spline object

          
        sp = op.GetObject()  
        points = sp.GetPointS()  
        points.Select(8)  
        
        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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

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

            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

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