SetSelection

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

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

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

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.

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