|  | @@ -9,27 +9,8 @@ if "bpy" in locals():
 | 
	
		
			
				|  |  |      import bpy
 | 
	
		
			
				|  |  |      import importlib
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    from . import zs_renderscene as zsrs
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    importlib.reload(zsrs)
 | 
	
		
			
				|  |  | -    from . import zs_masterscene as zsms
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    importlib.reload(zsms)
 | 
	
		
			
				|  |  | -    from . import zs_renderscene as zsu
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    importlib.reload(zsu)
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    from . import zs_anvil
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    importlib.reload(zs_anvil)
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    from . import zs_deadline
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    importlib.reload(zs_deadline)
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    from . import zs_light_linking
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    importlib.reload(zs_light_linking)
 | 
	
		
			
				|  |  | +    # from . import zs_renderscene as zsrs
 | 
	
		
			
				|  |  | +    # importlib.reload(zsrs)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  # or if this is the first load of this add-on
 | 
	
	
		
			
				|  | @@ -38,17 +19,7 @@ else:
 | 
	
		
			
				|  |  |      import json
 | 
	
		
			
				|  |  |      from pathlib import Path
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    from . import zs_masterscene as zsms  # noqa
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    from . import zs_renderscene as zsrs  # noqa
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    from . import zs_renderscene as zsu  # noqa
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    from . import zs_anvil
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    from . import zs_deadline
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    from . import zs_light_linking
 | 
	
		
			
				|  |  | +    # from . import zs_renderscene as zsrs  # noqa
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  # Addon info
 | 
	
	
		
			
				|  | @@ -63,20 +34,45 @@ bl_info = {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  # -------------------------------------------------------------------
 | 
	
		
			
				|  |  | -# UI Functions
 | 
	
		
			
				|  |  | +# Functions
 | 
	
		
			
				|  |  |  # -------------------------------------------------------------------
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +def load_scene():
 | 
	
		
			
				|  |  | +    print("Loading Scene")
 | 
	
		
			
				|  |  | +    # load scene data
 | 
	
		
			
				|  |  | +    # append products
 | 
	
		
			
				|  |  | +    # append elements
 | 
	
		
			
				|  |  | +    # append shapes
 | 
	
		
			
				|  |  | +    # set lighting
 | 
	
		
			
				|  |  | +    # set camera
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +def append_objects():
 | 
	
		
			
				|  |  | +    print("Appending Objects")
 | 
	
		
			
				|  |  | +    # append objects
 | 
	
		
			
				|  |  | +    # set transforms
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  # -------------------------------------------------------------------
 | 
	
		
			
				|  |  |  # Operators
 | 
	
		
			
				|  |  |  # -------------------------------------------------------------------
 | 
	
		
			
				|  |  | +# load scene operator
 | 
	
		
			
				|  |  | +class ZSSD_OT_LoadScene(bpy.types.Operator):
 | 
	
		
			
				|  |  | +    bl_idname = "zs_sd_loader.load_scene"
 | 
	
		
			
				|  |  | +    bl_label = "Load Scene"
 | 
	
		
			
				|  |  | +    bl_description = "Load Scene"
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    def execute(self, context):
 | 
	
		
			
				|  |  | +        load_scene()
 | 
	
		
			
				|  |  | +        return {"FINISHED"}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  # parent class for panels
 | 
	
		
			
				|  |  |  class ZSSDPanel:
 | 
	
		
			
				|  |  |      bl_space_type = "VIEW_3D"
 | 
	
		
			
				|  |  |      bl_region_type = "UI"
 | 
	
		
			
				|  |  | -    bl_category = "ZS Scene Manager"
 | 
	
		
			
				|  |  | +    bl_category = "ZS SD Loader"
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  # -------------------------------------------------------------------
 | 
	
	
		
			
				|  | @@ -100,6 +96,9 @@ class ZSSD_PT_Main(ZSSDPanel, bpy.types.Panel):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          col.label(text="Stable Diffusion Connection")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +        # load scene button
 | 
	
		
			
				|  |  | +        col.operator("zs_sd_loader.load_scene", text="Load Scene")
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  # modify after making products
 | 
	
		
			
				|  |  |  blender_classes = [
 | 
	
	
		
			
				|  | @@ -113,10 +112,7 @@ def register():
 | 
	
		
			
				|  |  |      for blender_class in blender_classes:
 | 
	
		
			
				|  |  |          bpy.utils.register_class(blender_class)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    # Has to be after class registering to correctly register property
 | 
	
		
			
				|  |  | -    bpy.types.Scene.zs_ll_parameters = bpy.props.CollectionProperty(
 | 
	
		
			
				|  |  | -        type=zs_light_linking.ZS_LL_Parameter, name="Light Linking Parameters"
 | 
	
		
			
				|  |  | -    )
 | 
	
		
			
				|  |  | +    # Has to be afqter class registering to correctly register property
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      # register global properties
 | 
	
		
			
				|  |  |  
 |