import mathutils
class CameraExporter:
- def export_to_file(self, context, out_fn):
- obj = context.active_object
-
- resource = self.export_camera(obj)
-
- resource.write_to_file(out_fn)
-
def export_camera(self, obj):
if obj.type!='CAMERA':
- raise Exception("Object is not a camera")
+ raise ValueError("Object is not a camera")
from .datafile import Resource, Statement
resource = Resource(obj.name+".camera", "camera")