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)?
-
2$\begingroup$ While you're waiting for a proper answer, one possible workaround would be to just explicit set the map you want in the shader and just ignore the other map: blender.stackexchange.com/questions/2176/… $\endgroup$– JtheNinjaCommented Apr 3, 2018 at 6:44
-
$\begingroup$ related keep-specific-uv-layer-and-remove-the-rest $\endgroup$– RattCommented Jan 20, 2023 at 12:40
4 Answers
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!
-
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.arditoCommented Apr 3, 2018 at 7:20
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!
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
-
1$\begingroup$ For 2.8 replace
uv_textures
withuv_layers
$\endgroup$ Commented Jan 19, 2020 at 15:33
For blender 3.3+:
import bpy
# Get selected objects
selected_objects = bpy.context.selected_objects
# Loop through selected objects
for obj in selected_objects:
# Check if object has UV maps
if obj.data.uv_layers:
# Remove all UV maps
while obj.data.uv_layers:
obj.data.uv_layers.remove(obj.data.uv_layers[0])