Skip to content

Commit

Permalink
Fix: Transform vector won't work on non image atlas layer
Browse files Browse the repository at this point in the history
  • Loading branch information
ucupumar committed Oct 24, 2023
1 parent 25ac3a6 commit 116348c
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2767,7 +2767,6 @@ def update_mapping(entity):
if image.source == 'TILED':
segment = image.yua.segments.get(entity.segment_name)
offset_y = get_udim_segment_mapping_offset(segment)
mapping.inputs[1].default_value[1] = offset_y
else:
segment = image.yia.segments.get(entity.segment_name)

Expand All @@ -2777,14 +2776,14 @@ def update_mapping(entity):
offset_x = scale_x * segment.tile_x + offset_x * scale_x
offset_y = scale_y * segment.tile_y + offset_y * scale_y

if is_greater_than_281():
mapping.inputs[1].default_value = (offset_x, offset_y, offset_z)
mapping.inputs[2].default_value = entity.rotation
mapping.inputs[3].default_value = (scale_x, scale_y, scale_z)
else:
mapping.translation = (offset_x, offset_y, offset_z)
mapping.rotation = entity.rotation
mapping.scale = (scale_x, scale_y, scale_z)
if is_greater_than_281():
mapping.inputs[1].default_value = (offset_x, offset_y, offset_z)
mapping.inputs[2].default_value = entity.rotation
mapping.inputs[3].default_value = (scale_x, scale_y, scale_z)
else:
mapping.translation = (offset_x, offset_y, offset_z)
mapping.rotation = entity.rotation
mapping.scale = (scale_x, scale_y, scale_z)

# Setting UV neighbor resolution probably isn't important right now
#set_uv_neighbor_resolution(entity, source=source, mapping=mapping)
Expand Down

0 comments on commit 116348c

Please sign in to comment.