select objects with empty uv maps



Is there a way to select all objects with empty uv maps, cause i have a really big and messy scene with a lot of meshes, some with the correct uv and a lot with nothing.

Everything renders fine because i using shaders with projections for these objects apart from those that i edited the uv’s (every thing is mixed), but the warnings of the empty uv maps cause the render times to slowdown.

So, if you know a way, that would really help me.



This should do the trick. It also spits out the info in the script editor…

 global proc findEmptyUVSets()
 	string $saSelected[] = `ls -sl -l`;
 	string $saEmptyObjs[] = {} ;
 	if (!size($saSelected))
 		error "Select something
 	for ($sSelected in $saSelected)
 		string $saUVSets[] = `polyUVSet -q -allUVSets $sSelected`;
 		for ($sUVSet in $saUVSets)
 			polyUVSet -currentUVSet -uvSet $sUVSet $sSelected;
 			int $iaNumUVs[] = `polyEvaluate -uv $sSelected`;
 			if (!$iaNumUVs[0])
 				print ("UV set ["+$sUVSet+"] on object ["+$sSelected+"] is empty
 				$saEmptyObjs[size($saEmptyObjs)] = $sSelected;
 	select -r $saEmptyObjs;


Thanks a lot, works like a charm!:thumbsup:


This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.