Browse Source

Add a decal flag to layer props

pull/84/head
Darryl Pogue 8 years ago
parent
commit
11175c3aaf
No known key found for this signature in database
GPG Key ID: CB824715C3E6FD41
  1. 3
      korman/exporter/material.py
  2. 4
      korman/properties/prop_texture.py
  3. 1
      korman/ui/ui_texture.py

3
korman/exporter/material.py

@ -328,6 +328,9 @@ class MaterialConverter:
state.ZFlags |= hsGMatState.kZNoZRead state.ZFlags |= hsGMatState.kZNoZRead
if layer_props.skip_depth_write: if layer_props.skip_depth_write:
state.ZFlags |= hsGMatState.kZNoZWrite state.ZFlags |= hsGMatState.kZNoZWrite
if layer_props.decal:
hsgmat.compFlags |= hsGMaterial.kCompDecal
state.ZFlags |= hsGMatState.kZIncLayer | hsGMatState.kZNoZWrite
# Export the specific texture type # Export the specific texture type
self._tex_exporters[texture.type](bo, layer, slot) self._tex_exporters[texture.type](bo, layer, slot)

4
korman/properties/prop_texture.py

@ -95,3 +95,7 @@ class PlasmaLayer(bpy.types.PropertyGroup):
description="Don't save the depth information, allowing rendering of layers behind this one", description="Don't save the depth information, allowing rendering of layers behind this one",
default=False, default=False,
options=set()) options=set())
decal = BoolProperty(name="Decal",
description="Render on top of parent surface",
default=False,
options=set())

1
korman/ui/ui_texture.py

@ -71,6 +71,7 @@ class PlasmaLayerPanel(TextureButtonsPanel, bpy.types.Panel):
col.label("Miscellaneous:") col.label("Miscellaneous:")
col.active = not slot.use_stencil col.active = not slot.use_stencil
col.prop(layer_props, "opacity", text="Opacity") col.prop(layer_props, "opacity", text="Opacity")
col.prop(layer_props, "decal")
col = split.column() col = split.column()
col.label("Z Depth:") col.label("Z Depth:")

Loading…
Cancel
Save