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$
3
$\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$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.