Files
UnrealEngineUWP/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/PropertySets/WeightMapSetProperties.h
michael balzer a49c74b915 MeshModelingToolset: Move ModelingOperators and ModelingOperatorsEditorOnly modules out of experimental plugin
#jira UETOOL-3823
#rb lonnie.li
#preflight 617b1aea5794a500014f544a

#ROBOMERGE-AUTHOR: michael.balzer
#ROBOMERGE-SOURCE: CL 17972239 in //UE5/Release-5.0/... via CL 17972248
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17972256 by michael balzer in ue5-release-engine-test branch]
2021-10-28 19:47:45 -04:00

46 lines
1.4 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "InteractiveTool.h"
#include "WeightMapSetProperties.generated.h"
struct FMeshDescription;
/**
* Basic Tool Property Set that allows for selecting from a list of FNames (that we assume are Weight Maps)
*/
UCLASS()
class MODELINGCOMPONENTS_API UWeightMapSetProperties : public UInteractiveToolPropertySet
{
GENERATED_BODY()
public:
/** Select vertex weight map. If configured, the weight map value will be sampled to modulate displacement intensity. */
UPROPERTY(EditAnywhere, Category = WeightMap, meta = (GetOptions = GetWeightMapsFunc))
FName WeightMap;
// this function is called provide set of available weight maps
UFUNCTION()
TArray<FString> GetWeightMapsFunc();
// internal list used to implement above
UPROPERTY(meta = (TransientToolProperty))
TArray<FString> WeightMapsList;
UPROPERTY(EditAnywhere, Category = WeightMap)
bool bInvertWeightMap = false;
// set list of weightmap FNames explicitly. Adds "None" as first option.
void InitializeWeightMaps(const TArray<FName>& WeightMapNames);
// set list of weightmap FNames based on per-vertex float attributes in MeshDescription. Adds "None" as first option.
void InitializeFromMesh(const FMeshDescription* Mesh);
// return true if any option other than "None" is selected
bool HasSelectedWeightMap() const;
};