2
$\begingroup$

I want to set my render settings to specific configuration , as in the following image

enter image description here

I tried the following script to attempt it

bpy.context.scene.render.engine = 'BLENDER_WORKBENCH'
bpy.context.scene.shading.light = 'MATCAP'
bpy.context.scene.shading.color_type = 'OBJECT'
bpy.context.scene.shading.show_shadows = True

( I just used the script I was getting in the blender console (if that's what we call it), I am new to blender so i just try to replicate the methodology i used in maya I guess things are a bit different here ) from here : enter image description here

But I am getting the following error :

Python: Traceback (most recent call last):
  File "\Text", line 201, in <module>
  File "\Text", line 191, in turnaround
AttributeError: 'Scene' object has no attribute 'shading'

Any help or even reference where I can get this done/look more about it would be really great.

Thanks & Regards

$\endgroup$
3
  • 4
    $\begingroup$ Does this answer your question? API access for workbench render settings $\endgroup$
    – Crantisz
    Jun 23, 2023 at 8:00
  • $\begingroup$ That also seems to be a bug. It should be reported if it isn't yet. Wrong information is displayed. $\endgroup$ Jun 23, 2023 at 8:29
  • $\begingroup$ @Crantisz Yes Thank you $\endgroup$ Jun 23, 2023 at 11:24

1 Answer 1

1
$\begingroup$

I've been struggling with the same issue. You can find the actual command hovering your mouse over the setting in the UI ; for example, I tried bpy.data.scenes["Scene"].render.engine = 'BLENDER_WORKBENCH in the interactive Python console, hit Enter, and it changed my render engine to Workbench. The 'console' you posted an image of shows different commands, I don't know the reason why. It showed nothing when I changed with Python, but when I used my mouse to revert to Cycles, this displayed bpy.context.scene.render.engine = 'CYCLES'...

$\endgroup$

You must log in to answer this question.

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