Ah the programmers gaze,

As soon as I had posted I had found my answer :)

In case anyone else gets stuck with something like this: fId = 
om.MScriptUtil.getInt(hitFacePtr)

Cheers,

Ben

On Tuesday, 27 September 2016 22:48:58 UTC+2, Benjam901 wrote:
>
> Hello all,
>
> I am trying to get the face index of a mesh as you drag the mouse along 
> it. I have found some code that has got me in the right direction.
>
> However I am having trouble getting the face id. I am using a 
> cmds.draggerContext and inside the onDrag function I have a 
> fnMesh.closestIntersection call that is returning an int pointer as a 
> result but I cannot figure out how to covert the pointer to an int i.e. the 
> actual face id.
>
> The code is below as a gist for you:
>
> https://gist.github.com/ben-hearn-sb/3fc8c5518cc76626dec1424f2aa308ee
>
> If there is a way to get the faceID or the Face straight out of the 
> pointer that would also be awesome!
>
> Cheers,
>
> Ben
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/1aa0f688-06a4-4d1e-81f7-f19d81ac7e7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to