I saw that Blender 2.79 has the ability to save objects in properties using their id's. However, due to the limited documentation i can't figure out what i am doing wrong. I have included the code and the release notes where i found it below. Any help would be awesome!
class MyPropertyGroup(bpy.types.PropertyGroup):
custom_1 = bpy.types.Object
custom_2 = bpy.props.IntProperty(name="My Int")
bpy.utils.register_class(MyPropertyGroup)
bpy.types.Scene.id_objects = PointerProperty(type=MyPropertyGroup)
# Call doesn't work
bpy.context.scene.id_objects.custom_1 = bpy.data.objects[0]
https://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.79/PythonAPI#Blender_2.79:_Python_API