How can i add the object to a view layer? I mean not just with code, but even manually how can i do that?
i trying to execute a script and first time it works fine, but second time it gives an error message: Python: Traceback (most recent call last): ******, line 32, in RuntimeError: Error: Object ‘Base_01_Low.001’ can’t be selected because it is not in View Layer ‘ViewLayer’!
here is a screenshot the explains the problem more detailed: https://drive.google.com/file/d/1nqvG02BWha7jubSIPqpV_JD5Ke_TNN8-/view?usp=sharing
and here is the blend file that shows the problem (script included in the text editor): https://drive.google.com/file/d/1eo54H4Jmb4MA8yGPZKIqonkiy2uwD4gT/view?usp=sharing
This error is not happening in every blend file i have, until now only in this one. I also tried removing the ‘state control’ part of hiding showing items, but still getting the same result.
So mainly question is, how can i avoid to get items are not in View Layer? If i can't avoid it, how can i force every item in the scene to be in the View Layer? Even manually solution is fine by me :)