numbers[ext] = n+1
for r in refs:
- with open(os.path.join(path, r.name), "w") as out_file:
- for s in r.statements:
- s.write_to_file(out_file)
-
- with open(out_fn, "w") as out_file:
- for s in obj_res.statements:
- s.write_to_file(out_file)
+ r.write_to_file(os.path.join(path, r.name))
+ obj_res.write_to_file(out_fn)
def export_object_resources(self, context, obj, resources, progress, material_maps=None):
if material_maps is None:
lods = self.collect_object_lods(obj)
from .datafile import Resource, Statement
- obj_res = Resource(obj.name+".object")
+ obj_res = Resource(obj.name+".object", "object")
statements = obj_res.statements
center, radius = self.compute_bounding_sphere(obj)
def export_stub_technique(self):
from .datafile import Resource, Statement
- tech_res = Resource("stub.tech")
+ tech_res = Resource("stub.tech", "technique")
pass_st = Statement("pass", "")
tech_res.statements.append(pass_st)
mat_st = Statement("material")