If i switch between solid and wireframe mode, i can see in the info window that these commands are invoked :
bpy.data.screens["Layout"].shading.type = 'WIREFRAME'
bpy.data.screens["Layout"].shading.type = 'SOLID'
Now i want to execute this command using python console. So i cut and paste the codes into python console but i got this error :
>>> bpy.data.screens["Layout"].shading.type = 'WIREFRAME'
Traceback (most recent call last):
File "<blender_console>", line 1, in <module>
AttributeError: 'Screen' object has no attribute 'shading'
>>> bpy.data.screens["Layout"].shading.type = 'SOLID'
Traceback (most recent call last):
File "<blender_console>", line 1, in <module>
AttributeError: 'Screen' object has no attribute 'shading'
Does anyone know why ? and what the correct script should i use in python console ?
Thanks