I want to set object to be as textured or wire like in

Property/object/viewport Display/Display as ..

How to do this using python ?


enter image description here


Mouse over see the property test in console

enter image description here Make sure python tooltips and developer extras is checked

Mousing over the desired field..

python: Object.display_type

Testing in the console

>>> C.object.display_type

Get it deliberately wrong to see what options are available.

>>> C.object.display_type = 'XXX'
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
TypeError: bpy_struct: item.attr = val: enum "XXX" not found
         in ('BOUNDS', 'WIRE', 'SOLID', 'TEXTURED')

>>> C.object.display_type = 'SOLID'

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.