Dorian Fevrier's blog - Quickly retrieve vertex positions of a Maya mesh (English Translation) - CommentairesJe m’appelle FEVRIER Dorian, je suis infographiste 3D passionné par mon métier, l’informatique en général, l’internet, la programmation et l’évolution de tout ce petit monde. Vous trouverez sur ce blog des tutoriaux, mes coups de cœurs, avis, etc.2024-01-02T23:48:05+01:00FEVRIER Dorianurn:md5:695d9c73474c33ce3dab043823509c4bDotclearQuickly retrieve vertex positions of a Maya mesh (English Translation) - Dorianurn:md5:89bda72c97c7945948de5930a5de62c32015-04-16T16:31:37+02:002015-04-16T15:31:53+02:00Dorian<p>You're welcome! ;)</p>Quickly retrieve vertex positions of a Maya mesh (English Translation) - Richurn:md5:100852a47998647c9709420de8e59b992015-04-16T16:02:15+02:002015-04-16T15:31:01+02:00Rich<p>Thank you for this quick tutorial, merci!</p>Quickly retrieve vertex positions of a Maya mesh (English Translation) - mailing listurn:md5:a07f836525b1e605e1c24b09a36726e02012-05-13T19:50:44+02:002012-05-13T18:50:44+02:00mailing list<p>now i can read your tutorials through google transalator link. Thanks buddy.</p>Quickly retrieve vertex positions of a Maya mesh (English Translation) - Dorianurn:md5:7b714d32942dcabeee5a4456571e93942012-03-16T15:41:32+01:002012-03-16T15:46:56+01:00Dorian<p>Hi Daniel!</p>
<p>Some tutorial are "understandable" if you use google translate:</p>
<p><a href="http://translate.google.fr/?sl=en&tl=fr#en" rel="ugc">http://translate.google.fr/?sl=en&tl=fr#en</a></p>
<p>Don't hesitate to ask on the post (even in english) if you need some clarifications. :sourit:</p>
<p>PS: Adrien <a hreflang="en" href="https://twitter.com/#%21/AdrienHerubel/status/180648807518834688" rel="ugc">give me</a> a shorter way on Twitter.</p>Quickly retrieve vertex positions of a Maya mesh (English Translation) - Daniel Limaurn:md5:a421c28e7bfa35b68cfbace90e59f83e2012-03-16T15:15:37+01:002012-03-16T15:15:37+01:00Daniel Lima<p>Thank you for your blog. I've leaning some good stuff here. I wish I know French so I could read your other tutorials. :)</p>
<p>...I'm learning API just now and I start to fell the power of possibilities! :)</p>
<p>Cheers,<br />
Daniel</p>Quickly retrieve vertex positions of a Maya mesh (English Translation) - Dorianurn:md5:02fc1b5082b114c06369bc0c153bd0dd2012-03-16T09:58:56+01:002012-03-16T09:58:56+01:00Dorian<p>Wow! Impressive! o_O</p>
<p>Thanks a lot for sharing this! :)</p>
<p>Regards,</p>
<p>Dorian</p>Quickly retrieve vertex positions of a Maya mesh (English Translation) - Daniel Limaurn:md5:4aeb064b3e685f0d4e590a1961af25ab2012-03-15T22:23:30+01:002012-03-16T09:57:08+01:00Daniel Lima<p>There's another way to retrieve those values even faster without c++:</p>
<code>"""cmds.polySphere(name='main') // Smotthed 4x -- 633602 vertices"""<br />
import maya.cmds as cmds<br />
import time<br />
<br />
t = time.time()<br />
xOrig = cmds.xform('main.vtx[*]', q=True, ws=True, t=True)<br />
origPts = zip(xOrig[0::3], xOrig[1::3], xOrig[2::3])<br />
print 'time: %s' %(time.time() - t)<br />
<br />
>> Result time: 2 sec
</code>Quickly retrieve vertex positions of a Maya mesh (English Translation) - Dorianurn:md5:61162ff4530f4edab25e4bd5758f14d82011-10-19T10:02:15+02:002011-10-19T09:02:15+02:00Dorian<p>Your building a dagPath object and im guessing injecting the objects mesh into it? << Yes, This is exactly this! :)</p>
<p>iterSel.getDagPath( dagPath ) put the dag path of the selection in the dagPath variable.</p>
<p>More info here: <a href="http://download.autodesk.com/us/maya/2011help/API/class_m_it_selection_list.html" title="http://download.autodesk.com/us/maya/2011help/API/class_m_it_selection_list.html" rel="ugc">http://download.autodesk.com/us/may...</a></p>
<p>Once you have the dag path, you should check this is a kMesh (already done during the selectionList generation) and put it in a MFnMesh to retrieve mesh informations.</p>
<p>More infos here:</p>
<p><a href="http://download.autodesk.com/us/maya/2011help/API/class_m_fn_mesh.html" title="http://download.autodesk.com/us/maya/2011help/API/class_m_fn_mesh.html" rel="ugc">http://download.autodesk.com/us/may...</a></p>
<p>I guess you could find more informations about Objects and Function Set here:</p>
<p><a href="http://download.autodesk.com/us/maya/2011help/index.html?url=./files/API_Objects_and_Function_Sets.htm,topicNumber=d0e657985" title="http://download.autodesk.com/us/maya/2011help/index.html?url=./files/API_Objects_and_Function_Sets.htm,topicNumber=d0e657985" rel="ugc">http://download.autodesk.com/us/may...</a></p>
<p>Good luck!</p>
<p>Dorian</p>Quickly retrieve vertex positions of a Maya mesh (English Translation) - Charles Lookerurn:md5:27805abc0d14d05b05656c3bdfee21032011-10-19T06:52:59+02:002011-10-19T05:52:59+02:00Charles Looker<p>dagPath = OpenMaya.MDagPath()<br />
iterSel.getDagPath( dagPath )</p>
<p>I kinda get everything your describing except for this part. Your building a dagPath object and im guessing injecting the objects mesh into it? is this so you can walk the sub components of the mesh? namely the verts?</p>