feat: camera cleanup
This commit is contained in:
@ -31,6 +31,10 @@ class BlCamera(BlDatablock):
|
||||
bl_automatic_push = True
|
||||
bl_icon = 'CAMERA_DATA'
|
||||
|
||||
def _construct(self, data):
|
||||
return bpy.data.cameras.new(data["name"])
|
||||
|
||||
|
||||
def load_implementation(self, data, target):
|
||||
utils.dump_anything.load(target, data)
|
||||
|
||||
@ -40,12 +44,11 @@ class BlCamera(BlDatablock):
|
||||
if dof_settings:
|
||||
utils.dump_anything.load(target.dof, dof_settings)
|
||||
|
||||
def _construct(self, data):
|
||||
return bpy.data.cameras.new(data["name"])
|
||||
|
||||
def dump_implementation(self, data, pointer=None):
|
||||
assert(pointer)
|
||||
|
||||
# TODO: background image support
|
||||
|
||||
dumper = utils.dump_anything.Dumper()
|
||||
dumper.depth = 2
|
||||
dumper.include_filter = [
|
||||
@ -67,6 +70,14 @@ class BlCamera(BlDatablock):
|
||||
'aperture_blades',
|
||||
'aperture_rotation',
|
||||
'aperture_ratio',
|
||||
'display_size',
|
||||
'show_limits',
|
||||
'show_mist',
|
||||
'show_sensor',
|
||||
'show_name',
|
||||
'sensor_fit',
|
||||
'sensor_height',
|
||||
'sensor_width',
|
||||
]
|
||||
return dumper.dump(pointer)
|
||||
|
||||
|
Reference in New Issue
Block a user