mirror of https://github.com/AxioDL/metaforce.git
Update boo
This commit is contained in:
parent
1b08fff68a
commit
f36dfa3be3
|
@ -224,17 +224,15 @@ def recursive_cook(fout, obj, version, path_hasher, parent_name):
|
||||||
raise RuntimeException('Imagepane Widget must have a child MESH with 4 verts')
|
raise RuntimeException('Imagepane Widget must have a child MESH with 4 verts')
|
||||||
if len(model_obj.data.uv_layers) < 1:
|
if len(model_obj.data.uv_layers) < 1:
|
||||||
raise RuntimeException('Imagepane Widget must have a child MESH with a UV layer')
|
raise RuntimeException('Imagepane Widget must have a child MESH with a UV layer')
|
||||||
if len(model_obj.data.materials) == 0:
|
path_hash = 0xffffffff
|
||||||
raise RuntimeException('Imagepane Widget must have a material')
|
if len(model_obj.data.materials):
|
||||||
material = model_obj.data.materials[0]
|
material = model_obj.data.materials[0]
|
||||||
if len(material.texture_slots) == 0 or not material.texture_slots[0]:
|
if len(material.texture_slots) and material.texture_slots[0]:
|
||||||
raise RuntimeException('Imagepane Widget must have a texture-slotted material')
|
tex_slot = material.texture_slots[0]
|
||||||
tex_slot = material.texture_slots[0]
|
if tex_slot.texture.type == 'IMAGE' and tex_slot.texture.image:
|
||||||
if tex_slot.texture.type != 'IMAGE' or not tex_slot.texture.image:
|
image = tex_slot.texture.image
|
||||||
raise RuntimeException('Imagepane Widget must have an IMAGE texture-slot')
|
path = bpy.path.abspath(image.filepath)
|
||||||
image = tex_slot.texture.image
|
path_hash = path_hasher.hashpath32(path)
|
||||||
path = bpy.path.abspath(image.filepath)
|
|
||||||
path_hash = path_hasher.hashpath32(path)
|
|
||||||
|
|
||||||
fout.write(struct.pack('>IIII', path_hash, 0, 0, 4))
|
fout.write(struct.pack('>IIII', path_hash, 0, 0, 4))
|
||||||
for i in range(4):
|
for i in range(4):
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit ee9f3efe610814707f50c034fb419b91987064bf
|
Subproject commit 594d590a55169216e222d6a426817790dd3d1e78
|
Loading…
Reference in New Issue