From 3487c05e38f49f960571daae515533862f8b1cf9 Mon Sep 17 00:00:00 2001 From: Sch <3516520171@qq.com> Date: Mon, 3 Jul 2023 05:02:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=81=9A=E4=B8=AA=E6=97=B6=E9=97=B4=E8=BD=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 6 + .vsconfig | 13 ++ Config/DefaultEditor.ini | 0 Config/DefaultEngine.ini | 207 ++++++++++++++++++ Config/DefaultGame.ini | 3 + Config/DefaultInput.ini | 85 +++++++ Content/MainMap.umap | Bin 0 -> 8783 bytes Content/NewWidgetBlueprint.uasset | Bin 0 -> 31403 bytes Cut5.sln | 73 ++++++ Cut5.uproject | 25 +++ Source/Cut5.Target.cs | 15 ++ Source/Cut5/Cut5.Build.cs | 23 ++ Source/Cut5/Cut5.cpp | 6 + Source/Cut5/Cut5.h | 6 + Source/Cut5/Cut5GameModeBase.cpp | 12 + Source/Cut5/Cut5GameModeBase.h | 18 ++ Source/Cut5/MainHUD.cpp | 25 +++ Source/Cut5/MainHUD.h | 19 ++ Source/Cut5/WidgetInterface.cpp | 7 + Source/Cut5/WidgetInterface.h | 27 +++ Source/Cut5/Widgets/DefineGlobal.h | 55 +++++ Source/Cut5/Widgets/SCutMainWindow.cpp | 105 +++++++++ Source/Cut5/Widgets/SCutMainWindow.h | 28 +++ Source/Cut5/Widgets/SCutTimeline.cpp | 141 ++++++++++++ Source/Cut5/Widgets/SCutTimeline.h | 47 ++++ Source/Cut5/Widgets/STimelineClip.cpp | 20 ++ Source/Cut5/Widgets/STimelineClip.h | 25 +++ Source/Cut5/Widgets/STimelineProperty.cpp | 52 +++++ Source/Cut5/Widgets/STimelineProperty.h | 31 +++ .../Cut5/Widgets/STimelinePropertyPanel.cpp | 57 +++++ Source/Cut5/Widgets/STimelinePropertyPanel.h | 33 +++ Source/Cut5/Widgets/STimelineTick.cpp | 47 ++++ Source/Cut5/Widgets/STimelineTick.h | 27 +++ Source/Cut5/Widgets/STrackBody.cpp | 121 ++++++++++ Source/Cut5/Widgets/STrackBody.h | 37 ++++ Source/Cut5/Widgets/STrackHead.cpp | 31 +++ Source/Cut5/Widgets/STrackHead.h | 27 +++ Source/Cut5Editor.Target.cs | 15 ++ 38 files changed, 1469 insertions(+) create mode 100644 .gitignore create mode 100644 .vsconfig create mode 100644 Config/DefaultEditor.ini create mode 100644 Config/DefaultEngine.ini create mode 100644 Config/DefaultGame.ini create mode 100644 Config/DefaultInput.ini create mode 100644 Content/MainMap.umap create mode 100644 Content/NewWidgetBlueprint.uasset create mode 100644 Cut5.sln create mode 100644 Cut5.uproject create mode 100644 Source/Cut5.Target.cs create mode 100644 Source/Cut5/Cut5.Build.cs create mode 100644 Source/Cut5/Cut5.cpp create mode 100644 Source/Cut5/Cut5.h create mode 100644 Source/Cut5/Cut5GameModeBase.cpp create mode 100644 Source/Cut5/Cut5GameModeBase.h create mode 100644 Source/Cut5/MainHUD.cpp create mode 100644 Source/Cut5/MainHUD.h create mode 100644 Source/Cut5/WidgetInterface.cpp create mode 100644 Source/Cut5/WidgetInterface.h create mode 100644 Source/Cut5/Widgets/DefineGlobal.h create mode 100644 Source/Cut5/Widgets/SCutMainWindow.cpp create mode 100644 Source/Cut5/Widgets/SCutMainWindow.h create mode 100644 Source/Cut5/Widgets/SCutTimeline.cpp create mode 100644 Source/Cut5/Widgets/SCutTimeline.h create mode 100644 Source/Cut5/Widgets/STimelineClip.cpp create mode 100644 Source/Cut5/Widgets/STimelineClip.h create mode 100644 Source/Cut5/Widgets/STimelineProperty.cpp create mode 100644 Source/Cut5/Widgets/STimelineProperty.h create mode 100644 Source/Cut5/Widgets/STimelinePropertyPanel.cpp create mode 100644 Source/Cut5/Widgets/STimelinePropertyPanel.h create mode 100644 Source/Cut5/Widgets/STimelineTick.cpp create mode 100644 Source/Cut5/Widgets/STimelineTick.h create mode 100644 Source/Cut5/Widgets/STrackBody.cpp create mode 100644 Source/Cut5/Widgets/STrackBody.h create mode 100644 Source/Cut5/Widgets/STrackHead.cpp create mode 100644 Source/Cut5/Widgets/STrackHead.h create mode 100644 Source/Cut5Editor.Target.cs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9ea30a3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.idea +Platforms +Saved +Intermediate +.vs +Binaries diff --git a/.vsconfig b/.vsconfig new file mode 100644 index 0000000..7f1e056 --- /dev/null +++ b/.vsconfig @@ -0,0 +1,13 @@ +{ + "version": "1.0", + "components": [ + "Microsoft.Net.Component.4.6.2.TargetingPack", + "Microsoft.VisualStudio.Component.VC.14.34.17.4.x86.x64", + "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", + "Microsoft.VisualStudio.Component.Windows10SDK", + "Microsoft.VisualStudio.Workload.CoreEditor", + "Microsoft.VisualStudio.Workload.ManagedDesktop", + "Microsoft.VisualStudio.Workload.NativeDesktop", + "Microsoft.VisualStudio.Workload.NativeGame" + ] +} diff --git a/Config/DefaultEditor.ini b/Config/DefaultEditor.ini new file mode 100644 index 0000000..e69de29 diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini new file mode 100644 index 0000000..214ead7 --- /dev/null +++ b/Config/DefaultEngine.ini @@ -0,0 +1,207 @@ + + +[/Script/EngineSettings.GameMapsSettings] +GameDefaultMap=/Game/MainMap.MainMap +EditorStartupMap=/Game/MainMap.MainMap + +[/Script/WindowsTargetPlatform.WindowsTargetSettings] +DefaultGraphicsRHI=DefaultGraphicsRHI_DX12 +-D3D12TargetedShaderFormats=PCD3D_SM5 ++D3D12TargetedShaderFormats=PCD3D_SM6 +-D3D11TargetedShaderFormats=PCD3D_SM5 ++D3D11TargetedShaderFormats=PCD3D_SM5 +Compiler=Default +AudioSampleRate=48000 +AudioCallbackBufferFrameSize=1024 +AudioNumBuffersToEnqueue=1 +AudioMaxChannels=0 +AudioNumSourceWorkers=4 +SpatializationPlugin= +SourceDataOverridePlugin= +ReverbPlugin= +OcclusionPlugin= +CompressionOverrides=(bOverrideCompressionTimes=False,DurationThreshold=5.000000,MaxNumRandomBranches=0,SoundCueQualityIndex=0) +CacheSizeKB=65536 +MaxChunkSizeOverrideKB=0 +bResampleForDevice=False +MaxSampleRate=48000.000000 +HighSampleRate=32000.000000 +MedSampleRate=24000.000000 +LowSampleRate=12000.000000 +MinSampleRate=8000.000000 +CompressionQualityModifier=1.000000 +AutoStreamingThreshold=0.000000 +SoundCueCookQualityIndex=-1 + +[/Script/HardwareTargeting.HardwareTargetingSettings] +TargetedHardwareClass=Desktop +AppliedTargetedHardwareClass=Desktop +DefaultGraphicsPerformance=Scalable +AppliedDefaultGraphicsPerformance=Scalable + +[/Script/Engine.RendererSettings] +r.Mobile.ShadingPath=0 +r.Mobile.SupportGPUScene=False +r.Mobile.AntiAliasing=1 +r.Mobile.FloatPrecisionMode=0 +r.Mobile.AllowDitheredLODTransition=False +r.Mobile.VirtualTextures=False +r.DiscardUnusedQuality=False +r.Shaders.CompressionFormat=2 +r.AllowOcclusionQueries=True +r.MinScreenRadiusForLights=0.030000 +r.MinScreenRadiusForDepthPrepass=0.030000 +r.MinScreenRadiusForCSMDepth=0.010000 +r.PrecomputedVisibilityWarning=False +r.TextureStreaming=True +Compat.UseDXT5NormalMaps=False +r.VirtualTextures=False +r.VT.EnableAutoImport=True +r.VirtualTexturedLightmaps=False +r.VT.AnisotropicFiltering=False +bEnableVirtualTextureOpacityMask=False +r.VT.TileSize=128 +r.VT.TileBorderSize=4 +r.vt.FeedbackFactor=16 +WorkingColorSpaceChoice=sRGB +RedChromaticityCoordinate=(X=0.640000,Y=0.330000) +GreenChromaticityCoordinate=(X=0.300000,Y=0.600000) +BlueChromaticityCoordinate=(X=0.150000,Y=0.060000) +WhiteChromaticityCoordinate=(X=0.312700,Y=0.329000) +r.ClearCoatNormal=False +r.DynamicGlobalIlluminationMethod=0 +r.ReflectionMethod=0 +r.ReflectionCaptureResolution=128 +r.ReflectionEnvironmentLightmapMixBasedOnRoughness=True +r.Lumen.HardwareRayTracing=False +r.Lumen.HardwareRayTracing.LightingMode=0 +r.Lumen.TranslucencyReflections.FrontLayer.EnableForProject=False +r.Lumen.TraceMeshSDFs=0 +r.Shadow.Virtual.Enable=1 +r.RayTracing=False +r.RayTracing.Shadows=False +r.RayTracing.Skylight=False +r.RayTracing.UseTextureLod=False +r.PathTracing=True +r.GenerateMeshDistanceFields=True +r.DistanceFields.DefaultVoxelDensity=0.200000 +r.Nanite.ProjectEnabled=True +r.AllowStaticLighting=True +r.NormalMapsForStaticLighting=False +r.ForwardShading=False +r.VertexFoggingForOpaque=True +r.SeparateTranslucency=True +r.TranslucentSortPolicy=0 +TranslucentSortAxis=(X=0.000000,Y=-1.000000,Z=0.000000) +vr.VRS.HMDFixedFoveationLevel=0 +vr.VRS.HMDFixedFoveationDynamic=False +r.CustomDepth=1 +r.CustomDepthTemporalAAJitter=True +r.PostProcessing.PropagateAlpha=0 +r.DefaultFeature.Bloom=True +r.DefaultFeature.AmbientOcclusion=True +r.DefaultFeature.AmbientOcclusionStaticFraction=True +r.DefaultFeature.AutoExposure=False +r.DefaultFeature.AutoExposure.Method=0 +r.DefaultFeature.AutoExposure.Bias=1.000000 +r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=True +r.DefaultFeature.MotionBlur=False +r.DefaultFeature.LensFlare=False +r.TemporalAA.Upsampling=True +r.AntiAliasingMethod=0 +r.MSAACount=4 +r.DefaultFeature.LightUnits=1 +r.DefaultBackBufferPixelFormat=4 +r.Shadow.UnbuiltPreviewInGame=True +r.StencilForLODDither=False +r.EarlyZPass=3 +r.EarlyZPassOnlyMaterialMasking=False +r.Shadow.CSMCaching=False +r.DBuffer=True +r.ClearSceneMethod=1 +r.VelocityOutputPass=1 +r.Velocity.EnableVertexDeformation=2 +r.SelectiveBasePassOutputs=False +bDefaultParticleCutouts=False +fx.GPUSimulationTextureSizeX=1024 +fx.GPUSimulationTextureSizeY=1024 +r.AllowGlobalClipPlane=False +r.GBufferFormat=1 +r.MorphTarget.Mode=True +r.GPUCrashDebugging=False +vr.InstancedStereo=False +r.MobileHDR=True +vr.MobileMultiView=False +r.Mobile.UseHWsRGBEncoding=False +vr.RoundRobinOcclusion=False +r.MeshStreaming=False +r.HeterogeneousVolumes=True +r.WireframeCullThreshold=5.000000 +r.SupportStationarySkylight=True +r.SupportLowQualityLightmaps=True +r.SupportPointLightWholeSceneShadows=True +r.SupportSkyAtmosphere=True +r.SupportSkyAtmosphereAffectsHeightFog=True +r.SupportCloudShadowOnForwardLitTranslucent=False +r.Shadow.TranslucentPerObject.ProjectEnabled=False +r.Water.SingleLayerWater.SupportCloudShadow=False +r.Substrate=False +r.Substrate.OpaqueMaterialRoughRefraction=False +r.Substrate.Debug.AdvancedVisualizationShaders=False +r.Material.RoughDiffuse=False +r.Material.EnergyConservation=False +r.OIT.SortedPixels=False +r.SkinCache.CompileShaders=False +r.SkinCache.SkipCompilingGPUSkinVF=False +r.SkinCache.DefaultBehavior=1 +r.SkinCache.SceneMemoryLimitInMB=128.000000 +r.Mobile.EnableStaticAndCSMShadowReceivers=True +r.Mobile.EnableMovableLightCSMShaderCulling=True +r.Mobile.Forward.EnableLocalLights=True +r.Mobile.Forward.EnableClusteredReflections=False +r.Mobile.EnableNoPrecomputedLightingCSMShader=False +r.Mobile.AllowDistanceFieldShadows=True +r.Mobile.AllowMovableDirectionalLights=True +r.Mobile.EnableMovableSpotlightsShadow=False +r.GPUSkin.Support16BitBoneIndex=False +r.GPUSkin.Limit2BoneInfluences=False +r.SupportDepthOnlyIndexBuffers=True +r.SupportReversedIndexBuffers=True +r.Mobile.AmbientOcclusion=False +r.GPUSkin.UnlimitedBoneInfluences=False +r.GPUSkin.UnlimitedBoneInfluencesThreshold=8 +DefaultBoneInfluenceLimit=(Default=0,PerPlatform=()) +MaxSkinBones=(Default=65536,PerPlatform=(("Mobile", 256))) +r.Mobile.PlanarReflectionMode=0 +r.Mobile.SupportsGen4TAA=True +bStreamSkeletalMeshLODs=(Default=False,PerPlatform=()) +bDiscardSkeletalMeshOptionalLODs=(Default=False,PerPlatform=()) +VisualizeCalibrationColorMaterialPath=/Engine/EngineMaterials/PPM_DefaultCalibrationColor.PPM_DefaultCalibrationColor +VisualizeCalibrationCustomMaterialPath=None +VisualizeCalibrationGrayscaleMaterialPath=/Engine/EngineMaterials/PPM_DefaultCalibrationGrayscale.PPM_DefaultCalibrationGrayscale + +[/Script/WorldPartitionEditor.WorldPartitionEditorSettings] +CommandletClass=Class'/Script/UnrealEd.WorldPartitionConvertCommandlet' + +[/Script/Engine.UserInterfaceSettings] +bAuthorizeAutomaticWidgetVariableCreation=False + +[/Script/Engine.Engine] ++ActiveGameNameRedirects=(OldGameName="TP_Blank",NewGameName="/Script/Cut5") ++ActiveGameNameRedirects=(OldGameName="/Script/TP_Blank",NewGameName="/Script/Cut5") ++ActiveClassRedirects=(OldClassName="TP_BlankGameModeBase",NewClassName="Cut5GameModeBase") + +[/Script/AndroidFileServerEditor.AndroidFileServerRuntimeSettings] +bEnablePlugin=True +bAllowNetworkConnection=True +SecurityToken=64F25A3B42285FEAB8C132B15063357A +bIncludeInShipping=False +bAllowExternalStartInShipping=False +bCompileAFSProject=False +bUseCompression=False +bLogFiles=False +bReportStats=False +ConnectionType=USBOnly +bUseManualIPAddress=False +ManualIPAddress= + diff --git a/Config/DefaultGame.ini b/Config/DefaultGame.ini new file mode 100644 index 0000000..d325281 --- /dev/null +++ b/Config/DefaultGame.ini @@ -0,0 +1,3 @@ + +[/Script/EngineSettings.GeneralProjectSettings] +ProjectID=DC8863584B4EB976B538D48259B614C0 diff --git a/Config/DefaultInput.ini b/Config/DefaultInput.ini new file mode 100644 index 0000000..4cc3605 --- /dev/null +++ b/Config/DefaultInput.ini @@ -0,0 +1,85 @@ +[/Script/Engine.InputSettings] +-AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f)) +-AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f)) +-AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f)) +-AxisConfig=(AxisKeyName="Gamepad_RightY",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f)) +-AxisConfig=(AxisKeyName="MouseX",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f)) +-AxisConfig=(AxisKeyName="MouseY",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f)) +-AxisConfig=(AxisKeyName="Mouse2D",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f)) ++AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_RightY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MouseX",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MouseY",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Mouse2D",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MouseWheelAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_LeftTriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_RightTriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_Special_Left_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_Special_Left_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) +bAltEnterTogglesFullscreen=True +bF11TogglesFullscreen=True +bUseMouseForTouch=False +bEnableMouseSmoothing=True +bEnableFOVScaling=True +bCaptureMouseOnLaunch=True +bEnableLegacyInputScales=True +bEnableMotionControls=True +bFilterInputByPlatformUser=False +bShouldFlushPressedKeysOnViewportFocusLost=True +bAlwaysShowTouchInterface=False +bShowConsoleOnFourFingerTap=True +bEnableGestureRecognizer=False +bUseAutocorrect=False +DefaultViewportMouseCaptureMode=CapturePermanently_IncludingInitialMouseDown +DefaultViewportMouseLockMode=LockOnCapture +FOVScale=0.011110 +DoubleClickTime=0.200000 +DefaultPlayerInputClass=/Script/EnhancedInput.EnhancedPlayerInput +DefaultInputComponentClass=/Script/EnhancedInput.EnhancedInputComponent +DefaultTouchInterface=/Engine/MobileResources/HUD/DefaultVirtualJoysticks.DefaultVirtualJoysticks +-ConsoleKeys=Tilde ++ConsoleKeys=Tilde ++ConsoleKeys=Caret + diff --git a/Content/MainMap.umap b/Content/MainMap.umap new file mode 100644 index 0000000000000000000000000000000000000000..4b40e1749d65a829d79a5228d6a3078d9563b921 GIT binary patch literal 8783 zcmeHN32+q06>T9AFou8y2+U!SI1ENN2xPF0R;vSHU7#Zn7ssF-NrOf^o7q_*xp1ry zAhM|>=BN;3AZ0=@QH)CgiX#bE#oa?pemIV zziQ@p|Ni~@_y50px>q{z-KW+!HZ?WP4P~rbC&n%j2X&|CC(9bcZ%_5rb^p`CO{4cr zOpYPh)hWlGD9?_K+gNbym6%>Xyc9yRKl}bN`pJx+o~?Sn*ShncL=St6WYcGTG;>N; zVtDn;>Rrpu?ecUb+0y=l=Pu53y?y$Fi29R<&i5!F*>_I7r2N8>_t!6`O|2ibW9Qy- zl0}^;T)Q`KxZenprOtli!;G9g!#BSjzPP5J>&$49T_|t({9Nj)tB-z^u)*=`jMz~mD=+E# zw;9>PDm(+9Uc7wv$cV3z42FN5cwDAbDaYkViaSU0P`wj-4pQty&q+)k5ymU(*(LjJhT_J(ep`i za^Hg+qf*ulhd~Fr+gX#MqW=i$cPQj~P>x zo-}5g=8h>DvDHCtXh$grLt{P%%dz|WV1tq%TG2(Ki zDy2*^6wO^w<2B?;R=;a_9OB|AF*H5Xr?^<=mZ%(>xhct(=E*91tDimxPIl-p?OmjmrHiDZy(L-7J+)M zW@Ko(Q&nWQk*62PdX=oRzL5>vF-WSWRa8oP1s{x+6%JU|!<4H2k$Z(Tyo%tb>OOBd zi~TCXMPV^(POZ|Txe1r;npswao=&MUPdCc7Z)#d4tJ0s{g_w{qU-K$(1l#G1SYpYh zYX)}?i#mHyffGot$m5a>*~MH}Mjj%svoyI>@~H;$Ek|?7tkALNOLR|nDdfUpMPA@# zYi14^im}t(zDmE<(@w2R83rNu6?eE(Q&q)FMof|1E|pxDBa@{r7IF6IsrU}5PMqja z7f3Z;j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jrXakcK9;je+RW4f;rt*QJDmZhAK#5+JKpd^%Qd5k+sK z50WWVqE1)n%SzOEfG_V1)dLEui_SwB#8|`Fya^gVH)&q*xs`|oo^g$1hS)46+Hp8I+*07v2`v;6{ z=pqP2S|)+=Nj)IL5_2Kn>y3T|@>Q4ycxGPvsUXouEH2*~TgO>|l!_Q{>R*y)Vi z7PdrSZXr`Y$|inP%{yw^8FrgK`u2QOY&qko8S&vaU~Z3a?@9RQ6Uf1L^3SRVUKFMk z#+Sc*5%>rLzC<`%Y&5y#N5g1SNul8tBxeRZ8nZ2W8?S9u(fOzNP=&^}<&1c|p>gj3 zM-ttgQvCG!KQA5f;+}>!v%++xE2^7Q#*S7<^Xsi>#uL*0ypa|!eF87!YKib+t5jPK zEAjHu|zxj*C8ThR}!iU^=>`)CQ`p>BYMNn`Gp>^XTY>m9WuY zrqPG$lsbHqsrP=tK_V7@;fRX%2#NKuh?I*m$&g_mAxo3QK}4F{V*x4|oBTEpL=9Y+b0zjrKhOUvaa5n(H;`ZkrYRU?<;u69rJJ7`OKN;HN_1bYU375GameViewport) + { + GEngine->GameViewport->AddViewportWidgetContent( + SNew(SCutMainWindow) + ); + + GEngine->bUseFixedFrameRate = 1; + GEngine->FixedFrameRate = 60000.0f; + + + UWidgetBlueprintLibrary::SetInputMode_UIOnlyEx(UGameplayStatics::GetPlayerController(GWorld, 0), nullptr, EMouseLockMode::DoNotLock); + UGameplayStatics::GetPlayerController(GWorld, 0)->bShowMouseCursor = true; + } +} diff --git a/Source/Cut5/MainHUD.h b/Source/Cut5/MainHUD.h new file mode 100644 index 0000000..1966026 --- /dev/null +++ b/Source/Cut5/MainHUD.h @@ -0,0 +1,19 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/HUD.h" +#include "MainHUD.generated.h" + +/** + * + */ +UCLASS() +class CUT5_API AMainHUD : public AHUD +{ + GENERATED_BODY() + + AMainHUD(); + +}; diff --git a/Source/Cut5/WidgetInterface.cpp b/Source/Cut5/WidgetInterface.cpp new file mode 100644 index 0000000..732c815 --- /dev/null +++ b/Source/Cut5/WidgetInterface.cpp @@ -0,0 +1,7 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "WidgetInterface.h" + + +// Add default functionality here for any IWidgetInterface functions that are not pure virtual. diff --git a/Source/Cut5/WidgetInterface.h b/Source/Cut5/WidgetInterface.h new file mode 100644 index 0000000..22142b5 --- /dev/null +++ b/Source/Cut5/WidgetInterface.h @@ -0,0 +1,27 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "UObject/Interface.h" +#include "WidgetInterface.generated.h" + +// This class does not need to be modified. +UINTERFACE() +class UWidgetInterface : public UInterface +{ + GENERATED_BODY() +}; + +/** + * + */ +class CUT5_API IWidgetInterface +{ + GENERATED_BODY() + + // Add interface functions to this class. This is the class that will be inherited to implement this interface. +public: + + virtual void UpdateTimelineLength() = 0; +}; diff --git a/Source/Cut5/Widgets/DefineGlobal.h b/Source/Cut5/Widgets/DefineGlobal.h new file mode 100644 index 0000000..e1afa6f --- /dev/null +++ b/Source/Cut5/Widgets/DefineGlobal.h @@ -0,0 +1,55 @@ +#pragma once +#include "DragAndDrop/DecoratedDragDropOp.h" + +class CUT5_API FGlobalData +{ +public: + inline static int32 DefaultTrackHeight = 50; + inline static int32 TrackLength = 1000; + inline static double DefaultTimeTickSpace = 10.0; +}; +enum class ETrackType +{ + VideoTrack, + AudioTrack, + PlayerTrack, + AtomSphereLightTrack, + SpotLightTrack, +}; + +struct FClipData; +struct CUT5_API FTrackData +{ + FString TrackName; + ETrackType TrackType; + TArray ClipData; +}; + +struct CUT5_API FClipData +{ + FGuid ClipGuid; + ETrackType ClipType; + int32 ClipStartFrame = 0; + int32 ClipEndFrame = 10; + TArray ClipColors; + +}; +struct CUT5_API FTimelinePropertyData +{ + FTimelinePropertyData() {}; + FTimelinePropertyData(FString InName, ETrackType InType) + { + Name = InName; + Type = InType; + } + FString Name = ""; + ETrackType Type = ETrackType::VideoTrack; +}; + +class CUT5_API FTrackClipDragOperation final : public FDecoratedDragDropOp +{ +public: + TSharedPtr DraggingWidget; + FTimelinePropertyData TimelinePropertyData; +}; + diff --git a/Source/Cut5/Widgets/SCutMainWindow.cpp b/Source/Cut5/Widgets/SCutMainWindow.cpp new file mode 100644 index 0000000..02ab102 --- /dev/null +++ b/Source/Cut5/Widgets/SCutMainWindow.cpp @@ -0,0 +1,105 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "SCutMainWindow.h" + +#include "SCutTimeline.h" +#include "SlateOptMacros.h" +#include "STimelinePropertyPanel.h" +#include "Widgets/Layout/SConstraintCanvas.h" +#include "Widgets/Layout/SScaleBox.h" + +BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION + +void SCutMainWindow::Construct(const FArguments& InArgs) +{ + SAssignNew(CutTimeline, SCutTimeline); + ChildSlot + [ + SNew(SScaleBox) + .HAlign(HAlign_Fill) + .VAlign(VAlign_Fill) + .Stretch(EStretch::Fill) + [ + SNew(SConstraintCanvas) + + SConstraintCanvas::Slot() + .Anchors(FAnchors(0, 0, 1, 1)) + [ + SNew(SVerticalBox) + + SVerticalBox::Slot() + .HAlign(HAlign_Fill) + .VAlign(VAlign_Fill) + [ + SNew(SHorizontalBox) + + SHorizontalBox::Slot() + .HAlign(HAlign_Fill) + .VAlign(VAlign_Fill) + [ + SNew(SVerticalBox) + + SVerticalBox::Slot() + [ + // Property Panel + SNew(STimelinePropertyPanel) + .MainWindow(SharedThis(this)) + ] + ] + + SHorizontalBox::Slot() + [ + SNew(SVerticalBox) + + SVerticalBox::Slot() + ] + + SHorizontalBox::Slot() + [ + SNew(SVerticalBox) + + SVerticalBox::Slot() + ] + ] + + SVerticalBox::Slot() + .HAlign(HAlign_Fill) + .VAlign(VAlign_Fill) + [ + CutTimeline.ToSharedRef() + ] + ] + ] + ]; + + FTrackData NewTrack; + NewTrack.TrackName = "Track 1"; + NewTrack.TrackType = ETrackType::VideoTrack; + CutTimeline->AddNewTrack(NewTrack, 0); + FTrackData NewTrack2; + NewTrack2.TrackName = "Track 2"; + NewTrack2.TrackType = ETrackType::VideoTrack; + CutTimeline->AddNewTrack(NewTrack2, 0); + CutTimeline->AddNewTrack(NewTrack2, 0); + CutTimeline->AddNewTrack(NewTrack2, 0); + CutTimeline->AddNewTrack(NewTrack2, 0); + CutTimeline->AddNewTrack(NewTrack2, 0); + CutTimeline->AddNewTrack(NewTrack2, 0); + CutTimeline->AddNewTrack(NewTrack2, 0); + CutTimeline->AddNewTrack(NewTrack2, 0); + CutTimeline->AddNewTrack(NewTrack2, 0); + CutTimeline->AddNewTrack(NewTrack2, 0); + CutTimeline->AddNewTrack(NewTrack2, 0); + CutTimeline->AddNewTrack(NewTrack2, 0); + CutTimeline->AddNewTrack(NewTrack2, 0); + CutTimeline->AddNewTrack(NewTrack2, 0); + CutTimeline->AddNewTrack(NewTrack2, 0); + CutTimeline->AddNewTrack(NewTrack2, 0); + CutTimeline->AddNewTrack(NewTrack2, 0); + CutTimeline->AddNewTrack(NewTrack2, 0); +} + +FReply SCutMainWindow::OnDragOver(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent) +{ + const FTrackClipDragOperation& ClipDragOperation = static_cast(DragDropEvent.GetOperation().ToSharedRef().Get()); + return SCompoundWidget::OnDragOver(MyGeometry, DragDropEvent); +} + +FReply SCutMainWindow::OnDrop(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent) +{ + return FReply::Handled().EndDragDrop(); +} + +END_SLATE_FUNCTION_BUILD_OPTIMIZATION diff --git a/Source/Cut5/Widgets/SCutMainWindow.h b/Source/Cut5/Widgets/SCutMainWindow.h new file mode 100644 index 0000000..84d82e1 --- /dev/null +++ b/Source/Cut5/Widgets/SCutMainWindow.h @@ -0,0 +1,28 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "SCutTimeline.h" +#include "Widgets/SCompoundWidget.h" + +/** + * + */ +class CUT5_API SCutMainWindow : public SCompoundWidget +{ +public: + SLATE_BEGIN_ARGS(SCutMainWindow) + { + } + + SLATE_END_ARGS() + + /** Constructs this widget with InArgs */ + void Construct(const FArguments& InArgs); + + TSharedPtr CutTimeline; + + virtual FReply OnDragOver(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent) override; + virtual FReply OnDrop(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent) override; +}; diff --git a/Source/Cut5/Widgets/SCutTimeline.cpp b/Source/Cut5/Widgets/SCutTimeline.cpp new file mode 100644 index 0000000..3ec0d73 --- /dev/null +++ b/Source/Cut5/Widgets/SCutTimeline.cpp @@ -0,0 +1,141 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "SCutTimeline.h" + +#include "SlateOptMacros.h" +#include "STimelineTick.h" +#include "STrackBody.h" +#include "Widgets/Input/SSlider.h" +#include "Widgets/Layout/SScrollBox.h" + +BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION + +void SCutTimeline::UpdateTimelineLength() +{ + TimelineTickBox->SetWidthOverride(FGlobalData::TrackLength); + for (IWidgetInterface* Interface : AllWidgets) + { + Interface->UpdateTimelineLength(); + } + TimelineTick->TickLengthBox->SetWidthOverride(FGlobalData::TrackLength); + TimelineTick->GenerateTickBox(FGlobalData::TrackLength / FGlobalData::DefaultTimeTickSpace); +} + +void SCutTimeline::Construct(const FArguments& InArgs) +{ + ChildSlot + [ + SNew(SVerticalBox) + + SVerticalBox::Slot() + [ + // Tool bar + SNew(SHorizontalBox) + ] + + SVerticalBox::Slot() + [ + // Timeline + SNew(SHorizontalBox) + + SHorizontalBox::Slot() + .SizeParam(FStretch(0.1f)) + [ + SNew(SVerticalBox) + + SVerticalBox::Slot() + .SizeParam(FAuto()) + [ + SNew(SBox) + .WidthOverride(10000) + .HeightOverride(25) + // 刻度补差值 + ] + + SVerticalBox::Slot() + [ + SAssignNew(TrackHeadScrollBox, SScrollBox) + .OnUserScrolled_Lambda([this](float ScrollValue) + { + TrackBodyScrollBox->SetScrollOffset(ScrollValue); + }) + ] + // Track Head + + ] + + SHorizontalBox::Slot() + .SizeParam(FStretch(0.9f)) + [ + SNew(SVerticalBox) + + SVerticalBox::Slot() + .SizeParam(FAuto()) + [ + SAssignNew(TimelineTickBox, SBox) + .WidthOverride(FGlobalData::TrackLength) + .HeightOverride(25) + [ + SAssignNew(TickScrollBox, SScrollBox) + .ScrollBarVisibility(EVisibility::Hidden) + .Orientation(EOrientation::Orient_Horizontal) + + SScrollBox::Slot() + [ + SAssignNew(TimelineTick, STimelineTick) + ] + + ] + // 刻度 + ] + + SVerticalBox::Slot() + [ + SAssignNew(TrackBodyHScrollBox, SScrollBox) + .Orientation(EOrientation::Orient_Horizontal) + .Visibility(EVisibility::SelfHitTestInvisible) + .ScrollBarVisibility(EVisibility::Hidden) + + SScrollBox::Slot() + [ + // Track Body + SAssignNew(TrackBodyScrollBox, SScrollBox) + .ScrollBarVisibility(EVisibility::Hidden) + .OnUserScrolled_Lambda([this](float ScrollValue) + { + TrackHeadScrollBox->SetScrollOffset(ScrollValue); + }) + ] + ] + + SVerticalBox::Slot() + .SizeParam(FAuto()) + [ + SNew(SSlider) + .Value(0.0f) + .OnValueChanged_Lambda([this](float ChangedValue) + { + TrackBodyHScrollBox->SetScrollOffset(ChangedValue * TrackBodyHScrollBox->GetScrollOffsetOfEnd()); + TickScrollBox->SetScrollOffset(ChangedValue * TickScrollBox->GetScrollOffsetOfEnd()); + }) + ] + + ] + ] + ]; + TrackHeadScrollBox->SetScrollBarVisibility(EVisibility::Hidden); + +} + +void SCutTimeline::AddNewTrack(FTrackData TrackData, int32 TrackIndex) +{ + TrackDataArray.Insert(TrackData, TrackIndex); + const TSharedPtr NewTrackHead = SNew(STrackHead).TrackData(TrackData).CutTimeline(SharedThis(this)); + const TSharedPtr NewTrackBody = SNew(STrackBody).TrackHead(NewTrackHead); + TrackHeadScrollBox->AddSlot() + [ + NewTrackHead.ToSharedRef() + ]; + TrackBodyScrollBox->AddSlot() + [ + NewTrackBody.ToSharedRef() + ]; + AllWidgets.Add(NewTrackBody.Get()); +} + +FReply SCutTimeline::OnDragOver(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent) +{ + return SCompoundWidget::OnDragOver(MyGeometry, DragDropEvent); +} + +END_SLATE_FUNCTION_BUILD_OPTIMIZATION diff --git a/Source/Cut5/Widgets/SCutTimeline.h b/Source/Cut5/Widgets/SCutTimeline.h new file mode 100644 index 0000000..d54b85c --- /dev/null +++ b/Source/Cut5/Widgets/SCutTimeline.h @@ -0,0 +1,47 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "DefineGlobal.h" +#include "STimelineTick.h" +#include "Cut5/WidgetInterface.h" + +#include "Widgets/SCompoundWidget.h" +#include "Widgets/Layout/SScrollBox.h" + +/** + * + +*/ + + + +class CUT5_API SCutTimeline : public SCompoundWidget +{ +public: + SLATE_BEGIN_ARGS(SCutTimeline) + { + } + + SLATE_END_ARGS() + + void UpdateTimelineLength(); + + + /** Constructs this widget with InArgs */ + void Construct(const FArguments& InArgs); + + void AddNewTrack(FTrackData TrackData, int32 TrackIndex); + + TArray TrackDataArray; + TArray AllWidgets; + TSharedPtr TimelineTick; + TSharedPtr TrackHeadScrollBox; + TSharedPtr TrackBodyScrollBox; + TSharedPtr TrackBodyHScrollBox; + TSharedPtr TimelineTickBox; + TSharedPtr TickScrollBox; + + virtual FReply OnDragOver(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent) override; +}; diff --git a/Source/Cut5/Widgets/STimelineClip.cpp b/Source/Cut5/Widgets/STimelineClip.cpp new file mode 100644 index 0000000..cba0958 --- /dev/null +++ b/Source/Cut5/Widgets/STimelineClip.cpp @@ -0,0 +1,20 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "STimelineClip.h" + +#include "SlateOptMacros.h" + +BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION + +void STimelineClip::Construct(const FArguments& InArgs) +{ + /* + ChildSlot + [ + // Populate the widget + ]; + */ +} + +END_SLATE_FUNCTION_BUILD_OPTIMIZATION diff --git a/Source/Cut5/Widgets/STimelineClip.h b/Source/Cut5/Widgets/STimelineClip.h new file mode 100644 index 0000000..501e191 --- /dev/null +++ b/Source/Cut5/Widgets/STimelineClip.h @@ -0,0 +1,25 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "DefineGlobal.h" +#include "Widgets/SCompoundWidget.h" + +/** + * + */ +class CUT5_API STimelineClip : public SCompoundWidget +{ +public: + SLATE_BEGIN_ARGS(STimelineClip) + { + } + + SLATE_END_ARGS() + + /** Constructs this widget with InArgs */ + void Construct(const FArguments& InArgs); + + FClipData ClipData; +}; diff --git a/Source/Cut5/Widgets/STimelineProperty.cpp b/Source/Cut5/Widgets/STimelineProperty.cpp new file mode 100644 index 0000000..6c26554 --- /dev/null +++ b/Source/Cut5/Widgets/STimelineProperty.cpp @@ -0,0 +1,52 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "STimelineProperty.h" + +#include "SlateOptMacros.h" + +BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION + +void STimelineProperty::Construct(const FArguments& InArgs) +{ + TimelinePropertyData = InArgs._TimelinePropertyData; + MainWindow = InArgs._MainWindow; + ChildSlot + [ + SNew(SBox) + .WidthOverride(128) + .HeightOverride(128) + .Padding(10, 10, 10, 10) + [ + SNew(SOverlay) + + SOverlay::Slot() + [ + SNew(SImage) + ] + + SOverlay::Slot() + [ + SNew(STextBlock) + .Text(FText::FromString(TimelinePropertyData.Name)) + ] + ] + + + ]; + // this->AssignParentWidget(MainWindow->CutTimeline.ToSharedRef()); +} + +FReply STimelineProperty::OnMouseButtonDown(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) +{ + return FReply::Handled().DetectDrag(SharedThis(this), EKeys::LeftMouseButton); +} + +FReply STimelineProperty::OnDragDetected(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) +{ + UE_LOG(LogTemp, Warning, TEXT("On Drag Detected")); + const TSharedPtr Operation = MakeShared(); + Operation->TimelinePropertyData = TimelinePropertyData; + Operation->DraggingWidget = SharedThis(this); + return FReply::Handled().BeginDragDrop(Operation.ToSharedRef()); + +} +END_SLATE_FUNCTION_BUILD_OPTIMIZATION diff --git a/Source/Cut5/Widgets/STimelineProperty.h b/Source/Cut5/Widgets/STimelineProperty.h new file mode 100644 index 0000000..1038381 --- /dev/null +++ b/Source/Cut5/Widgets/STimelineProperty.h @@ -0,0 +1,31 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "SCutMainWindow.h" +#include "SCutTimeline.h" +#include "Widgets/SCompoundWidget.h" + +/** + * + */ + + +class CUT5_API STimelineProperty : public SCompoundWidget +{ +public: + SLATE_BEGIN_ARGS(STimelineProperty) + { + } + SLATE_ARGUMENT(FTimelinePropertyData, TimelinePropertyData) + SLATE_ARGUMENT(TSharedPtr, MainWindow) + SLATE_END_ARGS() + + /** Constructs this widget with InArgs */ + void Construct(const FArguments& InArgs); + FTimelinePropertyData TimelinePropertyData; + TSharedPtr MainWindow; + virtual FReply OnMouseButtonDown(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) override; + virtual FReply OnDragDetected(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) override; +}; diff --git a/Source/Cut5/Widgets/STimelinePropertyPanel.cpp b/Source/Cut5/Widgets/STimelinePropertyPanel.cpp new file mode 100644 index 0000000..f575ce6 --- /dev/null +++ b/Source/Cut5/Widgets/STimelinePropertyPanel.cpp @@ -0,0 +1,57 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "STimelinePropertyPanel.h" + +#include "SlateOptMacros.h" +#include "Widgets/Layout/SGridPanel.h" + +BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION + +void STimelinePropertyPanel::Construct(const FArguments& InArgs) +{ + MainWindow = InArgs._MainWindow; + ChildSlot + [ + SNew(SBox) + [ + SNew(SScrollBox) + + SScrollBox::Slot() + .HAlign(HAlign_Fill) + .VAlign(VAlign_Fill) + [ + SAssignNew(GridPanel, SGridPanel) + ] + ] + ]; + AddNewSelection(FTimelinePropertyData("Test", ETrackType::VideoTrack)); + AddNewSelection(FTimelinePropertyData("Test1", ETrackType::VideoTrack)); + AddNewSelection(FTimelinePropertyData("Test2", ETrackType::VideoTrack)); + AddNewSelection(FTimelinePropertyData("Test3", ETrackType::VideoTrack)); + AddNewSelection(FTimelinePropertyData("Test4", ETrackType::VideoTrack)); + AddNewSelection(FTimelinePropertyData("Test5", ETrackType::VideoTrack)); + AddNewSelection(FTimelinePropertyData("Test6", ETrackType::VideoTrack)); + AddNewSelection(FTimelinePropertyData("Test7", ETrackType::VideoTrack)); + AddNewSelection(FTimelinePropertyData("Test8", ETrackType::VideoTrack)); + AddNewSelection(FTimelinePropertyData("Test9", ETrackType::VideoTrack)); + +} + +void STimelinePropertyPanel::AddNewSelection(FTimelinePropertyData TimelinePropertyData) +{ + const int32 TotalCount = GridPanel->GetChildren()->Num(); + GridPanel->AddSlot(TotalCount % MaxRowIndex, TotalCount / MaxRowIndex) + [ + SNew(STimelineProperty) + .TimelinePropertyData(TimelinePropertyData) + .MainWindow(MainWindow) + ]; + +} + +FReply STimelinePropertyPanel::OnDragOver(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent) +{ + return SCompoundWidget::OnDragOver(MyGeometry, DragDropEvent); +} + +END_SLATE_FUNCTION_BUILD_OPTIMIZATION diff --git a/Source/Cut5/Widgets/STimelinePropertyPanel.h b/Source/Cut5/Widgets/STimelinePropertyPanel.h new file mode 100644 index 0000000..8ca5f5a --- /dev/null +++ b/Source/Cut5/Widgets/STimelinePropertyPanel.h @@ -0,0 +1,33 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "STimelineProperty.h" +#include "Widgets/SCompoundWidget.h" +#include "Widgets/Layout/SGridPanel.h" + +/** + * + */ +class CUT5_API STimelinePropertyPanel : public SCompoundWidget +{ +public: + SLATE_BEGIN_ARGS(STimelinePropertyPanel) + { + } + SLATE_ARGUMENT(TSharedPtr, MainWindow) + SLATE_END_ARGS() + + /** Constructs this widget with InArgs */ + void Construct(const FArguments& InArgs); + + void AddNewSelection(FTimelinePropertyData TimelinePropertyData); + + virtual FReply OnDragOver(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent) override; + +private: + int32 MaxRowIndex = 3; + TSharedPtr MainWindow; + TSharedPtr GridPanel; +}; diff --git a/Source/Cut5/Widgets/STimelineTick.cpp b/Source/Cut5/Widgets/STimelineTick.cpp new file mode 100644 index 0000000..d70e0d8 --- /dev/null +++ b/Source/Cut5/Widgets/STimelineTick.cpp @@ -0,0 +1,47 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "STimelineTick.h" + +#include "DefineGlobal.h" +#include "SlateOptMacros.h" + +BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION + +void STimelineTick::Construct(const FArguments& InArgs) +{ + FSlateRenderTransform RenderTransform = FSlateRenderTransform(); + RenderTransform. + ChildSlot + [ + SAssignNew(TickLengthBox, SBox) + .WidthOverride(FGlobalData::TrackLength) + .HeightOverride(25) + [ + SAssignNew(TickBox, SOverlay) + + SOverlay::Slot() + [ + SAssignNew(TickCursor, SImage) + .RenderTransform() + ] + ] + ]; + GenerateTickBox(FGlobalData::TrackLength / FGlobalData::DefaultTimeTickSpace); +} + +void STimelineTick::GenerateTickBox(int32 TickCount) +{ + for (int32 i = 0; i < TickCount; i++) + { + TSharedPtr TickText = SNew(STextBlock).Text(FText::FromString("|")); + TickBox->AddSlot() + [ + TickText.ToSharedRef() + + ]; + TickText->SetRenderTransform(FSlateRenderTransform(FVector2D(i * FGlobalData::DefaultTimeTickSpace, 0))); + } + +} + +END_SLATE_FUNCTION_BUILD_OPTIMIZATION diff --git a/Source/Cut5/Widgets/STimelineTick.h b/Source/Cut5/Widgets/STimelineTick.h new file mode 100644 index 0000000..d257c37 --- /dev/null +++ b/Source/Cut5/Widgets/STimelineTick.h @@ -0,0 +1,27 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "Widgets/SCompoundWidget.h" + +/** + * + */ +class CUT5_API STimelineTick : public SCompoundWidget +{ +public: + SLATE_BEGIN_ARGS(STimelineTick) + { + } + + SLATE_END_ARGS() + + /** Constructs this widget with InArgs */ + void Construct(const FArguments& InArgs); + + void GenerateTickBox(int32 TickCount); + TSharedPtr TickBox; + TSharedPtr TickLengthBox; + TSharedPtr TickCursor; +}; diff --git a/Source/Cut5/Widgets/STrackBody.cpp b/Source/Cut5/Widgets/STrackBody.cpp new file mode 100644 index 0000000..150d260 --- /dev/null +++ b/Source/Cut5/Widgets/STrackBody.cpp @@ -0,0 +1,121 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "STrackBody.h" + +#include "SlateOptMacros.h" +#include "Widgets/Layout/SConstraintCanvas.h" + +BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION + +void STrackBody::Construct(const FArguments& InArgs) +{ + TrackHead = InArgs._TrackHead; + ChildSlot + [ + SAssignNew(TrackBodyBox, SBox) + .WidthOverride(FGlobalData::TrackLength) + .HeightOverride(FGlobalData::DefaultTrackHeight) + [ + SNew(SConstraintCanvas) + + SConstraintCanvas::Slot() + .AutoSize(true) + .Offset(FMargin(0, 0, 0, 0)) + .Anchors(FAnchors(0, 0, 1, 1)) + [ + SNew(SBorder) + .HAlign(HAlign_Fill) + .VAlign(VAlign_Fill) + .BorderBackgroundColor(FLinearColor(0.1f, 0.15f, 0.2f, 1.0f)) + [ + SAssignNew(Overlay, SOverlay) + ] + ] + ] + ]; + +} + +void STrackBody::CallRender() +{ + Overlay->ClearChildren(); + for (FClipData TempClipData : TrackHead->TrackData.ClipData) + { + if (TempClipData.ClipEndFrame > FGlobalData::TrackLength) + { + FGlobalData::TrackLength = TempClipData.ClipEndFrame; + TrackHead->CutTimeline->UpdateTimelineLength(); + } + Overlay->AddSlot() + .HAlign(HAlign_Left) + [ + SNew(SBox) + .WidthOverride(TempClipData.ClipEndFrame - TempClipData.ClipStartFrame) + .HeightOverride(FGlobalData::DefaultTrackHeight) + .RenderTransform(FSlateRenderTransform(FVector2D(TempClipData.ClipStartFrame, 0))) + [ + SNew(SBorder) + .ColorAndOpacity(TempClipData.ClipColors[0]) + .BorderBackgroundColor(TempClipData.ClipColors[0]) + ] + ]; + const FString A = FString::Printf(TEXT("%d"), TempClipData.ClipEndFrame - TempClipData.ClipStartFrame); + UE_LOG(LogTemp, Warning, TEXT("%s"), *A); + } + +} + +FReply STrackBody::OnDrop(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent) +{ + const FTrackClipDragOperation& ClipDragOperation = static_cast(DragDropEvent.GetOperation().ToSharedRef().Get()); + if (ClipDragOperation.TimelinePropertyData.Type == TrackHead->TrackData.TrackType) + { + + + FClipData NewClipData; + NewClipData.ClipGuid = FGuid::NewGuid(); + NewClipData.ClipType = ClipDragOperation.TimelinePropertyData.Type; + NewClipData.ClipStartFrame = FMath::TruncToInt(MyGeometry.AbsoluteToLocal(DragDropEvent.GetScreenSpacePosition()).X / FGlobalData::DefaultTimeTickSpace) * FGlobalData::DefaultTimeTickSpace; + NewClipData.ClipColors.Add(FLinearColor(1, 1, 1, 1));; + NewClipData.ClipEndFrame = NewClipData.ClipStartFrame + 200; + + //Overwrite the clip if it is in the same position + for (int32 i = TrackHead->TrackData.ClipData.Num() - 1; i > 0; i--) + { + const double ClipStartTime = TrackHead->TrackData.ClipData[i].ClipStartFrame; + const double ClipEndTime = TrackHead->TrackData.ClipData[i].ClipEndFrame; + if ((NewClipData.ClipEndFrame < ClipEndTime && ClipEndTime > ClipStartTime)) + { + TrackHead->TrackData.ClipData[i].ClipStartFrame = NewClipData.ClipEndFrame; + } + if ((NewClipData.ClipStartFrame < TrackHead->TrackData.ClipData[i].ClipEndFrame && NewClipData.ClipStartFrame > TrackHead->TrackData.ClipData[i].ClipStartFrame)) + { + TrackHead->TrackData.ClipData[i].ClipEndFrame = NewClipData.ClipStartFrame; + } + } + TrackHead->TrackData.ClipData.Add(NewClipData); + CallRender(); + } + + return FReply::Handled().EndDragDrop(); +} + +FReply STrackBody::OnDragOver(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent) +{ + // GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Blue, DragDropEvent.GetScreenSpacePosition().ToString()); + // GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Green, MyGeometry.GetAbsolutePosition().ToString()); + // GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Red, MyGeometry.AbsoluteToLocal(DragDropEvent.GetScreenSpacePosition()).ToString()); + return SCompoundWidget::OnDragOver(MyGeometry, DragDropEvent); +} + +void STrackBody::OnDragEnter(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent) +{ + SCompoundWidget::OnDragEnter(MyGeometry, DragDropEvent); +} + +void STrackBody::OnDragLeave(const FDragDropEvent& DragDropEvent) +{ + SCompoundWidget::OnDragLeave(DragDropEvent); +} + +END_SLATE_FUNCTION_BUILD_OPTIMIZATION diff --git a/Source/Cut5/Widgets/STrackBody.h b/Source/Cut5/Widgets/STrackBody.h new file mode 100644 index 0000000..c54f4f1 --- /dev/null +++ b/Source/Cut5/Widgets/STrackBody.h @@ -0,0 +1,37 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "STrackHead.h" +#include "Widgets/SCompoundWidget.h" + +/** + * + */ +class CUT5_API STrackBody : public SCompoundWidget, public IWidgetInterface +{ +public: + SLATE_BEGIN_ARGS(STrackBody) + { + } + SLATE_ARGUMENT(TSharedPtr, TrackHead) + SLATE_END_ARGS() + + /** Constructs this widget with InArgs */ + void Construct(const FArguments& InArgs); + void CallRender(); + virtual FReply OnDrop(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent) override; + virtual FReply OnDragOver(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent) override; + virtual void OnDragEnter(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent) override; + virtual void OnDragLeave(const FDragDropEvent& DragDropEvent) override; + TSharedPtr TrackHead; + TSharedPtr Overlay; + TSharedPtr TrackBodyBox; + + // Interface + virtual void UpdateTimelineLength() override + { + TrackBodyBox->SetWidthOverride(FGlobalData::TrackLength); + }; +}; diff --git a/Source/Cut5/Widgets/STrackHead.cpp b/Source/Cut5/Widgets/STrackHead.cpp new file mode 100644 index 0000000..903d632 --- /dev/null +++ b/Source/Cut5/Widgets/STrackHead.cpp @@ -0,0 +1,31 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "STrackHead.h" + +#include "SlateOptMacros.h" + +BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION + +void STrackHead::Construct(const FArguments& InArgs) +{ + TrackData = InArgs._TrackData; + CutTimeline = InArgs._CutTimeline; + ChildSlot + [ + SNew(SBox) + .WidthOverride(100) + .HeightOverride(FGlobalData::DefaultTrackHeight) + [ + SNew(SVerticalBox) + + SVerticalBox::Slot() + [ + SNew(STextBlock) + .Text(FText::FromString(TrackData.TrackName)) + ] + ] + + ]; +} + +END_SLATE_FUNCTION_BUILD_OPTIMIZATION diff --git a/Source/Cut5/Widgets/STrackHead.h b/Source/Cut5/Widgets/STrackHead.h new file mode 100644 index 0000000..0956f9f --- /dev/null +++ b/Source/Cut5/Widgets/STrackHead.h @@ -0,0 +1,27 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "SCutTimeline.h" +#include "Widgets/SCompoundWidget.h" + +/** + * + */ +class CUT5_API STrackHead : public SCompoundWidget +{ +public: + SLATE_BEGIN_ARGS(STrackHead) + { + } + SLATE_ARGUMENT(FTrackData, TrackData); + SLATE_ARGUMENT(TSharedPtr, CutTimeline); + SLATE_END_ARGS() + + /** Constructs this widget with InArgs */ + void Construct(const FArguments& InArgs); + + FTrackData TrackData; + TSharedPtr CutTimeline; +}; diff --git a/Source/Cut5Editor.Target.cs b/Source/Cut5Editor.Target.cs new file mode 100644 index 0000000..810887d --- /dev/null +++ b/Source/Cut5Editor.Target.cs @@ -0,0 +1,15 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +using UnrealBuildTool; +using System.Collections.Generic; + +public class Cut5EditorTarget : TargetRules +{ + public Cut5EditorTarget( TargetInfo Target) : base(Target) + { + Type = TargetType.Editor; + DefaultBuildSettings = BuildSettingsVersion.V2; + IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1; + ExtraModuleNames.Add("Cut5"); + } +}