Hello everybody. I’m struggling too trying to make it works.
I try to share my (poor) progress:
#make outliner fullscreen
for window in context.window_manager.windows:
screen = window.screen
for area in screen.areas:
if area.type == 'OUTLINER':
with context.temp_override(window=window, area=area):
bpy.ops.screen.screen_full_area()
#--------------------#
#deselect all
bpy.ops.object.select_all(action='DESELECT')
#select the target layer_collection
coll = bpy.context.view_layer.layer_collection.children[0] #here the target collection, this is an exsample
#make the collection active in the outliner
bpy.context.view_layer.active_layer_collection = coll
#make it editable !! this gives the ERROR!!!!
bpy.ops.outliner.id_operation(type = 'OVERRIDE_LIBRARY_MAKE_EDITABLE')
break
This code seems to correctly select the collection, but when it launch the id_operation it returns:
ret = _op_call(self.idname_py(), None, kw)
TypeError: Converting py args to operator properties: enum “OVERRIDE_LIBRARY_MAKE_EDITABLE” not found in (‘UNLINK’, ‘LOCAL’, ‘SINGLE’, ‘DELETE’, ‘REMAP’, ‘OVERRIDE_LIBRARY_RESET’, ‘OVERRIDE_LIBRARY_RESET_HIERARCHY’, ‘OVERRIDE_LIBRARY_RESYNC_HIERARCHY’, ‘OVERRIDE_LIBRARY_RESYNC_HIERARCHY_ENFORCE’, ‘OVERRIDE_LIBRARY_CLEAR_SINGLE’, ‘OVERRIDE_LIBRARY_CLEAR_HIERARCHY’, ‘COPY’, ‘PASTE’, ‘ADD_FAKE’, ‘CLEAR_FAKE’, ‘RENAME’, ‘SELECT_LINKED’)
This make me think about two options:
(the nice one) The way I’m trying to select the collection is still wrong.
(the bad one) It’s not possibile to do it.
It would be supercool to have this feature, please help! Thanks everybody
P.S:
Could you tell me more about this?
bpy.ops.ed.lib_id_override_editable_toggle()
In witch context should be called?