in preparing my addon for 2.8 I try to make the necessary collections and move or link objects into them via
I thought the collection_index=n would be the index of bpy.data.collections[n], which you can find by bpy.data.collections.find(“CollectionName”), but its not.
I figured out that bpy.data.collections are reordered alphabetically when a new collection is added or a collection is renamed. But the collection_index key of the move_to_collection function is an index given in order of collection creation. Can someone tell me how to access the collection_index value (preferably by collection name)?