Re: [Maya-Python] getUV and getUVAtPoint returning wierd results.

2013-01-15 Thread Paul Winex
Use API: import maya.OpenMaya as om selection = om.MSelectionList() om.MGlobal.getActiveSelectionList( selection ) iter = om.MItSelectionList( selection, om.MFn.kMesh ) dagPath = om.MDagPath() if iter: while not iter.isDone(): iter.getDagPath( dagPath ) meshFn = om.MFnMesh(dagP

[Maya-Python] Re: New powerful code editor

2013-01-15 Thread Justin Israel
Now that I have moved to a studio with linux, I ended up hitting similar issues with SublimeCodeIntel. Thought I would just tack on my solution for future searches... Was seeing the issue in the ST2 console, complaining about the wrong architecture (or missing) SilverCity. I had to manually bui

Re: [Maya-Python] getUV and getUVAtPoint returning wierd results.

2013-01-15 Thread Jan:
make that uvMap[0] instead of 1 (typo) 2013/1/15 Jan: > Found a workaround. > Just kept it all in cmds: > > vtxNumber = 1 > > sel = cmds.ls(sl = True) > ## Get uvMap uv nrs > uvMap = cmds.polyListComponentConversion(sel[0]+'.vtx[%s]' %vtxNumber, > fromVertex = True, toUV = True) > ## get uv coor

Re: [Maya-Python] getUV and getUVAtPoint returning wierd results.

2013-01-15 Thread Jan:
Found a workaround. Just kept it all in cmds: vtxNumber = 1 sel = cmds.ls(sl = True) ## Get uvMap uv nrs uvMap = cmds.polyListComponentConversion(sel[0]+'.vtx[%s]' %vtxNumber, fromVertex = True, toUV = True) ## get uv coordinates (one of the uvMaps is enough. uvCoords = cmds.polyEditUV(uvMap[1] ,

[Maya-Python] getUV and getUVAtPoint returning wierd results.

2013-01-15 Thread Jan:
1) I ran into a wierd problem in maya 2013. (maya2012 seems to be fine) if you grab any polygon object and run: for x in range(0, 10): print pm.selected()[0].getUVAtPoint(1) I seem to get on average a 75% chance of getting [0.0, 0.0] and 25% of the time the correct result. I've tested this