Refactoring model inside properties

Make a Property Group for blender
This commit is contained in:
2024-05-12 18:15:19 +02:00
parent 1f7d5b40e8
commit 4f539912eb
6 changed files with 17 additions and 3 deletions
+5 -1
View File
@@ -24,7 +24,7 @@ modules_class = [
# UI # UI
GRAOU_PT_panel, GRAOU_PT_panel,
# Preference # Preference
GRAOU_AddonPreference GRAOU_AddonPreference, FangeProperties
] ]
@@ -32,11 +32,15 @@ def register():
for cls in modules_class: for cls in modules_class:
bpy.utils.register_class(cls) bpy.utils.register_class(cls)
bpy.types.Scene.graou_props = bpy.props.PointerProperty(type=FangeProperties)
def unregister(): def unregister():
for cls in reversed(modules_class): for cls in reversed(modules_class):
bpy.utils.unregister_class(cls) bpy.utils.unregister_class(cls)
del bpy.types.Scene.graou_props
if __name__ == "__main__": if __name__ == "__main__":
register() register()
+1 -1
View File
@@ -1,6 +1,6 @@
import bpy import bpy
from ..models import FangeProject from ..properties.models import FangeProject
from pathlib import Path from pathlib import Path
+1 -1
View File
@@ -1,6 +1,6 @@
import bpy import bpy
from ..models import Outline from ..properties.models import Outline
class ConfigBlendScene(bpy.types.Operator): class ConfigBlendScene(bpy.types.Operator):
+10
View File
@@ -0,0 +1,10 @@
import bpy
class FangeProperties(bpy.types.PropertyGroup):
socket_collection: bpy.props.BoolProperty(
name='State Socket use',
description='Use the socket collection setup',
default=False
)