Verts = cmds.polyListComponentConversion( allGeo, tv=True ) If you want to use the index (sometimes you´ll need it) this would be the code: “lect(allGeo)” strange :curious: because the index of an array should be an integer, so you get the error: Error: line 1: TypeError: file line 8: list indices must be integers… In example, if allGeo = (“jaw_geo”, “head_geo”, “hand_geo”), then if you´re using the old command “lect(allGeo)”, the result would be: So, you dont have to select any element in the array with an index:īecause “i” is not the index of the position in the array, is the element in the list itself. It means that “elem” is going to go trough all the elements in the list, one by one, and automatically is going to change the index of the element that is reading (internally). Verts = cmds.polyListComponentConversion( geo, tv=True ) # import maya.cmds as cmdsĪllGeo = cmds.ls( "*geo", recursive=True ) Well, the problem is that you´re not using properly the for loop.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |