PolygonSelectionTag
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/10/2004 at 01:07, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 7.303
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;---------
Hi,
I have created a PolygonSelectionTag and assigned a polygon using the following COFFEE code:newbs = new(BaseSelect); newbs->Select(5); tag = new(PolygonSelectionTag); tag->SetSelection(newbs); tag->SetName("Testing"); ObjBeam->InsertTag(tag);
And now I want to get back the polygon number which has been assigned to the PolygonSelectionTag. I am trying like this...
var objTag = obj->GetFirstTag(); if(objTag) { if(objTag->GetType()==5673) // ****** IF POLYGONSELECTION TAG { println(objTag->GetName()); // ***** HERE I WANT TO GET THE POLYGON NUMBER
Hope someone will help me...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/10/2004 at 00:53, xxxxxxxx wrote:
The BaseSelect class doesn't contain the list of selected indices. Instead it works with bit arrays to mark every selected index, so you have to check every polygon in your object using a code like this:
var sel = objTag->GetSelection(); var i = 0; for (i = 0; i < obj->GetPolygonCount(); i++) { if (sel->IsSelected(i)) println(i); // obj->GetPolygon(i) is selected }
Hope it helps...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/10/2004 at 02:31, xxxxxxxx wrote:
Thanks for the response. I have already tried this. It works fine. Let me explain my problem in detail.
At first I created a Selection Tag for polygon No 4. After that I knife the polygon, it becomes as two polygons... probably polygon no 4 & 9. In design view in object manager when i double click my selection tag and click "Select Polygons" it will select both 4 & 9. But I tried with the above source code, it selects only 4. Its not detecting 9 (as selected polygon). Which function to use to achieve this? -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/10/2004 at 01:06, xxxxxxxx wrote:
Hi Guys,
I got it. I made a small mistake. Its working now.