本文整理汇总了C++中FEdModeLandscape类的典型用法代码示例。如果您正苦于以下问题:C++ FEdModeLandscape类的具体用法?C++ FEdModeLandscape怎么用?C++ FEdModeLandscape使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FEdModeLandscape类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetEditorMode
void FLandscapeToolKit::Init(const TSharedPtr<IToolkitHost>& InitToolkitHost)
{
auto NameToCommandMap = FLandscapeEditorCommands::Get().NameToCommandMap;
FEdModeLandscape* LandscapeEdMode = GetEditorMode();
TSharedRef<FUICommandList> CommandList = LandscapeEdMode->GetUICommandList();
#define MAP_MODE(ModeName) CommandList->MapAction(NameToCommandMap.FindChecked(ModeName), FUIAction(FExecuteAction::CreateSP(this, &FLandscapeToolKit::OnChangeMode, FName(ModeName)), FCanExecuteAction::CreateSP(this, &FLandscapeToolKit::IsModeEnabled, FName(ModeName)), FIsActionChecked::CreateSP(this, &FLandscapeToolKit::IsModeActive, FName(ModeName))));
MAP_MODE("ToolMode_Manage");
MAP_MODE("ToolMode_Sculpt");
MAP_MODE("ToolMode_Paint");
#undef MAP_MODE
#define MAP_TOOL(ToolName) CommandList->MapAction(NameToCommandMap.FindChecked("Tool_" ToolName), FUIAction(FExecuteAction::CreateSP(this, &FLandscapeToolKit::OnChangeTool, FName(ToolName)), FCanExecuteAction::CreateSP(this, &FLandscapeToolKit::IsToolEnabled, FName(ToolName)), FIsActionChecked::CreateSP(this, &FLandscapeToolKit::IsToolActive, FName(ToolName))));
MAP_TOOL("NewLandscape");
MAP_TOOL("ResizeLandscape");
MAP_TOOL("Sculpt");
MAP_TOOL("Paint");
MAP_TOOL("Smooth");
MAP_TOOL("Flatten");
MAP_TOOL("Ramp");
MAP_TOOL("Erosion");
MAP_TOOL("HydraErosion");
MAP_TOOL("Noise");
MAP_TOOL("Retopologize");
MAP_TOOL("Visibility");
MAP_TOOL("Select");
MAP_TOOL("AddComponent");
MAP_TOOL("DeleteComponent");
MAP_TOOL("MoveToLevel");
MAP_TOOL("Mask");
MAP_TOOL("CopyPaste");
MAP_TOOL("Mirror");
MAP_TOOL("Splines");
#undef MAP_TOOL
#define MAP_BRUSH_SET(BrushSetName) CommandList->MapAction(NameToCommandMap.FindChecked(BrushSetName), FUIAction(FExecuteAction::CreateSP(this, &FLandscapeToolKit::OnChangeBrushSet, FName(BrushSetName)), FCanExecuteAction::CreateSP(this, &FLandscapeToolKit::IsBrushSetEnabled, FName(BrushSetName)), FIsActionChecked::CreateSP(this, &FLandscapeToolKit::IsBrushSetActive, FName(BrushSetName))));
MAP_BRUSH_SET("BrushSet_Circle");
MAP_BRUSH_SET("BrushSet_Alpha");
MAP_BRUSH_SET("BrushSet_Pattern");
MAP_BRUSH_SET("BrushSet_Component");
MAP_BRUSH_SET("BrushSet_Gizmo");
#undef MAP_BRUSH_SET
#define MAP_BRUSH(BrushName) CommandList->MapAction(NameToCommandMap.FindChecked(BrushName), FUIAction(FExecuteAction::CreateSP(this, &FLandscapeToolKit::OnChangeBrush, FName(BrushName)), FCanExecuteAction(), FIsActionChecked::CreateSP(this, &FLandscapeToolKit::IsBrushActive, FName(BrushName))));
MAP_BRUSH("Circle_Smooth");
MAP_BRUSH("Circle_Linear");
MAP_BRUSH("Circle_Spherical");
MAP_BRUSH("Circle_Tip");
#undef MAP_BRUSH
LandscapeEditorWidgets = SNew(SLandscapeEditor, SharedThis(this));
FModeToolkit::Init(InitToolkitHost);
}
示例2: GetEditorMode
void FLandscapeEditorDetails::OnChangeBrush(FName BrushName)
{
FEdModeLandscape* LandscapeEdMode = GetEditorMode();
if (LandscapeEdMode != NULL)
{
LandscapeEdMode->SetCurrentBrush(BrushName);
}
}
示例3: GetEditorMode
void FLandscapeEditorDetailCustomization_MiscTools::OnbUseAutoRotateControlPointChanged(ECheckBoxState NewState)
{
FEdModeLandscape* LandscapeEdMode = GetEditorMode();
if (LandscapeEdMode)
{
LandscapeEdMode->SetbUseAutoRotateOnJoin(NewState == ECheckBoxState::Checked);
}
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:8,代码来源:LandscapeEditorDetailCustomization_MiscTools.cpp
示例4: GetEditorMode
FReply FLandscapeSplineDetails::OnMoveToCurrentLevelButtonClicked()
{
FEdModeLandscape* LandscapeEdMode = GetEditorMode();
if (LandscapeEdMode && LandscapeEdMode->CurrentToolTarget.LandscapeInfo.IsValid() && LandscapeEdMode->CurrentToolTarget.LandscapeInfo->GetCurrentLevelLandscapeProxy(true))
{
LandscapeEdMode->SplineMoveToCurrentLevel();
}
return FReply::Handled();
}
示例5: GetEditorMode
END_SLATE_FUNCTION_BUILD_OPTIMIZATION
FReply FLandscapeEditorDetailCustomization_CopyPaste::OnCopyToGizmoButtonClicked()
{
FEdModeLandscape* LandscapeEdMode = GetEditorMode();
if (LandscapeEdMode != NULL)
{
LandscapeEdMode->CopyDataToGizmo();
}
return FReply::Handled();
}
示例6: GetEditorMode
void FLandscapeEditorDetails::OnChangeTargetLandscape(TWeakObjectPtr<ULandscapeInfo> LandscapeInfo)
{
FEdModeLandscape* LandscapeEdMode = GetEditorMode();
if (LandscapeEdMode)
{
LandscapeEdMode->CurrentToolTarget.LandscapeInfo = LandscapeInfo.Get();
LandscapeEdMode->UpdateTargetList();
// force a Leave and Enter the current tool, in case it has something about the current landscape cached
LandscapeEdMode->SetCurrentTool(LandscapeEdMode->CurrentToolIndex);
if (LandscapeEdMode->CurrentGizmoActor.IsValid())
{
LandscapeEdMode->CurrentGizmoActor->SetTargetLandscape(LandscapeEdMode->CurrentToolTarget.LandscapeInfo.Get());
}
}
}
示例7: GLevelEditorModeTools
bool ALandscapePlaceholder::TeleportTo(const FVector& DestLocation, const FRotator& DestRotation, bool bIsATest /*= false*/, bool bNoCheck /*= false*/)
{
bool bResult = Super::TeleportTo(DestLocation, DestRotation, bIsATest, bNoCheck);
GLevelEditorModeTools().ActivateMode(FBuiltinEditorModes::EM_Landscape);
FEdModeLandscape* EdMode = (FEdModeLandscape*)GLevelEditorModeTools().GetActiveMode(FBuiltinEditorModes::EM_Landscape);
EdMode->UISettings->NewLandscape_Location = GetActorLocation();
EdMode->UISettings->NewLandscape_Rotation = GetActorRotation();
EdMode->SetCurrentTool("NewLandscape");
return bResult;
}
示例8: GetEditorMode
void FLandscapeEditorDetails::CustomizeDetails(IDetailLayoutBuilder& DetailBuilder)
{
FEdModeLandscape* LandscapeEdMode = GetEditorMode();
CommandList = LandscapeEdMode->GetUICommandList();
static const FLinearColor BorderColor = FLinearColor(0.2f, 0.2f, 0.2f, 0.2f);
static const FSlateBrush* BorderStyle = FEditorStyle::GetBrush("DetailsView.GroupSection");
IDetailCategoryBuilder& LandscapeEditorCategory = DetailBuilder.EditCategory("LandscapeEditor", FText::GetEmpty(), ECategoryPriority::TypeSpecific);
LandscapeEditorCategory.AddCustomRow(FText::GetEmpty())
.Visibility(TAttribute<EVisibility>::Create(TAttribute<EVisibility>::FGetter::CreateStatic(&FLandscapeEditorDetails::GetTargetLandscapeSelectorVisibility)))
[
SNew(SComboButton)
.OnGetMenuContent_Static(&FLandscapeEditorDetails::GetTargetLandscapeMenu)
.ButtonContent()
[
SNew(STextBlock)
.Text_Static(&FLandscapeEditorDetails::GetTargetLandscapeName)
]
];
FToolSelectorBuilder ToolBrushSelectorButtons(CommandList, FMultiBoxCustomization::None);
{
FUIAction ToolSelectorUIAction;
//ToolSelectorUIAction.IsActionVisibleDelegate.BindSP(this, &FLandscapeEditorDetails::GetToolSelectorIsVisible);
ToolBrushSelectorButtons.AddComboButton(
ToolSelectorUIAction,
FOnGetContent::CreateSP(this, &FLandscapeEditorDetails::GetToolSelector),
LOCTEXT("ToolSelector", "Tool"),
TAttribute<FText>(this, &FLandscapeEditorDetails::GetCurrentToolName),
LOCTEXT("ToolSelector.Tooltip", "Select Tool"),
TAttribute<FSlateIcon>(this, &FLandscapeEditorDetails::GetCurrentToolIcon)
);
FUIAction BrushSelectorUIAction;
BrushSelectorUIAction.IsActionVisibleDelegate.BindSP(this, &FLandscapeEditorDetails::GetBrushSelectorIsVisible);
ToolBrushSelectorButtons.AddComboButton(
BrushSelectorUIAction,
FOnGetContent::CreateSP(this, &FLandscapeEditorDetails::GetBrushSelector),
LOCTEXT("BrushSelector", "Brush"),
TAttribute<FText>(this, &FLandscapeEditorDetails::GetCurrentBrushName),
LOCTEXT("BrushSelector.Tooltip", "Select Brush"),
TAttribute<FSlateIcon>(this, &FLandscapeEditorDetails::GetCurrentBrushIcon)
);
FUIAction BrushFalloffSelectorUIAction;
BrushFalloffSelectorUIAction.IsActionVisibleDelegate.BindSP(this, &FLandscapeEditorDetails::GetBrushFalloffSelectorIsVisible);
ToolBrushSelectorButtons.AddComboButton(
BrushFalloffSelectorUIAction,
FOnGetContent::CreateSP(this, &FLandscapeEditorDetails::GetBrushFalloffSelector),
LOCTEXT("BrushFalloffSelector", "Falloff"),
TAttribute<FText>(this, &FLandscapeEditorDetails::GetCurrentBrushFalloffName),
LOCTEXT("BrushFalloffSelector.Tooltip", "Select Brush Falloff Type"),
TAttribute<FSlateIcon>(this, &FLandscapeEditorDetails::GetCurrentBrushFalloffIcon)
);
}
LandscapeEditorCategory.AddCustomRow(FText::GetEmpty())
.Visibility(TAttribute<EVisibility>::Create(TAttribute<EVisibility>::FGetter::CreateSP(this, &FLandscapeEditorDetails::GetToolSelectorVisibility)))
[
ToolBrushSelectorButtons.MakeWidget()
];
// Tools:
Customization_NewLandscape = MakeShareable(new FLandscapeEditorDetailCustomization_NewLandscape);
Customization_NewLandscape->CustomizeDetails(DetailBuilder);
Customization_ResizeLandscape = MakeShareable(new FLandscapeEditorDetailCustomization_ResizeLandscape);
Customization_ResizeLandscape->CustomizeDetails(DetailBuilder);
Customization_CopyPaste = MakeShareable(new FLandscapeEditorDetailCustomization_CopyPaste);
Customization_CopyPaste->CustomizeDetails(DetailBuilder);
Customization_MiscTools = MakeShareable(new FLandscapeEditorDetailCustomization_MiscTools);
Customization_MiscTools->CustomizeDetails(DetailBuilder);
// Brushes:
Customization_AlphaBrush = MakeShareable(new FLandscapeEditorDetailCustomization_AlphaBrush);
Customization_AlphaBrush->CustomizeDetails(DetailBuilder);
// Target Layers:
Customization_TargetLayers = MakeShareable(new FLandscapeEditorDetailCustomization_TargetLayers);
Customization_TargetLayers->CustomizeDetails(DetailBuilder);
}