[Maya-Python] Re: Get objects that are not uv

2017-07-20 Thread Robert White
If you need to avoid pymel for some reason:

from maya import cmds

def find_unmapped_meshes():
unmapped_meshes = []
for mesh in cmds.ls(type='mesh'):
uvs = cmds.polyListComponentConversion(mesh, toUV=True)
uvs = cmds.ls(uvs, fl=True)
if len(mesh) < 2:
unmapped_meshes.append(mesh)
return unmapped_meshes




On Thursday, July 20, 2017 at 3:04:56 PM UTC-5, Andres Weber wrote:
>
> 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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/550c3316-19ba-4132-a215-09168d90d7c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] Re: Get objects that are not uv

2017-07-20 Thread Andres Weber
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 python_inside_maya+unsubscr...@googlegroups.com.
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.


[Maya-Python] Get objects that are not uv

2017-07-20 Thread likage
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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/3135a1ec-65b3-4c35-8464-950af78b958a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Auto rig builder

2017-07-20 Thread Jeremie Passerin
Mgear is free open source

https://gumroad.com/l/mgear


On Jul 14, 2017 15:33, "Marcus Ottosson"  wrote:

> There's always good old trusty Advanced Skeleton, MEL through-and-through.
> :)
>
> - http://www.animationstudios.com.au/advanced-skeleton-download
>
> And then there's also Anzovin's work.
>
> - http://www.anzovin.com/products/
>
> I've been at the artist-end of many Advanced Skeleton-based rigs and
> though it's from the 90s, the rigs themselves have in my experience been
> surprisingly unsurprising; in terms of bugs and odd behavior. The
> performance has always been great as well (i.e. 30+ fps), which is more
> than I can say for most auto-riggers I've been in contact with.
>
> As I Googled, I also found that since 2017, Maya can do auto-rigging
> out-of-the-box :O
>
> - http://lesterbanks.com/2017/01/working-mayas-native-quick-rig-tool/
>
> --
> 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 python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/python_inside_maya/CAFRtmOCP5nifTH15E7iSVawqDTrBQ
> Jt7%3DJwihRUHG86o8-e4Gw%40mail.gmail.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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAKq4km9qR2s-JONmFz_wheDuxFyfhAHba7LQP7rEXN1_QVCFhw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.