Post #750: roaoao, I’m trying to make a button to move selected objects to center. It works
📋 Metadata
- Author: yan.kansky
- Date: 2017-06-26 03:13:37
- Type:
question - Quality Score: 7/10
- Reply to: post_00749
- Replies (3): post_00753, post_00757, post_00766
🏷️ Tags
macro python-scripting intermediate unsolved
⚙️ Related PME Features
- Macro Editor
- Python Scripting
💬 Content
roaoao, I’m trying to make a button to move selected objects to center. It works if I type this text in “Command”:
bpy.context.object.location[0] = 0

but for active object only. What do I need to add to the command to make it move not just one but all selected objects to center on one axis?