Blender Asked by JZK on December 30, 2020
I have multiple objects on scene with 2 UV sets, first default and second for one shared lightmap.
Now if i select all the objects (they have the same names for UVs) and try to switch between UV sets only active one will change. This forces me to tidiously selecting models one by one and changing UV sets for further edition in multi edit mode.
Is there any way to switch between all object’s UVs at once?
Toggle UV script
Going by question remit, ie objects having two UV maps, here is a script to toggle between them on selected objects.
Note script for 2.8 see How to change UVMap index? for prior.
import bpy
context = bpy.context
for o in context.selected_objects:
if o.type != 'MESH':
continue # only meshes?
uv = o.data.uv_layers
ai = uv.active_index
uv.active_index = 0 if ai else 1
uv.active.active_render = True
or set absolutely, script below sets all active UV maps to that of index 0.
import bpy
context = bpy.context
for o in context.selected_objects:
if o.type != 'MESH':
continue # only meshes?
uv = o.data.uv_layers
ai = uv.active_index
uv.active_index = 0
uv.active.active_render = True
Answered by batFINGER on December 30, 2020
Answered by Ron Jensen on December 30, 2020
Not sure if this helps...
If it's a case of switching maps, (as opposed to images) The UV Map shader input node looks up by name. The Cube and sphere in the illustrations share a map: 'Shared UV', and each has a map: 'UV Map' of its own.
They share the material, so the switch can be made in the UV Map node.
Answered by Robin Betts on December 30, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP