summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-07-22 21:37:25 +0200
committerGitHub <noreply@github.com>2019-07-22 21:37:25 +0200
commitd8d85762c4416ed383a33825dc3dd37b4fe15a9f (patch)
tree48e68bf6e87f7c67e5072c11d85765c365b63078
parenta36e09f39881fee2fe2da7ed89b76330202834bf (diff)
parent31eb116d49a8648a560354c7caa895cc7a8661c5 (diff)
Merge pull request #30753 from Calinou/make-header-run-from-any-location
Make `make_header.py` functional when run from any location
-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")