2
$\begingroup$

I'm currently working on a script to help me optimize my viewport for better performance. One way is changing the viewport aa. I have already found the line of code in which I can reference aa:

import bpy

bpy.types.PreferencesSystem.viewport_aa

But I can't figure out how to set a variable. My best guess was:

import bpy

bpy.types.PreferencesSystem.viewport_aa = "FXAA"

When I run that script, I don't get an error but nothing happens either. It's probably something simple I'm missing.

Thanks in advance!

If it helps: Blender API help link

$\endgroup$

1 Answer 1

2
$\begingroup$

This is accessed through the ever intuitive bpy.context.preferences.system.viewport_aa

You should be able to write directly to this variable:

bpy.context.preferences.system.viewport_aa = 'OFF'

for example.

$\endgroup$
1
  • $\begingroup$ This worked, thanks! Unfortunately it looks like I'll have to order a set of keycaps, ctrl, c and v are already starting to wear down...🙄 $\endgroup$
    – Olliboy
    Commented Oct 18, 2021 at 22:19

You must log in to answer this question.

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