e955...@gmail.com
unread,Aug 23, 2015, 7:51:41 AM8/23/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Python Programming for Autodesk Maya, s...@weacceptyou.com
by the way here is a snippet of my code, the mesh.allIntersections thing is the part that is taking too long:
def returnCollisionPoints(self, point, dir):
sel = om.MSelectionList()
dag = om.MDagPath()
sel.add("BASE_MESHShape")
sel.getDagPath(0,dag)
mesh = om.MFnMesh(dag)
point = om.MFloatPoint(*point)
dir = om.MFloatVector(*dir)
hitPoints = om.MFloatPointArray()
mesh.allIntersections(
point, dir,
None, None,
False, om.MSpace.kWorld,
10000, False,
None,
True,
hitPoints,
None, None,
None, None,
None
)
return hitPoints