import os
def create_technique_resource(material, resources):
- # This operates on a Blender material, not a custom object
from .datafile import Resource, Statement
tech_res = Resource(material.name+".tech", "technique")
tech_res.statements.append(st)
- if material.shadow_method!='NONE':
+ if material.cast_shadows:
st = Statement("method", "shadow")
st.sub.append(Statement("shader", "occluder.glsl.shader"))
tech_res.statements.append(st)
sampler_export = SamplerExporter()
from .material import Material
- material = Material(material)
+ if type(material)!=Material:
+ material = Material(material)
for p in material.properties:
if p.texture:
resources[mat_name] = None
def export_technique(self, material, resources):
+ from .material import Material
+ if type(material)!=Material:
+ material = Material(material)
+
return create_technique_resource(material, resources)
def export_material(self, material, resources):