Browse Source

Expose kAlphaTestHigh for halos

pull/25/head
Adam Johnson 9 years ago
parent
commit
4a7f0eaea9
  1. 2
      korman/exporter/material.py
  2. 3
      korman/properties/prop_texture.py
  3. 1
      korman/ui/ui_texture.py

2
korman/exporter/material.py

@ -206,6 +206,8 @@ class MaterialConverter:
layer.opacity = layer_props.opacity / 100 layer.opacity = layer_props.opacity / 100
if layer_props.opacity < 100: if layer_props.opacity < 100:
state.blendFlags |= hsGMatState.kBlendAlpha state.blendFlags |= hsGMatState.kBlendAlpha
if layer_props.alpha_halo:
state.blendFlags |= hsGMatState.kBlendAlphaTestHigh
# Export the specific texture type # Export the specific texture type
self._tex_exporters[texture.type](bo, hsgmat, layer, slot) self._tex_exporters[texture.type](bo, hsgmat, layer, slot)

3
korman/properties/prop_texture.py

@ -31,6 +31,9 @@ class PlasmaLayer(bpy.types.PropertyGroup):
min=0, min=0,
max=100, max=100,
subtype="PERCENTAGE") subtype="PERCENTAGE")
alpha_halo = BoolProperty(name="Fix Alpha Halo",
description="Fixes halos seen around semitransparent objects resulting from sorting errors",
default=False)
envmap_color = FloatVectorProperty(name="Environment Map Color", envmap_color = FloatVectorProperty(name="Environment Map Color",
description="The default background color rendered onto the Environment Map", description="The default background color rendered onto the Environment Map",

1
korman/ui/ui_texture.py

@ -77,3 +77,4 @@ class PlasmaLayerPanel(TextureButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.label("General:") col.label("General:")
col.prop(layer_props, "opacity", text="Opacity") col.prop(layer_props, "opacity", text="Opacity")
col.prop(layer_props, "alpha_halo")

Loading…
Cancel
Save