Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-09-08 13:27:03 +0300
committerCampbell Barton <campbell@blender.org>2022-09-08 13:32:57 +0300
commit5e2d139ee30d88b474d3e7d65d5ff37d0be086b6 (patch)
tree160ffc1f82463a185d8011d35feb517bc170873b /source/blender/blenkernel/BKE_appdir.h
parent82fc52ffc88142e0fa29335e07595c87c173a3a6 (diff)
Fix Blender as a Python module for WIN32
BKE_appdir_program_path_init would override the module path extracted from the Python module, replacing it with the Python executable. This caused the data files not to be found and the module not to load.
Diffstat (limited to 'source/blender/blenkernel/BKE_appdir.h')
-rw-r--r--source/blender/blenkernel/BKE_appdir.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_appdir.h b/source/blender/blenkernel/BKE_appdir.h
index dcacc2ca7b3..16488bdbf09 100644
--- a/source/blender/blenkernel/BKE_appdir.h
+++ b/source/blender/blenkernel/BKE_appdir.h
@@ -105,8 +105,11 @@ void BKE_appdir_app_templates(struct ListBase *templates);
/**
* Initialize path to program executable.
+ *
+ * \param strict: When true, use `argv0` unmodified (besides making absolute & normalizing).
+ * Otherwise other methods may be used to find the program path, including searching `$PATH`.
*/
-void BKE_appdir_program_path_init(const char *argv0);
+void BKE_appdir_program_path_init(const char *argv0, bool strict);
/**
* Path to executable