for i, obj in enumerate(objects):
progress.push_task_slice(obj.name, i, len(objects))
+ res_name = None
res = None
if obj.type=='MESH':
- if not object_exporter:
- from .export_object import ObjectExporter
- object_exporter = ObjectExporter()
- object_exporter.export_object_resources(context, obj, resources, material_atlases, progress)
- res = object_exporter.export_object(obj, resources, progress)
+ res_name = obj.name+".object"
+ if res_name not in resources:
+ if not object_exporter:
+ from .export_object import ObjectExporter
+ object_exporter = ObjectExporter()
+ object_exporter.export_object_resources(context, obj, resources, material_atlases, progress)
+ res = object_exporter.export_object(obj, resources, progress)
elif obj.type=='CAMERA':
- if not camera_exporter:
- from .export_camera import CameraExporter
- camera_exporter = CameraExporter()
- res = camera_exporter.export_camera(obj)
+ res_name = obj.name+".camera"
+ if res_name not in resources:
+ if not camera_exporter:
+ from .export_camera import CameraExporter
+ camera_exporter = CameraExporter()
+ res = camera_exporter.export_camera(obj)
elif obj.type=='ARMATURE':
- if not armature_exporter:
- from .export_armature import ArmatureExporter
- armature_exporter = ArmatureExporter()
- res = armature_exporter.export_armature(context, obj)
+ res_name = obj.name+".arma"
+ if res_name not in resources:
+ if not armature_exporter:
+ from .export_armature import ArmatureExporter
+ armature_exporter = ArmatureExporter()
+ res = armature_exporter.export_armature(context, obj)
if res:
- resources[res.name] = res
+ resources[res_name] = res
dummy_res.create_reference_statement("ref", res)
progress.pop_task()