Post #2821: : post_02935
š·ļø Tags
āļø Related PME Features
- Python Scripting
- Macro Editor
š¬ Content
Sergey_Kritskiy:
Iād like to share the same pie menu that calls for external
.pyscripts between two my machines, but paths to scripts are different due to Dropbox setup. Is it possible to use OS environmental variables inexecute_script("")? So instead ofexecute_script("D:/Dropbox/script.py")Iād use something likeexecute_script("$BLENDER_SCRIPTS/script.py")
Hi @Sergey_Kritskiy,
Yes, try something like this:
import os; execute_script(os.path.join(os.environ["BLENDER_SCRIPTS"], "script.py"))
ā¤ļø 2 likes