Skip to content

Commit e8ef049

Browse files
committed
Update cubemap extractor to solve an issue with certain cubemaps
Fixes cubemap_lockout and cubemap_plasma _rifle not being unpacked properly.
1 parent df1d878 commit e8ef049

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

io_scene_halo/global_functions/shader_generation/image_helper.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ def is_color_plate(img):
4747
is_color_plate = True
4848
if mask == border:
4949
is_color_plate = False
50-
50+
if mask == (0, 0, 255, 255) and border == (0, 0, 255, 255) and filler == (0, 0, 255, 255):
51+
is_color_plate = True
52+
5153
if is_color_plate:
5254
border_pixels = []
5355
for x in range(w):
@@ -136,11 +138,11 @@ def extract_colorplate_faces(img, palette):
136138

137139
def extract_t_faces(img):
138140
w, h = img.size
139-
if w % 4 != 0 or h % 3 != 0:
140-
print("Not a valid 4x3 T-shape image (%sx%s)" % (w, h))
141-
return None
141+
#if w % 4 != 0 or h % 3 != 0:
142+
#print("Not a valid 4x3 T-shape image (%sx%s)" % (w, h))
143+
#return None
142144

143-
face_w, face_h = w // 4, h // 3
145+
face_w, face_h = w // 4, w // 4
144146
if face_w != face_h or not is_power_of_two(face_w):
145147
print("Face size must be square and power of two. got %sx%s" % (face_w, face_h))
146148
return None

0 commit comments

Comments
 (0)