Intersector.create problem

maya
python

#1

Hi there. I’m trying to get intersector to work but I keep running into the following error:
RuntimeError: More keyword list entries (4) than format specifiers (2)

I’m wondering if it’s because I’m using api 2.0.

Anyway, here’s a snippet of code that I hope will help point me in the right direction:

targetSel = om.MGlobal.getActiveSelectionList()

targetObj = targetSel.getDagPath(0)
targetMFnObj = om.MFnMesh(targetObj)
targetFn = om.MFnDagNode(targetObj)
targetShape = targetFn.child(0)
targetPts = targetMFnObj.getPoints()

space = om.MSpace.kObject

matrix = targetObj.inclusiveMatrix()
intersector = om.MMeshIntersector()
intersector.create(targetShape, matrix)

Thanks,
Alec