Yes, you're right ! Thank you ! If anyone has a solution to get a MDagPath 
from the inputGeom, anyway, i'd more than happy to hear it =]


Le jeudi 11 août 2016 10:14:56 UTC+1, mjlefevre a écrit :
>
> If you connect the worldMesh of your shape to your custom inMesh 
> attribute, you can use geometryTransformMatrix() to grab the inclusive 
> matrix I think.
>
>
> On Wednesday, 10 August 2016 20:37:29 UTC+1, fruity wrote:
>>
>> I didn't know asMeshTransformed() and geometryTransformMatrix(), nice =] 
>> However, same result, i'm afraid. The MObject is still of type kMeshData 
>> instead of kMesh, and i can't init a MFnDagNode with it (still 
>> "(kInvalidParameter): Object is incompatible with this method // ")
>> In the meantime, i have a workaround. I'm after the inclusiveMatrix of 
>> this mesh, so i just added a matrix attribute to the node, which is maybe 
>> even better, as i can set a different matrix. But i'd like to find a 
>> solution for that anyway, that seems too standard to not have a quick way 
>> of doing it !
>> Thanks for your help, anyway.
>>
>>
>> Le mercredi 10 août 2016 20:12:12 UTC+1, mlefevre a écrit :
>>>
>>> I remember running into this issue before. Can you get the data you need 
>>> without using an MDagPath object?
>>>
>>> Maybe you can do what you need with something like asMeshTransformed() 
>>> and geometryTransformMatrix() functions of MDataHandle.
>>>
>>>
>>> On Tuesday, August 9, 2016 at 1:00:44 PM UTC+1, fruity wrote:
>>>>
>>>>
>>>>
>>>> Hi there, 
>>>>
>>>> I'm prototyping a new deformer in python, and i'm stuck with a super 
>>>> stupid problem. So essentially, i need to get the dagPath of an object, 
>>>> and 
>>>> to do that, i have only an outMesh plug connected to my deformer. I have 
>>>> something that looks like that :
>>>>
>>>> # this is what i get from my deformer
>>>> oSrcMesh = dataBlock.inputValue(A.aSrcMesh).asMesh()
>>>> # get the dagPath - test 1
>>>> xxx = OpenMaya.MDagPath()
>>>> OpenMaya.MDagPath.getAPathTo(oSrcMesh, xxx)
>>>> # get the dagPath - test 2
>>>> fnDag = OpenMaya.MFnDagNode(oSrcMesh)
>>>>
>>>>
>>>>
>>>> I won't go through everything i tried, but you get the idea ! I found 
>>>> NO way to get the dagPath of my mesh, starting from this oSrcMesh which is 
>>>> of type kMesh.
>>>> I think that my oSrcMesh is not aware of its hierarchy.
>>>>
>>>> So what is the clean way of getting a MDagPath out of this oSrcMesh ? 
>>>>
>>>> This stupid pure maya api problem took me more time than everything 
>>>> else in this deformer, which is kind of a shame, so any help would be more 
>>>> than appreciated !
>>>> Many thanks =]
>>>>
>>>

-- 
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/fc7455b1-33bb-45c0-89e2-1d8f3e0d02af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to