I'm trying to amend an addon that I made for Blender 2.7X to work with Blender 2.80.
The problem is with
bpy.context.scene.objects.active = some_object
This is how I used to set an active object, the problem is, active property was removed in the new API!,reading other Q&As, I found 2 suggestions:
The problem is, both of these will return the already active object, but when I try to use them this way:
bpy.context.active_object = some_object
bpy.context.object = some_object
I'm getting an AttributeError: property is read-only!
I tried the documentation with no luck!
According to Blender 2.8 WIKI API changes: https://wiki.blender.org/wiki/Dev:2.8/Source/LayersCollections/API-Changes
This doesn't work, AttributeError: 'Context' object has no attribute 'render_layer'