This repository has been archived on 2026-10-29. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
geometry-script/absolute_path.py
2022-11-14 18:31:26 -05:00

9 lines
No EOL
275 B
Python

import os
def absolute_path(component):
"""
Returns the absolute path to a file in the addon directory.
Alternative to `os.abspath` that works the same on macOS and Windows.
"""
return os.path.join(os.path.dirname(os.path.realpath(__file__)), component)