Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5825

rs.IsObjectSelectable vs rh_obj.IsSelectable()

$
0
0

@clement wrote:

Hi @Pascal,

i think the rs.IsObjectSelectable() method is slightly wrong. Please create a new file, add one curve and select it, then run this example:

import Rhino
import scriptcontext
import rhinoscriptsyntax as rs

def DoSomething():
    
    crv_ids = rs.ObjectsByType(rs.filter.curve, False)
    if not crv_ids: return
    
    for crv_id in crv_ids:
        print "rs.IsObjectSelectable = ", rs.IsObjectSelectable(crv_id)
        
    objs = [rs.coercerhinoobject(crv_id, True, True) for crv_id in crv_ids]
    for obj in objs:
        print "rh_obj.IsSelectable = ", obj.IsSelectable()

DoSomething()

…or RhinoCommon takes it too seriously :wink:

_
c.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5825

Trending Articles