summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2019-07-22 14:02:33 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2019-07-22 14:02:33 +0200
commit31eb116d49a8648a560354c7caa895cc7a8661c5 (patch)
treeb2ccead0e2870cb099092aa81c632ade463add5b /scene
parent6b19da583db5db64185765ccdae497b55ab00534 (diff)
Make `make_header.py` functional when run from any location
This removes the need to `cd` to `scene/resources/default_theme/` to get the expected result.
Diffstat (limited to 'scene')
-rwxr-xr-xscene/resources/default_theme/make_header.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/resources/default_theme/make_header.py b/scene/resources/default_theme/make_header.py
index bd5a723b23..cf0ccf1c3a 100755
--- a/scene/resources/default_theme/make_header.py
+++ b/scene/resources/default_theme/make_header.py
@@ -1,9 +1,14 @@
#!/usr/bin/env python
import glob
+import os
enc = "utf-8"
+# Change to the directory where the script is located,
+# so that the script can be run from any location
+os.chdir(os.path.dirname(os.path.realpath(__file__)))
+
# Generate include files
f = open("theme_data.h", "wb")