ShowFlag.Snap

ShowFlag.Snap

#Overview

name: ShowFlag.Snap

This variable is created as a Console Variable (cvar).

It is referenced in 70 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of ShowFlag.Snap is to control the visibility of snap points in the Unreal Engine editor viewports. This setting variable is primarily used in the rendering system, specifically for editor visualization.

Key points about ShowFlag.Snap:

  1. It is part of the engine’s show flags system, which controls various visual elements in the editor viewports.

  2. The Unreal Engine subsystem that relies on this variable is the editor rendering system, particularly for viewport visualization.

  3. The value of this variable is typically set through editor UI controls or programmatically when adjusting viewport settings.

  4. It interacts with other show flags and editor visualization settings to determine what is displayed in the viewport.

  5. Developers should be aware that this flag is only relevant for editor viewports and has no effect in shipping builds or runtime.

  6. Best practices for using this variable include:

    • Only enabling it when necessary for precise positioning or alignment in the editor
    • Disabling it when not needed to reduce visual clutter in the viewport
    • Using it in conjunction with other related editor tools and settings for effective snapping functionality

Regarding the associated variable “Snap”:

The purpose of “Snap” in this context is more general and can refer to various snapping functionalities throughout the engine. It is used in multiple subsystems, including:

  1. Animation and sequencer systems for aligning keyframes and sections
  2. Level editor for object placement and alignment
  3. UI and widget positioning
  4. Spline and curve editing

Key points about the “Snap” variable:

  1. It is used across multiple engine subsystems and is not limited to just viewport visualization.

  2. The value is often set through user interactions, editor settings, or programmatically in various tools.

  3. It can interact with numerous other variables depending on the context, such as grid settings, time snapping in sequencer, or object transformation values.

  4. Developers should be aware that snapping behavior can significantly impact user workflow and precision in various tools.

  5. Best practices for using snap functionality include:

    • Providing user options to enable/disable snapping as needed
    • Implementing appropriate snapping thresholds and logic for different contexts
    • Ensuring consistent snap behavior across related tools and systems
    • Using engine-provided snapping utilities when available to maintain consistency

In summary, while ShowFlag.Snap is specific to editor viewport visualization, the general concept of “Snap” is a broadly used functionality across many Unreal Engine systems, each with its own implementation and use cases.

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:241

Scope: file

Source code excerpt:

SHOWFLAG_FIXED_IN_SHIPPING(0, Grid, SFG_Normal, NSLOCTEXT("UnrealEd", "GridSF", "Grid"))
/** To show the snap in editor (only for editor view ports, red dots) */
SHOWFLAG_FIXED_IN_SHIPPING(0, Snap, SFG_Hidden, NSLOCTEXT("UnrealEd", "SnapSF", "Snap"))
/** In the filled view modeModeWidgetss, render mesh edges as well as the filled surfaces. */
SHOWFLAG_FIXED_IN_SHIPPING(0, MeshEdges, SFG_Advanced, NSLOCTEXT("UnrealEd", "MeshEdgesSF", "Mesh Edges"))
/** Complex cover rendering */
SHOWFLAG_FIXED_IN_SHIPPING(0, Cover, SFG_Hidden, NSLOCTEXT("UnrealEd", "CoverSF", "Cover"))
/** Spline rendering */
SHOWFLAG_FIXED_IN_SHIPPING(0, Splines, SFG_Advanced, NSLOCTEXT("UnrealEd", "SplinesSF", "Splines"))

#Associated Variable and Callsites

This variable is associated with another variable named Snap. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Plugins/Importers/USDImporter/Source/USDExporter/Private/LevelSequenceExporterUSD.cpp:1151

Scope (from outer to inner):

file
namespace    UE::LevelSequenceExporterUSD::Private
function     void BakeMovieSceneSequence

Source code excerpt:

		}

		FFrameTime StartFrameUETime = FFrameRate::Snap(StartFrame, Resolution, DisplayRate).FloorToFrame();
		double StartTimeCode = FFrameRate::TransformTime(StartFrameUETime, Resolution, StageFrameRate).AsDecimal();
		UsdStage.SetStartTimeCode(StartTimeCode);

		FFrameTime EndFrameUETime = FFrameRate::Snap(EndFrame, Resolution, DisplayRate).FloorToFrame();
		double EndTimeCode = FFrameRate::TransformTime(EndFrameUETime, Resolution, StageFrameRate).AsDecimal();
		UsdStage.SetEndTimeCode(EndTimeCode);

		const FConstraintsManagerController& Controller = FConstraintsManagerController::Get(Context.World);

		// Collect and sort the bakers: We need all skeletal animations evaluated first, as we need to manually force

#Loc: <Workspace>/Engine/Plugins/Importers/USDImporter/Source/USDExporter/Private/LevelSequenceExporterUSD.cpp:1209

Scope (from outer to inner):

file
namespace    UE::LevelSequenceExporterUSD::Private
function     void BakeMovieSceneSequence

Source code excerpt:

			Controller.EvaluateAllConstraints();

			FFrameTime KeyTime = FFrameRate::Snap(EvalTime, Resolution, DisplayRate).FloorToFrame();
			double UsdTimeCode = FFrameRate::TransformTime(KeyTime, Resolution, StageFrameRate).AsDecimal();

			for (const UnrealToUsd::FComponentBaker& Baker : SortedBakers)
			{
				Baker.BakerFunction(UsdTimeCode);
			}

#Loc: <Workspace>/Engine/Plugins/Importers/USDImporter/Source/USDUtilities/Private/USDPrimConversion.cpp:2092

Scope (from outer to inner):

file
function     bool UnrealToUsd::ConvertBoolTrack
lambda-function

Source code excerpt:

			bool KeyValue = KeyValues[KeyIndex];

			FFrameTime SnappedKeyTime{FFrameRate::Snap(KeyTime, Resolution, DisplayRate).FloorToFrame()};

			// We never need to bake bool tracks
			Values.Emplace(SnappedKeyTime.GetFrame(), KeyValue);
		}

		return Values;

#Loc: <Workspace>/Engine/Plugins/Importers/USDImporter/Source/USDUtilities/Private/USDPrimConversion.cpp:2179

Scope (from outer to inner):

file
function     bool UnrealToUsd::ConvertFloatTrack
lambda-function

Source code excerpt:

			if (KeyValue.InterpMode == StageInterpMode || KeyIndex == (KeyTimes.Num() - 1))
			{
				FFrameTime SnappedKeyTime(FFrameRate::Snap(KeyTime, Resolution, DisplayRate).FloorToFrame());
				Values.Emplace(SnappedKeyTime.GetFrame(), KeyValue.Value);
			}
			// We need to bake: Start from this key up until the next key (non-inclusive). We always want to put a keyframe at
			// KeyTime, but then snap the other ones to the stage framerate
			else
			{

#Loc: <Workspace>/Engine/Plugins/Importers/USDImporter/Source/USDUtilities/Private/USDPrimConversion.cpp:2193

Scope (from outer to inner):

file
function     bool UnrealToUsd::ConvertFloatTrack
lambda-function

Source code excerpt:

				for (FFrameTime EvalTime = KeyTime; EvalTime < NextKeyTime; EvalTime += BakeInterval)
				{
					FFrameNumber BakedKeyTime = FFrameRate::Snap(EvalTime, Resolution, DisplayRate).FloorToFrame();

					float Value = DefaultValue;
					Channel.Evaluate(BakedKeyTime, Value);

					Values.Emplace(BakedKeyTime, Value);
				}

#Loc: <Workspace>/Engine/Plugins/Importers/USDImporter/Source/USDUtilities/Private/USDPrimConversion.cpp:2279

Scope (from outer to inner):

file
function     bool UnrealToUsd::ConvertColorTrack
lambda-function

Source code excerpt:

			if (KeyValue.InterpMode == StageInterpMode || KeyIndex == (KeyTimes.Num() - 1))
			{
				FFrameNumber SnappedKeyTime = FFrameRate::Snap(KeyTime, Resolution, DisplayRate).FloorToFrame();
				OutBakeTimes.Emplace(SnappedKeyTime);
			}
			// We need to bake: Start from this key up until the next key (non-inclusive). We always want to put a keyframe at
			// KeyTime, but then snap the other ones to the stage framerate
			else
			{

#Loc: <Workspace>/Engine/Plugins/Importers/USDImporter/Source/USDUtilities/Private/USDPrimConversion.cpp:2293

Scope (from outer to inner):

file
function     bool UnrealToUsd::ConvertColorTrack
lambda-function

Source code excerpt:

				for (FFrameTime EvalTime = KeyTime; EvalTime < NextKeyTime; EvalTime += BakeInterval)
				{
					FFrameNumber BakedKeyTime = FFrameRate::Snap(EvalTime, Resolution, DisplayRate).FloorToFrame();
					OutBakeTimes.Emplace(BakedKeyTime);
				}
			}
		}
	};

#Loc: <Workspace>/Engine/Plugins/Importers/USDImporter/Source/USDUtilities/Private/USDPrimConversion.cpp:2407

Scope (from outer to inner):

file
function     bool UnrealToUsd::ConvertBoundsVectorTracks
lambda-function

Source code excerpt:

			if (KeyValue.InterpMode == StageInterpMode || KeyIndex == (KeyTimes.Num() - 1))
			{
				FFrameNumber SnappedKeyTime = FFrameRate::Snap(KeyTime, Resolution, DisplayRate).FloorToFrame();
				OutBakeTimes.Emplace(SnappedKeyTime);
			}
			// We need to bake: Start from this key up until the next key (non-inclusive). We always want to put a keyframe at
			// KeyTime, but then snap the other ones to the stage framerate
			else
			{

#Loc: <Workspace>/Engine/Plugins/Importers/USDImporter/Source/USDUtilities/Private/USDPrimConversion.cpp:2421

Scope (from outer to inner):

file
function     bool UnrealToUsd::ConvertBoundsVectorTracks
lambda-function

Source code excerpt:

				for (FFrameTime EvalTime = KeyTime; EvalTime < NextKeyTime; EvalTime += BakeInterval)
				{
					FFrameNumber BakedKeyTime = FFrameRate::Snap(EvalTime, Resolution, DisplayRate).FloorToFrame();
					OutBakeTimes.Emplace(BakedKeyTime);
				}
			}
		}
	};

#Loc: <Workspace>/Engine/Plugins/Importers/USDImporter/Source/USDUtilities/Private/USDPrimConversion.cpp:2565

Scope (from outer to inner):

file
function     bool UnrealToUsd::Convert3DTransformTrack
lambda-function

Source code excerpt:

			if (KeyValue.InterpMode == StageInterpMode || KeyIndex == (KeyTimes.Num() - 1))
			{
				FFrameNumber SnappedKeyTime = FFrameRate::Snap(KeyTime, Resolution, DisplayRate).FloorToFrame();
				BakeTimes.Emplace(SnappedKeyTime);
			}
			// We need to bake: Start from this key up until the next key (non-inclusive). We always want to put a keyframe at
			// KeyTime, but then snap the other ones to the stage framerate
			else
			{

#Loc: <Workspace>/Engine/Plugins/Importers/USDImporter/Source/USDUtilities/Private/USDPrimConversion.cpp:2579

Scope (from outer to inner):

file
function     bool UnrealToUsd::Convert3DTransformTrack
lambda-function

Source code excerpt:

				for (FFrameTime EvalTime = KeyTime; EvalTime < NextKeyTime; EvalTime += BakeInterval)
				{
					FFrameNumber BakedKeyTime = FFrameRate::Snap(EvalTime, Resolution, DisplayRate).FloorToFrame();
					BakeTimes.Emplace(BakedKeyTime);
				}
			}
		}

		return BakeTimes;

#Loc: <Workspace>/Engine/Plugins/Importers/USDImporter/Source/USDUtilities/Private/USDPrimConversion.cpp:4708

Scope (from outer to inner):

file
function     bool UnrealToUsd::ConvertXformable
lambda-function

Source code excerpt:

			for (FFrameTime EvalTime = StartFrame; EvalTime < EndFrame; EvalTime += Interval)
			{
				FFrameNumber KeyTime = FFrameRate::Snap(EvalTime, Resolution, DisplayRate).FloorToFrame();

				double Result = DefaultValue;
				if (Channel)
				{
					Result = Channel->GetDefault().Get(DefaultValue);
					Channel->Evaluate(KeyTime, Result);

#Loc: <Workspace>/Engine/Plugins/MovieScene/SequencerScripting/Source/SequencerScripting/Private/KeysAndChannels/MovieSceneScriptingChannel.h:211

Scope (from outer to inner):

file
function     static TArray<ScriptingKeyValueType> EvaluateKeysInChannel

Source code excerpt:

				for (FFrameTime EvalTime = InFrame; EvalTime < OutFrame; EvalTime += Interval)
				{
					FFrameNumber KeyTime = FFrameRate::Snap(EvalTime, Resolution, FrameRate).FloorToFrame();
					Channel->Evaluate(KeyTime, OutValues.Emplace_GetRef());
				}
			}
			else
			{
				FFrame::KismetExecutionMessage(TEXT("Unbounded range passed to evaluate keys."), ELogVerbosity::Error);

#Loc: <Workspace>/Engine/Plugins/Runtime/Harmonix/Source/HarmonixDsp/Private/HarmonixDsp/Effects/DistortionV2.cpp:78

Scope (from outer to inner):

file
namespace    Harmonix::Dsp::Effects
function     void FDistortionV2::SetInputGainDb

Source code excerpt:

	}

	void FDistortionV2::SetInputGainDb(float InGainDb, bool Snap)
	{
		SetInputGain(HarmonixDsp::DBToLinear(InGainDb), Snap);
	}

	float FDistortionV2::GetInputGainDb() const
	{
		return HarmonixDsp::LinearToDB(InputGain);
	}

	void FDistortionV2::SetInputGain(float InGain, bool Snap /*= false*/)
	{
		InGain = FMath::Clamp(InGain, 0.0f, 11.0f);
		if (InGain == InputGain.GetTarget())
		{
			return;
		}

#Loc: <Workspace>/Engine/Plugins/Runtime/Harmonix/Source/HarmonixDsp/Private/HarmonixDsp/Effects/DistortionV2.cpp:99

Scope (from outer to inner):

file
namespace    Harmonix::Dsp::Effects
function     void FDistortionV2::SetInputGain

Source code excerpt:


		InputGain = InGain;
		if (Snap)
		{
			InputGain.SnapToTarget();
		}
	}

	void FDistortionV2::SetOutputGainDb(float InGainDb, bool Snap /*= false*/)
	{
		SetOutputGain(HarmonixDsp::DBToLinear(InGainDb), Snap);
	}

	float FDistortionV2::GetOutputGainDb() const
	{
		return HarmonixDsp::LinearToDB(OutputGain);
	}

	void FDistortionV2::SetOutputGain(float InGain, bool Snap /*= false*/)
	{
		InGain = FMath::Clamp(InGain, 0.0f, 11.0f);
		if (InGain == OutputGain.GetTarget())
			return;

		FScopeLock Lock(&SettingsLock);
		OutputGain = InGain;
		if (Snap)
		{
			OutputGain.SnapToTarget();
		}
	}

	void FDistortionV2::SetDryGainDb(float InGainDb, bool InSnap)

#Loc: <Workspace>/Engine/Plugins/Runtime/Harmonix/Source/HarmonixDsp/Private/HarmonixDsp/Effects/DistortionV2.cpp:139

Scope (from outer to inner):

file
namespace    Harmonix::Dsp::Effects
function     void FDistortionV2::SetDryGain

Source code excerpt:

	}

	void FDistortionV2::SetDryGain(float InGain, bool Snap /*= false*/)
	{
		InGain = FMath::Clamp(InGain, 0.0f, 1.0f);
		if (InGain == DryGain.GetTarget())
		{
			return;
		}

#Loc: <Workspace>/Engine/Plugins/Runtime/Harmonix/Source/HarmonixDsp/Private/HarmonixDsp/Effects/DistortionV2.cpp:150

Scope (from outer to inner):

file
namespace    Harmonix::Dsp::Effects
function     void FDistortionV2::SetDryGain

Source code excerpt:


		DryGain = InGain;
		if (Snap)
		{
			DryGain.SnapToTarget();
		}
	}

	void FDistortionV2::SetWetGainDb(float InGainDb, bool InSnap)

#Loc: <Workspace>/Engine/Plugins/Runtime/Harmonix/Source/HarmonixDsp/Private/HarmonixDsp/Effects/DistortionV2.cpp:167

Scope (from outer to inner):

file
namespace    Harmonix::Dsp::Effects
function     void FDistortionV2::SetWetGain

Source code excerpt:

	}

	void FDistortionV2::SetWetGain(float InGain, bool Snap /*= false*/)
	{
		InGain = FMath::Clamp(InGain, 0.0f, 1.0f);
		if (InGain == WetGain.GetTarget())
		{
			return;
		}

#Loc: <Workspace>/Engine/Plugins/Runtime/Harmonix/Source/HarmonixDsp/Private/HarmonixDsp/Effects/DistortionV2.cpp:179

Scope (from outer to inner):

file
namespace    Harmonix::Dsp::Effects
function     void FDistortionV2::SetWetGain

Source code excerpt:


		WetGain = InGain;
		if (Snap)
		{
			WetGain.SnapToTarget();
		}
	}

	void FDistortionV2::SetMix(float Mix, bool InSnap)

#Loc: <Workspace>/Engine/Plugins/Runtime/Harmonix/Source/HarmonixDsp/Private/HarmonixDsp/Panner.cpp:18

Scope (from outer to inner):

file
function     void FPanner::UpdatePanRamper

Source code excerpt:

}

void FPanner::UpdatePanRamper(bool Snap)
{
	float newPanTarget = OffsetPan + StartingPolarPan;
	if (Snap)
	{
		AggregatedPanRamper.SnapTo(newPanTarget, OriginalPannerDetails.IsCircular());
	}
	else
	{
		AggregatedPanRamper.SetTarget(newPanTarget, OriginalPannerDetails.IsCircular());

#Loc: <Workspace>/Engine/Plugins/Runtime/Harmonix/Source/HarmonixDsp/Private/HarmonixDsp/Panner.cpp:31

Scope (from outer to inner):

file
function     void FPanner::UpdateEdgeProximityRamper

Source code excerpt:

}

void FPanner::UpdateEdgeProximityRamper(bool Snap)
{
	float newEdgeProxTarget = OffsetEdgeProximity * StartingEdgeProximity;
	if (Snap)
	{
		EdgeProximityRamper.SnapTo(newEdgeProxTarget);
	}
	else
	{
		EdgeProximityRamper.SetTarget(newEdgeProxTarget);

#Loc: <Workspace>/Engine/Plugins/Runtime/Harmonix/Source/HarmonixDsp/Public/HarmonixDsp/Effects/BiquadFilter.h:561

Scope (from outer to inner):

file
namespace    Harmonix::Dsp::Effects
class        class TMultiChannelBiquadFilter : public TBiquadFilter<T>
function     void Flatten

Source code excerpt:

		}

		void Flatten(bool Snap)
		{
			FreqRamper.SetTarget(20.0f);
			QRamper.SetTarget(1.0f);
			GainRamper.SetTarget(1.0f);
			Settings.Type = EBiquadFilterType::HighPass;

			if (Snap)
			{
				SnapSettings();
			}

			UpdateCoefsFromSettings();
		}

#Loc: <Workspace>/Engine/Plugins/Runtime/Harmonix/Source/HarmonixDsp/Public/HarmonixDsp/Effects/BiquadFilter.h:587

Scope (from outer to inner):

file
namespace    Harmonix::Dsp::Effects
class        class TMultiChannelBiquadFilter : public TBiquadFilter<T>
function     void SetTargetGain

Source code excerpt:

		const FBiquadFilterSettings& GetSettings() const { return Settings; }

		void SetTargetGain(float InGain, bool Snap)
		{
			if (Snap)
			{
				GainRamper.SnapTo(InGain);
				return;
			}

			if (InGain != GainRamper.GetTarget())

#Loc: <Workspace>/Engine/Plugins/Runtime/Harmonix/Source/HarmonixDsp/Public/HarmonixDsp/Effects/BitCrusher.h:16

Scope (from outer to inner):

file
namespace    Harmonix::Dsp::Effects
class        class FBitCrusher

Source code excerpt:


		void SetCrush(uint16 CrushLevel);
		void SetInputGain(float Gain, bool Snap = false);
		void SetOutputGain(float Gain, bool Snap = false);
		void SetWetGain(float Wet, bool Snap = false);
		void SetSampleHoldFactor(uint16 SampleHoldFactor);

		uint16 GetCrush() const { return CrushCoef; }
		uint16 GetSampleHoldFactor() const { return SampleHoldFactor; }
		float GetWetGain() const { return WetGainRamper.GetTarget(); }

#Loc: <Workspace>/Engine/Plugins/Runtime/Harmonix/Source/HarmonixDsp/Public/HarmonixDsp/Effects/DistortionV2.h:23

Scope (from outer to inner):

file
namespace    Harmonix::Dsp::Effects
class        class FDistortionV2

Source code excerpt:

		void Process(TAudioBuffer<float>& InBuffer, TAudioBuffer<float>& OutBuffer);

		void  SetInputGainDb(float InGainDb, bool Snap = false);
		float GetInputGainDb() const;

		void SetInputGain(float InGain, bool Snap = false);
		float GetInputGain() const { return InputGain; }

		void  SetOutputGainDb(float InGainDb, bool Snap = false);
		float GetOutputGainDb() const;

		void SetOutputGain(float InGain, bool Snap = false);
		float GetOutputGain() const { return OutputGain; }

		void  SetDryGainDb(float InGainDb, bool Snap = false);
		float GetDryGainDb() const;

		void SetDryGain(float InGain, bool Snap = false);
		float GetDryGain() const { return DryGain; }

		void  SetWetGainDb(float InGainDb, bool Snap = false);
		float GetWetGainDb() const;

		void SetWetGain(float InGain, bool Snap = false);
		float GetWetGain() const { return WetGain; }

		void  SetMix(float Mix, bool Snap = false);
		void  SetDCOffset(float Offset, bool Snap = false);

		float GetDCOffset() const { return DCAdjust; }
		void  SetType(uint8 InType);
		void  SetType(EDistortionTypeV2 Type);
		EDistortionTypeV2 GetType() const { return Type; }
		void SetupFilter(int32 Index, const FDistortionFilterSettings& InSettings);

#Loc: <Workspace>/Engine/Plugins/Runtime/Harmonix/Source/HarmonixDsp/Public/HarmonixDsp/Effects/DistortionV2.h:60

Scope (from outer to inner):

file
namespace    Harmonix::Dsp::Effects
class        class FDistortionV2

Source code excerpt:

		void SetSampleRate(uint32 SampleRate);

		void Setup(const FDistortionSettingsV2& Settings, uint32 SampleRate, uint32 RenderBufferSizeFrames, bool Snap);

		void Reset();

		static const int32 kMaxChannels = 8;
		static const int32 kMaxFilterPasses = 3;
		static const int32 kRampHops = 16;

#Loc: <Workspace>/Engine/Plugins/VirtualProduction/DMX/DMXControlConsole/Source/DMXControlConsoleEditor/Private/Widgets/SDMXControlConsoleEditorSpinBoxVertical.h:392

Scope (from outer to inner):

file
function     virtual FReply OnMouseButtonUp

Source code excerpt:

				if (CurrentDelta != 0 && !CommitWithMultiplier(MouseEvent))
				{
					InternalValue = Snap(InternalValue, CurrentDelta);
				}

				NotifyValueCommitted();
			}

			bDragging = false;

#Loc: <Workspace>/Engine/Plugins/VirtualProduction/DMX/DMXControlConsole/Source/DMXControlConsoleEditor/Private/Widgets/SDMXControlConsoleEditorSpinBoxVertical.h:816

Scope (from outer to inner):

file
function     void CommitValue

Source code excerpt:

			if( CurrentDelta != 0 )
			{
				NewValue = Snap(NewValue, CurrentDelta); // snap numeric point value to nearest Delta
			}
		}		

		// Update the max slider value based on the current value if we're in dynamic mode
		if (SupportDynamicSliderMaxValue.Get() && ValueAttribute.Get() > GetMaxSliderValue())
		{

#Loc: <Workspace>/Engine/Plugins/VirtualProduction/DMX/DMXControlConsole/Source/DMXControlConsoleEditor/Private/Widgets/SDMXControlConsoleEditorSpinBoxVertical.h:868

Scope (from outer to inner):

file
function     static double Snap

Source code excerpt:


	/** Snaps value to a nearest grid multiple. Clamps value if it's outside numeric range  */
	static double Snap(double InValue, double InGrid)
	{
		double Result = FMath::GridSnap(InValue, InGrid);
		return FMath::Clamp<double>(Result, TNumericLimits<NumericType>::Lowest(), TNumericLimits<NumericType>::Max());
	}

private:

#Loc: <Workspace>/Engine/Plugins/VirtualProduction/DMX/DMXEngine/Source/DMXEditor/Private/Factories/DMXGDTFImporter.cpp:489

Scope: file

Source code excerpt:


                                    GDTFAttributeDefinitions->FindAtributeByName(*LogicalChannelNode->GetAttribute("Attribute"), ImportLogicalChannel.Attribute);
                                    ImportLogicalChannel.Snap = DMXImport::GetEnumValueFromString<EDMXImportGDTFSnap>(LogicalChannelNode->GetAttribute("Snap"));
                                    ImportLogicalChannel.Master = DMXImport::GetEnumValueFromString<EDMXImportGDTFMaster>(LogicalChannelNode->GetAttribute("Master"));

                                    LexTryParseString(ImportLogicalChannel.MibFade, *LogicalChannelNode->GetAttribute("MibFade"));
                                    LexTryParseString(ImportLogicalChannel.DMXChangeTimeLimit, *LogicalChannelNode->GetAttribute("DMXChangeTimeLimit"));

                                    if (const FXmlNode* ChannelFunctionNode = LogicalChannelNode->FindChildNode("ChannelFunction"))

#Loc: <Workspace>/Engine/Plugins/VirtualProduction/DMX/DMXEngine/Source/DMXRuntime/Public/Library/DMXImportGDTF.h:597

Scope: file

Source code excerpt:


    UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "DMX")
    EDMXImportGDTFSnap Snap = EDMXImportGDTFSnap::No;

    UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "DMX")
    EDMXImportGDTFMaster Master = EDMXImportGDTFMaster::None;

    UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "DMX")
    float MibFade = 0.f;

#Loc: <Workspace>/Engine/Source/Developer/TraceInsights/Private/Insights/ViewModels/MarkersTimingTrack.cpp:336

Scope (from outer to inner):

file
function     double FMarkersTimingTrack::Snap

Source code excerpt:

////////////////////////////////////////////////////////////////////////////////////////////////////

double FMarkersTimingTrack::Snap(double Time, const double SnapTolerance)
{
	if (bUseOnlyBookmarks && !BookmarkCategory)
	{
		return Time;
	}

#Loc: <Workspace>/Engine/Source/Developer/TraceInsights/Private/Insights/ViewModels/MarkersTimingTrack.h:89

Scope (from outer to inner):

file
class        class FMarkersTimingTrack : public FBaseTimingTrack

Source code excerpt:

	virtual void InitTooltip(FTooltipDrawState& InOutTooltip, const ITimingEvent& InTooltipEvent) const override;

	double Snap(double Time, double SnapTolerance);

private:
	void ResetCache()
	{
		TimeMarkerBoxes.Reset();
		TimeMarkerTexts.Reset();

#Loc: <Workspace>/Engine/Source/Developer/TraceInsights/Private/Insights/Widgets/STimingView.cpp:2446

Scope (from outer to inner):

file
function     FReply STimingView::OnMouseMove

Source code excerpt:

				{
					const double SnapTolerance = 5.0 / Viewport.GetScaleX(); // +/- 5 pixels
					Time = MarkersTrack->Snap(Time, SnapTolerance);
				}

				TSharedRef<Insights::FTimeMarker> ScrubbingTimeMarker = TimeRulerTrack->GetScrubbingTimeMarker();
				ScrubbingTimeMarker->SetTime(Time);
				RaiseTimeMarkerChanging(ScrubbingTimeMarker);
			}

#Loc: <Workspace>/Engine/Source/Editor/ComponentVisualizers/Private/SplineComponentVisualizer.cpp:324

Scope (from outer to inner):

file
function     FSplineComponentVisualizer::FSplineComponentVisualizer

Source code excerpt:

	, AddKeyLockedAxis(EAxis::None)
	, bIsSnappingToActor(false)
	, SnapToActorMode(ESplineComponentSnapMode::Snap)
{
	FSplineComponentVisualizerCommands::Register();

	SplineComponentVisualizerActions = MakeShareable(new FUICommandList);

	SplineCurvesProperty = FindFProperty<FProperty>(USplineComponent::StaticClass(), GET_MEMBER_NAME_CHECKED(USplineComponent, SplineCurves));

#Loc: <Workspace>/Engine/Source/Editor/ComponentVisualizers/Private/SplineComponentVisualizer.cpp:414

Scope (from outer to inner):

file
function     void FSplineComponentVisualizer::OnRegister

Source code excerpt:

	SplineComponentVisualizerActions->MapAction(
		Commands.SnapKeyToNearestSplinePoint,
		FExecuteAction::CreateSP(this, &FSplineComponentVisualizer::OnSnapKeyToNearestSplinePoint, ESplineComponentSnapMode::Snap),
		FCanExecuteAction::CreateSP(this, &FSplineComponentVisualizer::IsSingleKeySelected));

	SplineComponentVisualizerActions->MapAction(
		Commands.AlignKeyToNearestSplinePoint,
		FExecuteAction::CreateSP(this, &FSplineComponentVisualizer::OnSnapKeyToNearestSplinePoint, ESplineComponentSnapMode::AlignToTangent),
		FCanExecuteAction::CreateSP(this, &FSplineComponentVisualizer::IsSingleKeySelected));

#Loc: <Workspace>/Engine/Source/Editor/ComponentVisualizers/Private/SplineComponentVisualizer.cpp:429

Scope (from outer to inner):

file
function     void FSplineComponentVisualizer::OnRegister

Source code excerpt:

	SplineComponentVisualizerActions->MapAction(
		Commands.SnapKeyToActor,
		FExecuteAction::CreateSP(this, &FSplineComponentVisualizer::OnSnapKeyToActor, ESplineComponentSnapMode::Snap),
		FCanExecuteAction::CreateSP(this, &FSplineComponentVisualizer::IsSingleKeySelected));

	SplineComponentVisualizerActions->MapAction(
		Commands.AlignKeyToActor,
		FExecuteAction::CreateSP(this, &FSplineComponentVisualizer::OnSnapKeyToActor, ESplineComponentSnapMode::AlignToTangent),
		FCanExecuteAction::CreateSP(this, &FSplineComponentVisualizer::IsSingleKeySelected));

#Loc: <Workspace>/Engine/Source/Editor/ComponentVisualizers/Private/SplineComponentVisualizer.cpp:850

Scope (from outer to inner):

file
function     void FSplineComponentVisualizer::DrawVisualizationHUD

Source code excerpt:

				};

				if (SnapToActorMode == ESplineComponentSnapMode::Snap)
				{
					DisplaySnapToActorHelpText(SnapToActorHelp);
				}
				else if (SnapToActorMode == ESplineComponentSnapMode::AlignToTangent)
				{
					DisplaySnapToActorHelpText(AlignToActorHelp);

#Loc: <Workspace>/Engine/Source/Editor/ComponentVisualizers/Public/SplineComponentVisualizer.h:208

Scope: file

Source code excerpt:

enum class ESplineComponentSnapMode
{
	Snap,
	AlignToTangent,
	AlignPerpendicularToTangent
};

/** SplineComponent visualizer/edit functionality */
class COMPONENTVISUALIZERS_API FSplineComponentVisualizer : public FComponentVisualizer, public FGCObject

#Loc: <Workspace>/Engine/Source/Editor/ComponentVisualizers/Public/SplineComponentVisualizer.h:335

Scope (from outer to inner):

file
class        class FSplineComponentVisualizer : public FComponentVisualizer, public FGCObject

Source code excerpt:


	/** Snapping: set snap to actor temporary mode */
	virtual void SetSnapToActorMode(const bool bInIsSnappingToActor, const ESplineComponentSnapMode InSnapMode = ESplineComponentSnapMode::Snap);

	/** Snapping: get snap to actor temporary mode */
	virtual bool GetSnapToActorMode(ESplineComponentSnapMode& OutSnapMode) const;

	/** Reset temporary modes after inputs are handled. */
	virtual void ResetTempModes();

#Loc: <Workspace>/Engine/Source/Editor/CurveEditor/Private/SCurveEditorPanel.cpp:484

Scope (from outer to inner):

file
function     void SCurveEditorPanel::SetAxisSnapping

Source code excerpt:

void SCurveEditorPanel::SetAxisSnapping(EAxisList::Type InAxis)
{
	FCurveEditorAxisSnap Snap = CurveEditor->GetAxisSnap();
	Snap.RestrictedAxisList = InAxis;
	CurveEditor->SetAxisSnap(Snap);
}

void SCurveEditorPanel::Tick(const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime)
{
	bool bWasRefreshed = false;
	if (bNeedsRefresh || CachedActiveCurvesSerialNumber != CurveEditor->GetActiveCurvesSerialNumber())

#Loc: <Workspace>/Engine/Source/Editor/Persona/Private/AnimTimeline/AnimModel.cpp:239

Scope (from outer to inner):

file
function     bool FAnimModel::Snap

Source code excerpt:

}

bool FAnimModel::Snap(float& InOutTime, float InSnapMargin, TArrayView<const FName> InSkippedSnapTypes) const
{
	double DoubleTime = InOutTime;
	bool bResult = Snap(DoubleTime, (double)InSnapMargin, InSkippedSnapTypes);
	InOutTime = static_cast<float>(DoubleTime);
	return bResult;
}

bool FAnimModel::Snap(double& InOutTime, double InSnapMargin, TArrayView<const FName> InSkippedSnapTypes) const
{
	InSnapMargin = FMath::Max(InSnapMargin, (double)KINDA_SMALL_NUMBER);

	double ClosestDelta = DBL_MAX;
	double ClosestSnapTime = DBL_MAX;

#Loc: <Workspace>/Engine/Source/Editor/Persona/Private/AnimTimeline/AnimModel.h:181

Scope (from outer to inner):

file
class        class FAnimModel : public TSharedFromThis<FAnimModel>, public FGCObject

Source code excerpt:

	 * @return true if a snap occurred
	 */
	bool Snap(float& InOutTime, float InSnapMargin, TArrayView<const FName> InSkippedSnapTypes) const;
	bool Snap(double& InOutTime, double InSnapMargin, TArrayView<const FName> InSkippedSnapTypes) const;

	/** Toggle the specified snap type */
	void ToggleSnap(FName InSnapName);

	/** Check whether the specified snap is enabled */
	bool IsSnapChecked(FName InSnapName) const;

#Loc: <Workspace>/Engine/Source/Editor/Persona/Private/AnimTimeline/AnimTimeSliderController.cpp:621

Scope: file

Source code excerpt:

			{
				const double SnapMargin = (ScrubConstants::SnapMarginInPixels / static_cast<double>(RangeToScreen.PixelsPerInput));
				WeakModel.Pin()->Snap(Time, SnapMargin, { FName("MontageSection") });
			}

			SetEditableTime(DraggedTimeIndex, static_cast<float>(Time), false);
			DraggedTimeIndex = INDEX_NONE;
		}
		else

#Loc: <Workspace>/Engine/Source/Editor/Persona/Private/AnimTimeline/AnimTimeSliderController.cpp:782

Scope: file

Source code excerpt:

				{
					const double SnapMargin = (ScrubConstants::SnapMarginInPixels / static_cast<double>(RangeToScreen.PixelsPerInput));
					WeakModel.Pin()->Snap(Time, SnapMargin, { FName("MontageSection") });
				}

				SetEditableTime(DraggedTimeIndex, static_cast<float>(Time), true);
			}
		}
	}

#Loc: <Workspace>/Engine/Source/Editor/Persona/Private/AnimTimeline/AnimTimelineTrack_NotifiesPanel.cpp:288

Scope (from outer to inner):

file
function     TSharedRef<SAnimNotifyPanel> FAnimTimelineTrack_NotifiesPanel::GetAnimNotifyPanel

Source code excerpt:

			.OnSetInputViewRange(this, &FAnimTimelineTrack_NotifiesPanel::OnSetInputViewRange)
			.OnInvokeTab(GetModel()->OnInvokeTab)
			.OnSnapPosition(&GetModel().Get(), &FAnimModel::Snap)
			.OnGetTimingNodeVisibility(this, &FAnimTimelineTrack_NotifiesPanel::OnGetTimingNodeVisibility)
			.OnNotifiesChanged_Lambda([this]()
			{ 
				Update();
				GetModel()->OnTracksChanged().Broadcast();
				 

#Loc: <Workspace>/Engine/Source/Editor/PhysicsAssetEditor/Private/PhysicsAssetEditorActions.h:29

Scope (from outer to inner):

file
class        class FPhysicsAssetEditorCommands : public TCommands<FPhysicsAssetEditorCommands>

Source code excerpt:

	TSharedPtr<FUICommandInfo> AddBodies;
	TSharedPtr<FUICommandInfo> ApplyPhysicalMaterial;
	TSharedPtr<FUICommandInfo> Snap;
	TSharedPtr<FUICommandInfo> CopyBodies;
	TSharedPtr<FUICommandInfo> PasteBodies;
	TSharedPtr<FUICommandInfo> CopyShapes;
	TSharedPtr<FUICommandInfo> PasteShapes;
	TSharedPtr<FUICommandInfo> CopyProperties;
	TSharedPtr<FUICommandInfo> PasteProperties;

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/MVVM/Views/SSequencerTrackAreaView.cpp:132

Scope (from outer to inner):

file
namespace    UE
namespace    Sequencer
function     FReply SSequencerTrackAreaView::OnDragOver

Source code excerpt:

			if (Sequencer->GetSequencerSettings()->GetIsSnapEnabled() && Sequencer->GetSequencerSettings()->GetSnapPlayTimeToInterval())
			{
				DropFrameNumber = FFrameRate::Snap(DropFrameNumber, Sequencer->GetFocusedTickResolution(), Sequencer->GetFocusedDisplayRate()).FrameNumber;
			}

			// If shift is pressed, drop onto the current time
			if (FSlateApplication::Get().GetModifierKeys().IsShiftDown())
			{
				DropFrameNumber = Sequencer->GetLocalTime().Time.FrameNumber;

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/MVVM/Views/SSequencerTrackAreaView.cpp:185

Scope (from outer to inner):

file
namespace    UE
namespace    Sequencer
function     FReply SSequencerTrackAreaView::OnDrop

Source code excerpt:

			if (Sequencer->GetSequencerSettings()->GetIsSnapEnabled() && Sequencer->GetSequencerSettings()->GetSnapPlayTimeToInterval())
			{
				DropFrameNumber = FFrameRate::Snap(DropFrameNumber, Sequencer->GetFocusedTickResolution(), Sequencer->GetFocusedDisplayRate()).FrameNumber;
			}

			// If shift is pressed, drop onto the current time
			if (FSlateApplication::Get().GetModifierKeys().IsShiftDown())
			{
				DropFrameNumber = Sequencer->GetLocalTime().Time.FrameNumber;

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/Sequencer.cpp:3342

Scope (from outer to inner):

file
function     void FSequencer::SnapSequencerTime

Source code excerpt:

		{
			// Snap (round) to display rate
			ScrubTime = FFrameRate::Snap(ScrubTime, TickResolution, DisplayRate);
		}
	}
}

void FSequencer::ForceEvaluate()
{

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/Sequencer.cpp:9234

Scope (from outer to inner):

file
function     void FSequencer::Pause

Source code excerpt:


		// Snap to the focused play rate
		FFrameTime RootPosition  = FFrameRate::Snap(LocalTime.Time, LocalTime.Rate, FocusedDisplayRate) * RootToLocalTransform.InverseFromLoop(RootToLocalLoopCounter);

		// Convert the root position from tick resolution time base (the output rate), to the play position input rate
		FFrameTime InputPosition = ConvertFrameTime(RootPosition, PlayPosition.GetOutputRate(), PlayPosition.GetInputRate());
		EvaluateInternal(PlayPosition.PlayTo(InputPosition));
	}
	else

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/SequencerHotspots.cpp:377

Scope (from outer to inner):

file
namespace    UE
namespace    Sequencer
function     TSharedPtr<ISequencerEditToolDragOperation> FKeyBarHotspot::InitiateDrag
function     void OnDrag

Source code excerpt:

				const float PixelSnapWidth = 20.f;
				const int32 SnapThreshold = VirtualTrackArea.PixelDeltaToFrame(PixelSnapWidth).FloorToFrame().Value;
				if (TOptional<FSequencerSnapField::FSnapResult> SnappedTime = SnapField.Snap(NewKeyTimes, SnapThreshold))
				{
					FFrameTime SnappedDiff = SnappedTime->SnappedTime - SnappedTime->OriginalTime;
					for (int32 Index = 0; Index < RelativeStartTimes.Num(); ++Index)
					{
						NewKeyTimes[Index] = NewKeyTimes[Index] + SnappedDiff;
					}

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/SequencerTimeSliderController.cpp:136

Scope (from outer to inner):

file
function     FFrameTime FSequencerTimeSliderController::ComputeScrubTimeFromMouse

Source code excerpt:

			{
				// Snap (round) to display rate
				ScrubTime = FFrameRate::Snap(ScrubTime, GetTickResolution(), GetDisplayRate());
			}
		}

		// SnapTimeToNearestKey will return ScrubTime unmodified if there is no key within range.
		ScrubTime = SnapTimeToNearestKey(MouseEvent, RangeToScreen, CursorPos.X, ScrubTime);
	}

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/SequencerTimeSliderController.cpp:1277

Scope (from outer to inner):

file
function     void FSequencerTimeSliderController::CommitScrubPosition

Source code excerpt:

		if (Sequencer->GetSequencerSettings()->GetIsSnapEnabled() && Sequencer->GetSequencerSettings()->GetSnapPlayTimeToInterval())
		{
			LowerBound = FFrameRate::Snap(LowerBound, TickResolution, DisplayRate);
			UpperBound = FFrameRate::Snap(UpperBound, TickResolution, DisplayRate);
		}

		NewValue = FMath::Clamp(NewValue, LowerBound, UpperBound);
	}

	// Manage the scrub position ourselves if its not bound to a delegate

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/Tools/DragOperation_Stretch.cpp:120

Scope (from outer to inner):

file
namespace    UE
namespace    Sequencer
function     void FEditToolDragOperation_Stretch::OnDrag

Source code excerpt:

		const int32 SnapThreshold = (SnapThresholdPx * Sequencer->GetFocusedTickResolution()).FloorToFrame().Value;

		TOptional<FSequencerSnapField::FSnapResult> SnappedResult = SnapField->Snap(CurrentTime.RoundToFrame(), SnapThreshold);
		if (SnappedResult.IsSet())
		{
			CurrentTime = SnappedResult->SnappedTime;
		}
	}

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/Tools/DragOperation_Stretch.cpp:161

Scope (from outer to inner):

file
namespace    UE
namespace    Sequencer
function     void FEditToolDragOperation_Stretch::OnEndDrag

Source code excerpt:

		const int32 SnapThreshold = (SnapThresholdPx * Sequencer->GetFocusedTickResolution()).FloorToFrame().Value;

		TOptional<FSequencerSnapField::FSnapResult> SnappedResult = SnapField->Snap(CurrentTime.RoundToFrame(), SnapThreshold);
		if (SnappedResult.IsSet())
		{
			CurrentTime = SnappedResult->SnappedTime;
		}
	}

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/Tools/EditToolDragOperations.cpp:308

Scope (from outer to inner):

file
function     void FResizeSection::OnDrag

Source code excerpt:

		if (Settings->GetSnapSectionTimesToSections())
		{
			SnappedTime = SnapField->Snap(SectionTimes, SnapThreshold);
		}

		if (SnappedTime.IsSet())
		{
			// Add the snapped amount onto the delta
			DeltaTime += (SnappedTime->SnappedTime - SnappedTime->OriginalTime).RoundToFrame();

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/Tools/EditToolDragOperations.cpp:661

Scope (from outer to inner):

file
function     void FManipulateSectionEasing::OnDrag

Source code excerpt:

		if (Settings->GetSnapSectionTimesToSections())
		{
			SnappedTime = SnapField->Snap(SnapTimes, SnapThreshold);
		}

		if (SnappedTime.IsSet())
		{
			// Add the snapped amount onto the delta
			DeltaTime += SnappedTime->SnappedTime - SnappedTime->OriginalTime;

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/Tools/EditToolDragOperations.cpp:873

Scope (from outer to inner):

file
function     void FMoveKeysAndSections::OnDrag

Source code excerpt:

		{
			// This may or may not set the SnappedTime depending on if there are any sections within the threshold.
			SnappedTime = SnapField->Snap(ValidSnapMarkers, SnapThreshold);
		}

		// If they actually snapped to something (snapping may be on but settings might dictate nothing to snap to) add the difference
		// to our current MouseTime so that MouseTime reflects the amount needed to move to get to the whole snap point.
		if (SnappedTime.IsSet())
		{

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/Tools/SequencerSnapField.cpp:206

Scope (from outer to inner):

file
function     TOptional<FSequencerSnapField::FSnapResult> FSequencerSnapField::Snap

Source code excerpt:

}

TOptional<FSequencerSnapField::FSnapResult> FSequencerSnapField::Snap(const FFrameTime& InTime, const FFrameTime& Threshold) const
{
	int32 Min = 0;
	int32 Max = SortedSnaps.Num();

	// Binary search, then linearly search a range
	for ( ; Min != Max ; )

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/Tools/SequencerSnapField.cpp:271

Scope (from outer to inner):

file
function     TOptional<FSequencerSnapField::FSnapResult> FSequencerSnapField::Snap

Source code excerpt:

}

TOptional<FSequencerSnapField::FSnapResult> FSequencerSnapField::Snap(const TArray<FFrameTime>& InTimes, const FFrameTime& Threshold) const
{
	TOptional<FSnapResult> ProspectiveSnap;

	int32 NumSnaps = 0;
	float MaxSnapWeight = 0.f;
	for (FFrameTime Time : InTimes)

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/Tools/SequencerSnapField.cpp:283

Scope (from outer to inner):

file
function     TOptional<FSequencerSnapField::FSnapResult> FSequencerSnapField::Snap

Source code excerpt:

		if (bSnapToLikeTypes)
		{
			ThisSnap = Snap(Time, Threshold);
		}

		if (bSnapToInterval)
		{
			FFrameTime ThisTime = ThisSnap.IsSet() ? ThisSnap->SnappedTime : Time;
			FFrameTime IntervalTime = FFrameRate::TransformTime(ThisTime, TickResolution, DisplayRate);

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/Tools/SequencerSnapField.h:44

Scope (from outer to inner):

file
class        class FSequencerSnapField

Source code excerpt:


	/** Snap the specified time to this field with the given threshold */
	TOptional<FSnapResult> Snap(const FFrameTime& InTime, const FFrameTime& Threshold) const;

	/** Snap the specified times to this field with the given threshold. Will return the closest snap value of the entire intersection. */
	TOptional<FSnapResult> Snap(const TArray<FFrameTime>& InTimes, const FFrameTime& Threshold) const;

private:
	/** Array of snap points, approximately grouped, and sorted in ascending order by time */
	TArray<UE::Sequencer::FSnapPoint> SortedSnaps;

	FFrameRate TickResolution;

#Loc: <Workspace>/Engine/Source/Runtime/Core/Public/Misc/FrameRate.h:115

Scope: file

Source code excerpt:

	 * @return A frame time in the destination frame rate
	 */
	static FFrameTime Snap(FFrameTime SourceTime, FFrameRate SourceRate, FFrameRate SnapToRate);

	/**
	 * Convert this frame rate to a prettified text string.
	 * @note: Does not check against decorated frame rate names in FCommonFrameRates
	 */
	CORE_API FText ToPrettyText() const;

#Loc: <Workspace>/Engine/Source/Runtime/Core/Public/Misc/FrameRate.h:300

Scope (from outer to inner):

file
function     inline FFrameTime FFrameRate::Snap

Source code excerpt:

}

inline FFrameTime FFrameRate::Snap(FFrameTime SourceTime, FFrameRate SourceRate, FFrameRate SnapToRate)
{
	return ConvertFrameTime(ConvertFrameTime(SourceTime, SourceRate, SnapToRate).RoundToFrame(), SnapToRate, SourceRate);
}

inline bool FFrameRate::IsMultipleOf(FFrameRate Other) const
{

#Loc: <Workspace>/Engine/Source/Runtime/Datasmith/DirectLink/Private/DirectLinkParameterStore.cpp:52

Scope (from outer to inner):

file
namespace    DirectLink
function     FParameterStoreSnapshot FParameterStore::Snapshot

Source code excerpt:

FParameterStoreSnapshot FParameterStore::Snapshot() const
{
	FParameterStoreSnapshot Snap;
	Snap.ReserveParamCount(GetParameterCount());

	for (const FParameterStore::FParameterDetails& ParamDetails : Parameters)
	{
		Snap.AddParam(
			ParamDetails.Name,
			ParamDetails.StorageMethod,
			ParamDetails.StorageLocation
		);
	}

	return Snap;
}

void FParameterStore::Update(const FParameterStoreSnapshot& NewValues)
{
	for (const FParameterStoreSnapshot::FParameterDetails& ParamUpdate : NewValues.Parameters)
	{

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:241

Scope: file

Source code excerpt:

SHOWFLAG_FIXED_IN_SHIPPING(0, Grid, SFG_Normal, NSLOCTEXT("UnrealEd", "GridSF", "Grid"))
/** To show the snap in editor (only for editor view ports, red dots) */
SHOWFLAG_FIXED_IN_SHIPPING(0, Snap, SFG_Hidden, NSLOCTEXT("UnrealEd", "SnapSF", "Snap"))
/** In the filled view modeModeWidgetss, render mesh edges as well as the filled surfaces. */
SHOWFLAG_FIXED_IN_SHIPPING(0, MeshEdges, SFG_Advanced, NSLOCTEXT("UnrealEd", "MeshEdgesSF", "Mesh Edges"))
/** Complex cover rendering */
SHOWFLAG_FIXED_IN_SHIPPING(0, Cover, SFG_Hidden, NSLOCTEXT("UnrealEd", "CoverSF", "Cover"))
/** Spline rendering */
SHOWFLAG_FIXED_IN_SHIPPING(0, Splines, SFG_Advanced, NSLOCTEXT("UnrealEd", "SplinesSF", "Splines"))

#Loc: <Workspace>/Engine/Source/Runtime/MovieSceneTracks/Private/Tracks/MovieSceneCameraCutTrack.cpp:344

Scope (from outer to inner):

file
function     void UMovieSceneCameraCutTrack::RearrangeAllSections

Source code excerpt:

		{
			const FFrameTime TimeAtHalf = CurSectionRange.GetLowerBoundValue() + FMath::FloorToInt(OverlapOrGap.Value / 2.f);
			MeetupFrame = FFrameRate::Snap(TimeAtHalf, TickResolution, DisplayRate).CeilToFrame();
		}

		if (MeetupFrame.IsSet())
		{
			PrevSectionRange.SetUpperBoundValue(MeetupFrame.GetValue());
			PrevSection->SetRange(PrevSectionRange);

#Loc: <Workspace>/Engine/Source/Runtime/TimeManagement/Private/TimeManagementBlueprintLibrary.cpp:62

Scope (from outer to inner):

file
function     FFrameTime UTimeManagementBlueprintLibrary::SnapFrameTimeToRate

Source code excerpt:

FFrameTime UTimeManagementBlueprintLibrary::SnapFrameTimeToRate(const FFrameTime& SourceTime, const FFrameRate& SourceRate, const FFrameRate& SnapToRate)
{ 
	return FFrameRate::Snap(SourceTime, SourceRate, SnapToRate); 
}

FFrameNumber UTimeManagementBlueprintLibrary::Add_FrameNumberFrameNumber(FFrameNumber A, FFrameNumber B)
{
	FFrameNumber Result = A;
	Result.Value += B.Value;