Update boo

This commit is contained in:
Jack Andersen 2017-01-20 14:19:53 -10:00
parent 1b08fff68a
commit f36dfa3be3
2 changed files with 10 additions and 12 deletions

View File

@ -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')
if len(model_obj.data.uv_layers) < 1:
raise RuntimeException('Imagepane Widget must have a child MESH with a UV layer')
if len(model_obj.data.materials) == 0:
raise RuntimeException('Imagepane Widget must have a material')
material = model_obj.data.materials[0]
if len(material.texture_slots) == 0 or not material.texture_slots[0]:
raise RuntimeException('Imagepane Widget must have a texture-slotted material')
tex_slot = material.texture_slots[0]
if tex_slot.texture.type != 'IMAGE' or not tex_slot.texture.image:
raise RuntimeException('Imagepane Widget must have an IMAGE texture-slot')
image = tex_slot.texture.image
path = bpy.path.abspath(image.filepath)
path_hash = path_hasher.hashpath32(path)
path_hash = 0xffffffff
if len(model_obj.data.materials):
material = model_obj.data.materials[0]
if len(material.texture_slots) and material.texture_slots[0]:
tex_slot = material.texture_slots[0]
if tex_slot.texture.type == 'IMAGE' and tex_slot.texture.image:
image = tex_slot.texture.image
path = bpy.path.abspath(image.filepath)
path_hash = path_hasher.hashpath32(path)
fout.write(struct.pack('>IIII', path_hash, 0, 0, 4))
for i in range(4):

2
hecl/extern/boo vendored

@ -1 +1 @@
Subproject commit ee9f3efe610814707f50c034fb419b91987064bf
Subproject commit 594d590a55169216e222d6a426817790dd3d1e78