Post #2613: @roaoao
📋 Metadata
- Author: Julien_Kaspar
- Date: 2019-08-12 13:02:49
- Type:
question - Quality Score: 6/10
- Replies (1): post_02614
🏷️ Tags
macro python-scripting intermediate unsolved
⚙️ Related PME Features
- Macro Editor
- Python Scripting
💬 Content
@roaoao
I’m trying to toggle the active object’s show_in_front property, and set the selected objects to match. In multi-line python it works, but combining them to a single line gives me a syntax error. Any idea why?
Thanks a lot!
ac = bpy.context.object; ac.show_in_front = not ac.show_in_front; for ob in bpy.context.selected_objects: ob.show_in_front = ac.show_in_front