Post #3210: ![](https://blenderartists.org/user_avatar/blenderartists.org/zelfor/48/844777_2

📋 Metadata

  • Author: roaoao
  • Date: 2020-04-26 05:20:20
  • Type: answer
  • Quality Score: 9/10
  • Reply to: post_03205

🏷️ Tags

macro hotkeys advanced solved

  • Macro Editor
  • Python Scripting
  • Command execution

💬 Content

Zelfor:

Is it possible to make a macro where to restore the “Transform Pivot Point” type?
EX.:
Macro
Line1: Transform Pivot Point = ‘ACTIVE_ELEMENT’
Line2: “command”
Line3: ???

@Zelfor,
This code works in any cases. And you don’t need to create a macro for it. You can use it in any menu (Command tab):

ts = C.scene.tool_settings; pp = ts.transform_pivot_point; ts.transform_pivot_point = 'ACTIVE_ELEMENT'; bpy.ops.pme.timeout(cmd="C.scene.tool_settings.transform_pivot_point = '%s'" % pp); bpy.ops.transform.resize('INVOKE_DEFAULT', True)

❤️ 3 likes


🔗 View on Blender Artists