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

    SetSelection

    SDK Help
    0
    5
    1.4k
    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
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 11/11/2002 at 13:56, xxxxxxxx wrote:

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

      ---------
      Oh man, it really seems I have to relearn anything again that I have used in COFFEE. Sorry, for the frequent questioning. (I guess that will happen more often in the next few days)
      How can I set a selection in C++? I know there is a FromArray() Command that selects the elements of an Unsigned CHAR selection, but to be honest I have no clue how to use that.
      But isn´t there something that uses a BaseSelection to set a Selection? Like in COFFEE I mean. bs->Select(i); op->SetPointSelection(bs); or anything similar to that?
      Thanks again

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 11/11/2002 at 15:20, xxxxxxxx wrote:

        Forget it. I got it now. Fight night. 🙂
        Samir

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 12/11/2002 at 01:30, xxxxxxxx wrote:

          Could you post an example how to normally select some points? I have some problems to be honest. The way I´m doing it now is:
          BaseSelect *vs = ToPoly(op)->GetPointS();
          UCHAR *Sel = bNew UCHAR[counter];
          [...]
          for(i;i<counter;i++)
             {
                    if(i==1)Sel[i-1]=(UCHAR)tboon;
          [...]
             }
          vs->FromArray(Sel,counter);
          bDelete(Sel);
          But I got somehow problems. tboon (etc.) stores a vertex index. So I want to select the point in tboon. I am really sure that I am doing it wrong (because of GetPointS). Is there a easier way? :
          Thanks

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 12/11/2002 at 06:05, xxxxxxxx wrote:

            Simple way: you can use Select(i) or Deselect(i).
            Must be "for(i=0;i<counter;i++)" or you set "i" before?

                
                
                
                
                for(i=0;i<count;i++)
                
                
                
                
                {
                
                
                
                
                if(mustselect(i)) Sel[i] = 1;
                
                
                
                
                else Sel[i] = 0; 
                
                
                
                
                }
                
                
                
            

            It must work.
            Remotion.

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 12/11/2002 at 06:08, xxxxxxxx wrote:

              Simple way: you can use Select(i) or Deselect(i).
              Oh, that works? Great. Thanks for your help Remo.
              Must be "for(i=0;i<counter;i++)" or you set "i" before?
              Yep, set it before the loop.
              Best
              Samir

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