I want to render an image without anti-aliasing. Using the UI, I select the Workbench engine. Then, under Sampling, I set Render to No Anti-Aliasing.

This displays the following commands in the info window:

bpy.context.scene.render.engine = 'BLENDER_WORKBENCH'
bpy.context.scene.render_aa = 'OFF'

When I try the same commands in the console, or in a stand-alone script, I get the following error:

AttributeError: 'Scene' object has no attribute 'render_aa'

Why is the info window lying to me?

Further, how can I turn off anti-aliasing in the Workbench engine with python?


The anti-aliasing for the Workbench engine can be turned off through:

bpy.context.scene.display.render_aa = 'OFF'

The API manual is very helpful for cases where the Python command is unclear. The render_aa property is part of the class bpy.types.SceneDisplay. Searching for this type shows that bpy.context.scene contains a reference to an object of that type.

The reason why the command is displayed incorrectly seems related to T69803. The Python tooltips are incomplete for PropertyGroups because RNA_path_full_property_py_ex()(rna_access.c) doesn't return a full path. This is also the reason why you see Python tooltips with missing parts like bpy.data.scenes["Scene"] ... render_aa for the Render anti-aliasing property in the UI.

TL;DR It's a bug.


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.