Returns a list of grip indices identifying an object's selected grips.
rhinoscriptsyntax.SelectedObjectGrips (object_id)
rhinoscript.grips.SelectedObjectGrips (object_id)
object_id |
Required. String or Guid. The identifier of the object. |
List |
A list of zero-based grip indices identifying the selected grips. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select curve", rs.filter.curve)
if obj:
rs.EnableObjectGrips( obj )
count = rs.ObjectGripCount( obj )
for i in xrange(0,count,2):
rs.SelectObjectGrip( obj, i )
grips = rs.SelectedObjectGrips(obj)
if grips: print len(grips), "grips selected"