Skip to content

Commit

Permalink
basic update
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonNordon4 committed Dec 10, 2023
1 parent fa8b40c commit a46c758
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 258 deletions.
205 changes: 0 additions & 205 deletions auto_load.py

This file was deleted.

5 changes: 5 additions & 0 deletions bakelab_bake.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
from os.path import abspath, join, exists

import bakelab_tools
from bakelab_tools import (
SelectObject,
SelectObjects,
IsValidMesh
)

class Baker(Operator):
"""Bake"""
Expand Down
37 changes: 0 additions & 37 deletions bakelab_dev.py

This file was deleted.

27 changes: 12 additions & 15 deletions bakelab_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
script_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, script_dir)

is_dev = True

import bakelab_bake
import bakelab_baked_data
import bakelab_map
Expand All @@ -32,6 +30,16 @@
importlib.reload(bakelab_tools)
importlib.reload(bakelab_ui)
importlib.reload(bakelab_uv)

def reload_modules():
importlib.reload(bakelab_bake)
importlib.reload(bakelab_baked_data)
importlib.reload(bakelab_map)
importlib.reload(bakelab_post)
importlib.reload(bakelab_properties)
importlib.reload(bakelab_tools)
importlib.reload(bakelab_ui)
importlib.reload(bakelab_uv)

classes = (
bakelab_properties.BakeLabProperties,
Expand All @@ -50,21 +58,10 @@
bakelab_baked_data.BakeMapData,
bakelab_baked_data.BakeLab_BakedData,
bakelab_map.BakeLabShowPassPresets,
bakelab_ui.BakeLabUI
bakelab_ui.BakeLabUI,
bakelab_ui.ResetUIOperator
)

if is_dev:
import bakelab_dev
if "bakelab_dev" in locals():
importlib.reload(bakelab_dev)

classes += (
bakelab_dev.ReloadOperator,
bakelab_dev.UninstallOperator,
bakelab_dev.BakeLabDeveloperPanel
)


def register():
print("Registering..")
failed_classes = []
Expand Down
4 changes: 3 additions & 1 deletion bakelab_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
)

class BakeLabUI(Panel):
bl_label = "BakeLab"
bl_label = "BakeLab1"
bl_space_type = 'VIEW_3D'
bl_idname = "BAKELAB_PT_ui"
bl_region_type = 'UI'
Expand Down Expand Up @@ -222,6 +222,7 @@ def draw(self, context):
else:
if props.bake_state == 'BAKING':
layout.label(text = 'Baking', icon = 'RENDER_STILL')

if props.bake_mode == 'INDIVIDUAL':
row = layout.row()
row.label(text = 'Objects:')
Expand Down Expand Up @@ -257,6 +258,7 @@ def draw(self, context):
row.label( text = props.baking_map_type)
layout.template_running_jobs()
layout.operator("bakelab.reset_ui_operator", icon='CANCEL')


elif props.bake_state == 'BAKED':
layout.label(text = 'Baked', icon = 'CHECKMARK')
Expand Down
4 changes: 4 additions & 0 deletions bakelab_uv.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
)

import bakelab_tools
from bakelab_tools import (
SelectObjects,
IsValidMesh
)

def SelectObject(obj):
bpy.ops.object.select_all(action = 'DESELECT')
Expand Down

0 comments on commit a46c758

Please sign in to comment.