void FSsProjectViewerCommands::RegisterCommands()
{
	UI_COMMAND(Play, "Play", "Play SsProject", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(PrevFrame, "PrevFrame", "Back One Frame", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(NextFrame, "NextFrame", "Forward One Frame", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(DrawGrid, "Grid", "Draw Grid", EUserInterfaceActionType::ToggleButton, FInputGesture());
}
void FLogWidgetCommands::RegisterCommands()
{
#if TARGET_UE4_CL < CL_INPUTCHORD
    UI_COMMAND(CopyLogLines, "Copy", "Copies the selected log lines to the clipboard", EUserInterfaceActionType::Button,
               FInputGesture(EModifierKey::Control, EKeys::C));
#else
    UI_COMMAND(CopyLogLines, "Copy", "Copies the selected log lines to the clipboard", EUserInterfaceActionType::Button,
               FInputChord(EModifierKey::Control, EKeys::C));
#endif

#if TARGET_UE4_CL < CL_INPUTCHORD
    UI_COMMAND(FindLogText, "Find", "Find text within the current log window tab", EUserInterfaceActionType::Button,
               FInputGesture(EModifierKey::Control, EKeys::F));
#else
    UI_COMMAND(FindLogText, "Find", "Find text within the current log window tab", EUserInterfaceActionType::Button,
               FInputChord(EModifierKey::Control, EKeys::F));
#endif
}
void FUserDefinedGestures::SetUserDefinedGesture( const FUICommandInfo& CommandInfo )
{
	if( Gestures.IsValid() )
	{
		const FName BindingContext = CommandInfo.GetBindingContext();
		const FName CommandName = CommandInfo.GetCommandName();

		// Find or create the command context
		const FUserDefinedGestureKey GestureKey(BindingContext, CommandName);
		FInputGesture& UserDefinedGesture = Gestures->FindOrAdd(GestureKey);

		// Save an empty invalid gesture if one was not set
		// This is an indication that the user doesn't want this bound and not to use the default gesture
		const TSharedPtr<const FInputGesture> InputGesture = CommandInfo.GetActiveGesture();
		UserDefinedGesture = (InputGesture.IsValid()) ? *InputGesture : FInputGesture();
	}
}
Beispiel #4
0
void FDesignerCommands::RegisterCommands()
{
	UI_COMMAND( LayoutTransform, "Layout Transform Mode", "Adjust widget layout transform", EUserInterfaceActionType::ToggleButton, FInputGesture(EKeys::W) );
	UI_COMMAND( RenderTransform, "Render Transform Mode", "Adjust widget render transform", EUserInterfaceActionType::ToggleButton, FInputGesture(EKeys::E) );

	UI_COMMAND( LocationGridSnap, "Grid Snap", "Enables or disables snapping to the grid when dragging objects around", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( RotationGridSnap, "Rotation Snap", "Enables or disables snapping objects to a rotation grid", EUserInterfaceActionType::ToggleButton, FInputGesture() );
}
void FCurveEditorCommands::RegisterCommands()
{
	UI_COMMAND(RemoveCurve, "Remove Curve", "Remove Curve", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(RemoveAllCurves, "Remove All Curves", "Remove All Curves", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(SetTime, "Set Time", "Set Time", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(SetValue, "Set Value", "Set Value", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(SetColor, "Set Color", "Set Color", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(DeleteKeys, "Delete Key", "Delete Key", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ScaleTimes, "Scale All Times", "Scales the times of all points of all visible tracks", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ScaleValues, "Scale All Values", "Scales the values of all points of all visible tracks", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ScaleSingleCurveTimes, "Scale Curve Times", "Scales the times of all points of this curve & its sub-curves", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ScaleSingleCurveValues, "Scale Curve Values", "Scales the values of all points of this curve & its sub-curves", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ScaleSingleSubCurveValues, "Scale Sub-Curve Values", "Scales the values of all points of this curve", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(FitHorizontally, "Horizontal", "Fit Horizontally", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(FitVertically, "Vertical", "Fit Vertically", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(FitToAll, "All", "Fit to All", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(FitToSelected, "Selected", "Fit to Selected", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(PanMode, "Pan", "Pan Mode", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(ZoomMode, "Zoom", "Zoom Mode", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(CurveAuto, "Auto", "Curve Auto", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(CurveAutoClamped, "Auto/Clamped", "Curve Auto/Clamped", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(CurveUser, "User", "Curve User", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(CurveBreak, "Break", "Curve Break", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(Linear, "Linear", "Linear", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(Constant, "Constant", "Constant", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(FlattenTangents, "Flatten", "Flatten Tangents", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(StraightenTangents, "Straighten", "Straighten Tangents", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ShowAllTangents, "Show All", "ShowAll Tangents", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(CreateTab, "Create", "Create Tab", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(DeleteTab, "Delete", "Delete Tab", EUserInterfaceActionType::Button, FInputGesture());
}
void FShaderEditorCommands::RegisterCommands()
{
	UI_COMMAND(OpenPluginWindow, "ShaderEditor", "Bring up ShaderEditor window", EUserInterfaceActionType::Button, FInputGesture());
}
void FSubstanceEditorCommands::RegisterCommands()
{
	UI_COMMAND(ExportPreset, "Export preset", "Export graph instance values to a substance preset file (.sbsprs).", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ImportPreset, "Import preset", "Import graph instance values from a substance preset file (.sbsprs).", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ResetDefaultValues, "Reset", "Reset graph instance values to default.", EUserInterfaceActionType::Button, FInputGesture());
}
void FSpeedTreeExportCommands::RegisterCommands()
{
	UI_COMMAND(PluginAction, "SpeedTreeExport", "Execute SpeedTreeExport action", EUserInterfaceActionType::Button, FInputGesture());
}
	/**
	 * Registers context menu commands for the blueprint palette.
	 */
	virtual void RegisterCommands() override
	{
		UI_COMMAND(RefreshPalette, "Refresh List", "Refreshes the list of nodes.", EUserInterfaceActionType::Button, FInputGesture());
	}
void FAnimViewportLODCommands::RegisterCommands()
{
	UI_COMMAND( LODAuto, "LOD Auto", "Automatically select LOD", EUserInterfaceActionType::RadioButton, FInputGesture() );
	UI_COMMAND( LOD0, "LOD 0", "Force select LOD 0", EUserInterfaceActionType::RadioButton, FInputGesture() );
	UI_COMMAND( LOD1, "LOD 1", "Force select LOD 1", EUserInterfaceActionType::RadioButton, FInputGesture() );
	UI_COMMAND( LOD2, "LOD 2", "Force select LOD 2", EUserInterfaceActionType::RadioButton, FInputGesture() );
	UI_COMMAND( LOD3, "LOD 3", "Force select LOD 3", EUserInterfaceActionType::RadioButton, FInputGesture() );
}
void FPLUGIN_NAMECommands::RegisterCommands()
{
	UI_COMMAND(PluginAction, "PLUGIN_NAME", "Execute PLUGIN_NAME action", EUserInterfaceActionType::Button, FInputGesture());
}
void FTranslationEditorCommands::RegisterCommands() 
{
	UI_COMMAND( ChangeSourceFont, "Change Source Font", "Change the Font for the Source Lanugage", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( ChangeTranslationTargetFont, "Change Translation Font", "Change the Translation Target Language Font", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( SaveTranslations, "Save", "Saves the translations to file", EUserInterfaceActionType::Button, FInputGesture() );
}
void FFlipbookEditorCommands::RegisterCommands()
{
	UI_COMMAND(SetShowGrid, "Grid", "Displays the viewport grid.", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(SetShowBounds, "Bounds", "Toggles display of the bounds of the static mesh.", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(SetShowCollision, "Collision", "Toggles display of the simplified collision mesh of the static mesh, if one has been assigned.", EUserInterfaceActionType::ToggleButton, FInputGesture(EKeys::C, EModifierKey::Alt));

	UI_COMMAND(SetShowPivot, "Show Pivot", "Display the pivot location of the static mesh.", EUserInterfaceActionType::ToggleButton, FInputGesture());
}
void FAssetEditorCommonCommands::RegisterCommands()
{
	UI_COMMAND( SaveAsset, "Save", "Saves this asset", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( ReimportAsset, "Reimport", "Reimports the asset being edited", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND( SwitchToStandaloneEditor, "Switch to Standalone Editor", "Closes the level-centric asset editor and reopens it in 'standalone' mode", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( SwitchToWorldCentricEditor, "Switch to World-Centric Editor", "Closes the standalone asset editor and reopens it in 'world-centric' mode, docked within the level editor that it was originally opened in.", EUserInterfaceActionType::Button, FInputGesture() );
}
void FPyServerCommands::RegisterCommands()
{
	UI_COMMAND(PluginAction, "PyServer", "Execute PyServer action", EUserInterfaceActionType::Button, FInputGesture());
}
void FAnimViewportShowCommands::RegisterCommands()
{
	UI_COMMAND( ToggleGrid, "Grid", "Display Grid", EUserInterfaceActionType::ToggleButton, FInputGesture() );

	UI_COMMAND( ToggleFloor, "Floor", "Display Floor", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( ToggleSky, "Sky", "Display Sky", EUserInterfaceActionType::ToggleButton, FInputGesture() );

	UI_COMMAND( MuteAudio, "Mute Audio", "Mutes audio from the preview", EUserInterfaceActionType::ToggleButton, FInputGesture() );

	UI_COMMAND(ProcessRootMotion, "Process Root Motion", "Moves preview based on animation root motion", EUserInterfaceActionType::ToggleButton, FInputGesture());

	UI_COMMAND( ShowReferencePose, "Reference Pose", "Show reference pose on preview mesh", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( ShowRetargetBasePose, "Retarget Base Pose", "Show retarget Base pose on preview mesh", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( ShowBound, "Bound", "Show bound on preview mesh", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( ShowPreviewMesh, "Mesh", "Show the preview mesh", EUserInterfaceActionType::ToggleButton, FInputGesture() );

	UI_COMMAND( ShowBones, "Bones", "Display Skeleton in viewport", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( ShowBoneNames, "Bone Names", "Display Bone Names in Viewport", EUserInterfaceActionType::ToggleButton, FInputGesture() );

	// below 3 menus are radio button styles
	UI_COMMAND(ShowDisplayInfoBasic, "Basic", "Display Basic Mesh Info in Viewport", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(ShowDisplayInfoDetailed, "Detailed", "Display Detailed Mesh Info in Viewport", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(HideDisplayInfo, "None", "Hide All Display Info in Viewport", EUserInterfaceActionType::RadioButton, FInputGesture());

	UI_COMMAND( ShowBoneWeight, "View Selected Bone Weight", "Display Selected Bone Weight in Viewport", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( ShowRawAnimation, "Uncompressed Animation", "Display Skeleton With Uncompressed Animation Data", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( ShowNonRetargetedAnimation, "NonRetargeted Animation", "Display Skeleton With non retargeted Animation Data", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( ShowAdditiveBaseBones, "Additive Base", "Display Skeleton In Additive Base Pose", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( ShowSockets, "Sockets", "Display socket hitpoints", EUserInterfaceActionType::ToggleButton, FInputGesture() );

	UI_COMMAND( ShowLocalAxesNone, "None", "Hides all local hierarchy axis", EUserInterfaceActionType::RadioButton, FInputGesture() );
	UI_COMMAND( ShowLocalAxesSelected, "Selected Hierarchy", "Shows only the local bone axis of the selected bones", EUserInterfaceActionType::RadioButton, FInputGesture() );
	UI_COMMAND( ShowLocalAxesAll, "All", "Shows all local hierarchy axes", EUserInterfaceActionType::RadioButton, FInputGesture() );

#if WITH_APEX_CLOTHING
	UI_COMMAND( DisableClothSimulation, "Disable Cloth Simulation", "Disable Cloth Simulation and Show non-simulated mesh", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( ApplyClothWind, "Apply Wind", "Apply Wind to Clothing", EUserInterfaceActionType::ToggleButton, FInputGesture() );

	UI_COMMAND( ShowClothSimulationNormals, "Simulation Normals", "Display Cloth Simulation Normals", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( ShowClothGraphicalTangents, "Graphical Tangents", "Display Cloth Graphical Tangents", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( ShowClothCollisionVolumes, "Collision Volumes", "Display Cloth Collision Volumes", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( EnableCollisionWithAttachedClothChildren, "Collide with Cloth Children", "Enables collision detection between collision primitives in the base mesh and clothing on any attachments in the preview scene.", EUserInterfaceActionType::ToggleButton, FInputGesture() );	

	UI_COMMAND( ShowClothPhysicalMeshWire, "Physical Mesh Wire", "Display Simulation Mesh's wire frame. Shows all physical mesh loaded from an asset file when cloth simulation is disabled and shows simulated results when simulating. The part having zero max distance value will be drawn in pink.", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( ShowClothMaxDistances, "Max Distances", "Display Max Distances only when simulation is disabled. If turned on this option, disables cloth simulation automatically", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( ShowClothBackstop, "Back stops", "Display Back stops. If it has a proper value, draws a line in red. Otherwise, draws a vertex in white.", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( ShowClothFixedVertices, "Fixed Vertices", "Display Fixed Vertices", EUserInterfaceActionType::ToggleButton, FInputGesture() );	

	// below 3 menus are radio button styles
	UI_COMMAND(ShowAllSections, "Show All Sections", "Display All sections including Cloth Mapped Sections", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(ShowOnlyClothSections, "Show Only Cloth Sections", "Display Only Cloth Mapped Sections", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(HideOnlyClothSections, "Hide Only Cloth Sections", "Display All Except Cloth Mapped Sections", EUserInterfaceActionType::RadioButton, FInputGesture());

#endif// #if WITH_APEX_CLOTHING
}
void FTextureEditorCommands::RegisterCommands()
{
	UI_COMMAND(RedChannel, "Red", "Toggles the red channel", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(GreenChannel, "Green", "Toggles the green channel", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(BlueChannel, "Blue", "Toggles the blue channel", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(AlphaChannel, "Alpha", "Toggles the alpha channel", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(Saturation, "Saturation", "Toggles color saturation", EUserInterfaceActionType::ToggleButton, FInputGesture());
	
	UI_COMMAND(CheckeredBackground, "Checkered", "Checkered background pattern behind the texture", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(CheckeredBackgroundFill, "Checkered (Fill)", "Checkered background pattern behind the entire viewport", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(FitToViewport, "Scale To Fit", "If enabled, the texture will be scaled to fit the viewport", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(SolidBackground, "Solid Color", "Solid color background", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(TextureBorder, "Draw Border", "If enabled, a border is drawn around the texture", EUserInterfaceActionType::ToggleButton, FInputGesture());

	UI_COMMAND(CompressNow, "Compress", "Compress the texture", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(Reimport, "Reimport", "Reimports the texture from file", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(Settings, "Settings...", "Opens the settings for the texture editor", EUserInterfaceActionType::Button, FInputGesture());
}
void FSSTBatchCombinerCommands::RegisterCommands()
{
	UI_COMMAND(PluginAction, "SSTBatchCombiner", "Execute SSTBatchCombiner action", EUserInterfaceActionType::Button, FInputGesture());
}
Beispiel #19
0
TArray<FShowFlagData>& GetShowFlagMenuItems()
{
	static TArray<FShowFlagData> OutShowFlags;

	static bool bFirst = true; 
	if(bFirst)
	{
		// do this only once
		bFirst = false;

		// FEngineShowFlags 
		{
			TMap<FString, FInputGesture> EngineFlagsGestures;

			EngineFlagsGestures.Add("Navigation", FInputGesture(EKeys::P) );
			EngineFlagsGestures.Add("BSP", FInputGesture() );
			EngineFlagsGestures.Add("Collision", FInputGesture(EKeys::C, EModifierKey::Alt) );
			EngineFlagsGestures.Add("Fog", FInputGesture(EKeys::F, EModifierKey::Alt ) );
			EngineFlagsGestures.Add("LightRadius", FInputGesture(EKeys::R, EModifierKey::Alt) );
			EngineFlagsGestures.Add("StaticMeshes", FInputGesture() );
			EngineFlagsGestures.Add("Landscape", FInputGesture(EKeys::L, EModifierKey::Alt) );
			EngineFlagsGestures.Add("Volumes", FInputGesture(EKeys::O, EModifierKey::Alt) );

			struct FIterSink
			{
				FIterSink(TArray<FShowFlagData>& InShowFlagData, const TMap<FString, FInputGesture>& InGesturesMap) 
					: ShowFlagData(InShowFlagData), GesturesMap(InGesturesMap)
				{
				}

				bool OnEngineShowFlag(uint32 InIndex, const FString& InName)
				{
					EShowFlagGroup Group = FEngineShowFlags::FindShowFlagGroup(*InName);
					if( Group != SFG_Hidden  )
					{
						FText FlagDisplayName;
						FEngineShowFlags::FindShowFlagDisplayName(InName, FlagDisplayName);

						const FInputGesture* Gesture = GesturesMap.Find(InName);
						if (Gesture != NULL)
						{
							ShowFlagData.Add( FShowFlagData( InName, FlagDisplayName, InIndex, Group, *Gesture ) );
						}
						else
						{
							ShowFlagData.Add( FShowFlagData( InName, FlagDisplayName, InIndex, Group ) );
						}
					}
					return true;
				}

				TArray<FShowFlagData>& ShowFlagData;
				const TMap<FString, FInputGesture>& GesturesMap;
			};

			FIterSink Sink(OutShowFlags, EngineFlagsGestures);

			FEngineShowFlags::IterateAllFlags(Sink);
		}	

		// Sort the show flags alphabetically by string.
		struct FCompareFShowFlagDataByName
		{
			FORCEINLINE bool operator()( const FShowFlagData& A, const FShowFlagData& B ) const
			{
				return A.DisplayName.ToString() < B.DisplayName.ToString();
			}
		};
		OutShowFlags.Sort( FCompareFShowFlagDataByName() );
	}

	return OutShowFlags;
}
/** UI_COMMAND takes long for the compile to optimize */
PRAGMA_DISABLE_OPTIMIZATION
void FBlueprintEditorCommands::RegisterCommands()
{
	// Edit commands
	UI_COMMAND( FindInBlueprint, "Search", "Finds references to functions, events, variables, and pins in the current Blueprint", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::Control, EKeys::F) );
	UI_COMMAND( FindInBlueprints, "Find in Blueprints", "Find references to functions, events and variables in ALL Blueprints", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::Control | EModifierKey::Shift, EKeys::F) );
	UI_COMMAND( ReparentBlueprint, "Reparent Blueprint", "Change the parent of this Blueprint", EUserInterfaceActionType::Button, FInputGesture() );

	UI_COMMAND( CompileBlueprint, "Compile", "Compile the blueprint", EUserInterfaceActionType::Button, FInputGesture(EKeys::F7) );
	UI_COMMAND( RefreshAllNodes, "Refresh All nodes", "Refreshes all nodes in the graph to account for external changes", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( DeleteUnusedVariables, "Delete Unused Variables", "Deletes any variables that are never used", EUserInterfaceActionType::Button, FInputGesture() );

	UI_COMMAND( FindReferencesFromClass, "List references (from class)", "Find all objects that the class references", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( FindReferencesFromBlueprint, "List referenced (from blueprint)", "Find all objects that the blueprint references", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( RepairCorruptedBlueprint, "Repair corrupted blueprint", "Attempts to repair a corrupted blueprint that cannot be saved", EUserInterfaceActionType::Button, FInputGesture() );

	// View commands 
	UI_COMMAND( ZoomToWindow, "Zoom to Graph Extents", "Fit the current view to the entire graph", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( ZoomToSelection, "Zoom to Selection", "Fit the current view to the selection", EUserInterfaceActionType::Button, FInputGesture(EKeys::Home) );
	UI_COMMAND( NavigateToParent, "Go to parent graph", "Open the parent graph", EUserInterfaceActionType::Button, FInputGesture(EKeys::PageUp) );
	UI_COMMAND( NavigateToParentBackspace, "Go to parent graph", "Open the parent graph", EUserInterfaceActionType::Button, FInputGesture(EKeys::BackSpace) );
	UI_COMMAND( NavigateToChild, "Go to child graph", "Open the child graph", EUserInterfaceActionType::Button, FInputGesture(EKeys::PageDown) );

	// Preview commands
	UI_COMMAND( ResetCamera, "Reset Camera", "Resets the camera to focus on the mesh", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( EnableSimulation, "Simulation", "Enables the simulation of the blueprint and ticking", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( ShowFloor, "Show Floor", "Toggles a ground mesh for collision", EUserInterfaceActionType::ToggleButton, FInputGesture() );
	UI_COMMAND( ShowGrid, "Show Grid", "Toggles viewport grid", EUserInterfaceActionType::ToggleButton, FInputGesture() );

	// Debugging commands
	UI_COMMAND( EnableAllBreakpoints,"Enable All Breakpoints", "Enable all breakpoints", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( DisableAllBreakpoints, "Disable All Breakpoints", "Disable all breakpoints", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( ClearAllBreakpoints, "Delete All Breakpoints", "Delete all breakpoints", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::Control | EModifierKey::Shift, EKeys::F9) );
	UI_COMMAND(	ClearAllWatches, "Delete All Watches", "Delete all watches", EUserInterfaceActionType::Button, FInputGesture() );

	// New documents
	UI_COMMAND( AddNewVariable, "Variable", "Adds a new variable to this blueprint.", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( AddNewLocalVariable, "Local Variable", "Adds a new local variable to this graph.", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( AddNewFunction, "Function", "Add a new function graph", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND(	AddNewMacroDeclaration, "Macro", "Add a new macro declaration graph", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( AddNewAnimationGraph, "Anim Graph", "Add a new animation graph", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( AddNewEventGraph, "Graph", "Add a new event graph", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( AddNewDelegate, "Event Dispatcher", "Add a new event dispatcher", EUserInterfaceActionType::Button, FInputGesture() );

	// Development commands
	UI_COMMAND( SaveIntermediateBuildProducts, "Save Intermediate Build Products", "Should the compiler save intermediate build products for debugging.", EUserInterfaceActionType::Check, FInputGesture() );

	UI_COMMAND( RecompileGraphEditor, "Recompile Graph Editor", "Recompiles and reloads C++ code for the graph editor", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( RecompileKismetCompiler, "Recompile Blueprint Compiler", "Recompiles and reloads C++ code for the blueprint compiler", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( RecompileBlueprintEditor, "Recompile Blueprint Editor", "Recompiles and reloads C++ code for the blueprint editor", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( RecompilePersona, "Recompile Persona", "Recompiles and reloads C++ code for Persona", EUserInterfaceActionType::Button, FInputGesture() );
}
/** UI_COMMAND takes long for the compile to optimize */
PRAGMA_DISABLE_OPTIMIZATION
void FBspModeCommands::RegisterCommands()
{
	UI_COMMAND( CSGAdd, "CSG Add", "Creates an additive bsp brush from the builder brush", EUserInterfaceActionType::Button, FInputGesture( EModifierKey::Control | EModifierKey::Alt, EKeys::A ) );
	UI_COMMAND( CSGSubtract, "CSG Subtract", "Creates a subtractive bsp brush from the builder brush", EUserInterfaceActionType::Button, FInputGesture( EModifierKey::Control | EModifierKey::Alt, EKeys::S ) );

	MapCommands();
}
void FTreeThemeEditorViewportCommands::RegisterCommands()
{
	UI_COMMAND(ShowPropertyTreeTheme, "TreeTheme", "Shows Tree Theme Properties", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ShowPropertySkylight, "Skylight", "Shows Skylight Properties", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ShowPropertyDirectionalLight, "Directional Light", "Shows Directional Light Properties", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ShowPropertyAtmosphericFog, "Atmospheric Fog", "Shows Atmospheric Fog Properties", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ToggleDebugData, "Toggle Debug Data", "Shows the debug data of the dungeon", EUserInterfaceActionType::Button, FInputGesture());

}
void FPLUGIN_NAMECommands::RegisterCommands()
{
	UI_COMMAND(OpenPluginWindow, "PLUGIN_NAME", "Bring up PLUGIN_NAME window", EUserInterfaceActionType::Button, FInputGesture());
}
void FPaperEditorCommands::RegisterCommands()
{
    UI_COMMAND(EnterTileMapEditMode, "Enable Tile Map Mode", "Enables Tile Map editing mode", EUserInterfaceActionType::ToggleButton, FInputGesture());

    UI_COMMAND(SelectPaintTool, "Paint", "Paint", EUserInterfaceActionType::ToggleButton, FInputGesture());
    UI_COMMAND(SelectEraserTool, "Eraser", "Eraser", EUserInterfaceActionType::ToggleButton, FInputGesture());
    UI_COMMAND(SelectFillTool, "Fill", "Paint Bucket", EUserInterfaceActionType::ToggleButton, FInputGesture());

    UI_COMMAND(SelectVisualLayersPaintingMode, "VisualLayers", "Visual Layers", EUserInterfaceActionType::ToggleButton, FInputGesture());
    UI_COMMAND(SelectCollisionLayersPaintingMode, "CollisionLayers", "Collision Layers", EUserInterfaceActionType::ToggleButton, FInputGesture());
}
PRAGMA_DISABLE_OPTIMIZATION
void FRosePluginCommands::RegisterCommands()
{
    UI_COMMAND(StartButton, "Import ROSE", "Begins importing ROSE data", EUserInterfaceActionType::Button, FInputGesture());
}
void FAnimViewportLODCommands::RegisterCommands()
{
	UI_COMMAND( LODAuto, "LOD Auto", "Automatically select LOD", EUserInterfaceActionType::RadioButton, FInputGesture() );
	UI_COMMAND( LOD0, "LOD 0", "Force select LOD 0", EUserInterfaceActionType::RadioButton, FInputGesture() );
	UI_COMMAND( LOD1, "LOD 1", "Force select LOD 1", EUserInterfaceActionType::RadioButton, FInputGesture() );
	UI_COMMAND( LOD2, "LOD 2", "Force select LOD 2", EUserInterfaceActionType::RadioButton, FInputGesture() );
	UI_COMMAND( LOD3, "LOD 3", "Force select LOD 3", EUserInterfaceActionType::RadioButton, FInputGesture() );

	UI_COMMAND( ShowLevelOfDetailSettings, "Level of Detail Settings", "Show the Level of Detail Settings Dialog", EUserInterfaceActionType::Button, FInputGesture() );
}
void FSkeletonTreeCommands::RegisterCommands()
{
	UI_COMMAND( ShowAllBones, "Show All Bones", "Show every bone in the skeleton", EUserInterfaceActionType::RadioButton, FInputGesture() );
	UI_COMMAND( ShowMeshBones, "Show Mesh Bones", "Show bones that are used in the mesh", EUserInterfaceActionType::RadioButton, FInputGesture() );
	UI_COMMAND( ShowWeightedBones, "Show Weighted Bones", "Show bones that have vertices weighted to them", EUserInterfaceActionType::RadioButton, FInputGesture() );
	UI_COMMAND( HideBones, "Hide Bones", "Hides all bones (sockets and attached assets will still be listed)", EUserInterfaceActionType::RadioButton, FInputGesture() );

	UI_COMMAND( CopyBoneNames, "Copy Selected Bone Names", "Copy selected bone names to clipboard", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( ResetBoneTransforms, "Reset Selected Bone Transforms", "Reset the transforms of the selected bones", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( CopySockets, "Copy Selected Sockets", "Copy selected sockets to clipboard", EUserInterfaceActionType::Button, FInputGesture( EModifierKey::Control, EKeys::C ) );
	UI_COMMAND( PasteSockets, "Paste Selected Sockets", "Paste selected sockets from clipboard", EUserInterfaceActionType::Button, FInputGesture( EModifierKey::Control, EKeys::V ) );

	UI_COMMAND( AddSocket, "Add Socket", "Add a socket to this bone in the skeleton (disabled when socket filter is set to \"Mesh Sockets\" or \"Sockets Hidden\" mode)", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( CreateMeshSocket, "Create Mesh Socket", "Duplicate this socket from skeleton to the current mesh and modify the socket data for it", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( RemoveMeshSocket, "Remove Mesh Socket", "Remove duplicated version of this socket for the current mesh (reverts to the socket in the skeleton)", EUserInterfaceActionType::Button, FInputGesture() );
	UI_COMMAND( PromoteSocketToSkeleton, "Promote Socket To Skeleton", "Makes this socket available for all meshes that use the same skeleton (copies the socket from this mesh to the skeleton)", EUserInterfaceActionType::Button, FInputGesture() );

	UI_COMMAND(DeleteSelectedRows, "Delete", "Delete all selected sockets and attached meshes in the tree", EUserInterfaceActionType::Button, FInputGesture(EKeys::Platform_Delete));

	UI_COMMAND( ShowActiveSockets, "Show Active Sockets", "Show mesh and skeleton sockets, hiding the skeleton sockets that have a customized mesh socket", EUserInterfaceActionType::RadioButton, FInputGesture() );
	UI_COMMAND( ShowAllSockets, "Show All Sockets", "Show all sockets that are in the mesh and skeleton", EUserInterfaceActionType::RadioButton, FInputGesture() );
	UI_COMMAND( ShowMeshSockets, "Show Mesh Sockets", "Show sockets that are in the mesh only", EUserInterfaceActionType::RadioButton, FInputGesture() );
	UI_COMMAND( ShowSkeletonSockets, "Show Skeleton Sockets", "Show sockets that are in the skeleton only", EUserInterfaceActionType::RadioButton, FInputGesture() );
	UI_COMMAND( HideSockets, "Hide Sockets", "Show no sockets", EUserInterfaceActionType::RadioButton, FInputGesture() );
}
Beispiel #28
0
void FPhATCommands::RegisterCommands()
{
	UI_COMMAND(ChangeDefaultMesh, "Change Mesh", "Change Default SkeletalMesh", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ResetEntireAsset, "Reset Asset", "Opens Body Creation Settings And Replaces Asset Using The New Settings", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(RestetBoneCollision, "Reset", "Reset Bone Collision", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ApplyPhysicalMaterial, "Apply PhysMat", "Applies Currently Selected Physical Material In Content Browser To All Bodies", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(EditingMode_Body, "Body Mode", "Body Editing Mode", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(EditingMode_Constraint, "Constraint Mode", "Constraint Editing Mode", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(MovementSpace_Local, "Local", "Local Movement Space", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(MovementSpace_World, "World", "World Movement Space", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(PhATTranslationMode, "Translation", "Translation Mode", EUserInterfaceActionType::ToggleButton, FInputGesture(EKeys::W));
	UI_COMMAND(PhATRotationMode, "Rotation", "Rotation Mode", EUserInterfaceActionType::ToggleButton, FInputGesture(EKeys::E));
	UI_COMMAND(PhATScaleMode, "Scale", "Scale Mode", EUserInterfaceActionType::ToggleButton, FInputGesture(EKeys::R));
	UI_COMMAND(CopyProperties, "Copy Properties", "Copy Properties: Copy Properties Of Currently Selected Object To Next Selected Object", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::Control, EKeys::C));
	UI_COMMAND(PasteProperties, "Paste Properties", "Paste Properties: Copy Properties Of Currently Selected Object To Next Selected Object", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::Control, EKeys::V));
	UI_COMMAND(InstanceProperties, "Instance Properties", "Instance Properties: Displays Instance Properties When In Body Editing Mode", EUserInterfaceActionType::ToggleButton, FInputGesture(EKeys::I));
	UI_COMMAND(RepeatLastSimulation, "Simulate", "Previews Physics Simulation", EUserInterfaceActionType::RadioButton, FInputGesture(EKeys::Enter));
	UI_COMMAND(SimulationNormal, "Real Simulation", "Previews Normal Physics Simulation", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(SimulationNoGravity, "No Gravity Simulation", "Run Physics Simulation without gravity. Use this to debug issues with your ragdoll. If the setup is correct, the asset should not move!", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(ToggleSelectedSimulation, "Selected Simulation", "Run Physics Simulation on selected objects. Use this to tune  specific parts of your ragdoll.", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(MeshRenderingMode_Solid, "Solid", "Solid Mesh Rendering Mode", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(MeshRenderingMode_Wireframe, "Wireframe", "Wireframe Mesh Rendering Mode", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(MeshRenderingMode_None, "None", "No Mesh Rendering Mode", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(CollisionRenderingMode_Solid, "Solid", "Solid Collision Rendering Mode", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(CollisionRenderingMode_Wireframe, "Wireframe", "Wireframe Collision Rendering Mode", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(CollisionRenderingMode_None, "None", "No Collision Rendering Mode", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(ConstraintRenderingMode_None, "None", "No Constraint Rendering Mode", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(ConstraintRenderingMode_AllPositions, "All Positions", "All Positions Constraint Rendering Mode", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(ConstraintRenderingMode_AllLimits, "All Limits", "All Limits Constraint Rendering Mode", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(ShowKinematicBodies, "Kinematic Bodies", "Displays Kinematic Bodies In Red", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(DrawGroundBox, "Ground Box", "Displays Floor Grid", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(ToggleGraphicsHierarchy, "Hierarchy", "Show Graphical Hierarchy Of Joints In Preview Viewport", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(ToggleBoneInfuences, "Bone Influences", "Displays Vertices Weighted To Currently Selected Bone or Body", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(ToggleMassProperties, "Mass Properties", "Show Mass Properties For Bodies When Simulation Is Enabled", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(DisableCollision, "Collision Off", "Disable Collision Of Currently Selected Body With Next Selected Body", EUserInterfaceActionType::Button, FInputGesture(EKeys::RightBracket));
	UI_COMMAND(EnableCollision, "Collision On", "Enable Collision Of Currently Selected Body With Next Selected Body", EUserInterfaceActionType::Button, FInputGesture(EKeys::LeftBracket));
	UI_COMMAND(WeldToBody, "Weld", "Weld Body: Weld Currently Selected Bodies", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(AddNewBody, "New Body", "Add New Body To Selected Bone.", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(AddSphere, "Add Sphere", "Add Sphere To Selected Bone", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(AddSphyl, "Add Sphyl", "Add Sphyl To Selected Bone", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(AddBox, "Add Box", "Add Box To Selected Bone", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(DeletePrimitive, "Delete", "Delete Selected Primitive", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(DuplicatePrimitive, "Duplicate", "Duplicate Selected Primitive", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ResetConstraint, "Reset", "Reset Constraint", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(SnapConstraint, "Snap", "Snap Constraint To Bone", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ConvertToBallAndSocket, "To B&S", "Convert Selected Constraint To Ball-And-Socket", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ConvertToHinge, "To Hinge", "Convert Selected Constraint To Hinge", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ConvertToPrismatic, "To Prismatic", "Convert Selected Constraint To Prismatic", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ConvertToSkeletal, "To Skeletal", "Convert Selected Constraint To Skeletal", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(DeleteConstraint, "Delete", "Delete Selected Constraint", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(PlayAnimation, "Play", "Play Animation", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(ShowSkeleton, "Skeleton", "Show Skeleton", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(MakeBodyKinematic, "Kinematic", "Make Body Kinematic", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(MakeBodySimulated, "Simulated", "Make Body Simulated", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(MakeBodyDefault, "Default", "Reset This Body To Default", EUserInterfaceActionType::RadioButton, FInputGesture());
	UI_COMMAND(KinematicAllBodiesBelow, "Set All Bodies Below To Kinematic", "Set All Bodies Below To Kinematic", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(SimulatedAllBodiesBelow, "Set All Bodies Below To Simulated", "Set All Bodies Below To Simulated", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(MakeAllBodiesBelowDefault, "Reset All Bodies Below To Default", "Reset All Bodies Below To Default", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(DeleteBody, "Delete", "Delete Selected Body", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(DeleteAllBodiesBelow, "Delete All Bodies Below", "Delete All Bodies Below", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ToggleMotor, "Toggle Motor", "Toggle Motor", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(EnableMotorsBelow, "Enable Motors Below", "Enable Motors Below", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(DisableMotorsBelow, "Disable Motors Below", "Disable Motors Below", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(SelectAllObjects, "Select All Objects", "Select All Objects", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::Control, EKeys::A));
	UI_COMMAND(HierarchyFilterAll, "All Bones", "Show Entire Hierarchy", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(HierarchyFilterBodies, "Bones With Bodies", "Filter Bones With Bodies", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(PerspectiveView, "Perspective", "Perspective", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(SideView, "Side", "Orthographic view from side", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(TopView, "Top", "Orthographic view from top", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(FrontView, "Front", "Orthographic view from front", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(Mirror, "Mirror", "Finds the body on the other side and duplicates constraint and body", EUserInterfaceActionType::Button, FInputGesture(EKeys::M));


	UI_COMMAND(SelectionLock, "Lock Selection", "", EUserInterfaceActionType::Button, FInputGesture(EKeys::X));

	/** As two commands cannot have the same key; this command wraps both 
	  * DeletePrimitive and DeleteConstraint so the user can delete whatever is selected 
	  */
	UI_COMMAND(DeleteSelected, "Delete selected primitive or constraint", "", EUserInterfaceActionType::Button, FInputGesture(EKeys::Platform_Delete));
	UI_COMMAND(CycleConstraintOrientation, "Cycle selected constraint orientation", "", EUserInterfaceActionType::Button, FInputGesture(EKeys::Q));
	UI_COMMAND(CycleConstraintActive, "Cycle active constraint", "", EUserInterfaceActionType::Button, FInputGesture(EKeys::Four));
	UI_COMMAND(ToggleSwing1, "Toggle Swing1 Constraint", "", EUserInterfaceActionType::Button, FInputGesture(EKeys::One));
	UI_COMMAND(ToggleSwing2, "Toggle Swing2 Constraint", "", EUserInterfaceActionType::Button, FInputGesture(EKeys::Three));
	UI_COMMAND(ToggleTwist, "Toggle Twist Constraint", "", EUserInterfaceActionType::Button, FInputGesture(EKeys::Two));
	UI_COMMAND(FocusOnSelection, "Focus the viewport on the current selection", "", EUserInterfaceActionType::Button, FInputGesture(EKeys::F));
	UI_COMMAND(CycleTransformMode, "Cycle the transform mode", "", EUserInterfaceActionType::Button, FInputGesture(EKeys::SpaceBar));
}
void FUserDefinedGestures::LoadGestures()
{
	if( !Gestures.IsValid() )
	{
		Gestures = MakeShareable( new FGesturesMap );

		// First, try and load the gestures from their new location in the ini file
		// Failing that, try and load them from the older txt file
		TArray<FString> GestureJsonArray;
		if( GConfig->GetArray(TEXT("UserDefinedGestures"), TEXT("UserDefinedGestures"), GestureJsonArray, GEditorKeyBindingsIni) )
		{
			// This loads an array of JSON strings representing the FUserDefinedGestureKey and FInputGesture in a single JSON object
			for(const FString& GestureJson : GestureJsonArray)
			{
				const FString UnescapedContent = FRemoteConfig::ReplaceIniSpecialCharWithChar(GestureJson).ReplaceEscapedCharWithChar();

				TSharedPtr<FJsonObject> GestureInfoObj;
				auto JsonReader = TJsonReaderFactory<>::Create( UnescapedContent );
				if( FJsonSerializer::Deserialize( JsonReader, GestureInfoObj ) )
				{
					const TSharedPtr<FJsonValue> BindingContextObj = GestureInfoObj->Values.FindRef( TEXT("BindingContext") );
					const TSharedPtr<FJsonValue> CommandNameObj = GestureInfoObj->Values.FindRef( TEXT("CommandName") );
					const TSharedPtr<FJsonValue> CtrlObj = GestureInfoObj->Values.FindRef( TEXT("Control") );
					const TSharedPtr<FJsonValue> AltObj = GestureInfoObj->Values.FindRef( TEXT("Alt") );
					const TSharedPtr<FJsonValue> ShiftObj = GestureInfoObj->Values.FindRef( TEXT("Shift") );
					const TSharedPtr<FJsonValue> CmdObj = GestureInfoObj->Values.FindRef( TEXT("Command") );
					const TSharedPtr<FJsonValue> KeyObj = GestureInfoObj->Values.FindRef( TEXT("Key") );

					const FName BindingContext = *BindingContextObj->AsString();
					const FName CommandName = *CommandNameObj->AsString();

					const FUserDefinedGestureKey GestureKey(BindingContext, CommandName);
					FInputGesture& UserDefinedGesture = Gestures->FindOrAdd(GestureKey);

					UserDefinedGesture = FInputGesture(*KeyObj->AsString(), EModifierKey::FromBools(
																				CtrlObj->AsBool(), 
																				AltObj->AsBool(), 
																				ShiftObj->AsBool(), 
																				CmdObj.IsValid() ? CmdObj->AsBool() : false // Old config files may not have this
																			));
				}
			}
		}
		else
		{
			TSharedPtr<FJsonObject> GesturesObj;

			// This loads a JSON object containing BindingContexts, containing objects of CommandNames, containing the FInputGesture information
			FString Content;
			if( GConfig->GetString(TEXT("UserDefinedGestures"), TEXT("Content"), Content, GEditorKeyBindingsIni) )
			{
				const FString UnescapedContent = FRemoteConfig::ReplaceIniSpecialCharWithChar(Content).ReplaceEscapedCharWithChar();

				auto JsonReader = TJsonReaderFactory<>::Create( UnescapedContent );
				FJsonSerializer::Deserialize( JsonReader, GesturesObj );
			}

			if (!GesturesObj.IsValid())
			{
				// Gestures have not been loaded from the ini file, try reading them from the txt file now
				TSharedPtr<FArchive> Ar = MakeShareable( IFileManager::Get().CreateFileReader( *( FPaths::GameSavedDir() / TEXT("Preferences/EditorKeyBindings.txt") ) ) );
				if( Ar.IsValid() )
				{
					auto TextReader = TJsonReaderFactory<ANSICHAR>::Create( Ar.Get() );
					FJsonSerializer::Deserialize( TextReader, GesturesObj );
				}
			}

			if (GesturesObj.IsValid())
			{
				for(const auto& BindingContextInfo : GesturesObj->Values)
				{
					const FName BindingContext = *BindingContextInfo.Key;
					TSharedPtr<FJsonObject> BindingContextObj = BindingContextInfo.Value->AsObject();
					for(const auto& CommandInfo : BindingContextObj->Values)
					{
						const FName CommandName = *CommandInfo.Key;
						TSharedPtr<FJsonObject> CommandObj = CommandInfo.Value->AsObject();

						const TSharedPtr<FJsonValue> CtrlObj = CommandObj->Values.FindRef( TEXT("Control") );
						const TSharedPtr<FJsonValue> AltObj = CommandObj->Values.FindRef( TEXT("Alt") );
						const TSharedPtr<FJsonValue> ShiftObj = CommandObj->Values.FindRef( TEXT("Shift") );
						const TSharedPtr<FJsonValue> CmdObj = CommandObj->Values.FindRef( TEXT("Command") );
						const TSharedPtr<FJsonValue> KeyObj = CommandObj->Values.FindRef( TEXT("Key") );

						const FUserDefinedGestureKey GestureKey(BindingContext, CommandName);
						FInputGesture& UserDefinedGesture = Gestures->FindOrAdd(GestureKey);

						UserDefinedGesture = FInputGesture(*KeyObj->AsString(), EModifierKey::FromBools(
																					CtrlObj->AsBool(), 
																					AltObj->AsBool(), 
																					ShiftObj->AsBool(), 
																					CmdObj.IsValid() ? CmdObj->AsBool() : false // Old config files may not have this
																				));
					}
				}
			}
		}
	}
}
Beispiel #30
0
/** UI_COMMAND takes long for the compile to optimize */
PRAGMA_DISABLE_OPTIMIZATION
void FMatineeCommands::RegisterCommands()
{
	UI_COMMAND(AddKey, "Add Key", "Add Key", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::None, EKeys::Enter));
	
	UI_COMMAND(Play, "Play", "Play", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::None, EKeys::L));
	UI_COMMAND(PlayLoop, "Loop", "Loop Section", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(Stop, "Stop", "Stop", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::None, EKeys::K));
	UI_COMMAND(PlayReverse, "Reverse", "Play in Reverse | Plays the Matinee sequence backwards, starting from the time cursor's position", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::None, EKeys::J));

	UI_COMMAND(PlayPause, "Play/Pause", "Toggle Play/Pause", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::None, EKeys::P));

	UI_COMMAND(CreateCameraActor, "Camera", "Create Camera Actor at Current Camera Location", EUserInterfaceActionType::Button, FInputGesture());

	UI_COMMAND(ToggleSnap, "Snap", "Toggle Snap", EUserInterfaceActionType::ToggleButton, FInputGesture(EModifierKey::None, EKeys::S));
	UI_COMMAND(ToggleSnapTimeToFrames, "Time to Frames", "Snap Time to Frames | Snaps the timeline cursor to the frame rate specified in the Snap Size setting", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(FixedTimeStepPlayback, "Fixed Time ", "Fixed Time Step Playback | Locks the playback rate to the frame rate specified in the Snap Size setting", EUserInterfaceActionType::ToggleButton, FInputGesture());

	UI_COMMAND(FitSequence, "Sequence", "Fit View to Sequence", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::None, EKeys::A));
	UI_COMMAND(FitViewToSelected, "Selected", "Fit View to Selected", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::None, EKeys::F));
	UI_COMMAND(FitLoop, "Loop", "Fit View to Locp", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::Shift, EKeys::A));
	UI_COMMAND(FitLoopSequence, "Loop Sequence", "Fit View / Loop Sequence", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::Control, EKeys::A));
	UI_COMMAND(ViewEndofTrack, "End", "Move to End of Track ", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::None, EKeys::E));

	UI_COMMAND(ToggleGorePreview, "Gore", "Enable Gore in Editor Preview", EUserInterfaceActionType::ToggleButton, FInputGesture());

	UI_COMMAND(LaunchRecordWindow, "Record", "Launch Recording Window for Matinee", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(CreateMovie, "Movie", "Create a Movie", EUserInterfaceActionType::Button, FInputGesture());

	UI_COMMAND(FileImport, "Import...", "Imports Sequence", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(FileExport, "Export All...", "Exports all Sequences", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ExportSoundCueInfo, "Export Sound Cue Info", "Exports Sound Cue info", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ExportAnimInfo, "Export Animation Track Info", "Exports Animation Track info", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(FileExportBakeTransforms, "Bake Transforms on Export", "Exports a key every frame, instead of just user created keys", EUserInterfaceActionType::ToggleButton, FInputGesture());

	UI_COMMAND(DeleteSelectedKeys, "Delete Keys", "Deletes selected keys", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(DuplicateKeys, "Duplicate Keys", "Duplicates selected keys", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(InsertSpace, "Insert Space", "Inserts space at the current position", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(StretchSection, "Stretch Section", "Stretches the selected section", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(StretchSelectedKeyFrames, "Stretch Selected Key Frames", "Stretches the selected keys", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(DeleteSection, "Delete Section", "Deletes the selected section", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(SelectInSection, "Select In Section", "Selects the keys in Section", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ReduceKeys, "Reduce Keys", "Attempts to remove unnecessary keys", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(SavePathTime, "Save Path Time", "Saves the path time at the current position", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(JumpToPathTime, "Jump to Path Time", "Jumps to the previously saved path time", EUserInterfaceActionType::Button, FInputGesture());

	UI_COMMAND(ScaleTranslation, "Scale Translation", "Scales the translation of the selected movement trac", EUserInterfaceActionType::Button, FInputGesture() );

	UI_COMMAND(Draw3DTrajectories, "Draw 3D Trajectories", "Toggles 3D trajectories", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(ShowAll3DTrajectories, "Show All 3D Trajectories", "Shows all movement track trajectories", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(HideAll3DTrajectories, "Hide All 3D Trajectories", "Hides all movement track trajectories", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(PreferFrameNumbers, "Prefer Frame Numbers", "Toggles frame numbers on keys", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(ShowTimeCursorPosForAllKeys, "Show Time Cursor Position", "Shows relative time cursor position on keys", EUserInterfaceActionType::Check, FInputGesture());

	UI_COMMAND(ZoomToTimeCursorPosition, "Zoom To Time Cursor Position", "Toggles center zoom on time cursor position", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(ViewFrameStats, "View Frame Stats", "Views frame stats", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(EditingCrosshair, "Editing Crosshair", "Toggles editing crosshair", EUserInterfaceActionType::ToggleButton, FInputGesture());

	UI_COMMAND(EnableEditingGrid,"Enable Editing Grid", "Toggles editing grid", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(TogglePanInvert,"Pan Invert", "Toggles pan invert", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(ToggleAllowKeyframeBarSelection,"Allow Keyframe Bar Selection", "Toggles keyframe bar selection", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(ToggleAllowKeyframeTextSelection,"Allow Keyframe Text Selection", "Toggles keyframe text selection", EUserInterfaceActionType::ToggleButton, FInputGesture());

	UI_COMMAND(ToggleLockCameraPitch,"Lock Camera Pitch", "Toggles lock camera pitch", EUserInterfaceActionType::ToggleButton, FInputGesture());

	//Context menu commands
	UI_COMMAND(EditCut,"Cut", "Cuts selected group or track", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::Control, EKeys::X));
	UI_COMMAND(EditCopy,"Copy", "Copies selected group or track", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::Control, EKeys::C));
	UI_COMMAND(EditPaste,"Paste", "Pastes group or track", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::Control, EKeys::V));

	//Tab
	UI_COMMAND(GroupDeleteTab, "Delete Group Tab", "Deletes selected group", EUserInterfaceActionType::Button, FInputGesture());

	//Group
	UI_COMMAND(ActorSelectAll, "Select Group Actors","Selects all group actors", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ActorAddAll, "Add Selected Actors","Adds selected actors to group", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ActorReplaceAll, "Replace Group Actors With Selected Actors","Replaces group actors with selected actors", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ActorRemoveAll, "Remove Group Actors","Removes all group actors", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ExportCameraAnim, "Export To CameraAnim","Exports selected group to CameraAnim", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ExportAnimTrackFBX, "Export (.FBX)","Exports selected track as FBX", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ExportAnimGroupFBX, "Export (.FBX)","Exports selected group as FBX", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(GroupDuplicate, "Duplicate Group","Duplicates selected group", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(GroupDelete, "Delete Group Tab","Deletes selected group", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(GroupCreateTab, "Create Group Tab","Creates new group", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(GroupRemoveFromTab, "Remove From Selected Group Tab","Removes selected group", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(RemoveFromGroupFolder, "Remove From Folder","Moves group to selected folder", EUserInterfaceActionType::Button, FInputGesture());

	//Track
	UI_COMMAND(TrackRename, "Rename Track","Renames selected track", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(TrackDelete, "Delete Track","Deletes selected track", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(Show3DTrajectory, "Show 3D Trajectory","Shows 3D trajectory", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(TrackSplitTransAndRot, "Split Translation And Rotation","Splits movement into translation and rotation tracks", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(TrackNormalizeVelocity, "Normalize Velocity","Normalizes track velocity", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ParticleReplayTrackContextStartRecording, "Start Recording Particles","Starts recording particle replay track", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ParticleReplayTrackContextStopRecording, "Stop Recording Particles","Stops recording particle replay track", EUserInterfaceActionType::Button, FInputGesture());

	//Background
	UI_COMMAND(NewFolder, "Add New Folder", "Adds new Folder", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(NewEmptyGroup, "Add New Empty Group", "Adds new Empty Group", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(NewCameraGroup, "Add New Camera Group", "Adds new Camera Group", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(NewParticleGroup, "Add New Particle Group", "Adds new Particle Group", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(NewSkeletalMeshGroup, "Add New Skeletal Group", "Adds new Skeletal Group", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(NewLightingGroup, "Add New Lighting Group", "Adds new Lighting Group", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(NewDirectorGroup, "Add New Director Group", "Adds new Director Group", EUserInterfaceActionType::Button, FInputGesture());

	UI_COMMAND(ToggleCurveEditor, "Curves", "Toggles curve editor", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(ToggleDirectorTimeline, "Director Timeline","Toggles director timeline", EUserInterfaceActionType::ToggleButton, FInputGesture());

	//Key
	UI_COMMAND(KeyModeCurveAuto, "Curve (Auto)","Sets mode to Curve (Auto)", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(KeyModeCurveAutoClamped, "Curve (Auto/Clamped)","Sets mode to Curve (Auto/Clamped)", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(KeyModeCurveBreak, "Curve (Break)","Sets mode to Curve (Break)", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(KeyModeLinear, "Linear","Sets mode to Linear", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(KeyModeConstant, "Constant","Sets mode to Constant", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(KeySetTime, "Set Time","Sets key time", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(KeySetValue, "Set Value","Sets key value", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(KeySetBool, "Set Bool","Sets key flag", EUserInterfaceActionType::Button, FInputGesture()); 
	UI_COMMAND(KeySetColor, "Set Color","Sets key color", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(MoveKeySetLookup, "Select Transform Lookup Group...","Selects transform lookup group...", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(MoveKeyClearLookup, "Clear Transform Lookup Group","Clears transform lookup group", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(EventKeyRename, "Rename Event","Renames event key", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(DirKeySetTransitionTime, "Set Transition Time","Sets transition time", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(DirKeyRenameCameraShot, "Rename Shot","Renames camera key", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(KeySetMasterVolume, "Set Master Volume","Sets master volume", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(KeySetMasterPitch, "Set Master Pitch","Sets master pitch", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ToggleKeyFlip, "Flip Toggle","Flips toggle action", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(KeySetConditionAlways, "Always Active","Toggles always active", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(KeySetConditionGoreEnabled, "Active if Gore is Enabled","Toggles active if gore is enabled", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(KeySetConditionGoreDisabled, "Active if Gore is Disabled","Toggles active if gore is disabled", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(AnimKeyLoop, "Set Looping","Sets key looping", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(AnimKeyNoLoop, "Set Non-Looping","Sets key non-looping", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(AnimKeySetStartOffset, "Set Start Offset","Sets key start offset", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(AnimKeySetEndOffset, "Set End Offset","Sets key end offset", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(AnimKeySetPlayRate, "Set Play Rate","Sets key play rate", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(AnimKeyToggleReverse, "Reverse","Toggles key reverse", EUserInterfaceActionType::ToggleButton, FInputGesture());
	UI_COMMAND(KeySyncGenericBrowserToSoundCue, "Sync Browser To Sound Cue","Finds Sound Cue in Content Browser", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ParticleReplayKeySetClipIDNumber, "Select Particle Replay Clip ID","Selects Particle Replay Clip ID", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(ParticleReplayKeySetDuration, "Set Particle Replay Duration","Sets Particle Replay Clip duration", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(SoundKeySetVolume, "Set Sound Volume","Sets key sound volume", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(SoundKeySetPitch, "Set Sound Pitch","Sets key sound pitch", EUserInterfaceActionType::Button, FInputGesture());

	//Collapse/Expand context menu
	UI_COMMAND(ExpandAllGroups, "Expand All","Expand the entire hierarchy of folders, groups and tracks in UnrealMatinee's track window", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(CollapseAllGroups, "Collapse All","Collapse the entire hierarchy of folders, groups and tracks in UnrealMatinee's track window", EUserInterfaceActionType::Button, FInputGesture());

	//Marker Context Menu
	UI_COMMAND(MarkerMoveToBeginning, "Move To Sequence Start","Moves marker to sequence start", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(MarkerMoveToEnd, "Move To Sequence End","Moves marker to sequence end", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(MarkerMoveToEndOfLongestTrack, "Move To Longest Track Endpoint","Moves marker to end of longest track", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(MarkerMoveToEndOfSelectedTrack, "Move To Longest Selected Track Endpoint","Moves marker to end of selected track", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(MarkerMoveToCurrentPosition, "Move To Current Timeline Position","Moves marker to current timeline position", EUserInterfaceActionType::Button, FInputGesture());

	//Viewport/Key commands
	UI_COMMAND(ZoomIn,"Zoom In","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::None, EKeys::Add));
	UI_COMMAND(ZoomOut,"Zoom Out","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::None, EKeys::Subtract));
	UI_COMMAND(ZoomInAlt,"Zoom In Alt","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::None, EKeys::Equals));
	UI_COMMAND(ZoomOutAlt,"Zoom Out Alt","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::None, EKeys::Underscore));
	UI_COMMAND(MarkInSection,"Mark In Section","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::None, EKeys::I));
	UI_COMMAND(MarkOutSection,"Mark Out Section","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::None, EKeys::O));
	UI_COMMAND(IncrementPosition,"Increment Position","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::None, EKeys::Right));
	UI_COMMAND(DecrementPosition,"Decrement Position","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::None, EKeys::Left));
	UI_COMMAND(MoveToNextKey,"Move To Next Key","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::Shift, EKeys::Right));
	UI_COMMAND(MoveToPrevKey,"Move To Previous Key","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::Shift, EKeys::Left));
	UI_COMMAND(SplitAnimKey,"Split Anim Key","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::None, EKeys::R));
	UI_COMMAND(MoveActiveUp,"Move Active Track/Group Up","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::None, EKeys::Up));
	UI_COMMAND(MoveActiveDown,"Move Active Track/Group Down","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::None, EKeys::Down));
#if PLATFORM_MAC
	UI_COMMAND(DuplicateSelectedKeys,"Duplicate Selected Keys","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::Command, EKeys::W));
#else
	UI_COMMAND(DuplicateSelectedKeys,"Duplicate Selected Keys","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::Control, EKeys::W));
#endif
	UI_COMMAND(CropAnimationBeginning,"Crop Animation Start","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::Control, EKeys::I));
	UI_COMMAND(CropAnimationEnd,"Crop Animation End","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::Control, EKeys::O));
	UI_COMMAND(ChangeKeyInterpModeAuto,"Change Key Interp Mode Auto","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::None, EKeys::One));
	UI_COMMAND(ChangeKeyInterpModeAutoClamped,"Change Key Interp Mode Auto Clamped","",EUserInterfaceActionType::Button,FInputGesture());
	UI_COMMAND(ChangeKeyInterpModeUser,"Change Key Interp Mode User","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::None, EKeys::Two));
	UI_COMMAND(ChangeKeyInterpModeBreak,"Change Key Interp Mode Break","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::None, EKeys::Three));
	UI_COMMAND(ChangeKeyInterpModeLinear,"Change Key Interp Mode Linear","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::None, EKeys::Four));
	UI_COMMAND(ChangeKeyInterpModeConstant,"Change Key Interp Mode Constant","",EUserInterfaceActionType::Button,FInputGesture(EModifierKey::None, EKeys::Five));
	UI_COMMAND(DeleteSelection, "Delete Selection", "", EUserInterfaceActionType::Button, FInputGesture(EModifierKey::None, EKeys::Platform_Delete));
}