I’m trying to direct 3 objects to different outputs in a GHPython component in Grasshopper.
If it is srf or polysrf, I want it to go to output a;
If it is a mesh, I want it to go to output b.
The problem is that no matter what kind of object I put they are always directed to output a.
Here is my file:
DirectObjectType.gh (10.6 KB)
Can anybody show what’s wrong?
And here is the python code that I use:
import rhinoscriptsyntax as rs
type = rs.ObjectType(x)
if type == 8 or 16:
a = x
elif type == 32:
b = x
print “Unsupported object”