I'm a 3d artist and I don't know anything about scripting so would really appreciate help with this!
Basically I have lots of buildings to unwrap. So far the buildings have separate material IDs applied to them For each type of material (about 10 ids in total) such as concrete and metal etc.
Since I am using tillable textures I just need a quick flatten unwrap pack for each channel ID.
I think the scipt would do something like this:
Select Object
Select Material ID (1)
Unwrap Modifier
(in UV editor)
Flatten Mapping
Selected Inverted faces
Flip faces
Pack UVs
Collapse UV Modifier
Repeat.
Many thanks for any help with this
Chris