Updated generation pages.
This commit is contained in:
@@ -213,11 +213,12 @@ def register_routes(app):
|
||||
combined_data['participants'] = action_obj.data.get('participants', {}) # Add participants
|
||||
|
||||
# Aggregate pose-related fields into 'pose'
|
||||
pose_fields = ['full_body', 'arms', 'hands', 'torso', 'pelvis', 'legs', 'feet']
|
||||
pose_fields = ['base', 'upper_body', 'lower_body', 'hands', 'feet']
|
||||
pose_parts = [action_data.get(k) for k in pose_fields if action_data.get(k)]
|
||||
|
||||
# Aggregate expression-related fields into 'expression'
|
||||
expression_parts = [action_data.get(k) for k in ['head', 'eyes'] if action_data.get(k)]
|
||||
expression_parts = [action_data.get('head', '')]
|
||||
expression_parts = [p for p in expression_parts if p]
|
||||
|
||||
combined_data['defaults'] = {
|
||||
'pose': ", ".join(pose_parts),
|
||||
@@ -245,12 +246,13 @@ def register_routes(app):
|
||||
# Fallback to sensible defaults if still empty (no checkboxes and no action defaults)
|
||||
selected_fields = ['special::name', 'defaults::pose', 'defaults::expression']
|
||||
# Add identity fields
|
||||
for key in ['base_specs', 'hair', 'eyes']:
|
||||
for key in ['base', 'head']:
|
||||
if character.data.get('identity', {}).get(key):
|
||||
selected_fields.append(f'identity::{key}')
|
||||
# Add wardrobe fields
|
||||
from utils import _WARDROBE_KEYS
|
||||
wardrobe = character.get_active_wardrobe()
|
||||
for key in ['full_body', 'headwear', 'top', 'bottom', 'legwear', 'footwear', 'hands', 'gloves', 'accessories']:
|
||||
for key in _WARDROBE_KEYS:
|
||||
if wardrobe.get(key):
|
||||
selected_fields.append(f'wardrobe::{key}')
|
||||
|
||||
@@ -261,11 +263,12 @@ def register_routes(app):
|
||||
action_data = action_obj.data.get('action', {})
|
||||
|
||||
# Aggregate pose-related fields into 'pose'
|
||||
pose_fields = ['full_body', 'arms', 'hands', 'torso', 'pelvis', 'legs', 'feet']
|
||||
pose_fields = ['base', 'upper_body', 'lower_body', 'hands', 'feet']
|
||||
pose_parts = [action_data.get(k) for k in pose_fields if action_data.get(k)]
|
||||
|
||||
# Aggregate expression-related fields into 'expression'
|
||||
expression_parts = [action_data.get(k) for k in ['head', 'eyes'] if action_data.get(k)]
|
||||
expression_parts = [action_data.get('head', '')]
|
||||
expression_parts = [p for p in expression_parts if p]
|
||||
|
||||
combined_data = {
|
||||
'character_id': action_obj.action_id,
|
||||
@@ -312,7 +315,7 @@ def register_routes(app):
|
||||
|
||||
# Identity
|
||||
ident = extra_char.data.get('identity', {})
|
||||
for key in ['base_specs', 'hair', 'eyes', 'extra']:
|
||||
for key in ['base', 'head', 'additional']:
|
||||
val = ident.get(key)
|
||||
if val:
|
||||
# Remove 1girl/solo
|
||||
@@ -320,8 +323,9 @@ def register_routes(app):
|
||||
extra_parts.append(val)
|
||||
|
||||
# Wardrobe (active outfit)
|
||||
from utils import _WARDROBE_KEYS
|
||||
wardrobe = extra_char.get_active_wardrobe()
|
||||
for key in ['top', 'headwear', 'legwear', 'footwear', 'accessories']:
|
||||
for key in _WARDROBE_KEYS:
|
||||
val = wardrobe.get(key)
|
||||
if val:
|
||||
extra_parts.append(val)
|
||||
@@ -531,8 +535,8 @@ def register_routes(app):
|
||||
"action_id": safe_slug,
|
||||
"action_name": name,
|
||||
"action": {
|
||||
"full_body": "", "head": "", "eyes": "", "arms": "", "hands": "",
|
||||
"torso": "", "pelvis": "", "legs": "", "feet": "", "additional": ""
|
||||
"base": "", "head": "", "upper_body": "", "lower_body": "",
|
||||
"hands": "", "feet": "", "additional": ""
|
||||
},
|
||||
"lora": {"lora_name": "", "lora_weight": 1.0, "lora_triggers": ""},
|
||||
"tags": []
|
||||
|
||||
Reference in New Issue
Block a user