Skip to content

Commit

Permalink
feat: make Light Panel setup toggleable
Browse files Browse the repository at this point in the history
- defaults to enabled
  • Loading branch information
michael-gh1 committed May 17, 2024
1 parent 012aacd commit 74f935f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions setup_wizard/character_rig_setup/character_rigger_props.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@


class CharacterRiggerPropertyGroup(PropertyGroup):
set_up_lighting_panel: BoolProperty(
name=' Set Up Lighting Panel',
description='Import and Set Up Lighting Panel',
default=True
)
allow_arm_ik_stretch: BoolProperty(
name=' Allow Arm IK Stretch',
description='Allow Arm IK Stretch',
Expand Down
6 changes: 4 additions & 2 deletions setup_wizard/character_rig_setup/character_riggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ def rig_character(self):
character_rigger_props: CharacterRiggerPropertyGroup = self.context.scene.character_rigger_props

# Lighting Panel is an Armature, so it's important this goes after the armature variable initialization above
for modifier in light_vectors_modifiers:
LightingPanel().set_up_lighting_panel(modifier) # Genshin Shader >= v3.4
# Genshin Shader >= v3.4
if character_rigger_props.set_up_lighting_panel:
for modifier in light_vectors_modifiers:
LightingPanel().set_up_lighting_panel(modifier)

# Important that the Armature is selected before performing rigging operations
bpy.ops.object.select_all(action='DESELECT')
Expand Down
1 change: 1 addition & 0 deletions setup_wizard/ui/gi_ui_setup_wizard_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ def draw(self, context):
operator_context='INVOKE_DEFAULT'
)
col = box.column()
col.prop(character_rigger_props, 'set_up_lighting_panel')
col.prop(character_rigger_props, 'allow_arm_ik_stretch')
col.prop(character_rigger_props, 'allow_leg_ik_stretch')
col.prop(character_rigger_props, 'use_arm_ik_poles')
Expand Down

0 comments on commit 74f935f

Please sign in to comment.