Forgive any typos in there. I had to hand type that code snippet from my workstation :-)
I already see I messed up: geomIt = om.MitGeometry(d, o) ==> geomIt = om.MItGeometry(d, o) On Thu Jan 15 2015 at 19:04:34 Justin Israel <[email protected]> wrote: > Maybe something like this? > > import maya.OpenMaya as om > > sel = om.MSelectionList() > om.MGlobal.getActiveSelectionList(sel) > > d = om.MDagPath() > o = om.MObject() > > selIt = om.MItSelectionList(sel) > fn = om.MFnSingleIndexedComponent() > uvs = om.MIntArray() > while not selIt.isDone(): > selIt.getDagPath(d, o) > fn.setObject(o) > fn.getElements(uvs) > print list(uvs) > > geomIt = om.MitGeometry(d, o) > while not geomIt.isDone(): > p = geomIt.position(om.MSpace.kWorld) > print geomIt.index(), (p[0], p[1], p[2], p[3]) > geomIt.next() > > selIt.next() > > > > > On Thu Jan 15 2015 at 16:46:38 <[email protected]> wrote: > >> Okay, one last question on this... >> >> I've got this all working great so far. Thanks for the help guys! >> >> Now, I'm trying to create follicles at surface point locations, But I'm >> not sure how to work with it, since they're not components(?). I noticed >> in the scriptEditor, that when I'm selecting them, it's spitting out UV >> values, which is exactly what I need. But how do I get those UV values from >> OpenMaya? >> >> Thanks! >> Kev >> >> -- >> 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/ms >> gid/python_inside_maya/33254070-9258-4d4b-baa0-95b6f28eae9a% >> 40googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > -- 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/CAPGFgA3e9-NCt7ef_h55sR724fb7SrLyE7skvPbpiu8Hho6Syw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
