Created
January 2, 2019 13:02
-
-
Save zeffii/a2b5fc2f8f9ddeaec8a28f924728d239 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def setup(): | |
import os, bpy, pathlib | |
path = os.path.dirname(bpy.data.filepath) | |
root = pathlib.Path(bpy.app.binary_path).parent | |
# old way | |
py = os.path.join(root, "2.80", "python", "include") | |
build = os.path.join(path, "build") | |
srcs = os.path.join(path, "voro", "src") | |
print(f'{path}\n{root}\n{py}\n{build}\n{srcs}\n') | |
# using pathlib.Path | |
from pathlib import Path | |
path = Path(bpy.data.filepath).parent | |
root = Path(bpy.app.binary_path).parent | |
py = Path(root) / "2.80" / "python" / "include" | |
build = Path(path) / "build" | |
srcs = Path(path) / "voro" / "src" | |
print(f'{path}\n{root}\n{py}\n{build}\n{srcs}\n') | |
setup() |
Author
zeffii
commented
Jan 3, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment