Thanks, yes, that was helpful information!
I ended up using a somewhat different implementation but you helped get me going
on the right track:
def SelectAllBlocksInObstacleMap():
''' turn off blocks if vertices are in obstacle map defined areas '''
Obstacle = ce.getObjectsFrom(ce.scene, ce.isLayer, ce.withName("'Obstacle'"))[0]
allBlocks = ce.getObjectsFrom(ce.scene, ce.isBlock)
for o in allBlocks:
verts = ce.getVertices(o)
if verts:
x = verts[0]
z = verts[2]
sampleSpot = ce.sampleBooleanLayerAttribute(Obstacle, "obstacle", x, z)
if sampleSpot:
ce.setAttribute(o, '/ce/block/shapeCreation', False)
as you can see, what I was missing was knowing to use the sampleBooleanLayerAttribute command,
so once I figured that out, I was able to proceed- although your implementation seems a bit cleaner, so I might
give that a try as well. 🙂