# remains intact for TBN vector computation
tbn_layer_index = -1
if self.tbn_vecs:
- uv_names = [u.name for u in self.uv_layers]
- if self.tbn_uvtex in uv_names:
+ if self.tbn_uvtex:
+ uv_names = [u.name for u in self.uv_layers]
+ if self.tbn_uvtex in uv_names:
+ tbn_layer_index = uv_names.index(self.tbn_uvtex)
+ elif self.uv_layers[0].unit==0:
+ tbn_layer_index = 0
+
+ if tbn_layer_index>=0:
prog_count += 1
- tbn_layer_index = uv_names.index(self.tbn_uvtex)
progress.push_task_slice("Computing TBN", 0, prog_count)
self.split_vertices(self.find_uv_group, progress, tbn_layer_index)
progress.set_task_slice(self.tbn_uvtex, 1, prog_count)