Skip to content

Commit

Permalink
Rename UVMaps
Browse files Browse the repository at this point in the history
  • Loading branch information
StanleySweet committed Nov 12, 2020
1 parent 350c413 commit b0345f8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions io_scene_pyrogenesis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,18 @@ def parse_actor(self, root, proppoint="root", parentprops=[], rootObj=None, prop
obj.select_set(True)

backup = bpy.context.selected_objects.copy()
for b in backup :
if b.data is None or b.data.uv_layers is None or not len(b.data.uv_layers):
continue
if len(b.data.uv_layers) > 0:
print("Renaming" + b.data.uv_layers[0].name + " to " + "UVMap")
b.data.uv_layers[0].name = "UVMap"

if len(b.data.uv_layers) > 1:
print("Renaming" + b.data.uv_layers[1].name + " to " + "AOMap")
b.data.uv_layers[1].name = "AOMap"


# Get those objects
imported_objects = bpy.context.selected_objects.copy()

Expand Down

0 comments on commit b0345f8

Please sign in to comment.