Skip to content

Commit

Permalink
Fixed preset folder setup
Browse files Browse the repository at this point in the history
  • Loading branch information
djmonkeyuk committed Sep 23, 2019
1 parent dd8d541 commit 6716841
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/no_mans_sky_base_builder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@
PointerProperty, StringProperty)
from bpy.types import Operator, Panel, PropertyGroup

BUILDER = builder.Builder()

FILE_PATH = os.path.dirname(os.path.realpath(__file__))
USER_PATH = os.path.join(os.path.expanduser("~"), "NoMansSkyBaseBuilder")
PRESET_PATH = os.path.join(USER_PATH, "presets")

BUILDER = builder.Builder()
GHOSTED_JSON = os.path.join(FILE_PATH, "resources", "ghosted.json")
ghosted_reference = python_utils.load_dictionary(GHOSTED_JSON)
GHOSTED_ITEMS = ghosted_reference["GHOSTED"]
Expand Down Expand Up @@ -1444,6 +1447,11 @@ def execute(self, context):
)

def register():
# Ensure User data folder structure exists
for data_path in [USER_PATH, PRESET_PATH]:
if not os.path.exists(data_path):
os.makedirs(data_path)

# Load Icons.
pcoll = bpy.utils.previews.new()
# path to the folder where the icon is
Expand Down

0 comments on commit 6716841

Please sign in to comment.