Browse Source

Merge 5191e786be into f907d26bf7

pull/258/merge
Patrick Dulebohn 2 years ago committed by GitHub
parent
commit
2ba0e9dc0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      korman/exporter/material.py
  2. 3
      korman/properties/prop_texture.py
  3. 1
      korman/ui/ui_texture.py

5
korman/exporter/material.py

@ -509,7 +509,10 @@ class MaterialConverter:
else: else:
layer_props = texture.plasma_layer layer_props = texture.plasma_layer
layer.opacity = layer_props.opacity / 100 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: if layer_props.alpha_halo:
state.blendFlags |= hsGMatState.kBlendAlphaTestHigh state.blendFlags |= hsGMatState.kBlendAlphaTestHigh
if layer_props.z_bias: if layer_props.z_bias:

3
korman/properties/prop_texture.py

@ -38,6 +38,9 @@ class PlasmaLayer(bpy.types.PropertyGroup):
description="Opacity of the texture", description="Opacity of the texture",
default=100.0, min=0.0, max=100.0, default=100.0, min=0.0, max=100.0,
precision=0, subtype="PERCENTAGE") 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", alpha_halo = BoolProperty(name="High Alpha Test",
description="Fixes halos seen around semitransparent objects resulting from sorting errors", description="Fixes halos seen around semitransparent objects resulting from sorting errors",
default=False) default=False)

1
korman/ui/ui_texture.py

@ -82,6 +82,7 @@ class PlasmaLayerPanel(TextureButtonsPanel, bpy.types.Panel):
sub = col.column() sub = col.column()
sub.active = not use_stencil sub.active = not use_stencil
sub.prop(layer_props, "opacity", text="Opacity") sub.prop(layer_props, "opacity", text="Opacity")
sub.prop(layer_props, "use_alpha_vcol", text="Use Alpha VCol")
sub.separator() sub.separator()
sub = col.column() sub = col.column()
sub.active = texture.type == "IMAGE" and texture.image is None sub.active = texture.type == "IMAGE" and texture.image is None

Loading…
Cancel
Save