Add basic operator to setup a light env

This commit is contained in:
2024-05-31 10:10:45 +02:00
parent 30531affba
commit e380e894d7
3 changed files with 17 additions and 3 deletions
+3 -2
View File
@@ -4,6 +4,7 @@ from .ui.export import GRAOU_PT_panel
from .operators.outline import ConfigBlendScene
from .operators.exports import ExportForFange
from .operators.misc import MakeBasicCollision
from .operators.lighting import ConfigLighting
from .preference import GRAOU_AddonPreference
from .properties.main import FangeProperties
@@ -20,8 +21,8 @@ bl_info = {
}
modules_class = [
# Main Property
ExportForFange, MakeBasicCollision, ConfigBlendScene,
# Main operators property
ExportForFange, MakeBasicCollision, ConfigBlendScene, ConfigLighting,
# UI
GRAOU_PT_panel,
# Preference
+12
View File
@@ -0,0 +1,12 @@
import bpy
class ConfigLighting(bpy.types.Operator):
"""Add or conform a lighting build"""
bl_idname = 'graou.lighting'
bl_label = 'Config or update a lighting'
def execute(self, context):
print(f'[Pipeline] Start lighting operator')
return {'FINISHED'}
+2 -1
View File
@@ -1,5 +1,5 @@
import bpy
import os
# import os
# from pathlib import Path
#
@@ -31,6 +31,7 @@ class GRAOU_PT_panel(bpy.types.Panel):
col.label(text='Main Config:')
col.operator('graou.build_scene', text='Init Scene', icon='OUTLINER')
col.prop(context.scene.graou_props, 'socket_collection', text='Use socket', toggle=True)
col.operator('graou.lighting', text='Set basic lighting', icon='OUTLINER_OB_LIGHT')
layout.separator()