objects = context.context.selected_objects
resources = {}
- material_atlases = {}
task = ctx.task("Exporting resources", 1.0)
- dummy_res = self.export_resources(task, objects, resources, material_atlases)
+ dummy_res = self.export_resources(task, objects, resources)
path, base = os.path.split(out_fn)
base, ext = os.path.splitext(base)
for r in refs:
r.write_to_file(os.path.join(path, r.name))
- def export_resources(self, ctx, objects, resources, material_atlases):
- if material_atlases is None:
- material_atlases = {}
-
+ def export_resources(self, ctx, objects, resources):
object_exporter = None
camera_exporter = None
armature_exporter = None
if not object_exporter:
from .export_object import ObjectExporter
object_exporter = ObjectExporter()
- object_exporter.export_object_resources(task, obj, resources, material_atlases)
+ object_exporter.export_object_resources(task, obj, resources)
res = object_exporter.export_object(obj, resources)
elif obj.type=='CAMERA':
res_name = obj.name+".camera"
class ProjectExporter:
def export_to_directory(self, ctx, out_dir):
- from .scene import create_scene_chain
+ from .scene import create_scene, create_scene_chain
task = ctx.task("Preparing scenes", 0.0)
task.set_slices(len(ctx.context.blend_data.scenes))
all_objects = []
for s in scenes.values():
- all_objects += s.prototypes
+ all_objects += [p.object for p in s.prototypes]
all_objects += s.lights
if s.camera:
all_objects.append(s.camera)
task = ctx.task("Exporting resources", 1.0)
resources = {}
- dummy_res = data_exporter.export_resources(task, all_objects, resources, None)
+ dummy_res = data_exporter.export_resources(task, all_objects, resources)
task = ctx.task("Exporting scenes", 1.0)
for s in ordered_scenes: