2016-12-08 08:52:44 -05:00
|
|
|
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
|
|
|
|
2014-04-29 06:45:18 -04:00
|
|
|
#include "LuaScriptCodeGenerator.h"
|
Copying //UE4/Release-Staging-4.15 to //UE4/Dev-Main (Source: //UE4/Release-4.15 @ 3267632)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3267632 on 2017/01/23 by Jurre.deBaare
Marker syncs not working correctly in Blend Spaces
#fix Ensure that SampleIndexWithMarkers is serialized
#JIRA UE-40975
Change 3266915 on 2017/01/20 by Arciel.Rekman
Fix Persona crash on Linux (UE-38790).
- Static template variable got instantiated into multiple DSOs; probably exacerbated by --as-needed since this does not happen without it.
#jira UE-38790
Change 3266785 on 2017/01/20 by Ian.Fox
#OnlineSubsystemLive - Make usage of CachedUsers thread safe. Duplicates CL 3245390
#jira UE-40649
Change 3266762 on 2017/01/20 by Rolando.Caloca
UE4.15 - Fix for reallocating scene color
#jira UE-40633
Change 3266642 on 2017/01/20 by Lina.Halper
Downgraded Warning to Info
#jira: UE-40643
Change 3266532 on 2017/01/20 by Jeff.Campeau
Fix multiplatform Windows includes defeating the safety check in MinWindows.h
#jira UE-40778
#rn Fixed a compile warning on Xbox One when XboxOneMinApi.h was included before MinWindows.h.
Change 3266523 on 2017/01/20 by Marc.Audy
Fix case where child actor could avoid getting begin play call
#jira UE-40960
Change 3266474 on 2017/01/20 by Peter.Sauerbrei
fix for using an API not yet available in iOS 8
#jira UE-40698
Change 3266339 on 2017/01/20 by Frank.Fella
Sequencer - Fix UI issues with multi-track section rows.
+ Don't show an empty sub-track when there are no sections.
+ Expand parent tracks by default.
#Jira UE-40487
Change 3266283 on 2017/01/20 by Jeff.Fisher
UE-40683 GearVR projects rendering black
-Fix from Remi Palandri
#jira UE-40683
#review-3265824 @nick.whiting @ryan.vance
Change 3266264 on 2017/01/20 by Lina.Halper
Downgraded warning and changed log message
#jira: UE-40643
Change 3266239 on 2017/01/20 by Peter.Sauerbrei
fix for virtual joystick not showing up on some devices
#jira UE-40472
Change 3266084 on 2017/01/20 by Mitchell.Wilson
Resaving level to have correct starting camera position. Saved in wrong position after fixing a bug.
#jira UE-40887
Change 3266077 on 2017/01/20 by Matt.Kuhlenschmidt
Fixed "Wait for Movies to Complete" flag being reversed
#jira UE-40943
Change 3266076 on 2017/01/20 by Mitchell.Wilson
Updating occulsion bounds method on P_spark_burst_2 so it is not occluded when spawned inside of the coin mesh in BP_Overview example.
Updating some post process examples due to changes made with Post Process settings. Film and Scene Color are temporary fixes and are intended to be fully updated in 4.16
#jira UE-40830 UE-40887
Change 3266034 on 2017/01/20 by Benn.Gallagher
Fixed crash when reimporting APEX destructibles from apb/x files caused by not allowing the renderer to flush destroy resource commands before emptying an array.
#jira UE-40911
Change 3266027 on 2017/01/20 by Ian.Fox
#OnlineSubsystemLive - Fix CreateSession and FindSession each permanently failing after first failure. Duplicates CL 3262175
#jira UE-39110
Change 3265906 on 2017/01/20 by Marcus.Wassmer
Fix GPU particle AFR flickering and optimize injection transfers.
Duplicate CL's 3260302, 3261252, 3265662, 3265678
#jira UE-40915
Change 3265873 on 2017/01/20 by Mark.Satterthwaite
Duplicate CL #3262535:
Make sure to set rasterizer state when rendering with a material in FSlateRHIRenderingPolicy::DrawElements
#jira UE-40842
Change 3265857 on 2017/01/20 by Jamie.Dale
Fixed font pathing issue that could happen in an out-of-source packaged build
#jira UE-40855
Change 3265675 on 2017/01/20 by Matt.Kuhlenschmidt
Move Dirt Mask Intensity to the correct post process category
#jira UE-40851
Change 3265674 on 2017/01/20 by Rolando.Caloca
UE4.15 - Revert
#jira UE-40633
Change 3265647 on 2017/01/20 by Mitchell.Wilson
Updating spawn location of the player pawn after unpossessing character in example 1.10.
#jira UE-40870
Change 3265612 on 2017/01/20 by Alexis.Matte
Prevent name clash warning when doing automation test
#jira UE-40788
Change 3265553 on 2017/01/20 by Matthew.Griffin
Fixed Shadow variable warning
Change 3265366 on 2017/01/20 by Dmitriy.Dyomin
Fixed: Vulkan crashes on Adreno Galaxy S7
#jira UE-40840
Change 3265294 on 2017/01/19 by Dmitriy.Dyomin
Fixed typo which was causing assert on mobile
#jira UE-40633
Change 3265111 on 2017/01/19 by Rolando.Caloca
UE4.15 - Fix for scene color crash
#jira UE-40633
Change 3264789 on 2017/01/19 by Josh.Adams
- Redoing a fix from Dev-Plat for UI_BUILD_SHIPPING_EDITOR
#jira UE-40798
Change 3264780 on 2017/01/19 by Rolando.Caloca
UE4.15 - Add Morph compute GPU stat
#jira UE-40891
Change 3264486 on 2017/01/19 by Mark.Satterthwaite
Fix the crash on startup on Intel GPUs - this is due to Intel Metal forcing SM4 to avoid some drivers bugs in SM5 but I got the condition for initialisation in FMinimalDummyForwardLightingResources wrong so it's attempting to create a RWBuffer for SM4 which won't work.
#jira UE-40863
Change 3264427 on 2017/01/19 by Rolando.Caloca
UE4.15 - Track down crash
#jira UE-40633
Change 3264393 on 2017/01/19 by Aaron.McLeran
#jira UE-40850
Re-fixing UE-39650 again in 4.15.
I hope this bug doesn't regress yet again!
Change 3264364 on 2017/01/19 by Daniel.Wright
In forward shading SceneCaptureSource modes Normal and BaseColor are replaced with SceneColorHDR as the GBuffer is not available. This is a silent failure for now as there's no good content error reporting mechanism for scene captures.
#jira UE-39658
Change 3264284 on 2017/01/19 by Mark.Satterthwaite
Duplicate CL #3264251:
Modify some asserts in MetalRHI - technically using a store-action of ENoAction on Stencil buffers should make it invalid to restart a render-pass but on Mac it will work because ENoAction won't invalidate anything written. In future we need to use deferred store-actions in Metal so that we can "restart" passes while enforcing correct Load/Store actions.
#jira UE-40803
Change 3264282 on 2017/01/19 by Benn.Gallagher
CIS fix, bad expression that failed to compile Mac
#jira UE-40716
Change 3264257 on 2017/01/19 by Mike.Beach
Revising fix in UBlueprint::BeginCacheForCookedPlatformData(), saving off nativization data if the -nativizeAssets param is present (not just if it was enabled in packaging settings).
#jira UE-40620
Change 3264242 on 2017/01/19 by Daniel.Wright
[Copy] Sharing IndirectLightingCacheTextureSampler samplers
#jira UE-40727
Change 3264191 on 2017/01/19 by Ori.Cohen
Fix heightfield not working with traces underneath.
#JIRA UE-39819
Change 3264139 on 2017/01/19 by Benn.Gallagher
Removed collision between clothing in external skeletal mesh components, as clothing simulations could already be in flight and editing collisions while the simulation is running is not supported by APEX
#jira UE-40716
Change 3264110 on 2017/01/19 by Max.Preussner
MfMedia: Disabled plug-in on Windows 10, because it is currently broken
#jira UE-406344
Change 3264108 on 2017/01/19 by Max.Preussner
MfMedia: Fixed compile errors on Windows 10
#jira UE-40644
Change 3264099 on 2017/01/19 by Jamie.Dale
Adding deprecation warning for 4.14 style PO export
#jira UE-40592
Change 3264089 on 2017/01/19 by Matthew.Griffin
Reworked DDC commandlet to make sure it actually calls BeginCacheForCookedPlatformData on assets
Skip doing this for Engine content if -ProjectOnly is set as that takes a long time and isn't necessary for the way we use it
#jira UE-39968
Change 3264065 on 2017/01/19 by James.Golding
Fix ModifyCurve node not calling init/update in SourcePose
#jira UE-40852
Change 3263729 on 2017/01/19 by Alexis.Matte
Fix a bad condition when filling the material sorting array
#jira UE-40814
Change 3263704 on 2017/01/19 by Jack.Porter
Fix compile error in AndroidESDeferredOpenGL.cpp when " ES Deferred Shading Renderer" is enabled.
#jira UE-40659
Change 3263627 on 2017/01/19 by Jack.Porter
Fixed black textures when Vulkan is packaged for ETC1
#jira UE-40658
Change 3263554 on 2017/01/19 by Jack.Porter
Fixes to HISMC LOD to use new screen size calculation. Solves issue where HISMC was always rendered at lowest LOD.
#jira UE-38930
Change 3263535 on 2017/01/19 by Matthew.Griffin
Removed unnecessary directories to always cook
Problem was actually down to string asset references not being resolved in file set generation
Change 3263534 on 2017/01/19 by Matthew.Griffin
Added -SkipPublish parameter to BuildLauncherSample command so that we don't chunk and post preflights
Change 3263267 on 2017/01/18 by Dan.Oconnor
Fix for editing of TMap/TSet variables in structure editor, async tasks, and when using UK2Node_CommutativeAssociativeBinaryOperator.
#jira UE-40428
Change 3263219 on 2017/01/18 by Dan.Oconnor
Fix copy paste error found by UDN user Craig.Wright that could result in fatal bytecode execution
#jira UE-19425
Change 3262980 on 2017/01/18 by Maciej.Mroz
#jira UE-40394, UE-40395, UE-40426, UE-40484, UE-40770
Integrated cl 3262851, 3261613, 3260908 from Dev-Blueprint
Change 3262908 on 2017/01/18 by Ori.Cohen
When refreshing physics assets, don't do so on components that have no bodies.
#JIRA UE-40764
Change 3262709 on 2017/01/18 by Matt.Kuhlenschmidt
Fix a crash if a background blur widget ends up being negative or zero sized
#jira UE-40820
Change 3262606 on 2017/01/18 by Marc.Audy
Don't bother the user with force feedback based on where the unpossessed pawn is standing in the world while in simulate mode
#jira UE-40785
Change 3262416 on 2017/01/18 by Marc.Audy
Reenable audio threading
#jira UE-00000
Change 3262125 on 2017/01/18 by Chris.Wood
Fixed unnecessary truncate in SMenuAnchor::Tick that caused menu placement to wobble
[UE-40293] - Dropdown selection box jitters when mouse is moved over top of it on Mac
#jira UE-40293
Change 3262103 on 2017/01/18 by Jamie.Dale
Merging some cooker fixes
CL# 3262089 - Fixing RedirectCollector issues with projects outside the UE4 directory
CL# 3262091 - Guarding against potentially invalid call to FString::Mid
CL# 3262094 - Cook on the fly builds now resolve string asset references
#jira UE-40790
Change 3262082 on 2017/01/18 by Chris.Bunner
Accumulate used particle materials from final mesh material module, not first.
#jira UE-39953
Change 3261996 on 2017/01/18 by Matthew.Griffin
Allow Samples to be built in pre-flights if you are specifying an engine version
Change 3261995 on 2017/01/18 by Matthew.Griffin
Resolve string asset references after loading packages to ensure that we find all required files
Change 3261934 on 2017/01/18 by Allan.Bentham
Bump shader version to force changes in 3260307 to occur.
#jira UE-39701
Change 3261842 on 2017/01/18 by Graeme.Thornton
Manual copy of CL 3253580 from Dev-Core
Added some validation of the class index in exportmap entries
#jira UE-37873
Change 3261017 on 2017/01/17 by Mitchell.Wilson
Resaving all levels to resolve short form string asset reference warnings.
#jira UE-40732
Change 3260918 on 2017/01/17 by Andrew.Rodham
Sequencer: Request unloaded levels to be loaded when being made visible through sequencer
#jira UE-40082
Change 3260909 on 2017/01/17 by Ben.Marsh
Fix error running "Clean" in installed build.
#jira UE-40751
Change 3260757 on 2017/01/17 by Jeff.Fisher
UE-39654 Crash when launching Google VR project
-Via SwitchGameWindowToUseGameViewport we get an early ResizeViewport which does an early Draw. This calls GetStereoProjectionMatrix before the game has ticked and fetched the device info we use to build that matrix.
-In this change we make the call to setup that information in the GoogleVRHMD constructor, to ensure it is done before anything tries to use it.
-I also added some asserts.
#jira UE-39654
#review-3260644
Change 3260637 on 2017/01/17 by Alexis.Matte
Fix crash when importing skeletal mesh containing a texture or a material using the same name.
#jira UE-40538
Change 3260630 on 2017/01/17 by Marc.Audy
When installing a feature pack maintain the include of the template so that any properties inside it are not lost by replacing it with the project's PCH include
Update all C++ feature packs to include the original project .h in the files that are copied in to the new project
#jira UE-40730
Change 3260600 on 2017/01/17 by matt.barnes
Test content for sequencer event tracks
#jira UE-29618
Change 3260593 on 2017/01/17 by Mieszko.Zielinski
Made FSupportedAreaData export as part of engine API #UE4
#jira UE-40739
Change 3260538 on 2017/01/17 by Marc.Audy
Always display axes in debug info, but show -- for value when we don't yet know the ranges
#jira UE-40700
Change 3260422 on 2017/01/17 by Marc.Audy
Expose level streaming incremental unregister component cvars in the engine streaming section of the project settings
#jira UE-10109
Change 3260392 on 2017/01/17 by Ben.Woodhouse
Duplicated from CL 3260107:
Fix FMonitoredProcess to prevent infinite loop in -nothreading mode
#jira UE-40717
Change 3260358 on 2017/01/17 by Chris.Bunner
Only validate tonemapper LUT input if actually hooked up.
#jira UE-40467
Change 3260327 on 2017/01/17 by Frank.Fella
PlatformMediaSource - Fix Validate to check all specified media sources, and change GetURL to get the url for the current platform when running uncooked.
#jira UE-40709
Change 3260307 on 2017/01/17 by Allan.Bentham
Restore metal compiler's shader source serialization code when the shader is to be compiled at runtime.
#jira UE-39701
Change 3260276 on 2017/01/17 by Alex.Delesky
#jira UE-40276 - Fixing an issue where a Standalone game launched from the editor cannot toggle fullscreen mode.
Change 3260274 on 2017/01/17 by Chris.Wood
Added check for null World ptr in AActor::PostEditChangeProperty to fix crash when pasting temporary Actors
[UE-40492] - Crash after ejecting from PIE session and selecting a component in the details panel
#jira UE-40492
Change 3260230 on 2017/01/17 by Ben.Woodhouse
Duplicated from dev-rendering@3232283
D3D12 - downgrade root signature size warning to a log following a discussion with Microsoft. There's not much we can actually do about it, and it's not relevant to all hardware
#jira UE-36999
Change 3260096 on 2017/01/17 by Thomas.Sarkanen
Fixed crash when rendering out a level sequence with layered animations
When a level contained sequences with layered animations that *werent* taking part in the render (i.e. they were not part of the current master sequence) then their instances were initialized but not ticked. When their components then got a call to evaluate their bone transforms, the cached blends were in an uninitialized state.
#jira UE-40654 - Render Movie using separate process crashes capture process
Change 3259875 on 2017/01/17 by Dmitriy.Dyomin
Fixed: SunTemple is washed out in one color on some Android devices
#jira UE-40689
Change 3259011 on 2017/01/16 by Max.Chen
Matinee to Level Sequence: Make RegisterTrackConverters pure virtual
#jira UE-37328
Change 3258992 on 2017/01/16 by Rolando.Caloca
UE4.15 - Integrate fix for outlines (3258807)
#jira UE-40690
Change 3258949 on 2017/01/16 by mason.seay
Disabled TranslatedMass test
#jira UE-29618
Change 3258860 on 2017/01/16 by Max.Preussner
Media: Prevent loading of media plug-ins in console apps, such as game servers (OR-34819)
#jira OR-34819
Change 3258846 on 2017/01/16 by Max.Preussner
MfMedia: Fixed incorrect tracks being played in multi-track media sources (UE-39703)
#jira UE-39703
Change 3258813 on 2017/01/16 by Benn.Gallagher
Added error on import for APEX clothing files that either have no submeshes or have no submeshes with simulated vertices.
#jira UE-40614
Change 3258771 on 2017/01/16 by James.Golding
Skip fatal warning in UBodySetup::Serialize if duplicating (e.g. spawning component via SCS with a BodySetup in its template)
#jira UE-40418
Change 3258747 on 2017/01/16 by Max.Chen
Sequencer: AddUnique SequencerActorTag to prevent multiple tags being added when spawning/despawning.
#jira UE-40665
Change 3258630 on 2017/01/16 by Jurre.deBaare
CIS IfDef issue fix
#JIRA UE-1234
Change 3258541 on 2017/01/16 by Phillip.Kavan
[UE-40131] Revised fix that will work for "inclusive" BP nativization with data-only BPs.
change summary:
- revised code in UBlueprint::BeginCacheForCookedPlatformData() to also support the "inclusive" nativization method
#jira UE-40131
Change 3258532 on 2017/01/16 by Max.Chen
Sequencer: Fix max row index off by one error . This was always incorrect, but it was masked by the fact that FixRowIndices() was called on the track when the UI gets built. That function was removed from the node layer in CL #3252753 and therefore exposed this bug.
#jira UE-40642
Change 3258505 on 2017/01/16 by Marc.Audy
Improve messaging when installing vehicle and vehicle adv C++ feature packs
#jira UE-40647
Change 3258478 on 2017/01/16 by Matt.Kuhlenschmidt
PR #3131: UE-40567: Added nullcheck to FSplinePointDetails (Contributed by projectgheist)
#jira UE-40567
Change 3258457 on 2017/01/16 by Jurre.deBaare
SpeedTree Billboards rendering with Incorrect Material
#fix Ensure that we add a section info entry for the billboard models/lods during SpeedTree importing
#jira UE-39677
Change 3258442 on 2017/01/16 by Alexis.Matte
Skeletalmesh import, make sure we increment the lod index when animation is not imported
#jira UE-40640
Change 3258431 on 2017/01/16 by Jurre.deBaare
Back out changelist 3258392
#fix issue was already resolved
#jira UE-1234
Change 3258392 on 2017/01/16 by Jurre.deBaare
Fix for non-unity CIS
#JIRA UE-1234
Change 3258358 on 2017/01/16 by Matthew.Griffin
Prevent warning from being shown when XMPP module is not built
#jira UE-40616
(I guess LoadModule could be changed to LoadModuleChecked now if they do exist)
Change 3258144 on 2017/01/15 by Marc.Audy
Fix non-unity CIS errors
#jira UE-00000
Change 3258141 on 2017/01/15 by zachary.wilson
Adding testing content for Distance Field Indirect Shadows
#jira UE-29618
Change 3258049 on 2017/01/14 by Nick.Shin
UFE sent incorrect header data on missing file
also, it seems that UFE was written to expect clients to close the connection -- (this should be closed manually -- which will flush the data and then close out the socket -- but, since this is a developer tool... leaving this as-is)
first, 404 was not sending the required double newline after headers
second, since connection are not closed manually (server side) send a dummy payload with content-length data
#jira UE-39992 Quicklaunch UFE HTML5 fails with "NS_ERROR_Failure"
Change 3257984 on 2017/01/14 by Aaron.McLeran
Attempting another fix for static analysis warning in CIS
#jira UE-40645
Change 3257904 on 2017/01/14 by Aaron.McLeran
Resolving static analysis warnings reported by CIS
#jira UE-40645
Change 3257883 on 2017/01/14 by Aaron.McLeran
Fixing build warning with CL 3257826
#jira UE-40645
Change 3257826 on 2017/01/13 by Aaron.McLeran
Integrating fixes from Dev-Framework and Odin to Release-415
#jira UE-40645
Change 3257654 on 2017/01/13 by Marc.Audy
Until plugins can drive their own dependencies vehicle and vehicle adv feature packs will not compile automatically and will pop up a message log informing the user of the actions they need to manually take.
#jira UE-40466
Change 3257608 on 2017/01/13 by John.Pollard
PC: Assertion Fail with UPackageMapClient::AddNetFieldExportGroup() viewing replays
#jira OR-34522
Change 3257489 on 2017/01/13 by Mitchell.Wilson
Removing preview mesh from multiple materials to resolve CIS warnings.
#jira UE-40628
Change 3257485 on 2017/01/13 by Chris.Babcock
Don't initialize FMinimalDummyForwardLightingResources for unneeded feature levels (below SM4)
#jira UE-40602
#ue4
#android
Change 3257444 on 2017/01/13 by Matt.Barnes
Updating test assets for UEQATC-2967
#jira UE-29618
Change 3257324 on 2017/01/13 by Arciel.Rekman
Linux: Update runtime CEF lib as well (UE-401413).
- Followup to CL 3256081.
#jira UE-40413
(Merging CL 3257241 from Dev-Platform to Release-4.15)
Change 3257140 on 2017/01/13 by Lina.Halper
Fix crash with deleting all poses
#jira: UE-40537
Change 3257066 on 2017/01/13 by Jurre.deBaare
CIS fix for game builds
#jira UE-1234
Change 3257056 on 2017/01/13 by Ben.Zeigler
#jira UE-40318 Fix crash in streamablemanager where callbacks would get called on a deleted manager.
This is being rewritten in 4.16, so do a quick fix for 4.15 to avoid the crash
Change 3256839 on 2017/01/13 by Jurre.deBaare
Added conversion of HLOD transition screen size to new transition screen area values
#fix During serialization patch up the values of transition screen size within the hierarchical lod setups
#misc Updated the default value to a screen size to screen area equivalent
#JIRA UE-40518
Change 3256761 on 2017/01/13 by Mieszko.Zielinski
Fixed EQS debug rendering not clearing previously displayed labels if new request has no labels #UE4
#jira UE-40589
Change 3256177 on 2017/01/12 by Josh.Adams
- Moved the MfMedia plugin outside of XboxOne directory, because it's a Windows plugin as well (that happens to also work on XboxOne - all public APIs)
#jira UE-40391
Change 3256131 on 2017/01/12 by Jamie.Dale
Fixing log spam when trying to load an empty font data
#jira UE-40555
Change 3256081 on 2017/01/12 by Arciel.Rekman
Fixed CEF compatibility problems on Ubuntu 14.04 (UE-40413).
- Also deleted Debug version of it.
- Change by yaakuro.
#jira UE-40413
(Edigrating CL 3256065 from Dev-Platform to Release-4.15)
Change 3256046 on 2017/01/12 by Jon.Nabozny
Use PxConvexFlag::eSHIFT_VERTICES when cooking meshes to fix baked in transforms.
#jira UE-39212
Change 3255939 on 2017/01/12 by mason.seay
Rebuilt lighting
#jira UE-29618
Change 3255912 on 2017/01/12 by Olaf.Piesche
Replicating fix from 3246828 for
#jira UE-39249
Change 3255909 on 2017/01/12 by Rolando.Caloca
UE4.15 - Support for choosing discrete AMD GPU
#jira UE-40546
Change 3255835 on 2017/01/12 by Martin.Wilson
Fix newly added virtual bones not being on screen.
#jira UE-40516
Change 3255774 on 2017/01/12 by Mark.Satterthwaite
Merging 3251926 for Richard.Wallis:
#jira UE-38828
Crash after Enabling Forward Shading on Mac and Creating/Editing Materials.
Using TGlobalResource to avoid constant resource allocation. Prev fix (in CL 3239454) caused a crash in D3D11 with zero sized resource views.
Change 3255771 on 2017/01/12 by Alexis.Matte
Fix a crash when re-importing asset with no material
#jira UE-40510
Change 3255746 on 2017/01/12 by Jon.Nabozny
Change _DEBUG to PX_DEBUG in ConvexHullLib.cpp
#jira UE-0000
Change 3255659 on 2017/01/12 by Jon.Nabozny
Enable Shifting Vertices during Convex Hull cooking to prevent precision issues.
(Copied CL-3249100 from Dev-Phyics-Upgrade to support new flag)
#jira UE-39212
Change 3255617 on 2017/01/12 by Ori.Cohen
Fix crash when computing mass for an async object. Using passed in rigid body instead of assuming SyncRigidActor
#JIRA UE-40458
Change 3255536 on 2017/01/12 by Jamie.Dale
Fixed crash when using an object picker against the 'Object' type
This also optimizes some filter code to avoid filtering when it would be pointless (and just slows things down).
#jira UE-40408
Change 3255451 on 2017/01/12 by Chris.Wood
Fixed read only text color in SCommentBubble
[UE-40384] - Reference Viewer comment text is difficult to read
Also changed DetermineForegroundColor() method in EditableTextBox classes to fallback on ForegroundColorOverride if it is set and ReadOnlyForegroundColorOverride isn't set.
#jira UE-40384
Change 3255448 on 2017/01/12 by Chris.Wood
Removed blinking cursor/caret on read only editable text layouts.
[UE-40502] - Flashing cursor/caret showing in read-only editable text layouts
#jira UE-40502
Change 3255445 on 2017/01/12 by Marc.Audy
Create the dynamic level streaming persistent object correctly outered to the World rather than the transient package to avoid GetWorld() crashing
#jira UE-00000
Change 3255441 on 2017/01/12 by Jon.Nabozny
Regenerate collision for the basic Cube mesh to fix resting issues and invalid verts.
#jira UE-40478
Change 3255407 on 2017/01/12 by Yannick.Lange
VREditor: - Fix: Assertion Failed crash after pressing F8 in PIE while Foliage Mode was selected
- Fix: Assertion Failed crash after pressing F8 in PIE while Paint Mode was selected
- Added extra checks for other possible future cases
#jira UE-39786 UE-39789
Change 3255393 on 2017/01/12 by Chris.Bunner
Duplicating CL 3255244: Removed test variable from MaterialExpressionVectorParameter.
#jira UE-40517
Change 3255375 on 2017/01/12 by Steve.Robb
CIS fix.
#jira UE-39556
Change 3255334 on 2017/01/12 by samuel.proctor
Corrected QA Container asset to remove pin warning.
#jira UE-29618
Change 3255319 on 2017/01/12 by james.cobbett
Fixing motion blur issue with test content for Pose Snapshots.
#jira UE-29618
Change 3255247 on 2017/01/12 by Nick.Darnell
Slate - Slate's Tab Manager is now a bit smarter about allowing Focus/BringToFront attention grabbing methods. In order to make the UI less jumpy it was restricted to only allowing alerts and bring to front to be triggered if you were on the window, or child window of the active application window.
That can negatively impact cases where a user takes an action (clicks a link ro button saying open/goto this tab), that is on another window. To work around this limitation, the Tab Manager will also permit the action if Slate is currently processing user input, implying that the action being taken is in direct response to the user pressing a button and interacting with the UI.
#jira UE-40313
Change 3255236 on 2017/01/12 by Phillip.Kavan
[UE-40131] Non-native child BPs can now properly override a nativized parent BP's components in a cooked build with exclusive Blueprint class nativiation.
- Mirrored from //UE4/Dev-Blueprints (CL# 3254024,3254391)
#jira UE-40131
Change 3255216 on 2017/01/12 by Rolando.Caloca
UE4.15 - Fix compile issue on Vulkan 1.0.37.0 or newer
#jira UE-40506
Change 3255206 on 2017/01/12 by Steve.Robb
Use outer walking IsA() implementation in editor to get around reinstancing and hot reload issues.
#fyi mike.beach
#jira UE-39556
Change 3255195 on 2017/01/12 by mason.seay
Adjusted slope to fix platform discrepancy
#jira UE-29618
Change 3255086 on 2017/01/12 by Jack.Porter
Fix XboxOneShaderCompiler.cpp non-unity compilation
#jira None
Change 3255085 on 2017/01/12 by Jack.Porter
Missing HTML5 changes from CL 3254907
#jira UE-39111
Change 3255031 on 2017/01/12 by Jack.Porter
More iOS GoogleVR changes missing from CL 3254907
#jira UE-39111
Change 3254991 on 2017/01/12 by Jack.Porter
Missing file from CL 3254907
#jira UE-39111
Change 3254907 on 2017/01/11 by Jack.Porter
Android MSAA changes - use r.MobileMSAA cvar, support more than 2x, fix issues where targets other than scene color were created with MSAA
#jira UE-39111
#jira UE-35849
#jira UEMOB-35
Change 3254810 on 2017/01/11 by Arciel.Rekman
Linux: fix for crash on exit (UE-40488).
#jira UE-40488
Change 3254617 on 2017/01/11 by Peter.Sauerbrei
remake the fix for missing PhysXVehicle library in binary for IOS and TVOS
#jira UE-39349
Change 3254489 on 2017/01/11 by mason.seay
Other minor improvements to the map
#jira UE-29618
Change 3254477 on 2017/01/11 by mason.seay
Map tweaks to prevent the vehicle from getting stuck
#jira UE-29618
Change 3254431 on 2017/01/11 by Mitchell.Wilson
Rebuilt lighting on all StarterContent levels.
#jira UE-40468
Change 3254333 on 2017/01/11 by mason.seay
Adjusted lightmap on mesh to remove odd rendering splotches
#jira UE-29618
Change 3254131 on 2017/01/11 by Rolando.Caloca
UE4.15 - Missing dumped shaders
#jira UE-40465
Change 3254126 on 2017/01/11 by Jeff.Fisher
UE-40422 Vive Motion Controllers unable to Play Haptic Effect
-Removed an unnecessary remapping of controllerindex to deviceid, they are the same now.
#jira UE-40422
#review-3254084
Change 3254046 on 2017/01/11 by Mark.Satterthwaite
Merging 3233811:
Fix compiling QA-Material tessellation shaders that don't need to emit from Hull or sample in Domain the HSOut buffer which was confusing MetalBackend.
#jira UE-39935
Change 3254021 on 2017/01/11 by james.cobbett
Test content for Pose Snapshot testing
#jira UE-29618
Change 3253993 on 2017/01/11 by Alexis.Matte
Fix the morph target import
#jira UE-40424
Change 3253948 on 2017/01/11 by mason.seay
Fixed Level BP logic that was causing Access None error
#jira UE-29618
Change 3253884 on 2017/01/11 by mason.seay
Updated mesh colors on map. Disabled motion blur
#jira UE-29618
Change 3253862 on 2017/01/11 by mason.seay
Disabled Always Show Mobile Input (turned on by accident)
#jira UE-29618
Change 3253859 on 2017/01/11 by Mark.Satterthwaite
Merging 3252866:
Fix Metal shader pipeline hash collisions caused by deferring MTLFunction construction until PrepareToDraw so that we may use Function-Constants to specialise the shader source without generating additional permutations. This is required to generate proper tessellation shaders which are specialised against the index-buffer usage & type (none, uint16, uint32). While we're here amend the hash functions to make better use of the existing hash functions to improve the distribution and hopefully reduce the possibility of collisions in future.
#jira UE-40357
Change 3253854 on 2017/01/11 by Mark.Satterthwaite
Merging 3252859:
Fix the calculation of Metal tessellation struct alignment and size to use largest member size, so that we don't assert in debug or cause out-of-bounds access in development/shipping.
#jira UE-40410
Change 3253853 on 2017/01/11 by Mark.Satterthwaite
Merging 3237394:
Add Metal-specific permutations of TBasePassHS - they affect the C++ definition on all platforms but are only cached or used on Metal - because the way we compile the combined VS+HS tessellation stage requires that the combined VS + HS HLSL code references the same resources, otherwise we get incorrect resouce bindings and subsequently fail to render properly. Long-term the Metal tessellation code will need to be refactored so that the vertex shader stage is emitted as a separate shader from the hull shader stage as this but will keep cropping back up and continue to complicate the engine.
#jira UE-39799
Change 3253852 on 2017/01/11 by Mark.Satterthwaite
Merging 3236850:
Make changing the Metal Shader Version project setting prompt the user to restart for the changes to take effect.
#jira UE-39801
Change 3253834 on 2017/01/11 by mason.seay
Updated mobile input textures to be power of two
#jira UE-29618
Change 3253807 on 2017/01/11 by Mark.Satterthwaite
Merging 3232641 & 3236788 & 3233854 & 3249742 from Dev-Rendering:
3232641:
- Eliminate redundant state changes in MetalRHI in the state cache.
- Add a new debug level for setting buffers to nil prior to calls to set*Bytes so that the tool doesn't display incorrect data.
- Make testing for validation & statistics features use the same EMetalFeatures API as everything else for consistency.
- Cache the fallback depth-stencil texture in the state cache and ignore it for determining whether a pass can restart - if we are using this texture its contents are worthless anyway.
3236788:
Fix 10.11.6 support (aka -nometalv2): the stencil view workaround necessitates a mid-render blit and the way things were setup resulted in the HasValidRenderTargets assert firing. Refactored the code to separate the concept or valid render-states in the cache from active render-states in the render-pass. Now it works as intended and will be needed for 4.15.
3233854:
More information about texture type validation errors in Metal.
3249742:
Fix missing GPU particles on Mac.
Pointers getting reused is causing the blendstate equality operator to fail.
Simple workaround until we have time for a proper fix.
#jira UE-40200
Change 3253636 on 2017/01/11 by Chris.Wood
Improved tracking of runtime and debugger attachment for analytics purposes.
[UE-39780] - Change IsDebugger to WasDebuggerPresent in all crash/AS analytics
[UE-39777] - Update MTBF IsDebugger state for every heartbeat
[UE-39778] - UnrealWatchdog to send WasDebuggerPresent state for app if set
[UE-39779] - UnrealWatchdog to send total run time of process
Debugger state was previously read once at startup or once at the time of an event. Debugger is now checked during the heartbeat and doesn't reset flag when detached so we know if a session was ever debugged. Also reporting total run time in UnrealWatchdog. Watchdog still doesn't run when debugging but and will never show popups to a debugger user even when forced on with -forcewatchdog.
#jira UE-39780, UE-39777, UE-39778, UE-39779
Change 3253281 on 2017/01/10 by Dan.Oconnor
Typo fix caused parameter in local struct definition to shadow the local
#jira UE-40027
Change 3253231 on 2017/01/10 by Dan.Oconnor
Mirror of 3253220
These pins should infer together
#jira UE-40427
Change 3253125 on 2017/01/10 by Uriel.Doyon
Brought back CL 3242117 and 3238685, which got lost on the way:
- Fix for possiblel check fail when changin mobility of actors.
- Fix for possible check fail when processing streaming data.
#jira UE-39996
Change 3252936 on 2017/01/10 by Marc.Audy
CopyPropertiesForUnrelatedObjects needs to consider path not just name of subobjects when matching them up to copy properties and update references
Ensure that a reinstanced child actor component ends up pointing at the correct child actor template
#jira UE-40027
Change 3252886 on 2017/01/10 by Lina.Halper
Fix for invalid AnimCurves when curve is added while running
#jira: UE-39826
Change 3252753 on 2017/01/10 by Frank.Fella
Sequencer - Change track rows to use separate track nodes in the display node tree, fixes key edit issues on animation and audio tracks.
#jira UE-39836
Change 3252640 on 2017/01/10 by Lukasz.Furman
fixed NavCollision losing user settings after any property change
copy of 3252628
#jira UE-40388
Change 3252614 on 2017/01/10 by Daniel.Wright
UStaticMeshComponent::InvalidateLightingCacheDetailed uses MarkRenderStateDirty. Massively speeds up duplication of HISMC with many instances (10+ minutes -> seconds), as InvalidateLightingCacheDetailed gets called for every instance.
#jira UE-40406
Change 3252609 on 2017/01/10 by mason.seay
Updated map with text actors for more visual clarity
#jira UE-29618
Change 3252477 on 2017/01/10 by Daniel.Wright
[Copy] Fixed race condition with FPrecomputedLightVolume::Data which was exposed when switching lighting scenarios
#jira UE-39852
Change 3252451 on 2017/01/10 by Daniel.Wright
Garbage collection calls UWorld>SendAllEndOfFrameUpdates() on all loaded worlds first so that deferred recreate render states happen before any UObjects are deleted
* Fixes rendering thread crashes in the order of events of 1) SetMaterial 2) GC 3) Rendering command that dereferences the UMaterial
#jira UE-30089
Change 3252418 on 2017/01/10 by Ben.Zeigler
#jira UE-40390 Fix crash saving blueprint with an inherited DataTable/CurveTable reference. Delta serialization meant that the necessary name wasn't in the name table, so adding it manually now.
Change 3252410 on 2017/01/10 by Max.Chen
Sequencer : Filter sections on select in range
Copy from Dev-Sequencer
#jira UE-37854
Change 3252385 on 2017/01/10 by Max.Chen
Sequencer: Update auto tangents when setting key time. This fixes a bug where dragging keys with auto tangents doesn't recompute tangents properly.
#jira UE-39923
Change 3252360 on 2017/01/10 by Allan.Bentham
Remove incorrect assert for iOS.
#jira UE-40385
Change 3252297 on 2017/01/10 by mason.seay
Test assets for suspending cloth simulation
#jira UE-29618
Change 3252125 on 2017/01/10 by Mieszko.Zielinski
Fallout fix after removal of BlackboardKeyUtils::CalculateComparisonResult declaration from the AIModule #UE4
#jira UE-40099
Change 3251987 on 2017/01/10 by Allan.Bentham
Fix HQ DoF
#jira UE-35548
Change 3251856 on 2017/01/10 by Jack.Porter
Fixed Get Instances Overlapping Box blueprint function due to issue with FBox constructor.
Added MakeBox and MakeBox2D kismet native functions
Fixed box overlap test ignoring instance scale
#jira UE-34409
Change 3251519 on 2017/01/09 by Daniel.Wright
[Copy] Fixed GLandscapeLayerUsageMaterial getting GC'ed
#jira UE-40055
Change 3251146 on 2017/01/09 by Lina.Halper
Fix on stable track data carrying over to pose asset
- decided to clean up track data in anim sequence since we don't really need that data anymore
#jira: UE-40351
#code review: Martin.Wilson
Change 3251056 on 2017/01/09 by Lina.Halper
fixed crash when pose node contains stale data when updating source.
#jira: UE-40258
#code review; Thomas.Sarkanen
Change 3251035 on 2017/01/09 by Mitchell.Wilson
Removed preview mesh in M_GodRay to resolve CIS warning.
Relinked textures used in two materials to resolve CIS warnings.
#jira UE-40350
Change 3250959 on 2017/01/09 by Mitchell.Wilson
Updating master sequence playback end time so the final audio track can be heard.
Updating multiple shots to resolve issues with audio not playing back properly.
#jira UE-40321 UE-40335
Change 3250896 on 2017/01/09 by Andrew.Rodham
Sequencer: Fixed level visibility not working in PIE
#jira UE-40082
Change 3250895 on 2017/01/09 by Andrew.Rodham
Sequencer: Fixed evaluation of overlapping audio and skeletal aninmation sections
- Audio and skeletal animation sections now continue to support legacy evaluation order. Overlapping sections of the same priority on the same row will be filtered out such that only the section with the latest start time will be evaluated.
#jira UE-40320
Change 3250830 on 2017/01/09 by Ben.Woodhouse
Duplicated from //ue4/Release-4.14
CL 3238182
Disable timestamp queries on pre-Maxwell nvidia hardware. Local testing suggests that this is the major cause of instability in the UE4.14 release.
It's possible that we could be more targeted by only excluding Fermi and older hardware, but identifying fermi hardware by device ID is difficult in practice, since the range overlaps with Kepler.
#jira UE-38818
Change 3250790 on 2017/01/09 by Lauren.Ridge
Fixing backspace on VR Editor numberpad menu.
#jira UE-39770
Change 3250681 on 2017/01/09 by Ben.Woodhouse
Duplicated from dev-rendering@3249296:
XB1/Fast semantics:
Add missing L1/L2 cache flush on transition to readable (or RW). The missing cache flush was causing indeterminism when reading from a texture shortly after writing to it as a render target.
This fixes bloom and diffuse irradiance issues
The bug has been there for a while, but CL 3227787 (drawclear early out) caused it to manifest
#jira UE-39727
#jira UE-40238
Change 3250680 on 2017/01/09 by Ben.Woodhouse
Duplicated from dev-rendering@3238664
Fix dbuffer decal rendering issues in fullscreen on PC. Also fixes crash in editor when viewing dbuffer materials.
Pass clearcolor in RT params for system textures to workaround a bug with ClearColorTexture not working in fullscreen mode on DX11. Make sure dbuffer targets are bound if we're rendering mesh decals
#jira UT-6891
#jira UE-39842
#jira UE-39949
Change 3250609 on 2017/01/09 by Steve.Robb
Maximum number of stats-using threads increased to 512.
#jira UE-38153
Change 3250604 on 2017/01/09 by Andrew.Rodham
Sequencer: Fixed incorrect seed being used when generating new animation type IDs for object properties
#jira UE-40327
Change 3250589 on 2017/01/09 by Matthew.Griffin
Changed publish symbols node to use runtime dependencies instead of manually including the whole PhysX folder
Avoids unused configs and VS2013 files
#jira UE-39171
Change 3250578 on 2017/01/09 by Matthew.Griffin
Removed art tools from released build now that they are available separately on the Marketplace
Change 3250282 on 2017/01/07 by Mieszko.Zielinski
Fixed UNavigationSystem::bNavigationAutoUpdateEnabled getting ignored by recent addition to related condition in UNavigationSystem #UE4
Reported by UT team.
Replication of a fix from Dev-Framework that didn't make it to 4.15 stream
#jira UE-40324
Change 3250276 on 2017/01/07 by Mieszko.Zielinski
Fixed not being able to add elements to UAIPerceptionStimuliSourceComponent.RegisterAsSourceForSenses for instances manually placed on the map #UE4
#jira UE-31711
Change 3250219 on 2017/01/07 by Mieszko.Zielinski
Extended comment to AISenseConfig_Sight::PeripheralVisionAngleDegrees to make it clear how it works #UE4
#jira UE-31731
Change 3250147 on 2017/01/07 by Andrew.Rodham
Added missing includes
#jira UE-40019
Change 3250096 on 2017/01/06 by Nick.Shin
refetch on timed out GET/POST requests
correction to: UE_MakeHTTPDataRequest
#jira UE-39992 Quicklaunch UFE HTML5 fails with "NS_ERROR_Failure"
Change 3249963 on 2017/01/06 by Mieszko.Zielinski
removed unused and undefined BlackboardKeyUtils::CalculateComparisonResult #UE4
#jira UE-40099
Change 3249829 on 2017/01/06 by Alexis.Matte
turn on the material name clash feature for the content browser importer.
#jira UE-40298
Change 3249791 on 2017/01/06 by andrew.porter
QAGame: Added level blueprint logic to QA-Sequencer that lets tester override sequence bindings
#jira UE-29618
Change 3249755 on 2017/01/06 by Jamie.Dale
Some fixes for object reference detection and notification when deleting assets
#jira UE-40121
Change 3249727 on 2017/01/06 by James.Golding
#jira UE-40242
Change 3249707 on 2017/01/06 by Mitchell.Wilson
Removing preview mesh with incorrect path from materials to resolve warnings in CIS.
#jira UE-40311
Change 3249543 on 2017/01/06 by Michael.Dupuis
#jira UE-40299: validate if UISettings is valid
Change 3249506 on 2017/01/06 by Alexis.Matte
Make sure we use the correct LodIndex when importing a new LOD in case a previous LOD import fail.
#jira UE-40240
Change 3249477 on 2017/01/06 by Ori.Cohen
Fix incorrect warning when moving kinematic objects during simulation.
#JIRA UE-40290
Change 3249472 on 2017/01/06 by Andrew.Rodham
Sequencer: Undo now works as expected when editing the properties of a key
#jira UE-40019
Change 3249390 on 2017/01/06 by Mitchell.Wilson
Removing preview meshes with improper path from materials to resolve CIS warnings in landscape mountains sample.
#jira UE-40300
Change 3249317 on 2017/01/06 by Alexis.Matte
Fix a crash when loading skeletalmesh with no section
#jira UE-40249
Change 3249294 on 2017/01/06 by Mitchell.Wilson
Updated defaultengine.ini for Match 3 to resolve warnings in CIS. ServerDefaultMap and TransitionMap had invalid paths.
#jira UE-40295
Change 3249213 on 2017/01/06 by Chris.Bunner
Fixed up logic for windowed/fullscreen output display selection when working with HDR. Now selects the most appropriate display if HDR enabled, else current monitor window is on. FullscreenDisplay commandline functions regardless of HDR support.
#jira OR-33525, OR-33536, OR-33540, OR-33520
Change 3249135 on 2017/01/06 by Martin.Wilson
Fix root motion issues on additive animations.
- Fix scale issue on resetting root bone
- Fix loss of root motion when animation is additive.
#jira UE-40232
Change 3248522 on 2017/01/05 by Alexis.Matte
Fix a crash when reimporting morph target. Also fix a crash when initiating ColorVertexBuffer with NULL value
#jira UE-40201
Change 3248271 on 2017/01/05 by Andrew.Rodham
Sequencer: Only reset persistent evaluation data when the sequence has changed
- This ensures that we don't destroy persistent data that is assumed to still exist (i.e. it was created in ::Setup) from the same sequence
#jira UE-40234
Change 3248092 on 2017/01/05 by Ben.Marsh
UBT: Remove the [Obsolete] attribute from methods in TargetRules; the [ObsoleteOverride] attribute gives a much better (and more concise) warning with specific instructions on how to resolve it.
Change 3248091 on 2017/01/05 by Marcus.Wassmer
Tick renderthreadtickables in -onethread to avoid leaks.
#jira UE-40248
Change 3248063 on 2017/01/05 by Marc.Audy
Route FAudioDevice::StopAllSounds to the audio thread if called on the game thread
#jira UE-40243
Change 3247995 on 2017/01/05 by Maciej.Mroz
NativizationSummary object is always present.
manually merged cl#3247985 from Dev-Blueprints
#jira UE-40035
Change 3247873 on 2017/01/05 by Chad.Garyet
Adding "Generate QA Labels" buildgraph node and automation script.
Port of createNewLabel and createMinimumLabel python scripts into UAT
#jira UEB-725
Change 3247855 on 2017/01/05 by Nick.Shin
refetch on timed out GET/POST requests
#jira UE-39992 Quicklaunch UFE HTML5 fails with "NS_ERROR_Failure"
Change 3247737 on 2017/01/05 by Marc.Audy
static mesh component instance data now correclty inherits from pritive component instance data instead of skipping it and inheriting directly from scene component instance data
#jira UE-40053
Change 3247723 on 2017/01/05 by mason.seay
Asset for suspend cloth bug
#jira UE-29618
Change 3247708 on 2017/01/05 by Mitchell.Wilson
Updating project settings to disable dbuffer decals to resolve rendering issues in Showdown while using -game -vr
#jira UE-40195
Change 3247652 on 2017/01/05 by Martin.Wilson
Fixes for animation notifies window
-Fix notify not being removed from skeleton
-Fix crash where editor is not refreshed after notify removal
#jira UE-40154
Change 3247638 on 2017/01/05 by mason.seay
Test assets for cloth suspension
#jira UE-29618
Change 3247630 on 2017/01/05 by Alexis.Matte
Prevent crash when the import fail and we have no staticmesh created
#jira UE-40024
Change 3247556 on 2017/01/05 by Ben.Marsh
Fix non-unity compile error.
Change 3247547 on 2017/01/05 by Jurre.deBaare
Crash while using the Delete Button in the HLOD Outliner while a Generated Proxy Mesh is opened in the Static Mesh Editor
#fix Unify path for both delete cluster options in the outliner UI
#jira UE-40066
Change 3247539 on 2017/01/05 by Benn.Gallagher
Fixed serialization crash for simplified skeletal meshes leading to corrupted assets that crash on load after skin weight buffer changes.
#jira UE-40199
Change 3247515 on 2017/01/05 by Allan.Bentham
Fix inverted planar reflections when mobileLDR
Fixed incorrect gamma 2 planar reflection rendering when mobileLDR
#jira UE-32868
Change 3247502 on 2017/01/05 by Dmitriy.Dyomin
Fixed: Single digit frame rate when sculpting landscape foliage.
#jira UE-39532
Change 3247232 on 2017/01/04 by Ben.Marsh
Remove private include from public header. Prevents compiling samples from installed build of the engine without private headers.
#jira UE-40135, UE-40137, UE-40139, UE-40140, UE-40141, UE-40142, UE-40143, UE-40144
Change 3247002 on 2017/01/04 by Chris.Babcock
Changed Vulkan hitchy pipeline log message verbosity
#jira UE-38354
#ue4
#android
#dontbackcopy
Change 3246927 on 2017/01/04 by matt.barnes
Updating QAGame content to facilitate UEQATC-2969
#jira UE-29618
Change 3246894 on 2017/01/04 by Mike.Beach
Mirroring CL 3245322 from Dev-BP
Fixed a crash when implementing a native interface in a BP
#jira UE-40155, UE-40203
Change 3246830 on 2017/01/04 by Chris.Bunner
Allow AllocGBuffer call when in simple-forward so dummy uniform buffer creation can occur.
#jira UE-39756
Change 3246816 on 2017/01/04 by Jon.Nabozny
Fix Anim Notifies Tab not opening in Animation Editor.
#JIRA UE-40134
Change 3246804 on 2017/01/04 by Ori.Cohen
Touch engine file to trigger re-link.
#JIRA UE-40156
Change 3246709 on 2017/01/04 by mason.seay
Updated map
#jira UE-29618
Change 3246606 on 2017/01/04 by Ori.Cohen
Fix for sweeps taking too long time (OR-32839).
- Exhaustive investigation uncovered apparent numerical problems in this code (when compiling with clang 3.9.x with -ffast-math).
- Current solution can result in overshoot for certain trace extents, but they are not expected to be a practical problem in Unreal.
- NVidia is aware and will investigate a better solution.
#tests Compiled Linux server with the changed PhysX and continuously ran bot matches for about a day.
#JIRA UE-40156
Change 3246571 on 2017/01/04 by Marc.Audy
Look at the body instance's desired collision enabled value rather than the primitive component's current collision enabled value when determining whether physics state should be created
#jira UE-39994
Change 3246527 on 2017/01/04 by tim.gautier
QAGame: BP_MediaPlayer now displays the name of the MediaPlayer plugin currently in use during playback
#jira UE-29618
Change 3246480 on 2017/01/04 by mason.seay
Map update
#jira UE-29618
Change 3246470 on 2017/01/04 by Ori.Cohen
Guard against infinitely thin geometry which fixes some nans. This showed up as issues in various projects
#JIRA UE-00000
Change 3246413 on 2017/01/04 by Jon.Nabozny
Cube asset did not have Tri Meshes. Reimported to fix the issue.
-- Copied from 3233164 --
#jira UE-39657
Change 3246388 on 2017/01/04 by Jon.Nabozny
Set 'p.MoveIgnoreFirstBlockingOverlap' to be enabled by default (3158732). This causes collision behavior to remain unchanged unless people opt in to the new behavior.
-- Copied from 3239735 (bot health fixed by a different CL) --
#jira UE-39387
Change 3246352 on 2017/01/04 by Jon.Nabozny
Fix FPredictProjectilePathParams to use a valid default value for TraceChannel.
This requires the use of a new bool bTraceWithChannel which is enabled by default.
-- Copied from 3239765 --
#JIRA UE-39726
Change 3246341 on 2017/01/04 by Ori.Cohen
Allow vehicles to inherit from PawnMovementComponent and only use the pawn/ai capabilities when a Pawn owner is used.
#JIRA UE-39508
Change 3246178 on 2017/01/04 by Andrew.Rodham
Sequencer: When playback stops naturally, the play position is set to the boundary that caused playback to stop (the end if playing forwards, the start if playing backwards)
- This is to reconcile the movie scene sequence player with previous behaviour
#jira UE-40076
Change 3246102 on 2017/01/04 by Benn.Gallagher
Fixed single threaded physics dispatcher triggering checks from clothing when running with a CPU with two or fewer cores.
#jira UE-39811
Change 3246100 on 2017/01/04 by Benn.Gallagher
Fixed ensure triggered when using root motion with sub instances
Fixed crash reinstancing an active anim class that had subinstances
#jira UE-39582
#jira UE-39579
Change 3246092 on 2017/01/04 by Marc.Audy
PR #3082: Improve comment for UInputComponent (Contributed by Soleone)
#jira UE-40098
Change 3246084 on 2017/01/04 by Matthew.Griffin
Remove bad files
Change 3246076 on 2017/01/04 by Matt.Kuhlenschmidt
Fixed all non-editable text properties having a double disabled effect. The text box is read only which prevents edting but still allows copying text from it. This feature had regressed and the disabled effect on top of the read only effect made it too difficult to see the text.
#jira UE-39652
Change 3246043 on 2017/01/04 by Steve.Robb
Use of CastChecked instead of Cast in implementations of IStructSerializerBackend::WriteProperty. This is both more efficient and will hopefully make it easier to diagnose the issue.
#jira UE-39872
Change 3246032 on 2017/01/04 by Martin.Wilson
Change FindBoneIndex to FindRawBoneIndex (final bone maps are not built until after all adding is done so they will not be found)
#jira UE-40105
Change 3246016 on 2017/01/04 by Andrew.Rodham
Editor: Insert/Duplicate/Delete menu on array properties now only closes itself on click, rather than all menus
- This allows us to edit such properties on context menus
#jira UE-39998
Change 3246005 on 2017/01/04 by Thomas.Sarkanen
Fixed asset attachment issues in Skeleton Tree
Assets were being attached uniquely, so only one asset could be attached to a bone/socket. However the calling code didnt know that the unique attachment function just gave up, so the item just got added to the bottom of the tree.
The attachment filter was not set correctly to allow for bone attatchments, so only sockets could be attached to.
The attach parent name was not initialized, so assets could not be deleted one at a time.
#jira UE-40040 - With multiple Preview assets on one bone, only one appears in Skeleton Tree
#jira UE-40041 - Preview assets appear at the bottom of the skeleton tree
Change 3246002 on 2017/01/04 by Andrew.Rodham
Sequencer: Fixed actor tick prerequisites not getting set up correctly for master sequences
#jira UE-39975
Change 3245979 on 2017/01/04 by Andrew.Rodham
Sequencer: Fixed scrubbing audio tracks not working propertly
#jira UE-40048
Change 3245978 on 2017/01/04 by Andrew.Rodham
Sequencer: Fixed dropping a level onto a level visibility section not marking the track as changed, and not correctly creating a transaction
#jira UE-39998
Change 3245977 on 2017/01/04 by Andrew.Rodham
Sequencer: Fixed crash caused by lingering persistent evaluation data
#jira UE-40064
Change 3245971 on 2017/01/04 by Dmitriy.Dyomin
Fixed: Using Set World Origin Location will cause the player pawn to stutter
#jira UE-40022
Change 3245725 on 2017/01/03 by Matt.Barnes
Further improvments on test assets for UEQATC-2963
#jira UE-29618
Change 3245658 on 2017/01/03 by Arciel.Rekman
Linux: fix ARM32 build (UE-39913).
#jira UE-39913
(Redoing CL 3240982 from Dev-Platform in Release-4.15)
Change 3245577 on 2017/01/03 by Mason.Seay
More vehicle updates
#jira UE-29618
Change 3245556 on 2017/01/03 by Matt.Barnes
Updating test content for UEQATC-2963
#jira UEQATC-2963
Change 3245461 on 2017/01/03 by mason.seay
Updating Inertia Tensor Scale to improve Vehicle Handling
#jira UE-40013
Change 3245442 on 2017/01/03 by Jeff.Fisher
UEVR-495 Assert when switching to 2d mode. sceHmdReprojectionStart failing.
-There was a race condition between switching output modes on the render thread and sceHmdReprojectionStart on the RHI thread. The flush fixes that. The reprojection would simply have failed that frame previously in shipping which would not matter much as we are switching output modes anyway.
#jira UEVR-495
#review-3245374
Change 3245427 on 2017/01/03 by Jeff.Fisher
UEVR-456 check if we are using camera before doing camera disconnected dialog on PSVR
-If the tracker is active, but we are tracking nothing (ie we have the morpheus hmd tracking plugin, and started up with it, but switched to 2d mode) don't pop up the camera setup warning until we start trying to track something again.
-This is useful for apps that have 2d and vr modes.
#jira UEVR-456
#review-3245372
Change 3245329 on 2017/01/03 by mason.seay
Level and vehicle tweaks
#jira UE-29618
Change 3245275 on 2017/01/03 by Chris.Babcock
Added EngineVersion to AndroidManfiest.xml metadata
#jira UE-40123
#ue4
#android
Change 3245235 on 2017/01/03 by Guillaume.Abadie
Cherry picks CL 3234813 from Dev-Rendering: Fixes texture mask static lighting when using GBuffer selective outputs.
#jira UE-39527
Change 3245183 on 2017/01/03 by Chris.Babcock
Added missing #undef LOCTEXT_NAMESPACE to some files (contributed by projectgheist)
#jira UE-40103
#PR #3085
#ue4
#android
Change 3245120 on 2017/01/03 by mason.seay
Missed some assets
#jira UE-29618
Change 3245116 on 2017/01/03 by mason.seay
Mass fucntional test
#jira UE-29618
Change 3245049 on 2017/01/03 by Ben.Marsh
PR #3086: Fixed ScriptGeneratorPlugin #includes (Contributed by projectgheist)
Change 3244924 on 2017/01/03 by Ben.Zeigler
#jira UE-40057 Fix regression in public access for SwapPlayerControllers, from GitHub #3072
Change 3244831 on 2017/01/03 by Mitchell.Wilson
Fixed hole in collision around level.
#jira UE-39576
Change 3244817 on 2017/01/03 by Matthew.Griffin
Change check for files being under engine directory to avoid problems with relative paths
#jira UE-40096
Change 3244801 on 2017/01/03 by Andrew.Rodham
Editor: Fixed color picker not working when opened from a details panel on a context menu
- When a color picker is opened from a details panel that's on a context menu, it now opens as a sub menu
- Added the ability to find an open menu from a widget path to FSlateApplication
#jira UE-39932
Change 3244776 on 2017/01/03 by Matt.Kuhlenschmidt
Fix window handle and device context being accessed by scene viewports after the underlying window has been destroyed by the OS. This is an invalid state on linux and using some vr devices.
#jira UE-7388
Change 3244672 on 2017/01/03 by Ben.Marsh
Search all directories containing universal CRT installations from the registry, rather than assuming that the first one found will contain the universal CRT version we want to use. Attempt to fix issues described in PR #3059.
Change 3244668 on 2017/01/03 by Thomas.Sarkanen
Added "Reimport Animation" and "Export to FBX" to the animation editor toolbar
Options were in the asset menu before.
#jira UE-39643 - Missing "Reimport" option for animation assets
Change 3244667 on 2017/01/03 by Thomas.Sarkanen
Reduced default URO distances in-line with new LOD calculations
New values should give (roughly) the same effect as the older values with the older system.
#jira UE-39939 - URO LOD distance factors different with the new screen size metric
Change 3244654 on 2017/01/03 by Matthew.Griffin
Added functionality to specify Loading Phase for plugin templates
Changed Blueprint Library Template so that it loads pre loading screen and can be linked correctly in blueprints that use it
#jira UE-38826
Change 3244631 on 2017/01/03 by Dmitriy.Dyomin
Fixed: TM_Landscape_LOD Folder does not Live Update contents after generating LODs with Create Per Package Asset
#jira UE-37368
Change 3244548 on 2017/01/02 by Jack.Porter
Fix for Post-process Materials rendering incorrectly in editor mobile preview after viewport is resized
#jira UE-39905
Change 3244389 on 2016/12/30 by Phillip.Kavan
[UE-39816] Fix broken pin links caused by renaming interface function input/output parameters prior to compiling the interface, but after renaming the function itself.
Mirrored from //UE4/Dev-Blueprints (CL# 3244388).
#jira UE-39816
Change 3244248 on 2016/12/29 by laz.matech
Saved the new sublevel in the persistent level and set it to hidden by default
#jira UE-29618
Change 3244213 on 2016/12/29 by laz.matech
Added a sublevel to QA-Sequencer map
#jira UE-29618
Change 3243857 on 2016/12/27 by samuel.proctor
Altered Container asset to have proper console input
#jira UE-29618
Change 3243852 on 2016/12/27 by Mason.Seay
Forgot config file
#jira UE-29618
Change 3243847 on 2016/12/27 by mason.seay
Improved mobile input
#jira UE-29618
Change 3243536 on 2016/12/24 by Phillip.Kavan
[UE-39944] Extend the GetClassDefaults node to include output pin exceptions for TSet/TMap properties (i.e. mirror safeguards already in place for TArray).
Mirrored from //UE4/Dev-Blueprints (CL# 3243210).
#jira UE-39944
Change 3243535 on 2016/12/24 by Phillip.Kavan
[UE-39816] Renaming interface input/output parameters will no longer cause broken pin links at interface function call sites in Blueprints that are currently loaded.
Mirrored from //UE4/Dev-Blueprints (CL# 3243207).
#jira UE-39816
Change 3243534 on 2016/12/24 by Phillip.Kavan
[UE-39733] Fix incorrect graph pin value display names for user-defined enum types.
Mirrored from //UE4/Dev-Blueprints (CL# 3239965).
#jira UE-39733
Change 3243532 on 2016/12/24 by Phillip.Kavan
[UE-39854] Fix nativized assets build error when there are no native code dependencies.
Mirrored from //UE4/Dev-Blueprints (CL# 3239778).
#jira UE-39854
Change 3243529 on 2016/12/24 by Phillip.Kavan
[UE-38999] Dump component tree node hierarchy to the output log on error state during widget generation.
Mirrored from //UE4/Dev-Blueprints (CL# 3239289).
#jira UE-38999
Change 3243442 on 2016/12/23 by mason.seay
QAGame cleanup - Replacing copy pose from mesh test assets
#jira UE-29618
Change 3243215 on 2016/12/22 by Dmitriy.Dyomin
Fixed: Switching to ES2 feature level preview renders black in editor
#jira UE-40009
Change 3243185 on 2016/12/22 by Ryan.Vance
#jira UEVR-478
Integrating 3235308 Mono changes from DevVR.
Change 3243183 on 2016/12/22 by Ryan.Vance
#jira UEVR-455
Integrating 3243173 post present call back implementation from 4.14.1
Change 3243182 on 2016/12/22 by Ryan.Vance
#jira UE-39269
Working around a nullptr deref in the Oculus runtime.
Change 3243153 on 2016/12/22 by mason.seay
WIP map update
#jira UE-29618
Change 3243128 on 2016/12/22 by andrew.porter
QAGame: Adding Actor Sequence test content for a crash.
#jira UE-29618
Change 3243117 on 2016/12/22 by Jeff.Fisher
UE-34004 GitHub 2659 : Implement support for OpenVR controller roles.
-Rather than assigning unreal hands to controllers in the order the controllers are connected assign unreal hands to match the ones the API is using.
-We now defer setting up controllers that are disconnected. This lets connected controllers, that may have hand preference from steam, occupy their desired hands first. If a controller is connected later and does not have a role it is assigned to an unoccupied hand or to the right hand.
-This can still end up ignoring role in the following circumstance (and I can get it to do this): get one controller to prefer'right' and the other to have no preference. Power off the 'right' prefering controller. Start the game with only the no-preference controller on. The game will put that controller in the right slot, because the api gives it no other hints. Then power on the controller that preferred 'right'. That controller will now be assigned left, because right is occupied. I don't see a way around that without the ability to switch which hand a controller is associated with at runtime.
-This does not yet handle starting with 2 controllers, disconnecting one, then connecting a third controller well. That did not work before either. A new Jira was created for that.
#2659
#jira UE-34004
#review-3231154
Change 3243093 on 2016/12/22 by mason.seay
Some tweaks to vehicle levels
#jira UE-29618
Change 3243084 on 2016/12/22 by andrew.porter
QAGame: Cleaned up Sequencer_OverrideBindings
#jira UE-29618
Change 3243009 on 2016/12/22 by andrew.porter
QAGame: Renaming actor in Sequencer_OverrideBindings.
#jira UE-29618
Change 3243003 on 2016/12/22 by andrew.porter
QAGame: Removing override bindings from level sequence
#jira UE-29618
Change 3242996 on 2016/12/22 by andrew.porter
QAGame: Slight tweak to QA-Sequencer.
#jira UE-29618
Change 3242982 on 2016/12/22 by Marc.Audy
Properly reenable stats sounds in both game and level editor
#jira UE-40015
Change 3242959 on 2016/12/22 by mason.seay
Test map for vehicles and moving meshes
#jira UE-29618
Change 3242934 on 2016/12/22 by andrew.porter
QAGame: Adding test content to QA-Sequencer for Override Bindings
#jira UE-29618
Change 3242870 on 2016/12/22 by Mason.Seay
QAGame footprint reduction: Clearing out content (were in for old bug reports)
#jira UE-29618
Change 3242799 on 2016/12/22 by tim.gautier
QAGame - Adding the following assets for Sequencer Event Track testing:
-TM-Sequencer_EventTrack + BuildData
-QA_LightStruct
-Sequencer_EventTrack
#jira UE-29618
Change 3242792 on 2016/12/22 by samuel.proctor
Correcting Container test asset for proper output
#jira UE-29618
Change 3242727 on 2016/12/22 by Dmitriy.Dyomin
Fixed: LoadLevelIntstance returns a reference that can't be used to send an interface message
#jira UE-40005
Change 3242666 on 2016/12/22 by Dmitriy.Dyomin
Fixed: Packaging Android app for Mali Graphics Debugger v4.3.0 fails
#jira UE-39534
Change 3242373 on 2016/12/21 by Ori.Cohen
Allow vehicles to override inertia tensor after any mass properties have changed.
#JIRA UE-39566
Change 3242323 on 2016/12/21 by Josh.Adams
- Somehow my last change just got completely lost in the edigrate shuffle. Or something. I have no idea! Rdoing it
#jira UE-39966
Change 3242286 on 2016/12/21 by mason.seay
Vehicle Assets and Maps
#jira UE-29618
Change 3242284 on 2016/12/21 by Marc.Audy
Fix "stat sounds" not working after PIE completes and a new one is begun
#jira UE-32743
#jira UE-39511
Change 3242281 on 2016/12/21 by Ori.Cohen
Fix multi select being very slow in phat
#JIRA UE-39559
Change 3242229 on 2016/12/21 by Ben.Marsh
Fixup workspace for building PhysX.
Change 3242227 on 2016/12/21 by Marc.Audy
Properly update listener position for stat sounds
#jira UE-38850
Change 3242218 on 2016/12/21 by Ori.Cohen
Fix physx html5 compilation APEX issue.
#JIRA UE-39566
Change 3242174 on 2016/12/21 by Ori.Cohen
Fix incorrect moment of inertia for convex elements with translation.
#JIRA UE-39566
Change 3242145 on 2016/12/21 by Ori.Cohen
Port 4.14 hotfix for vehicle stability
#JIRA UE-38710
Change 3242139 on 2016/12/21 by Ori.Cohen
Port 4.14 hotfix:
Fix crash when setting collision trace in construction script.
#JIRA UE-39341
Change 3242088 on 2016/12/21 by Alexis.Matte
Fix the drag and drop material on level instance to drop on the correct material slot
Fix the serialization of the staticmesh property FMeshSectionInfoMap
#jira UE-39952
Change 3242081 on 2016/12/21 by Andrew.Rodham
Sequencer: Make details view focused when resetting inner struct contents to ensure that focus path is valid.
#jira UE-39851
Change 3242079 on 2016/12/21 by Andrew.Rodham
Sequencer: Evaluation templates are now only fully rebuilt in PIE, and will not re-cycle track identifiers
- This addresses issues with newly compiled tracks recycling the persistent data of old stale tracks.
- This commit also ensures we don't fully rebuild templates in the editor when in Sequencer
#jira UE-39882
Change 3242078 on 2016/12/21 by Andrew.Rodham
Sequencer: Fixed crash when deactivating a section in sequencer
#jira UE-39880
Change 3242026 on 2016/12/21 by Josh.Adams
- Fixed compile errors in tools after NVNRHI move
#jira UE-39966
Change 3241994 on 2016/12/21 by andrew.porter
QAGame: Disabled auto play on Sequencer_AnimNotify.
#jira UE-29618
Change 3241989 on 2016/12/21 by Mitchell.Wilson
Resolving CIS warnings in Content examples.
Fixed up redirectors. Moved a texture from developer folder into project and relinked in POM_Debug material. Fixed up BP Commentary Box which was failing to compile. Updated spawn rate on Pulse Ring so it works as intended.
#jira UE-39984
Change 3241986 on 2016/12/21 by mason.seay
Vehicle Landscape Test map (mainly for crash investigation)
#jira UE-29618
Change 3241914 on 2016/12/21 by Josh.Adams
- Removed invalid and confusing .ini settings
#jira UE-39982
Change 3241902 on 2016/12/21 by Josh.Adams
- Moved NVNRHI stuff out of RHI.Build.cs
#jira UE-39966
Change 3241889 on 2016/12/21 by andrew.porter
QAGame: Added new level sequence to QA-Sequencer level
#jira UE-29618
Change 3241884 on 2016/12/21 by Alexis.Matte
Make sure the color grading cursor follow the mouse by using the exponent value when painting the cursor.
#jira UE-39834
Change 3241869 on 2016/12/21 by andrew.porter
QAGame: Adding test content for Sequencer Animation Notifies
#jira UE-29618
Change 3241809 on 2016/12/21 by Chris.Wood
Fix non-unity build errors in UnrealWatchdog.
[UE-39940] - GitHub 3054 : Added EngineBuildSettings.h to UnrealWatchdog.cpp
PR #3054: Added EngineBuildSettings.h to UnrealWatchdog.cpp (Contributed by ryanjon2040)
#jira UE-39940
Change 3241806 on 2016/12/21 by Marc.Audy
Don't unload and then reload streaming levels that are marked to be hidden.
#jira UE-39883
Change 3241802 on 2016/12/21 by Marc.Audy
Add new object flag RF_NeedInitialization to indicate that ~FObjectInitalizer and PostInitProperties have not been executed for the object
Do not allow Modify calls on Objects that have not been initialized
#jira UE-39731
Change 3241790 on 2016/12/21 by Marc.Audy
Don't rerun construction scripts when an actor has seamless traveled from another level
#jira UE-39699
Change 3241789 on 2016/12/21 by Marc.Audy
Check Owner has a valid world before trying to access Scene (4.14.2)
#jira UE-39560
Change 3241786 on 2016/12/21 by Marc.Audy
Fixed crash when seamless travelling in PIE from levels other than the current editor level with a streaming sublevel shared with the current editor level
#jira UE-39407
Change 3241781 on 2016/12/21 by Mitchell.Wilson
Fixed up redirectors for SkeletalMesh and Personal Walkthroughs.
#jira UE-30953
Change 3241747 on 2016/12/21 by mason.seay
Tag Query test map and assets
#jira UE-29618
Change 3240938 on 2016/12/20 by Ben.Marsh
Remaking QFE fixes from 4.14 branch.
Change 3240740 on 2016/12/20 by Ben.Marsh
Update branch name for analytics.
[CL 3272229 by Matthew Griffin in Main branch]
2017-01-25 16:23:41 -05:00
|
|
|
#include "ScriptGeneratorLog.h"
|
|
|
|
|
#include "UObject/ErrorException.h"
|
2014-04-29 06:45:18 -04:00
|
|
|
|
|
|
|
|
// Supported structs
|
2014-07-03 03:22:03 -04:00
|
|
|
static FName Name_Vector2D("Vector2D");
|
2014-04-29 06:45:18 -04:00
|
|
|
static FName Name_Vector("Vector");
|
|
|
|
|
static FName Name_Vector4("Vector4");
|
|
|
|
|
static FName Name_Quat("Quat");
|
|
|
|
|
static FName Name_Transform("Transform");
|
2014-07-03 03:22:03 -04:00
|
|
|
static FName Name_LinearColor("LinearColor");
|
|
|
|
|
static FName Name_Color("Color");
|
2014-04-29 06:45:18 -04:00
|
|
|
|
2014-06-23 06:27:04 -04:00
|
|
|
FLuaScriptCodeGenerator::FLuaScriptCodeGenerator(const FString& RootLocalPath, const FString& RootBuildPath, const FString& OutputDirectory, const FString& InIncludeBase)
|
|
|
|
|
: FScriptCodeGeneratorBase(RootLocalPath, RootBuildPath, OutputDirectory, InIncludeBase)
|
2014-04-29 06:45:18 -04:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FString FLuaScriptCodeGenerator::GenerateWrapperFunctionDeclaration(const FString& ClassNameCPP, UClass* Class, UFunction* Function)
|
|
|
|
|
{
|
|
|
|
|
return GenerateWrapperFunctionDeclaration(ClassNameCPP, Class, Function->GetName());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FString FLuaScriptCodeGenerator::GenerateWrapperFunctionDeclaration(const FString& ClassNameCPP, UClass* Class, const FString& FunctionName)
|
|
|
|
|
{
|
|
|
|
|
return FString::Printf(TEXT("int32 %s_%s(lua_State* InScriptContext)"), *Class->GetName(), *FunctionName);
|
|
|
|
|
}
|
|
|
|
|
|
2014-05-09 10:52:27 -04:00
|
|
|
FString FLuaScriptCodeGenerator::InitializeFunctionDispatchParam(UFunction* Function, UProperty* Param, int32 ParamIndex)
|
|
|
|
|
{
|
|
|
|
|
if (!(Param->GetPropertyFlags() & CPF_ReturnParm))
|
2014-04-29 06:45:18 -04:00
|
|
|
{
|
2014-05-09 10:52:27 -04:00
|
|
|
FString Initializer;
|
|
|
|
|
// In Lua, the first param index on the stack is 1 and it's the object we're invoking the function on
|
|
|
|
|
ParamIndex += 2;
|
|
|
|
|
|
|
|
|
|
if (Param->IsA(UIntProperty::StaticClass()))
|
2014-04-29 06:45:18 -04:00
|
|
|
{
|
2014-05-09 10:52:27 -04:00
|
|
|
Initializer = TEXT("(luaL_checkint");
|
2014-04-29 06:45:18 -04:00
|
|
|
}
|
2014-05-09 10:52:27 -04:00
|
|
|
else if (Param->IsA(UFloatProperty::StaticClass()))
|
2014-04-29 06:45:18 -04:00
|
|
|
{
|
2014-05-09 10:52:27 -04:00
|
|
|
Initializer = TEXT("(float)(luaL_checknumber");
|
2014-04-29 06:45:18 -04:00
|
|
|
}
|
2014-05-09 10:52:27 -04:00
|
|
|
else if (Param->IsA(UStrProperty::StaticClass()))
|
2014-04-29 06:45:18 -04:00
|
|
|
{
|
2014-05-09 10:52:27 -04:00
|
|
|
Initializer = TEXT("ANSI_TO_TCHAR(luaL_checkstring");
|
2014-04-29 06:45:18 -04:00
|
|
|
}
|
2014-05-09 10:52:27 -04:00
|
|
|
else if (Param->IsA(UNameProperty::StaticClass()))
|
2014-04-29 06:45:18 -04:00
|
|
|
{
|
2014-05-09 10:52:27 -04:00
|
|
|
Initializer = TEXT("FName(luaL_checkstring");
|
|
|
|
|
}
|
|
|
|
|
else if (Param->IsA(UBoolProperty::StaticClass()))
|
|
|
|
|
{
|
|
|
|
|
Initializer = TEXT("!!(lua_toboolean");
|
|
|
|
|
}
|
|
|
|
|
else if (Param->IsA(UStructProperty::StaticClass()))
|
|
|
|
|
{
|
|
|
|
|
UStructProperty* StructProp = CastChecked<UStructProperty>(Param);
|
2014-07-03 03:22:03 -04:00
|
|
|
if (StructProp->Struct->GetFName() == Name_Vector2D)
|
|
|
|
|
{
|
|
|
|
|
Initializer = TEXT("(FLuaVector2D::Get");
|
|
|
|
|
}
|
|
|
|
|
else if (StructProp->Struct->GetFName() == Name_Vector)
|
2014-05-09 10:52:27 -04:00
|
|
|
{
|
|
|
|
|
Initializer = TEXT("(FLuaVector::Get");
|
|
|
|
|
}
|
|
|
|
|
else if (StructProp->Struct->GetFName() == Name_Vector4)
|
|
|
|
|
{
|
|
|
|
|
Initializer = TEXT("(FLuaVector4::Get");
|
|
|
|
|
}
|
|
|
|
|
else if (StructProp->Struct->GetFName() == Name_Quat)
|
|
|
|
|
{
|
|
|
|
|
Initializer = TEXT("(FLuaQuat::Get");
|
|
|
|
|
}
|
2014-07-03 03:22:03 -04:00
|
|
|
else if (StructProp->Struct->GetFName() == Name_LinearColor)
|
|
|
|
|
{
|
|
|
|
|
Initializer = TEXT("(FLuaLinearColor::Get");
|
|
|
|
|
}
|
|
|
|
|
else if (StructProp->Struct->GetFName() == Name_Color)
|
|
|
|
|
{
|
|
|
|
|
Initializer = TEXT("FColor(FLuaLinearColor::Get");
|
|
|
|
|
}
|
2014-05-09 10:52:27 -04:00
|
|
|
else if (StructProp->Struct->GetFName() == Name_Transform)
|
|
|
|
|
{
|
|
|
|
|
Initializer = TEXT("(FLuaTransform::Get");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
FError::Throwf(TEXT("Unsupported function param struct type: %s"), *StructProp->Struct->GetName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (Param->IsA(UClassProperty::StaticClass()))
|
|
|
|
|
{
|
|
|
|
|
Initializer = TEXT("(UClass*)(lua_touserdata");
|
|
|
|
|
}
|
|
|
|
|
else if (Param->IsA(UObjectPropertyBase::StaticClass()))
|
|
|
|
|
{
|
|
|
|
|
Initializer = FString::Printf(TEXT("(%s)(lua_touserdata"), *GetPropertyTypeCPP(Param, CPPF_ArgumentOrReturnValue), ParamIndex);
|
2014-04-29 06:45:18 -04:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-05-09 10:52:27 -04:00
|
|
|
FError::Throwf(TEXT("Unsupported function param type: %s"), *Param->GetClass()->GetName());
|
2014-04-29 06:45:18 -04:00
|
|
|
}
|
2014-05-09 10:52:27 -04:00
|
|
|
|
|
|
|
|
return FString::Printf(TEXT("%s(InScriptContext, %d))"), *Initializer, ParamIndex);
|
2014-04-29 06:45:18 -04:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-05-09 10:52:27 -04:00
|
|
|
return FScriptCodeGeneratorBase::InitializeFunctionDispatchParam(Function, Param, ParamIndex);
|
|
|
|
|
}
|
2014-04-29 06:45:18 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FString FLuaScriptCodeGenerator::GenerateObjectDeclarationFromContext(const FString& ClassNameCPP, UClass* Class)
|
|
|
|
|
{
|
2014-05-09 10:52:27 -04:00
|
|
|
return FString::Printf(TEXT("UObject* Obj = (%s*)lua_touserdata(InScriptContext, 1);"), *ClassNameCPP);
|
2014-04-29 06:45:18 -04:00
|
|
|
}
|
|
|
|
|
|
2014-05-09 10:52:27 -04:00
|
|
|
FString FLuaScriptCodeGenerator::GenerateReturnValueHandler(const FString& ClassNameCPP, UClass* Class, UFunction* Function, UProperty* ReturnValue, const FString& ReturnValueName)
|
2014-04-29 06:45:18 -04:00
|
|
|
{
|
|
|
|
|
if (ReturnValue)
|
|
|
|
|
{
|
|
|
|
|
FString Initializer;
|
|
|
|
|
if (ReturnValue->IsA(UIntProperty::StaticClass()))
|
|
|
|
|
{
|
|
|
|
|
Initializer = FString::Printf(TEXT("lua_pushinteger(InScriptContext, %s);"), *ReturnValueName);
|
|
|
|
|
}
|
|
|
|
|
else if (ReturnValue->IsA(UFloatProperty::StaticClass()))
|
|
|
|
|
{
|
|
|
|
|
Initializer = FString::Printf(TEXT("lua_pushnumber(InScriptContext, %s);"), *ReturnValueName);
|
|
|
|
|
}
|
|
|
|
|
else if (ReturnValue->IsA(UStrProperty::StaticClass()))
|
|
|
|
|
{
|
|
|
|
|
Initializer = FString::Printf(TEXT("lua_pushstring(InScriptContext, TCHAR_TO_ANSI(*%s));"), *ReturnValueName);
|
|
|
|
|
}
|
|
|
|
|
else if (ReturnValue->IsA(UNameProperty::StaticClass()))
|
|
|
|
|
{
|
|
|
|
|
Initializer = FString::Printf(TEXT("lua_pushstring(InScriptContext, TCHAR_TO_ANSI(*%s.ToString()));"), *ReturnValueName);
|
|
|
|
|
}
|
|
|
|
|
else if (ReturnValue->IsA(UBoolProperty::StaticClass()))
|
|
|
|
|
{
|
|
|
|
|
Initializer = FString::Printf(TEXT("lua_pushboolean(InScriptContext, %s);"), *ReturnValueName);
|
|
|
|
|
}
|
|
|
|
|
else if (ReturnValue->IsA(UStructProperty::StaticClass()))
|
|
|
|
|
{
|
|
|
|
|
UStructProperty* StructProp = CastChecked<UStructProperty>(ReturnValue);
|
2014-07-03 03:22:03 -04:00
|
|
|
if (StructProp->Struct->GetFName() == Name_Vector2D)
|
|
|
|
|
{
|
|
|
|
|
Initializer = FString::Printf(TEXT("FLuaVector2D::Return(InScriptContext, %s);"), *ReturnValueName);
|
|
|
|
|
}
|
|
|
|
|
else if (StructProp->Struct->GetFName() == Name_Vector)
|
2014-04-29 06:45:18 -04:00
|
|
|
{
|
|
|
|
|
Initializer = FString::Printf(TEXT("FLuaVector::Return(InScriptContext, %s);"), *ReturnValueName);
|
|
|
|
|
}
|
|
|
|
|
else if (StructProp->Struct->GetFName() == Name_Vector4)
|
|
|
|
|
{
|
|
|
|
|
Initializer = FString::Printf(TEXT("FLuaVector4::Return(InScriptContext, %s);"), *ReturnValueName);
|
|
|
|
|
}
|
|
|
|
|
else if (StructProp->Struct->GetFName() == Name_Quat)
|
|
|
|
|
{
|
|
|
|
|
Initializer = FString::Printf(TEXT("FLuaQuat::Return(InScriptContext, %s);"), *ReturnValueName);
|
|
|
|
|
}
|
2014-07-03 03:22:03 -04:00
|
|
|
else if (StructProp->Struct->GetFName() == Name_LinearColor)
|
|
|
|
|
{
|
|
|
|
|
Initializer = FString::Printf(TEXT("FLuaLinearColor::Return(InScriptContext, %s);"), *ReturnValueName);
|
|
|
|
|
}
|
|
|
|
|
else if (StructProp->Struct->GetFName() == Name_Color)
|
|
|
|
|
{
|
|
|
|
|
Initializer = FString::Printf(TEXT("FLuaLinearColor::Return(InScriptContext, FLinearColor(%s));"), *ReturnValueName);
|
|
|
|
|
}
|
2014-04-29 06:45:18 -04:00
|
|
|
else if (StructProp->Struct->GetFName() == Name_Transform)
|
|
|
|
|
{
|
|
|
|
|
Initializer = FString::Printf(TEXT("FLuaTransform::Return(InScriptContext, %s);"), *ReturnValueName);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
FError::Throwf(TEXT("Unsupported function return value struct type: %s"), *StructProp->Struct->GetName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (ReturnValue->IsA(UObjectPropertyBase::StaticClass()))
|
|
|
|
|
{
|
|
|
|
|
Initializer = FString::Printf(TEXT("lua_pushlightuserdata(InScriptContext, %s);"), *ReturnValueName);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
FError::Throwf(TEXT("Unsupported function return type: %s"), *ReturnValue->GetClass()->GetName());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return FString::Printf(TEXT("%s\r\n\treturn 1;"), *Initializer);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return TEXT("return 0;");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool FLuaScriptCodeGenerator::CanExportClass(UClass* Class)
|
|
|
|
|
{
|
|
|
|
|
bool bCanExport = FScriptCodeGeneratorBase::CanExportClass(Class);
|
|
|
|
|
if (bCanExport)
|
|
|
|
|
{
|
2015-03-24 15:51:28 -04:00
|
|
|
const FString ClassNameCPP = GetClassNameCPP(Class);
|
|
|
|
|
// No functions to export? Don't bother exporting the class.
|
|
|
|
|
bool bHasMembersToExport = false;
|
|
|
|
|
for (TFieldIterator<UFunction> FuncIt(Class); !bHasMembersToExport && FuncIt; ++FuncIt)
|
2014-04-29 06:45:18 -04:00
|
|
|
{
|
2015-03-24 15:51:28 -04:00
|
|
|
UFunction* Function = *FuncIt;
|
|
|
|
|
if (CanExportFunction(ClassNameCPP, Class, Function))
|
2014-04-29 06:45:18 -04:00
|
|
|
{
|
2015-03-24 15:51:28 -04:00
|
|
|
bHasMembersToExport = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// Check properties too
|
|
|
|
|
if (!bHasMembersToExport)
|
|
|
|
|
{
|
|
|
|
|
for (TFieldIterator<UProperty> PropertyIt(Class, EFieldIteratorFlags::ExcludeSuper); !bHasMembersToExport && PropertyIt; ++PropertyIt)
|
|
|
|
|
{
|
|
|
|
|
UProperty* Property = *PropertyIt;
|
|
|
|
|
if (CanExportProperty(ClassNameCPP, Class, Property))
|
2014-04-29 06:45:18 -04:00
|
|
|
{
|
|
|
|
|
bHasMembersToExport = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-03-24 15:51:28 -04:00
|
|
|
bCanExport = bHasMembersToExport;
|
2014-04-29 06:45:18 -04:00
|
|
|
}
|
|
|
|
|
return bCanExport;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool FLuaScriptCodeGenerator::CanExportFunction(const FString& ClassNameCPP, UClass* Class, UFunction* Function)
|
|
|
|
|
{
|
|
|
|
|
bool bExport = FScriptCodeGeneratorBase::CanExportFunction(ClassNameCPP, Class, Function);
|
|
|
|
|
if (bExport)
|
|
|
|
|
{
|
|
|
|
|
for (TFieldIterator<UProperty> ParamIt(Function); bExport && ParamIt; ++ParamIt)
|
|
|
|
|
{
|
|
|
|
|
UProperty* Param = *ParamIt;
|
2014-05-09 10:52:27 -04:00
|
|
|
bExport = IsPropertyTypeSupported(Param);
|
2014-04-29 06:45:18 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return bExport;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FString FLuaScriptCodeGenerator::ExportFunction(const FString& ClassNameCPP, UClass* Class, UFunction* Function)
|
|
|
|
|
{
|
|
|
|
|
FString GeneratedGlue = GenerateWrapperFunctionDeclaration(ClassNameCPP, Class, Function);
|
|
|
|
|
GeneratedGlue += TEXT("\r\n{\r\n");
|
|
|
|
|
|
|
|
|
|
UProperty* ReturnValue = NULL;
|
|
|
|
|
UClass* FuncSuper = NULL;
|
|
|
|
|
|
|
|
|
|
if (Function->GetOwnerClass() != Class)
|
|
|
|
|
{
|
|
|
|
|
// Find the base definition of the function
|
|
|
|
|
if (ExportedClasses.Contains(Function->GetOwnerClass()->GetFName()))
|
|
|
|
|
{
|
|
|
|
|
FuncSuper = Function->GetOwnerClass();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FString FunctionBody;
|
|
|
|
|
if (FuncSuper == NULL)
|
|
|
|
|
{
|
|
|
|
|
FunctionBody += FString::Printf(TEXT("\t%s\r\n"), *GenerateObjectDeclarationFromContext(ClassNameCPP, Class));
|
2014-05-09 10:52:27 -04:00
|
|
|
FunctionBody += GenerateFunctionDispatch(Function);
|
2014-04-29 06:45:18 -04:00
|
|
|
|
|
|
|
|
FString FunctionCallArguments;
|
|
|
|
|
FString ReturnValueDeclaration;
|
2014-05-09 10:52:27 -04:00
|
|
|
for (TFieldIterator<UProperty> ParamIt(Function); !ReturnValue && ParamIt; ++ParamIt)
|
2014-04-29 06:45:18 -04:00
|
|
|
{
|
|
|
|
|
UProperty* Param = *ParamIt;
|
2014-05-09 10:52:27 -04:00
|
|
|
if (Param->GetPropertyFlags() & CPF_ReturnParm)
|
2014-04-29 06:45:18 -04:00
|
|
|
{
|
|
|
|
|
ReturnValue = Param;
|
|
|
|
|
}
|
2014-05-09 10:52:27 -04:00
|
|
|
}
|
|
|
|
|
FString ReturnValueName;
|
|
|
|
|
if (ReturnValue)
|
|
|
|
|
{
|
|
|
|
|
ReturnValueName = FString::Printf(TEXT("Params.%s"), *ReturnValue->GetName());
|
|
|
|
|
}
|
|
|
|
|
FunctionBody += FString::Printf(TEXT("\t%s\r\n"), *GenerateReturnValueHandler(ClassNameCPP, Class, Function, ReturnValue, *ReturnValueName));
|
2014-04-29 06:45:18 -04:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
FunctionBody = FString::Printf(TEXT("\treturn %s_%s(InScriptContext);\r\n"), *FuncSuper->GetName(), *Function->GetName());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GeneratedGlue += FunctionBody;
|
|
|
|
|
GeneratedGlue += TEXT("}\r\n\r\n");
|
|
|
|
|
|
|
|
|
|
auto& Exports = ClassExportedFunctions.FindOrAdd(Class);
|
|
|
|
|
Exports.Add(Function->GetFName());
|
|
|
|
|
|
|
|
|
|
return GeneratedGlue;
|
|
|
|
|
}
|
|
|
|
|
|
2014-05-09 10:52:27 -04:00
|
|
|
bool FLuaScriptCodeGenerator::IsPropertyTypeSupported(UProperty* Property) const
|
2014-04-29 06:45:18 -04:00
|
|
|
{
|
2014-05-09 10:52:27 -04:00
|
|
|
bool bSupported = true;
|
|
|
|
|
if (Property->IsA(UStructProperty::StaticClass()))
|
|
|
|
|
{
|
|
|
|
|
UStructProperty* StructProp = CastChecked<UStructProperty>(Property);
|
2014-07-03 03:22:03 -04:00
|
|
|
if (StructProp->Struct->GetFName() != Name_Vector2D &&
|
|
|
|
|
StructProp->Struct->GetFName() != Name_Vector &&
|
2014-05-09 10:52:27 -04:00
|
|
|
StructProp->Struct->GetFName() != Name_Vector4 &&
|
|
|
|
|
StructProp->Struct->GetFName() != Name_Quat &&
|
2014-07-03 03:22:03 -04:00
|
|
|
StructProp->Struct->GetFName() != Name_LinearColor &&
|
|
|
|
|
StructProp->Struct->GetFName() != Name_Color &&
|
2014-05-09 10:52:27 -04:00
|
|
|
StructProp->Struct->GetFName() != Name_Transform)
|
|
|
|
|
{
|
|
|
|
|
bSupported = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-09-11 03:16:52 -04:00
|
|
|
else if (Property->IsA(ULazyObjectProperty::StaticClass()) ||
|
|
|
|
|
Property->IsA(UAssetObjectProperty::StaticClass()) ||
|
|
|
|
|
Property->IsA(UAssetClassProperty::StaticClass()) ||
|
|
|
|
|
Property->IsA(UWeakObjectProperty::StaticClass()))
|
|
|
|
|
{
|
|
|
|
|
bSupported = false;
|
|
|
|
|
}
|
2014-05-09 10:52:27 -04:00
|
|
|
else if (!Property->IsA(UIntProperty::StaticClass()) &&
|
|
|
|
|
!Property->IsA(UFloatProperty::StaticClass()) &&
|
|
|
|
|
!Property->IsA(UStrProperty::StaticClass()) &&
|
|
|
|
|
!Property->IsA(UNameProperty::StaticClass()) &&
|
|
|
|
|
!Property->IsA(UBoolProperty::StaticClass()) &&
|
|
|
|
|
!Property->IsA(UObjectPropertyBase::StaticClass()) &&
|
|
|
|
|
!Property->IsA(UClassProperty::StaticClass()))
|
|
|
|
|
{
|
|
|
|
|
bSupported = false;
|
|
|
|
|
}
|
2014-09-11 03:16:52 -04:00
|
|
|
|
2014-05-09 10:52:27 -04:00
|
|
|
return bSupported;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool FLuaScriptCodeGenerator::CanExportProperty(const FString& ClassNameCPP, UClass* Class, UProperty* Property)
|
|
|
|
|
{
|
|
|
|
|
// Only editable properties can be exported
|
|
|
|
|
if (!(Property->PropertyFlags & CPF_Edit))
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
// Check if property type is supported
|
|
|
|
|
return IsPropertyTypeSupported(Property);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FString FLuaScriptCodeGenerator::ExportProperty(const FString& ClassNameCPP, UClass* Class, UProperty* Property, int32 PropertyIndex)
|
|
|
|
|
{
|
|
|
|
|
FString PropertyName = Property->GetName();
|
|
|
|
|
UProperty* ReturnValue = NULL;
|
|
|
|
|
UClass* PropertySuper = NULL;
|
|
|
|
|
|
|
|
|
|
if (Property->GetOwnerClass() != Class)
|
|
|
|
|
{
|
|
|
|
|
// Find the base class where this property was defined
|
|
|
|
|
if (ExportedClasses.Contains(Property->GetOwnerClass()->GetFName()))
|
|
|
|
|
{
|
|
|
|
|
PropertySuper = Property->GetOwnerClass();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Getter
|
|
|
|
|
FString GetterName = FString::Printf(TEXT("Get_%s"), *PropertyName);
|
|
|
|
|
FString GeneratedGlue = GenerateWrapperFunctionDeclaration(ClassNameCPP, Class, GetterName);
|
|
|
|
|
GeneratedGlue += TEXT("\r\n{\r\n");
|
|
|
|
|
FString FunctionBody;
|
|
|
|
|
if (PropertySuper == NULL)
|
|
|
|
|
{
|
|
|
|
|
FunctionBody += FString::Printf(TEXT("\t%s\r\n"), *GenerateObjectDeclarationFromContext(ClassNameCPP, Class));
|
|
|
|
|
FunctionBody += FString::Printf(TEXT("\tstatic UProperty* Property = FindScriptPropertyHelper(%s::StaticClass(), TEXT(\"%s\"));\r\n"), *ClassNameCPP, *Property->GetName());
|
|
|
|
|
FunctionBody += FString::Printf(TEXT("\t%s PropertyValue;\r\n"), *GetPropertyTypeCPP(Property, CPPF_ArgumentOrReturnValue));
|
|
|
|
|
FunctionBody += TEXT("\tProperty->CopyCompleteValue(&PropertyValue, Property->ContainerPtrToValuePtr<void>(Obj));\r\n");
|
|
|
|
|
FunctionBody += FString::Printf(TEXT("\t%s\r\n"), *GenerateReturnValueHandler(ClassNameCPP, Class, NULL, Property, TEXT("PropertyValue")));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
FunctionBody = FString::Printf(TEXT("\treturn %s_%s(InScriptContext);\r\n"), *PropertySuper->GetName(), *GetterName);
|
|
|
|
|
}
|
|
|
|
|
GeneratedGlue += FunctionBody;
|
|
|
|
|
GeneratedGlue += TEXT("}\r\n\r\n");
|
|
|
|
|
FunctionBody.Empty(FunctionBody.Len());
|
|
|
|
|
|
|
|
|
|
// Store the name of this getter as well as the name of the wrapper function
|
|
|
|
|
FPropertyAccessor Getter;
|
|
|
|
|
Getter.AccessorName = GetterName;
|
|
|
|
|
Getter.FunctionName = FString::Printf(TEXT("%s_%s"), *Class->GetName(), *GetterName);
|
|
|
|
|
auto& Exports = ClassExportedProperties.FindOrAdd(Class);
|
|
|
|
|
Exports.Add(Getter);
|
|
|
|
|
|
|
|
|
|
// Setter
|
|
|
|
|
FString SetterName = FString::Printf(TEXT("Set_%s"), *PropertyName);
|
|
|
|
|
GeneratedGlue += GenerateWrapperFunctionDeclaration(ClassNameCPP, Class, SetterName);
|
|
|
|
|
GeneratedGlue += TEXT("\r\n{\r\n");
|
|
|
|
|
if (PropertySuper == NULL)
|
|
|
|
|
{
|
|
|
|
|
FunctionBody += FString::Printf(TEXT("\t%s\r\n"), *GenerateObjectDeclarationFromContext(ClassNameCPP, Class));
|
|
|
|
|
FunctionBody += FString::Printf(TEXT("\tstatic UProperty* Property = FindScriptPropertyHelper(%s::StaticClass(), TEXT(\"%s\"));\r\n"), *ClassNameCPP, *Property->GetName());
|
|
|
|
|
FunctionBody += FString::Printf(TEXT("\t%s PropertyValue = %s;\r\n"), *GetPropertyTypeCPP(Property, CPPF_ArgumentOrReturnValue), *InitializeFunctionDispatchParam(NULL, Property, 0));
|
|
|
|
|
FunctionBody += TEXT("\tProperty->CopyCompleteValue(Property->ContainerPtrToValuePtr<void>(Obj), &PropertyValue);\r\n");
|
|
|
|
|
FunctionBody += TEXT("\treturn 0;\r\n");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
FunctionBody = FString::Printf(TEXT("\treturn %s_%s(InScriptContext);\r\n"), *PropertySuper->GetName(), *SetterName);
|
|
|
|
|
}
|
|
|
|
|
GeneratedGlue += FunctionBody;
|
|
|
|
|
GeneratedGlue += TEXT("}\r\n\r\n");
|
|
|
|
|
|
|
|
|
|
// Store the name of this setter as well as the name of the wrapper function
|
|
|
|
|
FPropertyAccessor Setter;
|
|
|
|
|
Setter.AccessorName = SetterName;
|
|
|
|
|
Setter.FunctionName = FString::Printf(TEXT("%s_%s"), *Class->GetName(), *SetterName);
|
|
|
|
|
Exports.Add(Setter);
|
|
|
|
|
|
2014-04-29 06:45:18 -04:00
|
|
|
return GeneratedGlue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FString FLuaScriptCodeGenerator::ExportAdditionalClassGlue(const FString& ClassNameCPP, UClass* Class)
|
|
|
|
|
{
|
|
|
|
|
FString GeneratedGlue;
|
|
|
|
|
|
|
|
|
|
const FString ClassName = Class->GetName();
|
|
|
|
|
|
|
|
|
|
// Constructor and destructor
|
|
|
|
|
if (!(Class->GetClassFlags() & CLASS_Abstract))
|
|
|
|
|
{
|
|
|
|
|
GeneratedGlue += GenerateWrapperFunctionDeclaration(ClassNameCPP, Class, TEXT("New"));
|
|
|
|
|
GeneratedGlue += TEXT("\r\n{\r\n");
|
2014-05-09 10:52:27 -04:00
|
|
|
GeneratedGlue += TEXT("\tUObject* Outer = (UObject*)lua_touserdata(InScriptContext, 1);\r\n");
|
|
|
|
|
GeneratedGlue += TEXT("\tFName Name = FName(luaL_checkstring(InScriptContext, 2));\r\n");
|
2015-02-03 07:32:14 -05:00
|
|
|
GeneratedGlue += FString::Printf(TEXT("\tUObject* Obj = NewObject<%s>(Outer, Name);\r\n"), *ClassNameCPP);
|
2014-04-29 06:45:18 -04:00
|
|
|
GeneratedGlue += TEXT("\tif (Obj)\r\n\t{\r\n");
|
|
|
|
|
GeneratedGlue += TEXT("\t\tFScriptObjectReferencer::Get().AddObjectReference(Obj);\r\n");
|
|
|
|
|
GeneratedGlue += TEXT("\t}\r\n");
|
|
|
|
|
GeneratedGlue += TEXT("\tlua_pushlightuserdata(InScriptContext, Obj);\r\n");
|
|
|
|
|
GeneratedGlue += TEXT("\treturn 1;\r\n");
|
|
|
|
|
GeneratedGlue += TEXT("}\r\n\r\n");
|
|
|
|
|
|
|
|
|
|
GeneratedGlue += GenerateWrapperFunctionDeclaration(ClassNameCPP, Class, TEXT("Destroy"));
|
|
|
|
|
GeneratedGlue += TEXT("\r\n{\r\n");
|
|
|
|
|
GeneratedGlue += FString::Printf(TEXT("\t%s\r\n"), *GenerateObjectDeclarationFromContext(ClassNameCPP, Class));
|
|
|
|
|
GeneratedGlue += TEXT("\tif (Obj)\r\n\t{\r\n");
|
|
|
|
|
GeneratedGlue += TEXT("\t\tFScriptObjectReferencer::Get().RemoveObjectReference(Obj);\r\n");
|
|
|
|
|
GeneratedGlue += TEXT("\t}\r\n\treturn 0;\r\n");
|
|
|
|
|
GeneratedGlue += TEXT("}\r\n\r\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Class: Equivalent of StaticClass()
|
|
|
|
|
GeneratedGlue += GenerateWrapperFunctionDeclaration(ClassNameCPP, Class, TEXT("Class"));
|
|
|
|
|
GeneratedGlue += TEXT("\r\n{\r\n");
|
|
|
|
|
GeneratedGlue += FString::Printf(TEXT("\tUClass* Class = %s::StaticClass();\r\n"), *ClassNameCPP);
|
|
|
|
|
GeneratedGlue += TEXT("\tlua_pushlightuserdata(InScriptContext, Class);\r\n");
|
|
|
|
|
GeneratedGlue += TEXT("\treturn 1;\r\n");
|
|
|
|
|
GeneratedGlue += TEXT("}\r\n\r\n");
|
|
|
|
|
|
|
|
|
|
// Library
|
|
|
|
|
GeneratedGlue += FString::Printf(TEXT("static const luaL_Reg %s_Lib[] =\r\n{\r\n"), *ClassName);
|
|
|
|
|
if (!(Class->GetClassFlags() & CLASS_Abstract))
|
|
|
|
|
{
|
|
|
|
|
GeneratedGlue += FString::Printf(TEXT("\t{ \"New\", %s_New },\r\n"), *ClassName);
|
|
|
|
|
GeneratedGlue += FString::Printf(TEXT("\t{ \"Destroy\", %s_Destroy },\r\n"), *ClassName);
|
|
|
|
|
GeneratedGlue += FString::Printf(TEXT("\t{ \"Class\", %s_Class },\r\n"), *ClassName);
|
|
|
|
|
}
|
2014-05-09 10:52:27 -04:00
|
|
|
auto FunctionExports = ClassExportedFunctions.Find(Class);
|
|
|
|
|
if (FunctionExports)
|
2014-04-29 06:45:18 -04:00
|
|
|
{
|
2014-05-09 10:52:27 -04:00
|
|
|
for (auto& FunctionName : *FunctionExports)
|
2014-04-29 06:45:18 -04:00
|
|
|
{
|
|
|
|
|
GeneratedGlue += FString::Printf(TEXT("\t{ \"%s\", %s_%s },\r\n"), *FunctionName.ToString(), *ClassName, *FunctionName.ToString());
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-05-09 10:52:27 -04:00
|
|
|
auto PropertyExports = ClassExportedProperties.Find(Class);
|
|
|
|
|
if (PropertyExports)
|
|
|
|
|
{
|
|
|
|
|
for (auto& Accessor : *PropertyExports)
|
|
|
|
|
{
|
|
|
|
|
GeneratedGlue += FString::Printf(TEXT("\t{ \"%s\", %s },\r\n"), *Accessor.AccessorName, *Accessor.FunctionName);
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-04-29 06:45:18 -04:00
|
|
|
GeneratedGlue += TEXT("\t{ NULL, NULL }\r\n};\r\n\r\n");
|
|
|
|
|
|
|
|
|
|
return GeneratedGlue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FLuaScriptCodeGenerator::ExportClass(UClass* Class, const FString& SourceHeaderFilename, const FString& GeneratedHeaderFilename, bool bHasChanged)
|
|
|
|
|
{
|
|
|
|
|
if (!CanExportClass(Class))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UE_LOG(LogScriptGenerator, Log, TEXT("Exporting class %s"), *Class->GetName());
|
|
|
|
|
|
|
|
|
|
ExportedClasses.Add(Class->GetFName());
|
|
|
|
|
LuaExportedClasses.Add(Class);
|
|
|
|
|
AllSourceClassHeaders.Add(SourceHeaderFilename);
|
|
|
|
|
|
|
|
|
|
const FString ClassGlueFilename = GetScriptHeaderForClass(Class);
|
|
|
|
|
AllScriptHeaders.Add(ClassGlueFilename);
|
|
|
|
|
|
|
|
|
|
const FString ClassNameCPP = GetClassNameCPP(Class);
|
|
|
|
|
FString GeneratedGlue(TEXT("#pragma once\r\n\r\n"));
|
|
|
|
|
|
2014-05-09 10:52:27 -04:00
|
|
|
// Export all functions
|
2014-04-29 06:45:18 -04:00
|
|
|
for (TFieldIterator<UFunction> FuncIt(Class /*, EFieldIteratorFlags::ExcludeSuper*/); FuncIt; ++FuncIt)
|
|
|
|
|
{
|
|
|
|
|
UFunction* Function = *FuncIt;
|
|
|
|
|
if (CanExportFunction(ClassNameCPP, Class, Function))
|
|
|
|
|
{
|
|
|
|
|
GeneratedGlue += ExportFunction(ClassNameCPP, Class, Function);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-05-09 10:52:27 -04:00
|
|
|
// Export properties that are owned by this class
|
|
|
|
|
int32 PropertyIndex = 0;
|
|
|
|
|
for (TFieldIterator<UProperty> PropertyIt(Class /*, EFieldIteratorFlags::ExcludeSuper*/); PropertyIt; ++PropertyIt, ++PropertyIndex)
|
|
|
|
|
{
|
|
|
|
|
UProperty* Property = *PropertyIt;
|
|
|
|
|
if (CanExportProperty(ClassNameCPP, Class, Property))
|
|
|
|
|
{
|
|
|
|
|
UE_LOG(LogScriptGenerator, Log, TEXT(" %s %s"), *Property->GetClass()->GetName(), *Property->GetName());
|
|
|
|
|
GeneratedGlue += ExportProperty(ClassNameCPP, Class, Property, PropertyIndex);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-04-29 06:45:18 -04:00
|
|
|
GeneratedGlue += ExportAdditionalClassGlue(ClassNameCPP, Class);
|
|
|
|
|
|
|
|
|
|
SaveHeaderIfChanged(ClassGlueFilename, GeneratedGlue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FLuaScriptCodeGenerator::FinishExport()
|
|
|
|
|
{
|
|
|
|
|
GlueAllGeneratedFiles();
|
|
|
|
|
RenameTempFiles();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FLuaScriptCodeGenerator::GlueAllGeneratedFiles()
|
|
|
|
|
{
|
|
|
|
|
// Generate inl library file
|
|
|
|
|
FString LibGlueFilename = GeneratedCodePath / TEXT("GeneratedScriptLibraries.inl");
|
|
|
|
|
FString LibGlue;
|
|
|
|
|
|
|
|
|
|
// Include all source header files
|
|
|
|
|
for (auto& HeaderFilename : AllSourceClassHeaders)
|
|
|
|
|
{
|
|
|
|
|
// Re-base to make sure we're including the right files on a remote machine
|
|
|
|
|
FString NewFilename(RebaseToBuildPath(HeaderFilename));
|
|
|
|
|
LibGlue += FString::Printf(TEXT("#include \"%s\"\r\n"), *NewFilename);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Include all script glue headers
|
|
|
|
|
for (auto& HeaderFilename : AllScriptHeaders)
|
|
|
|
|
{
|
|
|
|
|
// Re-base to make sure we're including the right files on a remote machine
|
2014-06-23 06:27:04 -04:00
|
|
|
FString NewFilename(FPaths::GetCleanFilename(HeaderFilename));
|
2014-04-29 06:45:18 -04:00
|
|
|
LibGlue += FString::Printf(TEXT("#include \"%s\"\r\n"), *NewFilename);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LibGlue += TEXT("\r\nvoid LuaRegisterExportedClasses(lua_State* InScriptContext)\r\n{\r\n");
|
|
|
|
|
for (auto Class : LuaExportedClasses)
|
|
|
|
|
{
|
|
|
|
|
LibGlue += FString::Printf(TEXT("\tFLuaUtils::RegisterLibrary(InScriptContext, %s_Lib, \"%s\");\r\n"), *Class->GetName(), *Class->GetName());
|
|
|
|
|
}
|
|
|
|
|
LibGlue += TEXT("}\r\n\r\n");
|
|
|
|
|
|
|
|
|
|
SaveHeaderIfChanged(LibGlueFilename, LibGlue);
|
|
|
|
|
}
|