diff --git a/korman/exporter/material.py b/korman/exporter/material.py index 6c269fc..f6114e2 100644 --- a/korman/exporter/material.py +++ b/korman/exporter/material.py @@ -328,6 +328,9 @@ class MaterialConverter: state.ZFlags |= hsGMatState.kZNoZRead if layer_props.skip_depth_write: state.ZFlags |= hsGMatState.kZNoZWrite + if layer_props.decal: + hsgmat.compFlags |= hsGMaterial.kCompDecal + state.ZFlags |= hsGMatState.kZIncLayer | hsGMatState.kZNoZWrite # Export the specific texture type self._tex_exporters[texture.type](bo, layer, slot) diff --git a/korman/properties/prop_texture.py b/korman/properties/prop_texture.py index 8cf3c26..cec7364 100644 --- a/korman/properties/prop_texture.py +++ b/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", default=False, options=set()) + decal = BoolProperty(name="Decal", + description="Render on top of parent surface", + default=False, + options=set()) diff --git a/korman/ui/ui_texture.py b/korman/ui/ui_texture.py index 1deef67..cb02f6c 100644 --- a/korman/ui/ui_texture.py +++ b/korman/ui/ui_texture.py @@ -71,6 +71,7 @@ class PlasmaLayerPanel(TextureButtonsPanel, bpy.types.Panel): col.label("Miscellaneous:") col.active = not slot.use_stencil col.prop(layer_props, "opacity", text="Opacity") + col.prop(layer_props, "decal") col = split.column() col.label("Z Depth:")