Skip to content

Commit

Permalink
dev_packs_path Preferencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspirata committed Jul 12, 2024
1 parent c4a7f76 commit 0348908
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 9 deletions.
9 changes: 9 additions & 0 deletions Mcblend Source/Preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ class McblendPreferences(AddonPreferences):
subtype="DIR_PATH"
)

dev_packs_path: StringProperty(
name="Dev Resource Packs Folder",
subtype="DIR_PATH"
)

dev_tools: BoolProperty(
name="Dev Tools",
default=False
Expand Down Expand Up @@ -84,5 +89,9 @@ def draw(self, context):
row = box.row()
row.prop(self, "mc_instances_path")

if self.dev_tools:
row = box.row()
row.prop(self, "dev_packs_path")

row = box.row()
row.prop(self, "dev_tools")
32 changes: 23 additions & 9 deletions Mcblend Source/Resource_Packs.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,28 @@ def find_mc():
else:
print("MC instance not found")

default_pack = "Bare Bones 1.21"
default_path = os.path.join(resource_packs_directory, default_pack)
resource_packs[default_pack] = {"path": (default_path),"type": "Texture", "enabled": False}
if Preferences.dev_tools:
dev_resource_packs_directory = Preferences.dev_packs_path
default_pack = "Bare Bones 1.21"
default_path = os.path.join(dev_resource_packs_directory, default_pack)
resource_packs[default_pack] = {"path": (default_path),"type": "Texture", "enabled": False}

default_pack = "Better Emission"
default_path = os.path.join(resource_packs_directory, default_pack)
resource_packs[default_pack] = {"path": (default_path), "type": "PBR", "enabled": True}
default_pack = "Better Emission"
default_path = os.path.join(dev_resource_packs_directory, default_pack)
resource_packs[default_pack] = {"path": (default_path), "type": "PBR", "enabled": True}

default_pack = "Embrace Pixels PBR"
default_path = os.path.join(resource_packs_directory, default_pack)
resource_packs[default_pack] = {"path": (default_path), "type": "PBR", "enabled": True}
default_pack = "Embrace Pixels PBR"
default_path = os.path.join(dev_resource_packs_directory, default_pack)
resource_packs[default_pack] = {"path": (default_path), "type": "PBR", "enabled": True}
else:
default_pack = "Bare Bones 1.21"
default_path = os.path.join(dev_resource_packs_directory, default_pack)
resource_packs[default_pack] = {"path": (default_path),"type": "Texture", "enabled": False}

default_pack = "Better Emission"
default_path = os.path.join(dev_resource_packs_directory, default_pack)
resource_packs[default_pack] = {"path": (default_path), "type": "PBR", "enabled": True}

default_pack = "Embrace Pixels PBR"
default_path = os.path.join(dev_resource_packs_directory, default_pack)
resource_packs[default_pack] = {"path": (default_path), "type": "PBR", "enabled": True}
Binary file modified Mcblend.blend
Binary file not shown.

0 comments on commit 0348908

Please sign in to comment.