0
$\begingroup$

I accidentally added 2 UV maps to an object, and the wrong one is selected to be used in the render. The problem is, I have over 100 non-linked duplicated of this object in my scene. How do I remove a UV map from all of them (quickly)?

$\endgroup$
1
$\begingroup$

you may have to join the objects together and simply go into the image texture editor and remove them both with the little negative sign on the right to remove the custom textures in the slot of the object. if you still don't get it please say or if I'm not answering the right problem that you are experiencing.

Thanks and good luck!

$\endgroup$
  • 2
    $\begingroup$ Hi, why don't you add what should the OP do to get back all separated objects, after? That would make this answer much more useful... $\endgroup$ – m.ardito Apr 3 '18 at 7:20
2
$\begingroup$

You can use the following script:

import bpy

selected = bpy.context.selected_objects

bad_uvmap = 'UVMap.001' # Enter the UV map name you want to remove here

for obj in selected:
    try:
        badUV = obj.data.uv_textures[ bad_uvmap ]
        obj.data.uv_textures.remove( badUV )
    except:
        pass
  • Paste it in the text editor (open a text editor view, use the "new" button and paste).
  • Change the line "bad_uvmap = 'UVMap.001'" by replacing 'UVMap.001' by the name of the UV map you want to remove
  • Select all the concerned objects in the 3D view
  • Come back to the text editor and use 'run script' or AltP
$\endgroup$
2
$\begingroup$

I'm using Blender 2.8 beta, and this is the modified version of the script I'm using to delete all the unwanted UV Map Layers from all the selected objects at once:

import bpy
selected = bpy.context.selected_objects

bad_uvmap = 'UVChannel_2' # Enter the UV map name you want to remove here
print("Deleting unwanted UV Layers")
 for obj in selected:
   if obj.type == "MESH":
     bad_uvlayer = obj.data.uv_layers.get(bad_uvmap)
     if bad_uvlayer != None:
       obj.data.uv_layers.remove(bad_uvlayer)

Hope this helps!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.