1
$\begingroup$

In a previous script I made for 2.79 I could change properties on a particular layout area without having it active:

for area in bpy.data.screens["Animation"].areas:
    if area.type == 'VIEW_3D':
        for spaces in area.spaces:
            if spaces.type == 'VIEW_3D':
                area.spaces.active.clip_start = 0.1

Does anyone know how to achieve this with 2.80 and workspaces?

$\endgroup$

1 Answer 1

4
$\begingroup$

Figured it out thanks to iceythe from blenderartists: https://blenderartists.org/t/access-to-workspace-areas/1137024

for area in bpy.data.workspaces['my_workspace'].screens[0].areas:
    if area.type == 'VIEW_3D':
      for spaces in area.spaces:
          if spaces.type == 'VIEW_3D':
              area.spaces.active.clip_start = 0.1
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .