Select active UV Set for multiple objects

Hi People,

I have a scene with a lot of objects. I made a huge Texture Atlas with the “Texture Atlas” add on. Since that, all my textures show up wrong because they use the second UV set now. How can i select all of my objects at once and make the first UVset active again? touching everything one by one would be extremly tedious.

greetings


import bpy

for obj in bpy.context.selected_objects:
    obj.data.uv_textures.active_index = 0 #set active UV Map to index 0
    obj.data.uv_textures[0].active_render = True #set active render (camera icon) to True

Thank you so much!!! works perfect. I am totally going to learn how to script now :slight_smile: