ok so on this....I have my UV coord, there is no function for converting
that to a face and the examples im finding ONLY cover using a map ID not a
random UV position, additionally, the code example actually doesnt even work


import maya.cmds as cmds
import maya.OpenMaya as OpenMaya

list = OpenMaya.MSelectionList()
sphereName = "pSphereShape1"
planeName = "pPlaneShape1"

list.add(sphereName)
list.add(planeName)

sphereObj = OpenMaya.MObject()
planeObj = OpenMaya.MObject()

list.getDependNode(0, sphereObj)
list.getDependNode(1, planeObj)

sphereMesh = OpenMaya.MFnMesh(sphereObj) # errors out here with #
RuntimeError: (kInvalidParameter): Object is incompatible with this method
#
planeMesh = OpenMaya.MFnMesh(planeObj)


On Thu, Jun 17, 2021 at 2:59 PM Todd Widup <todd.wi...@gmail.com> wrote:

> that would work :)
> wasnt thinking about getting faces
>
>
> On Thu, Jun 17, 2021 at 2:46 PM vince touache <fruityfr...@gmail.com>
> wrote:
>
>> you can get the polygon (as in "the face") at a given u and v, and from
>> the polygon, you query the vertices. Once there, you can get the
>> skinweights and barycentric. Or am I missing something?
>>
>> Le jeudi 17 juin 2021 à 17:43:25 UTC-4, todd.wi...@gmail.com a écrit :
>>
>>> lol what I meant is how can you query the weight if given the UV
>>> position?
>>>
>>> On Thu, Jun 17, 2021 at 2:26 PM vince touache <fruit...@gmail.com>
>>> wrote:
>>>
>>>> I believe maya is using barycentric coordinates, that would be an easy
>>>> way of doing what you need (although the "UVs" part is not mandatory)
>>>>
>>>> Le jeudi 17 juin 2021 à 17:25:14 UTC-4, todd....@gmail.com a écrit :
>>>>
>>>>> hey all, any good way of getting skin weights at a UV position (not a
>>>>> vtx) in python?
>>>>>
>>>>> --
>>>>> Todd Widup
>>>>> Creature TD / Technical Artist
>>>>> todd....@gmail.com
>>>>>
>>>> --
>>>> 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 python_inside_m...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/python_inside_maya/9364d2d3-6100-4aac-b7a7-d81d01a78fd9n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/python_inside_maya/9364d2d3-6100-4aac-b7a7-d81d01a78fd9n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
>>>
>>> --
>>> Todd Widup
>>> Creature TD / Technical Artist
>>> todd....@gmail.com
>>>
>> --
>> 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 python_inside_maya+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/b965c34d-a1de-4ed6-af53-32e4d1c32973n%40googlegroups.com
>> <https://groups.google.com/d/msgid/python_inside_maya/b965c34d-a1de-4ed6-af53-32e4d1c32973n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> Todd Widup
> Creature TD / Technical Artist
> todd.wi...@gmail.com
>


-- 
Todd Widup
Creature TD / Technical Artist
todd.wi...@gmail.com

-- 
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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CABBPk34%3DmgtDpm%2BLOwN7TuNji8DaUv61-KBaTffBF8mR_rNowg%40mail.gmail.com.

Reply via email to