Browse Source

A few more layer flags...

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

Loading…
Cancel
Save