Post #3611:
Ju
📋 Metadata
- Author: blndrusr
- Date: 2020-10-07 17:18:38
- Type:
answer - Quality Score: 8/10
🏷️ Tags
v1-18-7 macro scripting intermediate solved
⚙️ Related PME Features
- Macro Editor
- Property Editor
- Python Scripting
💬 Content
JustRon:
Also, without using python, is it possible to save states for tools in a macro so they can be retrieved later? For example, save the current snap settings, change them to something different, do something else and apply the original settings again.
Check these two posts:
Pie Menu Editor 1.18.7 Released Scripts and Themes
Yes, they will be lost after restart. If you want to save data in blend file add a new Property item and press Store in … button in advanced settings. Select Scene for example. To access the data use this code: C.scene.MyProperty C.scene.MyProperty = “My Value”
Pie Menu Editor 1.18.7 Released Scripts and Themes
You can store your variables in pme.context.globals dict: pme.context.globals.get(“my_var_name”, “my_default_value”) pme.context.globals.update(my_var_name=“my_value”)