Editing object through python and visibility issues

With collection “hide viewport” and collection “disabled” state, it’s pretty hard to figure when it is possible to edit objects through python.
Looks like object.visible_set(state=True) is not enough to ensure object are editable.

The API should provide simple way to ensure that objects are editable.
As it is we must ensure object + nested collections visibility state are on (beside the “disabled” state) making the whole process a bit hard to handle.

Bmesh module allow editing hidden objects (and most low level ways of edit) so at some point the root issue lie in poll methods not allowing invisible objects to be edited, where there is no real technical reason to prevent this - but this is another topic.

1 Like