refactor: remove asserts()
This commit is contained in:
parent
d293b36f1e
commit
b3ba76614a
@ -46,8 +46,7 @@ class BlCamera(BlDatablock):
|
||||
return dumper.dump(pointer)
|
||||
|
||||
def resolve(self):
|
||||
assert(self.data)
|
||||
self.pointer = bpy.data.cameras.get(self.data['name'])
|
||||
self.pointer = utils.find_from_attr('uuid', self.uuid, bpy.data.cameras)
|
||||
|
||||
def is_valid(self):
|
||||
return bpy.data.cameras.get(self.data['name'])
|
||||
|
@ -46,8 +46,7 @@ class BlCurve(BlDatablock):
|
||||
return data
|
||||
|
||||
def resolve(self):
|
||||
assert(self.data)
|
||||
self.pointer = bpy.data.curves.get(self.data['name'])
|
||||
self.pointer = utils.find_from_attr('uuid', self.uuid, bpy.data.curves)
|
||||
|
||||
def is_valid(self):
|
||||
return bpy.data.curves.get(self.data['name'])
|
||||
|
@ -65,8 +65,7 @@ class BlGpencil(BlDatablock):
|
||||
return data
|
||||
|
||||
def resolve(self):
|
||||
assert(self.data)
|
||||
self.pointer = bpy.data.grease_pencils.get(self.data['name'])
|
||||
self.pointer = utils.find_from_attr('uuid', self.uuid, bpy.data.grease_pencils)
|
||||
|
||||
def resolve_dependencies(self):
|
||||
deps = []
|
||||
|
@ -59,8 +59,7 @@ class BlImage(BlDatablock):
|
||||
return data
|
||||
|
||||
def resolve(self):
|
||||
assert(self.data)
|
||||
self.pointer = bpy.data.images.get(self.data['name'])
|
||||
self.pointer = utils.find_from_attr('uuid', self.uuid, bpy.data.images)
|
||||
|
||||
def diff(self):
|
||||
return False
|
||||
|
@ -18,8 +18,7 @@ class BlLibrary(BlDatablock):
|
||||
return utils.dump_datablock(pointer, 1)
|
||||
|
||||
def resolve(self):
|
||||
assert(self.data)
|
||||
self.pointer = bpy.data.libraries.get(self.data['name'])
|
||||
self.pointer = utils.find_from_attr('uuid', self.uuid, bpy.data.libraries)
|
||||
|
||||
# def diff(self):
|
||||
# return (self.bl_diff())
|
||||
|
@ -40,7 +40,6 @@ class BlLight(BlDatablock):
|
||||
return data
|
||||
|
||||
def resolve(self):
|
||||
assert(self.data)
|
||||
self.pointer = bpy.data.lights.get(self.data['name'])
|
||||
|
||||
def is_valid(self):
|
||||
|
@ -127,7 +127,6 @@ class BlMaterial(BlDatablock):
|
||||
return data
|
||||
|
||||
def resolve(self):
|
||||
assert(self.data)
|
||||
self.pointer = bpy.data.materials.get(self.data['name'])
|
||||
|
||||
def resolve_dependencies(self):
|
||||
|
@ -155,7 +155,6 @@ class BlMesh(BlDatablock):
|
||||
return data
|
||||
|
||||
def resolve(self):
|
||||
assert(self.data)
|
||||
self.pointer = utils.find_from_attr('uuid', self.uuid, bpy.data.meshes)
|
||||
# self.pointer = bpy.data.meshes.get(self.data['name'])
|
||||
|
||||
|
@ -27,7 +27,6 @@ class BlMetaball(BlDatablock):
|
||||
return data
|
||||
|
||||
def resolve(self):
|
||||
assert(self.data)
|
||||
self.pointer = bpy.data.metaballs.get(self.data['name'])
|
||||
|
||||
def is_valid(self):
|
||||
|
@ -96,7 +96,6 @@ class BlObject(BlDatablock):
|
||||
return data
|
||||
|
||||
def resolve(self):
|
||||
assert(self.data)
|
||||
self.pointer = utils.find_from_attr('uuid', self.uuid, bpy.data.objects)
|
||||
# object_name = self.data['name']
|
||||
# try:
|
||||
|
@ -55,7 +55,6 @@ class BlScene(BlDatablock):
|
||||
return data
|
||||
|
||||
def resolve(self):
|
||||
assert(self.data)
|
||||
scene_name = self.data['name']
|
||||
|
||||
self.pointer = bpy.data.scenes.get(scene_name)
|
||||
|
@ -84,8 +84,7 @@ class BlWorld(BlDatablock):
|
||||
return data
|
||||
|
||||
def resolve(self):
|
||||
assert(self.data)
|
||||
self.pointer = bpy.data.worlds.get(self.data['name'])
|
||||
self.pointer = utils.find_from_attr('uuid', self.uuid, bpy.data.worlds)
|
||||
|
||||
def resolve_dependencies(self):
|
||||
deps = []
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 63abb5584fff5f43a313af60ce40953cae72f522
|
||||
Subproject commit e5fa814ef5bc6f9a5987879e06cdd0a33f8f23d6
|
Loading…
x
Reference in New Issue
Block a user