Skip to main content
edited tags
Link
Source Link

Setting clip start and end via python in all workspaces

Using this post, I was able to change the clipping in the current workspace.

Setting camera clip end via Python

I would like all workspaces to have the same clipping. I came up with the following logic, which does not work properly.

min_clip = 1
max_clip = 500
for workspace in bpy.data.workspaces:
            bpy.context.window.workspace = workspace
            for area in bpy.context.screen.areas:
                if area.type == 'VIEW_3D':
                    for space in area.spaces:
                        if space.type == 'VIEW_3D':
                            space.clip_start = min_clip
                            space.clip_end = max_clip

It still only changes the clipping in the Scripting workspace.

Thanks alot