Browse Source

A few more layer flags...

pull/6/head
Adam Johnson 9 years ago
parent
commit
b68a2a930a
  1. 10
      korman/exporter/material.py

10
korman/exporter/material.py

@ -201,10 +201,14 @@ class MaterialConverter:
print(" No UVMap specified... Blindly using the first one, maybe it exists :|")
# General texture flags and such
texture = slot.texture
# ...
state = layer.state
if slot.blend_type == "ADD":
state.blendFlags |= hsGMatState.kBlendAdd
elif slot.blend_type == "MULTIPLY":
state.blendFlags |= hsGMatState.kBlendMult
# Export the specific texture type
texture = slot.texture
export_fn = "_export_texture_type_{}".format(texture.type.lower())
if not hasattr(self, export_fn):
raise explosions.UnsupportedTextureError(texture, bm)
@ -218,6 +222,8 @@ class MaterialConverter:
state = layer.state
if texture.invert_alpha:
state.blendFlags |= hsGMatState.kBlendInvertAlpha
if texture.extension == "CLIP":
state.clampFlags |= hsGMatState.kClampTexture
# Now, let's export the plBitmap
# If the image is None (no image applied in Blender), we assume this is a plDynamicTextMap

Loading…
Cancel
Save