generated from stilobique/BlenderTemplate
Refactoring model inside properties
Make a Property Group for blender
This commit is contained in:
@@ -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,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,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):
|
||||||
|
|||||||
@@ -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
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user