Select by Map Channel

Hi people,

i'm looking for a way to select objects that have been assigned a map channel. i have a scene with thousands of objects and need each them to have several map channels. in order to easily select objects that have been assigned an uvw mod with let's say map ch 1, i'd need a script where i can enter the map ch number and have the script select all of these objects, maybe with an option to select hidden objects too or to work only on the selection - even if the modifier stack with all those uvw modifiers has been collapsed.
is this doable? thanks in advance.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
peter_trance's picture

Besides dropping it into a

Besides dropping it into a max window, How do I install this?

“When women are depressed, they eat or go shopping. Men invade another country. It's a whole different way of thinking.”

Anton Berg's picture

Almost all product images on

Almost all product images on the IKEA webpage are 3D ;-) Sometimes it shows, sometimes it doesent.

Glad the script helps!

OgmaSoul3D
Anton Berg
anton[at]os3d.se

Anton Berg's picture

Here is a new version with

Here is a new version with the little added feature.

I do remove uvchannels on collapsed editpolys or editmesh. I do NOT remove any modifiers that applies uvw coordinates like uvwunwrap or uvw modifier. So if you have modifier in the stack, my script will remove uvs on the object and then the modifier reapply it again. So the possibilty that I destroy/reset the settings in a uvwunwrap-modifier is very high.

As long as everything is collapsed then it should work.

usage: type in the ids you want to remove ex: 1,4,6 and press remove...

Hope this works for you!

AttachmentSize
OS3D_selectByUvId_v03.ms 4.22 KB
OS3D_SelectByUvId_V03.jpg 57.48 KB

OgmaSoul3D
Anton Berg
anton[at]os3d.se

pokoy's picture

i always wondered whether

i always wondered whether IKEA is doing any cg stuff. if you have set up some site showcasing the work let me know!

the script already saved me lots of work as working with the scene is quite a challenge. lots of objects, lots of textures, lots of IDs and not time - lots of fun ;-)

THANKS A LOT!

greets,
marcin

Anton Berg's picture

Ok no problem, I work in the

Ok no problem, I work in the same world. Always a pity when you cant show your work to anyone ;-) I currently work at the R&D dept att IKEA... and I always have to wait a year or two before I can show anything to anyone.

But you have given me the info I need and as long as all objects are collapsed then it shouldn´t be a big problem.

I will get back to you in a while ...

OgmaSoul3D
Anton Berg
anton[at]os3d.se

Anton Berg's picture

Then I need to know how you

Then I need to know how you add the ID...
Do you add several uvwmap modifiers on every model or is it alot of editpoly/editmesh objects that you apply uvwmapping/unwrap and then collapse?

If all objects have collapsed modifier stacks then it is not very hard. But I guess that it is a mix between, uvwmap uvwunwrap and collapsed modifier stacks...

I would be helped alot if you could give an example scene with say 50-100 typical objects that you need to use this script on... send it to my email anton[at]os3d.se if it is sensitive data or post it here!

OgmaSoul3D
Anton Berg

OgmaSoul3D
Anton Berg
anton[at]os3d.se

pokoy's picture

sorry, i really cannot pass

sorry, i really cannot pass you any data, all under NDA.

i would always collapse the stack before doing any action, the script wouldn't have to delete modifiers from the stack.

thanks again!

pokoy's picture

Anton, works like a charm,

Anton,

works like a charm, thank you!

i hope you don't mind me requesting a feature:
- an option to remove a map id from the selected objects,
so i'd still have to enter the map channel number and press the button 'remove specified IDs from selected objects' or alike.

can't say how useful this is for me. thumbs up!

Anton Berg's picture

This is script that is made

This is script that is made in 3dsmax 2008 I am not 100% certain that is works in older versions.

I have tried to create a small script that selects objects by UV id.

to try it out...
drag n drop the script onto 3dsmax

usage:
1. Select the objects you want to search among
2. Press the first button "Get IDs used on selection" to get a list of UV-IDs used on your current selection.
3. Remove the ids you dont want
4. press the "Select objects with the IDs above" button to select only the objects (in the current selection) that has that ID...

If you know the ids you want to select you dont need to run the first step. Just write a comma separated file like this: 1,3,13,4

Tips.
1. You need to have a selection before you press "Select objects..."

2. If your objects that we search among is NOT edit_mesh och edit_poly, I first need to create mesh_Copy of that object. And then check out what uvmaps is used. Unfortunally this takes quite some memory and time. So it is slow to run this script on objects that is NOT edit_mesh or Edit_poly.

If anyone has another solution to get the uvmaps used on a "normal" node, I would really like to hear it. Not the amount of maps but the exact maps used like UV:2,5,13

I hope this helps you somewhat... please let me know if you want to add some features.

By the way I have not added the "select hidden" objects yet. I need a another way of selecting the objects you want to search among first...

Please save the scene before running this script the first time, you never know what happens ;-)

AttachmentSize
OS3D_SelectByUvId_V01.jpg 60.02 KB
OS3D_selectByUvId_v02.ms 3.25 KB

OgmaSoul3D
Anton Berg
anton[at]os3d.se

pokoy's picture

hey anton, that was quick!

hey anton,

that was quick! i'm going to try the script today and if it's working it will save me lots of trouble ;-)
thank you very much!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.