1
$\begingroup$

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 ?

Thanks

enter image description here

$\endgroup$
2
$\begingroup$

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
'WIRE'

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'
| improve this answer | |
$\endgroup$

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.