ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
Submitted by TwilightZoney on Tue, 2016-12-27 01:31
I'm in of a bit of a pinch got a lot of objects in a scene looking to export out into a engine. Seems I miss giving some objects UV's. Would need to figure a way to get a list of what objects don't have a second UV channel for light maps.
to get this: so you see if there's less than the 2 default channels (0 for vc and 1 as the default UV) the objects will be selected...ie. hasn't got an extra 'light map' channel....again, I STRESS, I hacked this...okay...cos it was really old...2005...and I'm not a mxs expert...
fn getNumUVChannels obj = (
count = 0
if classof obj == Editable_Poly then
(
for i in 1 to polyOp.getNumMaps obj do
if polyOp.getMapSupport obj i then count += 1
)
else
(
if classof obj == editable_mesh then
(
for i in 1 to meshOp.getNumMaps obj do
if meshOp.getMapSupport obj i then count += 1
)
)
return count
)
for o in geometry do
if getNumUVChannels o < 2 then (
selectmore o
)
Comments
i hacked this...
http://forums.cgsociety.org/archive/index.php?t-264514.html
to get this: so you see if there's less than the 2 default channels (0 for vc and 1 as the default UV) the objects will be selected...ie. hasn't got an extra 'light map' channel....again, I STRESS, I hacked this...okay...cos it was really old...2005...and I'm not a mxs expert...
fn getNumUVChannels obj = (
count = 0
if classof obj == Editable_Poly then
(
for i in 1 to polyOp.getNumMaps obj do
if polyOp.getMapSupport obj i then count += 1
)
else
(
if classof obj == editable_mesh then
(
for i in 1 to meshOp.getNumMaps obj do
if meshOp.getMapSupport obj i then count += 1
)
)
return count
)
for o in geometry do
if getNumUVChannels o < 2 then (
selectmore o
)