Refactor clothing visuals

This commit is contained in:
2026-05-29 22:54:28 +03:00
parent 4405324095
commit cf40321d3a
11 changed files with 187 additions and 481 deletions
@@ -12,6 +12,7 @@
#include "NakedDesire/Censorship/CensorshipComponent.h"
#include "NakedDesire/Clothing/ClothingItemDefinition.h"
#include "NakedDesire/Clothing/ClothingItemInstance.h"
#include "NakedDesire/Clothing/ClothingVisualsComponent.h"
#include "NakedDesire/Global/Constants.h"
#include "NakedDesire/Global/NakedDesireHUD.h"
#include "NakedDesire/Global/NakedDesireUserSettings.h"
@@ -33,42 +34,7 @@ ANakedDesireCharacter::ANakedDesireCharacter()
StatsManager = CreateDefaultSubobject<UStatsManager>("Stats Manager");
MissionsManager = CreateDefaultSubobject<UMissionsManager>("Missions Manager");
NipplesMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Nipples");
NipplesMeshComponent->SetupAttachment(GetMesh());
AnalMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Anal");
AnalMeshComponent->SetupAttachment(GetMesh());
VaginaMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Vagina");
VaginaMeshComponent->SetupAttachment(GetMesh());
HeadMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Head");
HeadMeshComponent->SetupAttachment(GetMesh());
NeckMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Neck");
NeckMeshComponent->SetupAttachment(GetMesh());
FaceMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Face");
FaceMeshComponent->SetupAttachment(GetMesh());
EyesMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Eyes");
EyesMeshComponent->SetupAttachment(GetMesh());
BodySuitMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Body Suit");
BodySuitMeshComponent->SetupAttachment(GetMesh());
TopMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Top");
TopMeshComponent->SetupAttachment(GetMesh());
BottomMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Bottom");
BottomMeshComponent->SetupAttachment(GetMesh());
UnderwearTopMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Underwear Top");
UnderwearTopMeshComponent->SetupAttachment(GetMesh());
UnderwearBottomMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Underwear Bottom");
UnderwearBottomMeshComponent->SetupAttachment(GetMesh());
SocksMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Socks");
SocksMeshComponent->SetupAttachment(GetMesh());
FootwearMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Footwear");
FootwearMeshComponent->SetupAttachment(GetMesh());
OuterwearMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Outerwear");
OuterwearMeshComponent->SetupAttachment(GetMesh());
WristRestraintMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Wrist Restraint");
WristRestraintMeshComponent->SetupAttachment(GetMesh());
AnkleRestraintMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Ankle Restraint");
AnkleRestraintMeshComponent->SetupAttachment(GetMesh());
NeckRestraintMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>("Neck Restraint");
NeckRestraintMeshComponent->SetupAttachment(GetMesh());
ClothingVisualsComponent = CreateDefaultSubobject<UClothingVisualsComponent>(TEXT("Clothing Visuals Component"));
BoobLCensorship = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Boob L Censorship"));
BoobLCensorship->SetupAttachment(GetMesh(), FName(TEXT("boob_l")));
@@ -157,7 +123,8 @@ void ANakedDesireCharacter::BeginPlay()
StimuliSourceComponent->RegisterWithPerceptionSystem();
// Initialize after Super::BeginPlay so clothing hydration has populated the
// equipped set; the component recomputes censorship from that final state.
// equipped set; both components sync from that final state.
ClothingVisualsComponent->Initialize(GetMesh(), ClothingManager);
CensorshipComponent->Initialize(ClothingManager, BoobLCensorship, BoobRCensorship, VaginaCensorship, AnalCensorship);
HUD = Cast<ANakedDesireHUD>(UGameplayStatics::GetPlayerController(GetWorld(), 0)->GetHUD());