I created a Python like this
But this code must have a collection called "Background" in the scene from the beginning
I want this.
- If there was no collection called "Background", we would create one with Python and move the selected object
- If the "Background" collection exists, just move it instead of creating a new one
And I'd like to go from ViewPort to Hide I created this code, but I don't know how to specify the "Background"
bpy.context.scene.hide_viewport = True
With just these two lines, I was able to create Empty if it wasn't there and select it if it was there.
I was putting up the wrong code.
bpy.context.scene.exclude = True
When I modified it in this way, I get an error
bg_col.hide_exclude = True