Files
UnrealEngineUWP/Engine/Source/Editor/PhysicsAssetEditor/Private/SkeletonTreePhysicsItem.h
nick brett 7e1eab27e2 [UE][Feature] RBAN Better Debug Draw - 2nd attempt
- Added Debug Visualization of physics bodies and constraints for RBAN nodes in AnimBP editor
- Added checkboxes to filter debug Visualization to Phat skeleton tree
- Created a new PhysicsAssetRenderSettings class that incorporates the debug rendering and filtering settings from Phat
- Created a new PhysicsAssetRenderUtilities namespace that incorporates the debug rendering and filtering code from Phat
- Synchronize debug visualization of physics bodies and constraints between Phat and AnimBP editors

oringinaly submitted as cl-19242421 but failed on non-unity build so backed out

#rb [at]Chris.Caulfield, [at]Thomas.Sarkanen, [at]Cedric.Caillaud
#preflight 6221e57d335298c3145112d1

#ROBOMERGE-OWNER: nick.brett
#ROBOMERGE-AUTHOR: nick.brett
#ROBOMERGE-SOURCE: CL 19283727 via CL 19295417 via CL 19304854 via CL 19304870
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19347122 by nick brett in ue5-main branch]
2022-03-10 21:02:14 -05:00

49 lines
1.7 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Styling/SlateColor.h"
#include "Input/Reply.h"
#include "Widgets/SWidget.h"
#include "Widgets/Views/STableViewBase.h"
#include "Widgets/Views/STableRow.h"
#include "SkeletonTreeItem.h"
class FSkeletonTreePhysicsItem : public FSkeletonTreeItem
{
public:
SKELETON_TREE_ITEM_TYPE(FSkeletonTreePhysicsItem, FSkeletonTreeItem)
FSkeletonTreePhysicsItem(class UPhysicsAsset* const InPhysicsAsset, const TSharedRef<class ISkeletonTree>& InSkeletonTree);
/** ISkeletonTreeItem interface */
virtual void GenerateWidgetForNameColumn(TSharedPtr< SHorizontalBox > Box, const TAttribute<FText>& FilterText, FIsSelected InIsSelected) override;
virtual TSharedRef< SWidget > GenerateWidgetForDataColumn(const FName& DataColumnName, FIsSelected InIsSelected) override;
virtual FName GetRowItemName() const override { return DisplayName; }
/** UI Callbacks */
virtual void OnToggleItemDisplayed(ECheckBoxState InCheckboxState) = 0;
virtual ECheckBoxState IsItemDisplayed() const = 0;
private:
/** Gets the icon to display for this body */
virtual const FSlateBrush* GetBrush() const = 0;
/** Gets the color to display the item's text */
virtual FSlateColor GetTextColor() const = 0;
/** Gets the tool tip to display on hovering over the item's name */
virtual FText GetNameColumnToolTip() const = 0;
protected:
/** Gets the physics asset render settings for this physics item */
struct FPhysicsAssetRenderSettings* GetRenderSettings() const;
/** Unique ID of the physics asset for this physics item */
uint32 PhysicsAssetPathNameHash;
/** The name of the item in the tree */
FName DisplayName;
};