Skip to content

Commit

Permalink
Sample Pytolith loading code
Browse files Browse the repository at this point in the history
  • Loading branch information
num0005 committed Dec 11, 2024
1 parent 0f10310 commit 9c1b76d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "io_scene_halo/packages/Pytolith"]
path = io_scene_halo/packages/Pytolith
url = [email protected]:num0005/Pytolith.git
branch = master
15 changes: 15 additions & 0 deletions io_scene_halo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@
FloatVectorProperty
)

# enable loading packages from "packages"
import pathlib
import os
import sys
root_directory = pathlib.Path(os.path.abspath(__file__)).parent
sys.path.append(str(root_directory/"packages"))

from . import global_ui
from . import file_ass
from . import file_jma
Expand All @@ -60,6 +67,14 @@
from . import file_wrl
from . import misc

# sample code

import sys
from Pytolith import Definitions

defs = Definitions.Definitions()
defs.load_from_xml(r"X:\Halo2TagLayout")

modules = [
global_ui,
file_ass,
Expand Down
1 change: 1 addition & 0 deletions io_scene_halo/packages/Pytolith
Submodule Pytolith added at b82b03

0 comments on commit 9c1b76d

Please sign in to comment.