0
$\begingroup$

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?

$\endgroup$
1
$\begingroup$

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.

enter image description here

enter image description here

They share the material, so the switch can be made in the UV Map node.

$\endgroup$
2
  • $\begingroup$ Well this is kinda walkaround, it will give me the view but still have to switch to second channel for editing lightmaps in object editor, Thx anyway. $\endgroup$ – JZK Sep 9 '19 at 9:21
  • $\begingroup$ @JZK OK, got you. You want to change the active UV on multiple objects simultaneously. $\endgroup$ – Robin Betts Sep 9 '19 at 9:46
0
$\begingroup$

You could make a "Mix Vector" node and drive the Fac by a common property...

enter image description here enter image description here

$\endgroup$
0
$\begingroup$

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
$\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.