I’ve made a simple script that lets you sync the active UV layer / channel between multiple objects. Primarily this sped up my lightmapping workflow a lot. If a corresponding channel doesn’t exist, it also creates a matching one for the selected objects. This also lets you set the render UV map for multiple objects.
New Version, updated the post above. I added functionality to delete and split the active render set and simple active set to separate buttons / operators.
Nice one! Blender’s default way of (not) handling UV Sets of multiple objects can be a real pain in the a**. We cobbled together our own little tool for that a while back (not to be released any time soon), maybe you can find something useful there. It’s a slightly different approach though:
Haha yes I agree. Blender lacks some functionality for working with multiple objects. From changing common parameters (modifiers for example), to more complex things like physics and UVs.
This was super essential though Although I think my version offers more functionality while also including yours. I’m thinking of introducing an index (2nd layer instead of “LightmapUVs”) way of selection instead of name matching but I haven’t found a need for that yet.
Maybe you would interest, I found addon with options to moving UV up and down in the list, modified it slightly with adding sorting, and moved it to expandable panel under UV Maps.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
bl_info = {
"name" : "BatchUVMaps",
"author" : "Arnas Karmaza",
"description" : "Extra Batch UV Operators",
"blender" : (2, 93, 0),
"version" : (1, 0, 1),
'location': 'Properties > Mesh Properties > UV Maps',
"warning" : "",
"category" : "Object"
}
import bpy
from . operators import OBJECT_OT_set_active_render_uv, OBJECT_OT_set_active_uv, OBJECT_OT_delete_active_uv
from . operators import Operator
from bpy.types import Panel
class UVMAPS_PT_batch_tools(Panel):
bl_label = "UV Batch Tools"
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "data"
bl_parent_id = "DATA_PT_uv_texture"
bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
layout = self.layout
row = layout.row()
row.operator('object.set_active_uv_for_selected_objects', icon ='RIGHTARROW', text="Sync Active")
row.operator('object.set_active_uv_render_layer_for_selected_objects', icon='RESTRICT_RENDER_OFF', text="Set Active")
row.operator('object.delete_active_uv_layer_for_selected_objects', icon='TRASH', text="Delete Active")
#defining classes here
classes = (
UVMAPS_PT_batch_tools,
OBJECT_OT_set_active_uv,
OBJECT_OT_delete_active_uv,
OBJECT_OT_set_active_render_uv
)
#def draw(self, context):
# layout = self.layout
# layout.label(text="Batch UV Tools:")
# row = layout.row()
# row.operator('object.set_active_uv_for_selected_objects', icon ='RIGHTARROW', text="Sync Active")
# row.operator('object.set_active_uv_render_layer_for_selected_objects', icon='RESTRICT_RENDER_OFF', text="Set Active")
# row.operator('object.delete_active_uv_layer_for_selected_objects', icon='TRASH', text="Delete Active")
def register():
from bpy.utils import register_class
for cls in classes:
register_class(cls)
# Drawing the Operator in UV maps panel
#bpy.types.DATA_PT_uv_texture.append(draw)
def unregister():
from bpy.utils import unregister_class
for cls in classes:
unregister_class(cls)
# Removing the operator from UV maps panel
#bpy.types.DATA_PT_uv_texture.remove(draw)
Hi
I think this is a very useful add-on!
However, it does not work as shown in the video
When I press the Sync active map button, the UV channel is selected, but the channel does not increase
Is this a bug?
Blender : 2.93.4
Batch UV Operators : 1.0.1
@InamuraJIN Hey! Sorry I missed that. It goes over selected objects and sets the active UV map to the one with the same name. If a layer with the same name doesn’t exist on some object, it will create a UV layer with that name.
In your example it works as expected, not sure what outcome you’re looking for?