mirror of
https://github.com/sinbad/StevesUEHelpers.git
synced 2025-02-23 09:35:25 +00:00
Default to using the lowest LOD for mesh vis
This commit is contained in:
parent
e210759e7b
commit
047d90d66b
@ -111,7 +111,7 @@ FPrimitiveSceneProxy* UStevesEditorVisComponent::CreateSceneProxy()
|
|||||||
if (IsValid(Mesh.Mesh))
|
if (IsValid(Mesh.Mesh))
|
||||||
{
|
{
|
||||||
const FTransform CombinedXForm = FTransform(Mesh.Rotation, Mesh.Location, Mesh.Scale) * XForm;
|
const FTransform CombinedXForm = FTransform(Mesh.Rotation, Mesh.Location, Mesh.Scale) * XForm;
|
||||||
const FStaticMeshLODResources& Lod = Mesh.Mesh->GetLODForExport(0);
|
const FStaticMeshLODResources& Lod = Mesh.Mesh->GetLODForExport(Mesh.bUseLowestLOD ? Mesh.Mesh->GetNumLODs() - 1 : 0);
|
||||||
TArray<FDynamicMeshVertex> Vertices;
|
TArray<FDynamicMeshVertex> Vertices;
|
||||||
TArray<uint32> Indices;
|
TArray<uint32> Indices;
|
||||||
|
|
||||||
|
@ -263,17 +263,22 @@ struct STEVESUEHELPERS_API FStevesEditorVisMesh
|
|||||||
/// The colour of the line render
|
/// The colour of the line render
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
FColor Colour;
|
FColor Colour;
|
||||||
|
/// Whether to use the lowest detail LOD for vis
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
bool bUseLowestLOD = true;
|
||||||
|
|
||||||
FStevesEditorVisMesh(UStaticMesh* InMesh,
|
FStevesEditorVisMesh(UStaticMesh* InMesh,
|
||||||
const FVector& InLocation,
|
const FVector& InLocation,
|
||||||
const FVector& InScale,
|
const FVector& InScale,
|
||||||
const FRotator& InRot,
|
const FRotator& InRot,
|
||||||
const FColor& InColour) :
|
const FColor& InColour,
|
||||||
|
bool InUseLowestLOD = true) :
|
||||||
Mesh(InMesh),
|
Mesh(InMesh),
|
||||||
Location(InLocation),
|
Location(InLocation),
|
||||||
Scale(InScale),
|
Scale(InScale),
|
||||||
Rotation(InRot),
|
Rotation(InRot),
|
||||||
Colour(InColour)
|
Colour(InColour),
|
||||||
|
bUseLowestLOD(InUseLowestLOD)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user