There's probably a hundred ways to do this but here's one:
import pymel.core as pm
sel = pm.ls(sl=True)
sel[0].getShape().getUVs()

>>> ([], []) # This is empty/no UVs
# Or you could do 

sel[0].getShape().map
# or
sel[0].map
# Empty objects should just return something like (depending on object name)
>>> pCubeShape2.map[0]
Interested to see what other people come up with.  For completeness you 
should probably also check all UV sets just in case...but you mentioned 
that's not a constraint.



On Thursday, July 20, 2017 at 3:02:49 PM UTC-4, likage wrote:
>
> Hi all,
>
> I have this model in which some of the geometries within are not uv-ed.
> As in, you select the geometry >> open up uv editor >> it is blank.
>
> And so it is causing some problems with a script I am doing. Are there any 
> ways in which I can use python to check for such geos with the blank uvs?
>
> FYI, there is only 1 uv set for this model.
>

-- 
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/6254e53e-d1bc-4ee6-9bc3-8082b334cfa7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to