Post #5599: That’s a good idea.
📋 Metadata
- Author: Pluglug
- Date: 2025-09-17 20:27:20
- Type:
answer - Quality Score: 8/10
- Reply to: post_05598
- Replies (2): post_05600, post_05601
🏷️ Tags
⚙️ Related PME Features
- Macro Editor
- Python Scripting
💬 Content
That’s a good idea.
However, you’re confusing it with bpy.ops.
With bpy.ops, you can control the undo flag with a boolean argument.
bpy.ops.some_operator('INVOKE_DEFAULT', False)
https://docs.blender.org/api/current/bpy.ops.html#keywords-and-positional-arguments
But execute_script() is not bpy.ops, it’s a utility within PME. It simply executes a script and returns True.
As an advanced technique, if you want to call a PME macro without undo, it would be like this:
bpy.ops.pme.macro_something(False, PME_OT_macro_exec1={"cmd":"execute_script(\"foo.py\")"})