Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion korman/exporter/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,10 @@ def export_texture_slot(self, bo, bm, hsgmat, slot, idx, name=None, blend_flags=
else:
layer_props = texture.plasma_layer
layer.opacity = layer_props.opacity / 100
self._handle_layer_opacity(layer, layer_props.opacity)
if layer_props.opacity < 100 and not state.blendFlags & hsGMatState.kBlendMask:
state.blendFlags |= hsGMatState.kBlendAlpha
if layer_props.use_alpha_vcol:
state.blendFlags |= hsGMatState.kBlendAlpha
if layer_props.alpha_halo:
state.blendFlags |= hsGMatState.kBlendAlphaTestHigh
if layer_props.z_bias:
Expand Down
3 changes: 3 additions & 0 deletions korman/properties/prop_texture.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ class PlasmaLayer(bpy.types.PropertyGroup):
description="Opacity of the texture",
default=100.0, min=0.0, max=100.0,
precision=0, subtype="PERCENTAGE")
use_alpha_vcol = BoolProperty(name="Use Alpha VCol",
description="Texture uses the Alpha vertex color values",
default=False)
alpha_halo = BoolProperty(name="High Alpha Test",
description="Fixes halos seen around semitransparent objects resulting from sorting errors",
default=False)
Expand Down
1 change: 1 addition & 0 deletions korman/ui/ui_texture.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def draw(self, context):
sub = col.column()
sub.active = not use_stencil
sub.prop(layer_props, "opacity", text="Opacity")
sub.prop(layer_props, "use_alpha_vcol", text="Use Alpha VCol")
sub.separator()
sub = col.column()
sub.active = texture.type == "IMAGE" and texture.image is None
Expand Down