Hi Sam, This is certainly possible, if by "point" you mean vertex, you can:
1a. Get all components 2a. Pick one at random 3a. Emit from object, using the component It will create 2 nodes, one of which is an emitter that follows the component in worldspace. If by "point" you mean arbitrary location on a mesh, including inbetween vertices, you can: 1b. Create follicle on surface 2b. Insert a random value between 0-1 If you don't have any UVs, you can 1c. Duplicate the mesh 2c. Project planar 3c. Repeat 1b and 2b. 4c. Delete duplicate Best, Marcus On 22 September 2014 16:59, Ricardo Viana <[email protected]> wrote: > import maya.cmds as cmds > > #list selected vertices, only works if you dont lasso select them. > > selVerts = cmds.ls(sl=True) > > #create empty list to store positions > selPositions = [] > > > #loop to look up every vertex position and store it in selPositions > for vertex in selVerts: > #query the position > pos = cmds.xform(vertex, query = True , t = True) > #append to list > selPositions.append(pos) > > > # loop to create locators > for position in selPositions: > #create a locator > locator = cmds.spaceLocator() > #move it into the position > cmds.xform(locator, t= position) > > > On 22 September 2014 16:59, Ricardo Viana <[email protected]> wrote: > >> This might help. >> I've commented so you can follow. >> >> >> On 22 September 2014 09:57, Mahmoodreza Aarabi <[email protected]> >> wrote: >> >>> You can write plugin with Maya Python API too. >>> but i think you get good result with maya commands too with mel and >>> python script. >>> >>> On Mon, Sep 22, 2014 at 12:26 PM, <[email protected]> wrote: >>> >>>> i guess plugins are c++ right. way over my head, but ill look into it. >>>> thanks, >>>> >>>> Sam >>>> >>>> -- >>>> 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/d82cd654-520a-4085-a752-dd9db7607ef5%40googlegroups.com >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> >>> -- >>> >>> >>> Bests, >>> madoodia >>> >>> -- >>> 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/CADvbQwK%3D5pjZ-%3DRLOJfToRqRP_QvsSJ5t5PEVtT3MHoh8ZAi5w%40mail.gmail.com >>> <https://groups.google.com/d/msgid/python_inside_maya/CADvbQwK%3D5pjZ-%3DRLOJfToRqRP_QvsSJ5t5PEVtT3MHoh8ZAi5w%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >>> 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/CAK%2Bp0%3DZvqWXZ8DzQJjF0ndLsPPz30XQSP%3D1sfBWYnz0WjWGX%3DQ%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAK%2Bp0%3DZvqWXZ8DzQJjF0ndLsPPz30XQSP%3D1sfBWYnz0WjWGX%3DQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- *Marcus Ottosson* [email protected] -- 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/CAFRtmOA47zNk96MNVd6W3n2vo0BWNO8%3D8ayezp1vi2PpYC5J3w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
