def add(self, obj: core.Asset):
    if (obj in self.objects_to_blend):
        return self.objects_to_blend[obj]
    (blender_obj, setters) = add_object(obj)
    blender_obj.name = obj.uid
    if hasattr(blender_obj, 'rotation_mode'):
        blender_obj.rotation_mode = 'QUATERNION'
    self.objects_to_blend[obj] = blender_obj
    if isinstance(blender_obj, bpy.types.Object):
        collection = bpy.context.scene.collection.objects
        if (blender_obj not in collection.values()):
            collection.link(blender_obj)
    for (name, setter) in setters.items():
        setter.mapping = self.objects_to_blend
        value = getattr(obj, name)
        if isinstance(value, core.Asset):
            value = self.add(value)
        setter(munch.Munch(owner=obj, new=value, type='init'))
        obj.observe(setter, names=[name])
    obj.destruction_callbacks.append(Destructor([blender_obj]))
    obj.keyframe_callbacks.append(Keyframer(setters))
    return blender_obj
def add(self, obj: core.Asset):
    if (obj in self.objects_to_blend):
        return self.objects_to_blend[obj]
    (blender_obj, setters) = add_object(obj)
    blender_obj.name = obj.uid
    if hasattr(blender_obj, 'rotation_mode'):
        blender_obj.rotation_mode = 'QUATERNION'
    self.objects_to_blend[obj] = blender_obj
    if isinstance(blender_obj, bpy.types.Object):
        collection = bpy.context.scene.collection.objects
        if (blender_obj not in collection.values()):
            collection.link(blender_obj)
    for (name, setter) in setters.items():
        setter.mapping = self.objects_to_blend
        value = getattr(obj, name)
        if isinstance(value, core.Asset):
            value = self.add(value)
        setter(munch.Munch(owner=obj, new=value, type='init'))
        obj.observe(setter, names=[name])
    obj.destruction_callbacks.append(Destructor([blender_obj]))
    obj.keyframe_callbacks.append(Keyframer(setters))
    return blender_obj