Skip to content

Commit e88acf4

Browse files
committed
Fix the import path in the Python API
1 parent d0a2dd7 commit e88acf4

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

source/changelog.jai

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ PRIZM_VERSION_0_11_0 :: Version.{"0.11.0", "WIP", #string DONE
6161
* TODO Update compiler and SDL version!
6262
DONE};
6363

64+
PRIZM_VERSION_0_10_1 :: Version.{"0.10.1", "14 May 2024", #string DONE
65+
* Fixes to the Python API
66+
67+
* Fixed the import path generated by the "Prism > Tools > API > Python > Copy import lines" button
68+
DONE};
69+
6470
PRIZM_VERSION_0_10_0 :: Version.{"0.10.0", "13 May 2024", #string DONE
6571
* Added a Python API for OBJ authoring with Prizm extensions
6672
@@ -710,6 +716,7 @@ DONE
710716
init_changelog :: () {
711717
//array_add(*changelog, PRIZM_VERSION_BACKLOGGED);
712718
//array_add(*changelog, PRIZM_VERSION_0_11_0);
719+
array_add(*changelog, PRIZM_VERSION_0_10_1);
713720
array_add(*changelog, PRIZM_VERSION_0_10_0);
714721
array_add(*changelog, PRIZM_VERSION_0_9_3);
715722
array_add(*changelog, PRIZM_VERSION_0_9_2);

source/ui.jai

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1543,13 +1543,15 @@ show_python_api_ui :: () {
15431543
ImGui.Checkbox("Use import aliases", *app.api.using_python_import_aliases);
15441544
show_tooltip("Enable to this use `from prizm import ...`\nwhich is will save you some typing");
15451545

1546+
exe_directory := get_directory(get_path_of_running_executable());
1547+
15461548
modify :: (import : *string, line : string) {
15471549
import.* = join(import.*, line,, temp);
15481550
}
15491551

15501552
import : string;
15511553
modify(*import, "import sys\n");
1552-
modify(*import, "sys.path.append(\"C:/Dev/Prizm/api/python\")\n");
1554+
modify(*import, tprint("sys.path.append(\"%/api/python\")\n", exe_directory));
15531555
if app.api.using_python_import_aliases {
15541556
modify(*import, "from prizm import Obj, Vec2, Vec3, Vec4, Color, documentation\n");
15551557
} else {

0 commit comments

Comments
 (0)