You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- add support for VertexColor shader mode in EMeshEditingMaterialModes, handle in sculpt tools - MeshSculptToolBase: add ability to hide view and brushop properties, add ability to show surface or volumetric indicator, add tracking of last-hit triangle ID - add UPolygroupLayersProperties, standard property set for listing and picking from available Polygroup layers for a mesh - add MeshGroupPaintTool, uses above extensions to allow for painting per-triangle integer polygroups #rb none #rnx #jira none [CL 14861461 by Ryan Schmidt in ue5-main branch]
43 lines
1.0 KiB
C++
43 lines
1.0 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "PropertySets/PolygroupLayersProperties.h"
|
|
#include "DynamicMesh3.h"
|
|
#include "DynamicMeshAttributeSet.h"
|
|
|
|
|
|
void UPolygroupLayersProperties::InitializeGroupLayers(const FDynamicMesh3* Mesh)
|
|
{
|
|
GroupLayersList.Add(TEXT("Default")); // always have standard group
|
|
if (Mesh->Attributes())
|
|
{
|
|
for (int32 k = 0; k < Mesh->Attributes()->NumPolygroupLayers(); k++)
|
|
{
|
|
FName Name = Mesh->Attributes()->GetPolygroupLayer(k)->GetName();
|
|
GroupLayersList.Add(Name.ToString());
|
|
}
|
|
}
|
|
|
|
if (GroupLayersList.Contains(ActiveGroupLayer.ToString()) == false) // discard restored value if it doesn't apply
|
|
{
|
|
ActiveGroupLayer = FName(GroupLayersList[0]);
|
|
}
|
|
}
|
|
|
|
|
|
bool UPolygroupLayersProperties::HasSelectedPolygroup() const
|
|
{
|
|
return ActiveGroupLayer != FName(GroupLayersList[0]);
|
|
}
|
|
|
|
|
|
void UPolygroupLayersProperties::SetSelectedFromPolygroupIndex(int32 Index)
|
|
{
|
|
if (Index < 0)
|
|
{
|
|
ActiveGroupLayer = FName(GroupLayersList[0]);
|
|
}
|
|
else
|
|
{
|
|
ActiveGroupLayer = FName(GroupLayersList[Index+1]);
|
|
}
|
|
} |