Forráskód Böngészése

load scene outline

Sergiu 10 hónapja
szülő
commit
0bd499f63f

+ 34 - 38
03_blender/sd_blender/__init__.py

@@ -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
 

BIN
03_blender/sd_blender/__pycache__/__init__.cpython-310.pyc


+ 1 - 1
03_blender/sd_blender/mklink_40.bat

@@ -1,4 +1,4 @@
-mklink /J "C:\Users\hulpe\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\zs_scene_manager_addon" "D:\Git\zs_scene_manager_addon"
+mklink /J "C:\Users\hulpe\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\zs_sd_blender" "D:\Git\ap-canvas-creation-module\03_blender\sd_blender"
 
 ECHO\
 ECHO Enter your input string and press ENTER when done.