Files
UnrealEngineUWP/Engine/Source/Runtime/RuntimeAssetCache/Private/RuntimeAssetCacheBuilders.cpp

242 lines
7.1 KiB
C++
Raw Normal View History

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#include "RuntimeAssetCacheBuilders.h"
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4059031) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 3974233 by Rex.Hill Optimized BuildStaticMeshVertexAndIndexBuffers and TEdgeBuilder Change 3974234 by Rex.Hill Reduced number of calls to SaveRawMesh and LoadRawMesh Change 3974235 by Rex.Hill Optimized SaveRawMesh by pre-allocating buffer Change 3981370 by Jamie.Dale Added support for deprecated (renamed) classes, structs, enums, functions, and properties in Python The glue code generation will now use the existing redirects system to build deprecated entries for old names. You can also specify deprecated names to the ScriptName and ScriptMethod meta-data values by adding extra semi-colon separated entries (the first entry is the current name). Accessing deprecated objects in Python leads to a deprecation warning when developer mode is enabled. Change 3983875 by Jamie.Dale Exposed some asset registry functions that may be useful in a commandlet environment Change 3983901 by Jamie.Dale Hoisted some AssetData helpers onto the struct in Python Change 3988367 by Jamie.Dale Python now honors EditInstanceOnly and EditDefaultsOnly when setting property values Change 3988369 by Jamie.Dale Exposed generic get_default_object function that takes a type and returns you the CDO This is needed for types that aren't natively exposed to Python (such as Blueprint generated types) Change 3989890 by Jamie.Dale Moved BlutilityActor to be Private in EditorScriptingUtils This can be removed once it's no longer needed. Change 3989900 by Jamie.Dale Updated EditorScriptingUtilities to use the Public/Private folder structure for source code Change 3990082 by Anousack.Kitisa Added plugin for Shotgun integration in Unreal. #jira UEENT-959 Change 3990783 by Anousack.Kitisa Changed ShotgunMenuItem to a struct. Change 3991139 by Jamie.Dale Minimized use of GUnrealEd (favoring GEditor) so that this code can be used by commandlets Removed redundant usages of GEditor/GUnrealEd from within UEditorEngine itself, and fixed cases where null data was being accessed. Testing that loading, saving, and creating a new blank map will now work in a commandlet without crashing. Change 3993189 by Jamie.Dale Fixed some mismatched return types Change 3993191 by Jamie.Dale Inital support for taking the GIL at key points where external C code calls into Python Change 3993683 by Patrick.Boutot [LTC] Add a CustomTimeStep that decode a LinearTimecode from the MediaSource. The MediaPlayer need to support buffering and should not run late since it's used to tick the engine time. Update DropTimecode to use the new Timecode structure in TimeManagement. Change 3994430 by Jamie.Dale Adjusted how inline structs work so that types known at compile time can inline allocate without being fully hand-wrapped in Python They must now be registered via FPyWrapperTypeRegistry::RegisterInlineStructFactory before we start generating wrapped types Change 3996083 by Jamie.Dale Added a distinct type for generated enum types so that you can query their available enum entries Change 3998253 by conan.reis Remove redundant Perforce error output from the log Change 4000307 by JeanMichel.Dignard Optimized FFbxImporter::ValidateAllMeshesAreReferenceByNodeAttribute() - Stored all scene nodes geometry ids in a set instead of looping on all scene nodes for every geometry. O(N) instead of O(N^2). - For 38685 scene nodes and 5417 geometry, the time went from 2 min 21.688 s to 0 min 0.098 s. Change 4000605 by Jamie.Dale Added support for constant "hoisting" This allows you to tag a helper function that returns a constant with ScriptConstant meta-data (providing a potentially overridden name) to "hoist" that helper function to be a constant of the type it operates on when wrapped for Python (ScriptConstantHost can be used to host the constant on a struct rather than its own object). Change 4001617 by Jamie.Dale Updated ScriptMethod and ScriptConstant to allow hoisting onto other classes as well as structs This allows you to have a runtime class be extended via methods in an editor-only module Change 4005287 by Jamie.Dale Added a GIL lock when Slate Tick events call back into Python Change 4005383 by Andrew.Rodham Sequencer: Initial scripting exposure and support First pass includes the following: - Find/add/interate master tracks - Find/add/interate bindings (both possessables and spawnables) - Find/add/interate tracks on bindings - Add/interate sections on tracks - Get/Set section ranges Change 4008609 by Jamie.Dale Added some missing native Python types to the documentation Native modules now build up a list of types and functions associated with them. This information is then passed through to the document generation to ensure that all exposed native types and functions are documented. In addition, any native Python module files are now assimilated into the unreal.py stub file and parsed so that they can be documented too. Change 4008654 by Jamie.Dale Allow math operators to use the base type versions unless overridden Change 4009740 by Patrick.Boutot Add BP function to convert a Timecode into a string. Change 4009763 by Patrick.Boutot Update AudioCapture to retreive the SampleRate. Used by the LinearTimecode. Change the requested format from int16 to float since we converted it into that format later on. Change 4009768 by Andrew.Rodham Removed explicit names from ScriptName methods, expanded sequencer scripting range functionality Change 4009830 by Jamie.Dale Added support for UPARAM(ref) on arguments exposed to Python For standard functions, this just produces an input and output for the same argument (we can't mutate the input due to potential coercion). For ScriptMethod functions that use it on the 'self' argument, this will mark the function as "inline" and have the function apply the result of the 'self' argument back onto the 'self' instance after calling the function. Change 4010034 by Jamie.Dale Added support for init_unreal.py start-up scripts These can be placed in any known sys.path in Python, including the Content/Python folders we automatically add, and the UnrealEngine/Python directory under the users home directory. Change 4010422 by Jamie.Dale Improved errror reporting during Python generation It will now ensure if a debugger is attached to draw programmer attention to an error. Change 4010498 by Patrick.Boutot Remove unnecessary loop Timecode.ToFrameNumber() Change 4011312 by Jamie.Dale Duplicate deprecated names will no longer assert during Python glue generation They will now log a warning and continue Change 4012068 by JeanMichel.Dignard Allow to render thumbnails for newly created packages. - To render a thumbnail, you either need a customer thumbnail renderer or a cached thumbnail. Querying cached thumbnails fails for newly created packages because it calls DoesPackageExist which check on disk. This call is unnecessary since we're relying on FindPackage which only works for packages that are loaded in memory. Change 4013781 by Jamie.Dale FFrame::KismetExecutionMessage (or LogRuntimeError or LogRuntimeWarning) will now produce Python exceptions You can use these to emit warnings or errors from UFunctions wrapped for scripting, and when called from Python they will produce a Python exception (for errors), or Python warning (for warnings). Change 4014337 by Jamie.Dale Struct coercion now errors if you provide a sequence with too many elements This also makes sure that PyConversion doesn't set an error state if ESetErrorState::No is passed (which could have previously happened from type casting calls). Change 4015290 by Andrew.Rodham Sequencer: Moved runtime functionality from ISequencerChannelInterface to IMovieSceneChannelInterface - Rename IBatchChannelInterface to IMovieSceneChannelInterface - Removed MovieScene::Dilate() - Added TMovieSceneChannelTraits::SupportsDefaults to automatically stub out functions relating to channel defaults Change 4015664 by Jamie.Dale Renamed ScriptMathOp meta-data to ScriptOperator Change 4016230 by Jamie.Dale Fixed incorrect make/break path in Importance Sampling Library (for Importance Texture) Change 4017326 by Jamie.Dale Added make and break support in Python Structs that have a native make function will now use this as their constructor. This also adds support for breaking a struct into a tuple, either via a native break function, or via generic property enumeration. Change 4017551 by Jamie.Dale Removed redundant outer parameter from find/load_asset/package Change 4018594 by Jamie.Dale Added ScriptMethodSelfReturn as an alternative to UPARAM(ref) These two function signatures produce the same behavior and have the same cost in Python, the only difference is how they appear to Blueprints (and Blueprints seem to favor non-reference functions). UFUNCTION(..., meta=(ScriptMethod)) static void DoThing(UPARAM(ref) FThingType&, int32); UFUNCTION(..., meta=(ScriptMethod, ScriptMethodSelfReturn)) static FThingType DoThing(FThingType, int32); Change 4020956 by Anousack.Kitisa Added Shotgun to the Level Editor/World Outliner and Content Browser context menus when there's a selected actor or asset. #jira UEENT-1219 Change 4021986 by Anousack.Kitisa Used the Python startup scripts mechanism to launch the Shotgun bootstrap script. Related to Jira UE-57896. Change 4022993 by Jamie.Dale Added support for extra operators on Python structs You can now expose bool conversion and comparison operators (==, !=, <, <=, >, >=) in addition to the previous set of math operators. As part of this there is now stricter signature validation when generating the Python binding. Change 4023226 by Jamie.Dale Added Make and Break function for FSoftClassPath Change 4023348 by Jamie.Dale Exposed some methods and operators for PrimaryAssetId and PrimaryAssetType Change 4027911 by Jamie.Dale Cross-outer redirects are no longer applied in Python #jira UETOOL-1382 Change 4029618 by JeanMichel.Dignard Unreal Studio UX - Made "Unreal Studio" the default tab in the new project wizard if we're using an installed enterprise build. - Create new projects as enterprise projects if we're using an insalled enterprise build. #jira UEENT-1231, UEENT-796 Change 4030217 by Jamie.Dale Exposed ScopedSlowTask to Python #jira UETOOL-1375 Change 4030784 by Matt.Hoffman Sequencer curve editor now shows vertical axis labels. #jira UE-58160 Change 4030858 by JeanLuc.Corenthin Expose LOD creation thru Python: - Create one struct to hold onto reduction settings per LOD - Create one struct to hold onto an array of reduction settings and a parameter to enable of disable automatic computation of screen size - Create new method to apply reduction settings to an array of StaticMeshActors #jira UEENT-1232 Change 4032239 by Jamie.Dale Cleanup pass over wrapped structs - Code dealing with reflected structs now uses UScriptStruct rather than UStruct. - The old PyConversion::NativizeStruct and PyConversion::PythonizeStruct have been renamed to PyConversion::NativizeStructInstance and PyConversion::PythonizeStructInstance. - New PyConversion::NativizeStruct and PyConversion::PythonizeStruct functions have been added to convert an object (or Python type) to a UScriptStruct (akin to what PyConversion::NativizeClass and PyConversion::PythonizeClass does for UClass). Change 4032247 by Jamie.Dale Cleaned up some Python slow task code Change 4032251 by Jamie.Dale Added functions to get the Python type associated with an Unreal class, struct, or enum Change 4032258 by Jamie.Dale Added Python iterators for Unreal objects, classes, and structs, as well as the Python types wrapped by Unreal classes or structs #jira UETOOL-1380 Change 4032320 by Jamie.Dale Fixed Python object iterators skipping their first item Change 4032321 by Jamie.Dale Added Python iterators for actors and selected actors #jira UETOOL-1380 Change 4033908 by Anousack.Kitisa Added Shotgun settings for metadata tags. #jira UEENT-1175 Change 4033909 by Anousack.Kitisa Added wrapper function to sync Content Browser to assets for scripting. #jira UEENT-1218 Change 4034951 by Matt.Hoffman Media Tracks now highlight when added to a Sequence/UMG animation. Change 4034966 by Jamie.Dale Added GIL locks around post_init code that can be called from C++ Change 4035019 by Matt.Hoffman UMG Render Transforms + Margins now support infinite sections. Change 4035470 by Andrew.Rodham Introduced a common base class for all movie scene channel data, FMovieSceneChannel. Removed IMovieSceneChannelInterface. Renamed FMovieSceneChannelEditorData to FMovieSceneChannelMetaData. Renamed FMovieSceneChannel and TMovieSceneChannel to FMovieSceneChannelData and TMovieSceneChannelData, to make way for common channel base class. Renamed instances of 'specialized' channel editor data to 'extended' channel editor data. Introduced non-templated FMovieSceneChannelHandle and a templated version. Changed internal implementation to use a lookup rather than a directly resolved weak ptr. Various pieces of documentation and cleanup. Change 4037112 by Max.Chen Sequencer: Added some missing RF_Transactional flags to newly created sections. Change 4037121 by Max.Chen Sequence Recorder: Timecode recording Introduced an FSourceTimecode which is saved as editor only data to the MovieSceneSection and MovieScene. FSourceTimecode consists of an FFrameNumber delta that correlates the section's initial start time to an FTimecode. The FFrameNumber is adjusted whenever the section is moved. One use case for this is through sequence recorder, which captures the timecode at the start of recording and saves an FSourceTimecode per movie scene section it creates. If the section is moved, it can always be returned to its source timecode by the section's right click menu, "Sync to Source Timecode". #jira UESEQ-406 Change 4038462 by Jamie.Dale Added support for using Python callables with delegates All the "x_function" methods on delegates and multicast delegates now have an "x_callable" equivalent that take a Python callable (we attempt basic validation of the signature, but that only allows us to check the input argument count is what we expect). Internally the callable is wrapped in a UObject, so certain GC restrictions are present (and is why coercion is disabled for callables). Delegates wrapped in Python (including as a direct property of an object or struct, or inside a container) will be kept alive via the Python reference collection, however once there are no Python references left the proxy object will be allowed to die unless something external has taken a reference to the proxy object. Change 4039123 by James.McNatton Remove dependency on SteamController in VirtualCamera #rb none Change 4039162 by Jamie.Dale Fixed linter warnings about unescaped backslashes in docstrings Change 4039170 by Jamie.Dale No longer expose deprecated functions or properties if they clash with another Python exposed item Change 4039429 by Max.Chen Sequence Recorder: Swap to editor actors on end PIE if the actors to record were set to the PIE actors Change 4039442 by Max.Chen Sequence Recorder: Find the existing object binding and record into it if it exists. When recording to an existing object binding, if the track exists, remove all animation data and reuse the track. Change 4039477 by Jamie.Dale Added warnings for conflicting Python type and field names Change 4039478 by Jamie.Dale Fixed warnings for conflicting Python type and field names Change 4039511 by Max.Chen Sequencer: Remove all animation data for spawn track Change 4040649 by James.McNatton Multiple Virtual Camera bug fixes - Removed QAGame mannequin from test map - Fixed errors being generated when trying to load preset - Presets now properly load and save axis settings - Deleted presets should no longer linger in menus - Presets now save and load favorite status Change 4041356 by Max.Chen Sequence Recorder: Takes system #jira UESP-544 Change 4041589 by Jamie.Dale Added C++ source information (plugin, module, and file) to the Python doc string Change 4041746 by Jamie.Dale Made ScriptOperator more relaxed about its signature validation as long as the additional input parameters are defaulted Change 4041757 by James.McNatton Virtual Camera Bug Fixes - The Input Source dropdown now accurately reflects user selection - Input source changed to EditDefaultsOnly - Focus should no longer be set when the settings menu is open Change 4041823 by Jamie.Dale Made ScriptOperator more relaxed about its signature validation for defaulted input parameters Existing Blueprint exposed operator functions may both default required arguments, and add additional default arguments. ScriptOperator will now accept both of these as long as there are enough arguments, but not too many non-defaulted arguments. Change 4042956 by James.McNatton VirtualCamera bug fixes related to focus plane visualization - Removed extra focus plane that was being displayed - Added logic to adjust for nonuniform scaling of objects when settings up tracking focus Change 4043400 by James.McNatton Multiple bug fixes related to saving various values - Now saves matte opacity and updates on load - Now saves filmback format name and updates on load - Now saves desired distance units and updates on load Change 4043481 by James.McNatton Fixed issue in Virtual Camera where joystick movement would not properly apply locks after rotating #rb none Change 4044358 by Jamie.Dale Fixed some cases where empty default values would be lost from UHT Eg, empty strings, null objects Change 4044362 by Jamie.Dale Fixed old-style enums being missed by the Python glue generation if they're only referenced by a property of function Change 4044371 by Jamie.Dale Fixed default value application for some struct types that use a custom default value format when exported by UHT Change 4044417 by Max.Chen Sequence Recorder: Better default group names with an underscore separator for letters Change 4045164 by Jamie.Dale Hardened usage of CopyScriptStruct to ensure that the source type is a child of the destination type, and that the destination type is used to copy (to still allow slicing of derived data) Change 4045195 by Jamie.Dale Updated FPropValueOnScope::GetValue to be able to return the value for a particular array index Change 4045589 by James.McNatton Fixed packaging error for VirtualCamera plugin - Plugin is now a runtime plugin rather than developer - Fixed up associated warnings with saving and loading in editor Change 4046208 by James.McNatton Virtual Camera bug fixes - Adjusted how mattes and filmback works together - Should now always respond properly to changing filmback settings in UI - Should now match the correct view size within the matte under all circumstances Change 4046372 by Max.Chen Sequencer: Fix subsequence binding ids. #jira UE-55337 Change 4046694 by Max.Chen Sequence Recorder: Compile the template before finding the camera sequence id since the precompiled template is not up to date. Change 4046801 by Jamie.Dale Improved default values and return types used in the unreal.py stub file - Object and Struct types generate an __init__ function with the correct signature. - Struct __init__ functions list the correct default values (including when using make/break functions). - Methods now list the correct default values. - Get/Set getters return a value of the correct type. - Get/Set setters are no longer exported for read-only properties. - Constants resolve to the correct type and value. #jira UETOOL-1377 Change 4047023 by Jamie.Dale Added missing hook-up for % and %= in Python Change 4047100 by Jamie.Dale Operators are now exposed to unreal.py and generate docs stating which overloads are available Change 4047105 by Jamie.Dale String is now "str" in doc strings to match the Python type Change 4047714 by Max.Chen Sequencer: Resolved merge conflicts with Dev-Sequencer Change 4048150 by Jamie.Dale Fixed single-culture PO import/export failing #jira UE-47079 Change 4048653 by Andrew.Rodham Sequencer: Automatic re-evaluation is now suppressed for external changes that modified only default values on channels - The issue is that moving an object that is partially-keyed in sequencer, with auto-key off, will set default values for the non-keyed channels. Doing so will dirty the sequence, which causes a re-evaluation, which re-evalutes the keyed channels, which effectively undoes the external change. - This is now fixed by suppressing the automatic re-evaluation for a specific signature of a specific sequence, if that is the only thing that has dirtied the sequence. Any subsequent changes to the sequence will cause a re-evaluation, and the suppression to be wiped. #jira UE-57519 #jira UE-58487 Change 4048814 by Jamie.Dale Fixed syntax error if an enum had an unknown value Change 4048819 by Jamie.Dale Fixed struct init functions having the wrong default values Change 4048856 by JeanLuc.Corenthin - Removed LOD & collision functions from UEditorLevelLibrary - Created a new class, UEditorMeshLibrary, to hold onto functionalities related to StaticMeshes - Added method to set LODs on a static mesh - Added method to remove LODs from a static mesh - Added method to get number of LODs on a static mesh - Added method to get number of simple collisions onto a static mesh - Added method to get number of convex collisions onto a static mesh - Added method to add convex collision onto a static mesh - Added method to remove all collisions onto a static mesh #jira UEENT-1232 #jira UEENT-1233 Change 4048961 by Jamie.Dale Improved formatting of output parameters in doc strings #jira UETOOL-1376 Change 4048988 by Jamie.Dale Fixed context leakage between the console and files, and import "unreal" by default now in the console #jira UETOOL-1379 Change 4049912 by Max.Chen Sequence Recorder: Minor recording group name improvements. - Initialize newly created actor group with existing actor group's base path. - When duplicating, use the current group's name as the base. - When typing in a name, if it fits the group format, the name should be allowable if it doesn't conflict with existing group names/assets. Change 4049934 by Andrew.Rodham Sequencer: Minor clean-up of sequencer interfaces and overloads - Replaced remaining instances of void* with FMovieSceneChannel* now that we mandate a common base class - Changed remaining explicit calls to SetDefault to SetChannelDefault overload so it works correctly with the SupportsDefaults trait - Exposed ability to manually implement an ISequencerChannelInterface rather than using the default templated one Change 4050608 by conan.reis Was getting link error about use of FFrameTime in ULevelSequencePlaybackController::PlayFromBeginning() in the VirtualCamera plugin so added TimeManagement to its dependant modules so it compiles again. Change 4050899 by Max.Chen Sequencer: Allow actor components for synchronization #jira UE-58468 Change 4050900 by Max.Chen Sequence Recorder: Don't create a spawn section if the object is a possessable #jira UE-58272 Change 4050904 by Max.Chen Curve Editor: Fix for evaluation a section of time when one key is non-weighted and the other is weighted. What we do is evaluate them both as being weighted, but we don't have the weight value for the non-weighted tangent. The weight of the non-weighted tangent is implicilty 1/3rd the distance between the two points, so we just calculate that if needed. #jira UE-58573 Change 4050905 by Max.Chen Curve Editor: When calculating vertical extents find feature points where slopes are zero and check them in addition to the keys if the curve is cubic. Curves now fit correclty vertically. Also changed fudge to 5% from 10% to match up old editor. Tighter fits seems better. #jira UE-58571 Change 4050972 by James.McNatton Added functions to ISequenceRecorder - Calling StartRecording with an empty array now triggers recording without clearning queued recordings - Added function to queue an actor to be recorded - Added function to check the next take number for a given actor when using groups Change 4050994 by James.McNatton Bug fixes for Virtual Camera - Preset menu now shows dates in the timestamp - Resetting offsets now alerts the system to update UI Change 4051431 by David.Hibbitts Added a component and blueprint library to access LiveLink data in blueprints which also works in editor. Deprecated LiveLink Driven component #jira UESP-577 Change 4051475 by Patrick.Boutot Rename EditorMeshLibrary Merge AssetScriptingUtilititesEditor with EditorScriptingUtilities. Add Redirects. Change 4051558 by Patrick.Boutot EngineCustomTimeStep returns true when we also want to perform the default engine code. Change 4052106 by Andrew.Rodham Sequencer: Adding an example that creates a sequence out of the current editor selection Change 4052205 by Anousack.Kitisa Fixed selected asset paths referenced by selected actors when using context Shotgun menu. Added function to retrieve the work area directory for Shotgun. #jira UEENT-1220 Change 4052951 by James.McNatton Virtual Camera Sequence Recorder updates to integrate new take system - Takes no longer display unless sequence recorder has a group selected - Adjusted fix to packaging error - FPS value will no longer appear if sequence recorder isn't available Change 4053130 by mason.seay Updated Game Mode Override Change 4053273 by James.McNatton Virtual Camera cleanup adjustments Change 4053627 by Max.Chen Sequencer: Disable bind sequencer to PIE/simulate while recording. Change 4053628 by Max.Chen Sequence Recorder: Fix target animation not persisting #jira UE-58508 Change 4053871 by Max.Chen Image Plate: Fix icon path Change 4054370 by Patrick.Boutot Remove LiveLink warning. Create base a class for FLiveLinkFrameRate as suggested in GenericPlatformCompilerPreSetup.h Change 4054447 by Darren.Pegg AJA low level device API Blackmagic low level API MediaIOCore changes to support AJA/Blackmagic changes AJA Module converted to use MediaIOCore Blackmagic Module changes for MediaIOCore Blackmagic/AJA Binary files Change 4054769 by Patrick.Boutot Packaging error issue introduce with CL 4054370. #jira UE-58749 Change 4055443 by Max.Chen Sequencer: Fix crash in adding filler shot #jira UE-58767 Change 4056577 by JeanMichel.Dignard Fixed crash with automation tests. We would bind the default UEditorEngine to Automation and on map load, it would call PIE on GEditor but with recent changes, PIE is called on this and the default UEditorEngine is not initialized so it would crash with a null GameViewportClass. Now we'll bind Automation on UEditorEngine InitializeObjectReferences so that we're in a good state and it's only called for GEditor. #jira UE-58792 Change 4057238 by Jamie.Dale Fixed crash when renaming Python generated classes or structs Change 4058435 by Jamie.Dale Fixed lingering exception state when converting a dict to a struct Change 4058486 by mason.seay Removed remote.host call from map [CL 4060164 by JeanMichel Dignard in Main branch]
2018-05-09 10:24:50 -04:00
#include "Serialization/LargeMemoryWriter.h"
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
#include "RuntimeAssetCacheModule.h"
#include "TextureResource.h"
#include "Engine/Texture.h"
#include "Engine/Texture2D.h"
void URuntimeAssetCacheBuilder_ObjectBase::SaveNewAssetToCache(UObject* NewAsset)
{
SetAsset(NewAsset);
GetFromCacheAsync(OnAssetCacheComplete);
}
void URuntimeAssetCacheBuilder_ObjectBase::SetAsset(UObject* NewAsset)
{
Asset = NewAsset;
OnSetAsset(Asset);
}
FVoidPtrParam URuntimeAssetCacheBuilder_ObjectBase::Build()
{
// There was no cached asset, so this is expecting us to return the data that needs to be saved to disk
// If we have no asset created yet, just return null. That will trigger the async creation of the asset.
// If we do have an asset, serialize it here into a good format and return a pointer to that memory buffer.
if (Asset)
{
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4059031) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 3974233 by Rex.Hill Optimized BuildStaticMeshVertexAndIndexBuffers and TEdgeBuilder Change 3974234 by Rex.Hill Reduced number of calls to SaveRawMesh and LoadRawMesh Change 3974235 by Rex.Hill Optimized SaveRawMesh by pre-allocating buffer Change 3981370 by Jamie.Dale Added support for deprecated (renamed) classes, structs, enums, functions, and properties in Python The glue code generation will now use the existing redirects system to build deprecated entries for old names. You can also specify deprecated names to the ScriptName and ScriptMethod meta-data values by adding extra semi-colon separated entries (the first entry is the current name). Accessing deprecated objects in Python leads to a deprecation warning when developer mode is enabled. Change 3983875 by Jamie.Dale Exposed some asset registry functions that may be useful in a commandlet environment Change 3983901 by Jamie.Dale Hoisted some AssetData helpers onto the struct in Python Change 3988367 by Jamie.Dale Python now honors EditInstanceOnly and EditDefaultsOnly when setting property values Change 3988369 by Jamie.Dale Exposed generic get_default_object function that takes a type and returns you the CDO This is needed for types that aren't natively exposed to Python (such as Blueprint generated types) Change 3989890 by Jamie.Dale Moved BlutilityActor to be Private in EditorScriptingUtils This can be removed once it's no longer needed. Change 3989900 by Jamie.Dale Updated EditorScriptingUtilities to use the Public/Private folder structure for source code Change 3990082 by Anousack.Kitisa Added plugin for Shotgun integration in Unreal. #jira UEENT-959 Change 3990783 by Anousack.Kitisa Changed ShotgunMenuItem to a struct. Change 3991139 by Jamie.Dale Minimized use of GUnrealEd (favoring GEditor) so that this code can be used by commandlets Removed redundant usages of GEditor/GUnrealEd from within UEditorEngine itself, and fixed cases where null data was being accessed. Testing that loading, saving, and creating a new blank map will now work in a commandlet without crashing. Change 3993189 by Jamie.Dale Fixed some mismatched return types Change 3993191 by Jamie.Dale Inital support for taking the GIL at key points where external C code calls into Python Change 3993683 by Patrick.Boutot [LTC] Add a CustomTimeStep that decode a LinearTimecode from the MediaSource. The MediaPlayer need to support buffering and should not run late since it's used to tick the engine time. Update DropTimecode to use the new Timecode structure in TimeManagement. Change 3994430 by Jamie.Dale Adjusted how inline structs work so that types known at compile time can inline allocate without being fully hand-wrapped in Python They must now be registered via FPyWrapperTypeRegistry::RegisterInlineStructFactory before we start generating wrapped types Change 3996083 by Jamie.Dale Added a distinct type for generated enum types so that you can query their available enum entries Change 3998253 by conan.reis Remove redundant Perforce error output from the log Change 4000307 by JeanMichel.Dignard Optimized FFbxImporter::ValidateAllMeshesAreReferenceByNodeAttribute() - Stored all scene nodes geometry ids in a set instead of looping on all scene nodes for every geometry. O(N) instead of O(N^2). - For 38685 scene nodes and 5417 geometry, the time went from 2 min 21.688 s to 0 min 0.098 s. Change 4000605 by Jamie.Dale Added support for constant "hoisting" This allows you to tag a helper function that returns a constant with ScriptConstant meta-data (providing a potentially overridden name) to "hoist" that helper function to be a constant of the type it operates on when wrapped for Python (ScriptConstantHost can be used to host the constant on a struct rather than its own object). Change 4001617 by Jamie.Dale Updated ScriptMethod and ScriptConstant to allow hoisting onto other classes as well as structs This allows you to have a runtime class be extended via methods in an editor-only module Change 4005287 by Jamie.Dale Added a GIL lock when Slate Tick events call back into Python Change 4005383 by Andrew.Rodham Sequencer: Initial scripting exposure and support First pass includes the following: - Find/add/interate master tracks - Find/add/interate bindings (both possessables and spawnables) - Find/add/interate tracks on bindings - Add/interate sections on tracks - Get/Set section ranges Change 4008609 by Jamie.Dale Added some missing native Python types to the documentation Native modules now build up a list of types and functions associated with them. This information is then passed through to the document generation to ensure that all exposed native types and functions are documented. In addition, any native Python module files are now assimilated into the unreal.py stub file and parsed so that they can be documented too. Change 4008654 by Jamie.Dale Allow math operators to use the base type versions unless overridden Change 4009740 by Patrick.Boutot Add BP function to convert a Timecode into a string. Change 4009763 by Patrick.Boutot Update AudioCapture to retreive the SampleRate. Used by the LinearTimecode. Change the requested format from int16 to float since we converted it into that format later on. Change 4009768 by Andrew.Rodham Removed explicit names from ScriptName methods, expanded sequencer scripting range functionality Change 4009830 by Jamie.Dale Added support for UPARAM(ref) on arguments exposed to Python For standard functions, this just produces an input and output for the same argument (we can't mutate the input due to potential coercion). For ScriptMethod functions that use it on the 'self' argument, this will mark the function as "inline" and have the function apply the result of the 'self' argument back onto the 'self' instance after calling the function. Change 4010034 by Jamie.Dale Added support for init_unreal.py start-up scripts These can be placed in any known sys.path in Python, including the Content/Python folders we automatically add, and the UnrealEngine/Python directory under the users home directory. Change 4010422 by Jamie.Dale Improved errror reporting during Python generation It will now ensure if a debugger is attached to draw programmer attention to an error. Change 4010498 by Patrick.Boutot Remove unnecessary loop Timecode.ToFrameNumber() Change 4011312 by Jamie.Dale Duplicate deprecated names will no longer assert during Python glue generation They will now log a warning and continue Change 4012068 by JeanMichel.Dignard Allow to render thumbnails for newly created packages. - To render a thumbnail, you either need a customer thumbnail renderer or a cached thumbnail. Querying cached thumbnails fails for newly created packages because it calls DoesPackageExist which check on disk. This call is unnecessary since we're relying on FindPackage which only works for packages that are loaded in memory. Change 4013781 by Jamie.Dale FFrame::KismetExecutionMessage (or LogRuntimeError or LogRuntimeWarning) will now produce Python exceptions You can use these to emit warnings or errors from UFunctions wrapped for scripting, and when called from Python they will produce a Python exception (for errors), or Python warning (for warnings). Change 4014337 by Jamie.Dale Struct coercion now errors if you provide a sequence with too many elements This also makes sure that PyConversion doesn't set an error state if ESetErrorState::No is passed (which could have previously happened from type casting calls). Change 4015290 by Andrew.Rodham Sequencer: Moved runtime functionality from ISequencerChannelInterface to IMovieSceneChannelInterface - Rename IBatchChannelInterface to IMovieSceneChannelInterface - Removed MovieScene::Dilate() - Added TMovieSceneChannelTraits::SupportsDefaults to automatically stub out functions relating to channel defaults Change 4015664 by Jamie.Dale Renamed ScriptMathOp meta-data to ScriptOperator Change 4016230 by Jamie.Dale Fixed incorrect make/break path in Importance Sampling Library (for Importance Texture) Change 4017326 by Jamie.Dale Added make and break support in Python Structs that have a native make function will now use this as their constructor. This also adds support for breaking a struct into a tuple, either via a native break function, or via generic property enumeration. Change 4017551 by Jamie.Dale Removed redundant outer parameter from find/load_asset/package Change 4018594 by Jamie.Dale Added ScriptMethodSelfReturn as an alternative to UPARAM(ref) These two function signatures produce the same behavior and have the same cost in Python, the only difference is how they appear to Blueprints (and Blueprints seem to favor non-reference functions). UFUNCTION(..., meta=(ScriptMethod)) static void DoThing(UPARAM(ref) FThingType&, int32); UFUNCTION(..., meta=(ScriptMethod, ScriptMethodSelfReturn)) static FThingType DoThing(FThingType, int32); Change 4020956 by Anousack.Kitisa Added Shotgun to the Level Editor/World Outliner and Content Browser context menus when there's a selected actor or asset. #jira UEENT-1219 Change 4021986 by Anousack.Kitisa Used the Python startup scripts mechanism to launch the Shotgun bootstrap script. Related to Jira UE-57896. Change 4022993 by Jamie.Dale Added support for extra operators on Python structs You can now expose bool conversion and comparison operators (==, !=, <, <=, >, >=) in addition to the previous set of math operators. As part of this there is now stricter signature validation when generating the Python binding. Change 4023226 by Jamie.Dale Added Make and Break function for FSoftClassPath Change 4023348 by Jamie.Dale Exposed some methods and operators for PrimaryAssetId and PrimaryAssetType Change 4027911 by Jamie.Dale Cross-outer redirects are no longer applied in Python #jira UETOOL-1382 Change 4029618 by JeanMichel.Dignard Unreal Studio UX - Made "Unreal Studio" the default tab in the new project wizard if we're using an installed enterprise build. - Create new projects as enterprise projects if we're using an insalled enterprise build. #jira UEENT-1231, UEENT-796 Change 4030217 by Jamie.Dale Exposed ScopedSlowTask to Python #jira UETOOL-1375 Change 4030784 by Matt.Hoffman Sequencer curve editor now shows vertical axis labels. #jira UE-58160 Change 4030858 by JeanLuc.Corenthin Expose LOD creation thru Python: - Create one struct to hold onto reduction settings per LOD - Create one struct to hold onto an array of reduction settings and a parameter to enable of disable automatic computation of screen size - Create new method to apply reduction settings to an array of StaticMeshActors #jira UEENT-1232 Change 4032239 by Jamie.Dale Cleanup pass over wrapped structs - Code dealing with reflected structs now uses UScriptStruct rather than UStruct. - The old PyConversion::NativizeStruct and PyConversion::PythonizeStruct have been renamed to PyConversion::NativizeStructInstance and PyConversion::PythonizeStructInstance. - New PyConversion::NativizeStruct and PyConversion::PythonizeStruct functions have been added to convert an object (or Python type) to a UScriptStruct (akin to what PyConversion::NativizeClass and PyConversion::PythonizeClass does for UClass). Change 4032247 by Jamie.Dale Cleaned up some Python slow task code Change 4032251 by Jamie.Dale Added functions to get the Python type associated with an Unreal class, struct, or enum Change 4032258 by Jamie.Dale Added Python iterators for Unreal objects, classes, and structs, as well as the Python types wrapped by Unreal classes or structs #jira UETOOL-1380 Change 4032320 by Jamie.Dale Fixed Python object iterators skipping their first item Change 4032321 by Jamie.Dale Added Python iterators for actors and selected actors #jira UETOOL-1380 Change 4033908 by Anousack.Kitisa Added Shotgun settings for metadata tags. #jira UEENT-1175 Change 4033909 by Anousack.Kitisa Added wrapper function to sync Content Browser to assets for scripting. #jira UEENT-1218 Change 4034951 by Matt.Hoffman Media Tracks now highlight when added to a Sequence/UMG animation. Change 4034966 by Jamie.Dale Added GIL locks around post_init code that can be called from C++ Change 4035019 by Matt.Hoffman UMG Render Transforms + Margins now support infinite sections. Change 4035470 by Andrew.Rodham Introduced a common base class for all movie scene channel data, FMovieSceneChannel. Removed IMovieSceneChannelInterface. Renamed FMovieSceneChannelEditorData to FMovieSceneChannelMetaData. Renamed FMovieSceneChannel and TMovieSceneChannel to FMovieSceneChannelData and TMovieSceneChannelData, to make way for common channel base class. Renamed instances of 'specialized' channel editor data to 'extended' channel editor data. Introduced non-templated FMovieSceneChannelHandle and a templated version. Changed internal implementation to use a lookup rather than a directly resolved weak ptr. Various pieces of documentation and cleanup. Change 4037112 by Max.Chen Sequencer: Added some missing RF_Transactional flags to newly created sections. Change 4037121 by Max.Chen Sequence Recorder: Timecode recording Introduced an FSourceTimecode which is saved as editor only data to the MovieSceneSection and MovieScene. FSourceTimecode consists of an FFrameNumber delta that correlates the section's initial start time to an FTimecode. The FFrameNumber is adjusted whenever the section is moved. One use case for this is through sequence recorder, which captures the timecode at the start of recording and saves an FSourceTimecode per movie scene section it creates. If the section is moved, it can always be returned to its source timecode by the section's right click menu, "Sync to Source Timecode". #jira UESEQ-406 Change 4038462 by Jamie.Dale Added support for using Python callables with delegates All the "x_function" methods on delegates and multicast delegates now have an "x_callable" equivalent that take a Python callable (we attempt basic validation of the signature, but that only allows us to check the input argument count is what we expect). Internally the callable is wrapped in a UObject, so certain GC restrictions are present (and is why coercion is disabled for callables). Delegates wrapped in Python (including as a direct property of an object or struct, or inside a container) will be kept alive via the Python reference collection, however once there are no Python references left the proxy object will be allowed to die unless something external has taken a reference to the proxy object. Change 4039123 by James.McNatton Remove dependency on SteamController in VirtualCamera #rb none Change 4039162 by Jamie.Dale Fixed linter warnings about unescaped backslashes in docstrings Change 4039170 by Jamie.Dale No longer expose deprecated functions or properties if they clash with another Python exposed item Change 4039429 by Max.Chen Sequence Recorder: Swap to editor actors on end PIE if the actors to record were set to the PIE actors Change 4039442 by Max.Chen Sequence Recorder: Find the existing object binding and record into it if it exists. When recording to an existing object binding, if the track exists, remove all animation data and reuse the track. Change 4039477 by Jamie.Dale Added warnings for conflicting Python type and field names Change 4039478 by Jamie.Dale Fixed warnings for conflicting Python type and field names Change 4039511 by Max.Chen Sequencer: Remove all animation data for spawn track Change 4040649 by James.McNatton Multiple Virtual Camera bug fixes - Removed QAGame mannequin from test map - Fixed errors being generated when trying to load preset - Presets now properly load and save axis settings - Deleted presets should no longer linger in menus - Presets now save and load favorite status Change 4041356 by Max.Chen Sequence Recorder: Takes system #jira UESP-544 Change 4041589 by Jamie.Dale Added C++ source information (plugin, module, and file) to the Python doc string Change 4041746 by Jamie.Dale Made ScriptOperator more relaxed about its signature validation as long as the additional input parameters are defaulted Change 4041757 by James.McNatton Virtual Camera Bug Fixes - The Input Source dropdown now accurately reflects user selection - Input source changed to EditDefaultsOnly - Focus should no longer be set when the settings menu is open Change 4041823 by Jamie.Dale Made ScriptOperator more relaxed about its signature validation for defaulted input parameters Existing Blueprint exposed operator functions may both default required arguments, and add additional default arguments. ScriptOperator will now accept both of these as long as there are enough arguments, but not too many non-defaulted arguments. Change 4042956 by James.McNatton VirtualCamera bug fixes related to focus plane visualization - Removed extra focus plane that was being displayed - Added logic to adjust for nonuniform scaling of objects when settings up tracking focus Change 4043400 by James.McNatton Multiple bug fixes related to saving various values - Now saves matte opacity and updates on load - Now saves filmback format name and updates on load - Now saves desired distance units and updates on load Change 4043481 by James.McNatton Fixed issue in Virtual Camera where joystick movement would not properly apply locks after rotating #rb none Change 4044358 by Jamie.Dale Fixed some cases where empty default values would be lost from UHT Eg, empty strings, null objects Change 4044362 by Jamie.Dale Fixed old-style enums being missed by the Python glue generation if they're only referenced by a property of function Change 4044371 by Jamie.Dale Fixed default value application for some struct types that use a custom default value format when exported by UHT Change 4044417 by Max.Chen Sequence Recorder: Better default group names with an underscore separator for letters Change 4045164 by Jamie.Dale Hardened usage of CopyScriptStruct to ensure that the source type is a child of the destination type, and that the destination type is used to copy (to still allow slicing of derived data) Change 4045195 by Jamie.Dale Updated FPropValueOnScope::GetValue to be able to return the value for a particular array index Change 4045589 by James.McNatton Fixed packaging error for VirtualCamera plugin - Plugin is now a runtime plugin rather than developer - Fixed up associated warnings with saving and loading in editor Change 4046208 by James.McNatton Virtual Camera bug fixes - Adjusted how mattes and filmback works together - Should now always respond properly to changing filmback settings in UI - Should now match the correct view size within the matte under all circumstances Change 4046372 by Max.Chen Sequencer: Fix subsequence binding ids. #jira UE-55337 Change 4046694 by Max.Chen Sequence Recorder: Compile the template before finding the camera sequence id since the precompiled template is not up to date. Change 4046801 by Jamie.Dale Improved default values and return types used in the unreal.py stub file - Object and Struct types generate an __init__ function with the correct signature. - Struct __init__ functions list the correct default values (including when using make/break functions). - Methods now list the correct default values. - Get/Set getters return a value of the correct type. - Get/Set setters are no longer exported for read-only properties. - Constants resolve to the correct type and value. #jira UETOOL-1377 Change 4047023 by Jamie.Dale Added missing hook-up for % and %= in Python Change 4047100 by Jamie.Dale Operators are now exposed to unreal.py and generate docs stating which overloads are available Change 4047105 by Jamie.Dale String is now "str" in doc strings to match the Python type Change 4047714 by Max.Chen Sequencer: Resolved merge conflicts with Dev-Sequencer Change 4048150 by Jamie.Dale Fixed single-culture PO import/export failing #jira UE-47079 Change 4048653 by Andrew.Rodham Sequencer: Automatic re-evaluation is now suppressed for external changes that modified only default values on channels - The issue is that moving an object that is partially-keyed in sequencer, with auto-key off, will set default values for the non-keyed channels. Doing so will dirty the sequence, which causes a re-evaluation, which re-evalutes the keyed channels, which effectively undoes the external change. - This is now fixed by suppressing the automatic re-evaluation for a specific signature of a specific sequence, if that is the only thing that has dirtied the sequence. Any subsequent changes to the sequence will cause a re-evaluation, and the suppression to be wiped. #jira UE-57519 #jira UE-58487 Change 4048814 by Jamie.Dale Fixed syntax error if an enum had an unknown value Change 4048819 by Jamie.Dale Fixed struct init functions having the wrong default values Change 4048856 by JeanLuc.Corenthin - Removed LOD & collision functions from UEditorLevelLibrary - Created a new class, UEditorMeshLibrary, to hold onto functionalities related to StaticMeshes - Added method to set LODs on a static mesh - Added method to remove LODs from a static mesh - Added method to get number of LODs on a static mesh - Added method to get number of simple collisions onto a static mesh - Added method to get number of convex collisions onto a static mesh - Added method to add convex collision onto a static mesh - Added method to remove all collisions onto a static mesh #jira UEENT-1232 #jira UEENT-1233 Change 4048961 by Jamie.Dale Improved formatting of output parameters in doc strings #jira UETOOL-1376 Change 4048988 by Jamie.Dale Fixed context leakage between the console and files, and import "unreal" by default now in the console #jira UETOOL-1379 Change 4049912 by Max.Chen Sequence Recorder: Minor recording group name improvements. - Initialize newly created actor group with existing actor group's base path. - When duplicating, use the current group's name as the base. - When typing in a name, if it fits the group format, the name should be allowable if it doesn't conflict with existing group names/assets. Change 4049934 by Andrew.Rodham Sequencer: Minor clean-up of sequencer interfaces and overloads - Replaced remaining instances of void* with FMovieSceneChannel* now that we mandate a common base class - Changed remaining explicit calls to SetDefault to SetChannelDefault overload so it works correctly with the SupportsDefaults trait - Exposed ability to manually implement an ISequencerChannelInterface rather than using the default templated one Change 4050608 by conan.reis Was getting link error about use of FFrameTime in ULevelSequencePlaybackController::PlayFromBeginning() in the VirtualCamera plugin so added TimeManagement to its dependant modules so it compiles again. Change 4050899 by Max.Chen Sequencer: Allow actor components for synchronization #jira UE-58468 Change 4050900 by Max.Chen Sequence Recorder: Don't create a spawn section if the object is a possessable #jira UE-58272 Change 4050904 by Max.Chen Curve Editor: Fix for evaluation a section of time when one key is non-weighted and the other is weighted. What we do is evaluate them both as being weighted, but we don't have the weight value for the non-weighted tangent. The weight of the non-weighted tangent is implicilty 1/3rd the distance between the two points, so we just calculate that if needed. #jira UE-58573 Change 4050905 by Max.Chen Curve Editor: When calculating vertical extents find feature points where slopes are zero and check them in addition to the keys if the curve is cubic. Curves now fit correclty vertically. Also changed fudge to 5% from 10% to match up old editor. Tighter fits seems better. #jira UE-58571 Change 4050972 by James.McNatton Added functions to ISequenceRecorder - Calling StartRecording with an empty array now triggers recording without clearning queued recordings - Added function to queue an actor to be recorded - Added function to check the next take number for a given actor when using groups Change 4050994 by James.McNatton Bug fixes for Virtual Camera - Preset menu now shows dates in the timestamp - Resetting offsets now alerts the system to update UI Change 4051431 by David.Hibbitts Added a component and blueprint library to access LiveLink data in blueprints which also works in editor. Deprecated LiveLink Driven component #jira UESP-577 Change 4051475 by Patrick.Boutot Rename EditorMeshLibrary Merge AssetScriptingUtilititesEditor with EditorScriptingUtilities. Add Redirects. Change 4051558 by Patrick.Boutot EngineCustomTimeStep returns true when we also want to perform the default engine code. Change 4052106 by Andrew.Rodham Sequencer: Adding an example that creates a sequence out of the current editor selection Change 4052205 by Anousack.Kitisa Fixed selected asset paths referenced by selected actors when using context Shotgun menu. Added function to retrieve the work area directory for Shotgun. #jira UEENT-1220 Change 4052951 by James.McNatton Virtual Camera Sequence Recorder updates to integrate new take system - Takes no longer display unless sequence recorder has a group selected - Adjusted fix to packaging error - FPS value will no longer appear if sequence recorder isn't available Change 4053130 by mason.seay Updated Game Mode Override Change 4053273 by James.McNatton Virtual Camera cleanup adjustments Change 4053627 by Max.Chen Sequencer: Disable bind sequencer to PIE/simulate while recording. Change 4053628 by Max.Chen Sequence Recorder: Fix target animation not persisting #jira UE-58508 Change 4053871 by Max.Chen Image Plate: Fix icon path Change 4054370 by Patrick.Boutot Remove LiveLink warning. Create base a class for FLiveLinkFrameRate as suggested in GenericPlatformCompilerPreSetup.h Change 4054447 by Darren.Pegg AJA low level device API Blackmagic low level API MediaIOCore changes to support AJA/Blackmagic changes AJA Module converted to use MediaIOCore Blackmagic Module changes for MediaIOCore Blackmagic/AJA Binary files Change 4054769 by Patrick.Boutot Packaging error issue introduce with CL 4054370. #jira UE-58749 Change 4055443 by Max.Chen Sequencer: Fix crash in adding filler shot #jira UE-58767 Change 4056577 by JeanMichel.Dignard Fixed crash with automation tests. We would bind the default UEditorEngine to Automation and on map load, it would call PIE on GEditor but with recent changes, PIE is called on this and the default UEditorEngine is not initialized so it would crash with a null GameViewportClass. Now we'll bind Automation on UEditorEngine InitializeObjectReferences so that we're in a good state and it's only called for GEditor. #jira UE-58792 Change 4057238 by Jamie.Dale Fixed crash when renaming Python generated classes or structs Change 4058435 by Jamie.Dale Fixed lingering exception state when converting a dict to a struct Change 4058486 by mason.seay Removed remote.host call from map [CL 4060164 by JeanMichel Dignard in Main branch]
2018-05-09 10:24:50 -04:00
FLargeMemoryWriter Ar(GetSerializedDataSizeEstimate(), /*bIsPersistent*/ true);
SerializeAsset(Ar);
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4059031) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 3974233 by Rex.Hill Optimized BuildStaticMeshVertexAndIndexBuffers and TEdgeBuilder Change 3974234 by Rex.Hill Reduced number of calls to SaveRawMesh and LoadRawMesh Change 3974235 by Rex.Hill Optimized SaveRawMesh by pre-allocating buffer Change 3981370 by Jamie.Dale Added support for deprecated (renamed) classes, structs, enums, functions, and properties in Python The glue code generation will now use the existing redirects system to build deprecated entries for old names. You can also specify deprecated names to the ScriptName and ScriptMethod meta-data values by adding extra semi-colon separated entries (the first entry is the current name). Accessing deprecated objects in Python leads to a deprecation warning when developer mode is enabled. Change 3983875 by Jamie.Dale Exposed some asset registry functions that may be useful in a commandlet environment Change 3983901 by Jamie.Dale Hoisted some AssetData helpers onto the struct in Python Change 3988367 by Jamie.Dale Python now honors EditInstanceOnly and EditDefaultsOnly when setting property values Change 3988369 by Jamie.Dale Exposed generic get_default_object function that takes a type and returns you the CDO This is needed for types that aren't natively exposed to Python (such as Blueprint generated types) Change 3989890 by Jamie.Dale Moved BlutilityActor to be Private in EditorScriptingUtils This can be removed once it's no longer needed. Change 3989900 by Jamie.Dale Updated EditorScriptingUtilities to use the Public/Private folder structure for source code Change 3990082 by Anousack.Kitisa Added plugin for Shotgun integration in Unreal. #jira UEENT-959 Change 3990783 by Anousack.Kitisa Changed ShotgunMenuItem to a struct. Change 3991139 by Jamie.Dale Minimized use of GUnrealEd (favoring GEditor) so that this code can be used by commandlets Removed redundant usages of GEditor/GUnrealEd from within UEditorEngine itself, and fixed cases where null data was being accessed. Testing that loading, saving, and creating a new blank map will now work in a commandlet without crashing. Change 3993189 by Jamie.Dale Fixed some mismatched return types Change 3993191 by Jamie.Dale Inital support for taking the GIL at key points where external C code calls into Python Change 3993683 by Patrick.Boutot [LTC] Add a CustomTimeStep that decode a LinearTimecode from the MediaSource. The MediaPlayer need to support buffering and should not run late since it's used to tick the engine time. Update DropTimecode to use the new Timecode structure in TimeManagement. Change 3994430 by Jamie.Dale Adjusted how inline structs work so that types known at compile time can inline allocate without being fully hand-wrapped in Python They must now be registered via FPyWrapperTypeRegistry::RegisterInlineStructFactory before we start generating wrapped types Change 3996083 by Jamie.Dale Added a distinct type for generated enum types so that you can query their available enum entries Change 3998253 by conan.reis Remove redundant Perforce error output from the log Change 4000307 by JeanMichel.Dignard Optimized FFbxImporter::ValidateAllMeshesAreReferenceByNodeAttribute() - Stored all scene nodes geometry ids in a set instead of looping on all scene nodes for every geometry. O(N) instead of O(N^2). - For 38685 scene nodes and 5417 geometry, the time went from 2 min 21.688 s to 0 min 0.098 s. Change 4000605 by Jamie.Dale Added support for constant "hoisting" This allows you to tag a helper function that returns a constant with ScriptConstant meta-data (providing a potentially overridden name) to "hoist" that helper function to be a constant of the type it operates on when wrapped for Python (ScriptConstantHost can be used to host the constant on a struct rather than its own object). Change 4001617 by Jamie.Dale Updated ScriptMethod and ScriptConstant to allow hoisting onto other classes as well as structs This allows you to have a runtime class be extended via methods in an editor-only module Change 4005287 by Jamie.Dale Added a GIL lock when Slate Tick events call back into Python Change 4005383 by Andrew.Rodham Sequencer: Initial scripting exposure and support First pass includes the following: - Find/add/interate master tracks - Find/add/interate bindings (both possessables and spawnables) - Find/add/interate tracks on bindings - Add/interate sections on tracks - Get/Set section ranges Change 4008609 by Jamie.Dale Added some missing native Python types to the documentation Native modules now build up a list of types and functions associated with them. This information is then passed through to the document generation to ensure that all exposed native types and functions are documented. In addition, any native Python module files are now assimilated into the unreal.py stub file and parsed so that they can be documented too. Change 4008654 by Jamie.Dale Allow math operators to use the base type versions unless overridden Change 4009740 by Patrick.Boutot Add BP function to convert a Timecode into a string. Change 4009763 by Patrick.Boutot Update AudioCapture to retreive the SampleRate. Used by the LinearTimecode. Change the requested format from int16 to float since we converted it into that format later on. Change 4009768 by Andrew.Rodham Removed explicit names from ScriptName methods, expanded sequencer scripting range functionality Change 4009830 by Jamie.Dale Added support for UPARAM(ref) on arguments exposed to Python For standard functions, this just produces an input and output for the same argument (we can't mutate the input due to potential coercion). For ScriptMethod functions that use it on the 'self' argument, this will mark the function as "inline" and have the function apply the result of the 'self' argument back onto the 'self' instance after calling the function. Change 4010034 by Jamie.Dale Added support for init_unreal.py start-up scripts These can be placed in any known sys.path in Python, including the Content/Python folders we automatically add, and the UnrealEngine/Python directory under the users home directory. Change 4010422 by Jamie.Dale Improved errror reporting during Python generation It will now ensure if a debugger is attached to draw programmer attention to an error. Change 4010498 by Patrick.Boutot Remove unnecessary loop Timecode.ToFrameNumber() Change 4011312 by Jamie.Dale Duplicate deprecated names will no longer assert during Python glue generation They will now log a warning and continue Change 4012068 by JeanMichel.Dignard Allow to render thumbnails for newly created packages. - To render a thumbnail, you either need a customer thumbnail renderer or a cached thumbnail. Querying cached thumbnails fails for newly created packages because it calls DoesPackageExist which check on disk. This call is unnecessary since we're relying on FindPackage which only works for packages that are loaded in memory. Change 4013781 by Jamie.Dale FFrame::KismetExecutionMessage (or LogRuntimeError or LogRuntimeWarning) will now produce Python exceptions You can use these to emit warnings or errors from UFunctions wrapped for scripting, and when called from Python they will produce a Python exception (for errors), or Python warning (for warnings). Change 4014337 by Jamie.Dale Struct coercion now errors if you provide a sequence with too many elements This also makes sure that PyConversion doesn't set an error state if ESetErrorState::No is passed (which could have previously happened from type casting calls). Change 4015290 by Andrew.Rodham Sequencer: Moved runtime functionality from ISequencerChannelInterface to IMovieSceneChannelInterface - Rename IBatchChannelInterface to IMovieSceneChannelInterface - Removed MovieScene::Dilate() - Added TMovieSceneChannelTraits::SupportsDefaults to automatically stub out functions relating to channel defaults Change 4015664 by Jamie.Dale Renamed ScriptMathOp meta-data to ScriptOperator Change 4016230 by Jamie.Dale Fixed incorrect make/break path in Importance Sampling Library (for Importance Texture) Change 4017326 by Jamie.Dale Added make and break support in Python Structs that have a native make function will now use this as their constructor. This also adds support for breaking a struct into a tuple, either via a native break function, or via generic property enumeration. Change 4017551 by Jamie.Dale Removed redundant outer parameter from find/load_asset/package Change 4018594 by Jamie.Dale Added ScriptMethodSelfReturn as an alternative to UPARAM(ref) These two function signatures produce the same behavior and have the same cost in Python, the only difference is how they appear to Blueprints (and Blueprints seem to favor non-reference functions). UFUNCTION(..., meta=(ScriptMethod)) static void DoThing(UPARAM(ref) FThingType&, int32); UFUNCTION(..., meta=(ScriptMethod, ScriptMethodSelfReturn)) static FThingType DoThing(FThingType, int32); Change 4020956 by Anousack.Kitisa Added Shotgun to the Level Editor/World Outliner and Content Browser context menus when there's a selected actor or asset. #jira UEENT-1219 Change 4021986 by Anousack.Kitisa Used the Python startup scripts mechanism to launch the Shotgun bootstrap script. Related to Jira UE-57896. Change 4022993 by Jamie.Dale Added support for extra operators on Python structs You can now expose bool conversion and comparison operators (==, !=, <, <=, >, >=) in addition to the previous set of math operators. As part of this there is now stricter signature validation when generating the Python binding. Change 4023226 by Jamie.Dale Added Make and Break function for FSoftClassPath Change 4023348 by Jamie.Dale Exposed some methods and operators for PrimaryAssetId and PrimaryAssetType Change 4027911 by Jamie.Dale Cross-outer redirects are no longer applied in Python #jira UETOOL-1382 Change 4029618 by JeanMichel.Dignard Unreal Studio UX - Made "Unreal Studio" the default tab in the new project wizard if we're using an installed enterprise build. - Create new projects as enterprise projects if we're using an insalled enterprise build. #jira UEENT-1231, UEENT-796 Change 4030217 by Jamie.Dale Exposed ScopedSlowTask to Python #jira UETOOL-1375 Change 4030784 by Matt.Hoffman Sequencer curve editor now shows vertical axis labels. #jira UE-58160 Change 4030858 by JeanLuc.Corenthin Expose LOD creation thru Python: - Create one struct to hold onto reduction settings per LOD - Create one struct to hold onto an array of reduction settings and a parameter to enable of disable automatic computation of screen size - Create new method to apply reduction settings to an array of StaticMeshActors #jira UEENT-1232 Change 4032239 by Jamie.Dale Cleanup pass over wrapped structs - Code dealing with reflected structs now uses UScriptStruct rather than UStruct. - The old PyConversion::NativizeStruct and PyConversion::PythonizeStruct have been renamed to PyConversion::NativizeStructInstance and PyConversion::PythonizeStructInstance. - New PyConversion::NativizeStruct and PyConversion::PythonizeStruct functions have been added to convert an object (or Python type) to a UScriptStruct (akin to what PyConversion::NativizeClass and PyConversion::PythonizeClass does for UClass). Change 4032247 by Jamie.Dale Cleaned up some Python slow task code Change 4032251 by Jamie.Dale Added functions to get the Python type associated with an Unreal class, struct, or enum Change 4032258 by Jamie.Dale Added Python iterators for Unreal objects, classes, and structs, as well as the Python types wrapped by Unreal classes or structs #jira UETOOL-1380 Change 4032320 by Jamie.Dale Fixed Python object iterators skipping their first item Change 4032321 by Jamie.Dale Added Python iterators for actors and selected actors #jira UETOOL-1380 Change 4033908 by Anousack.Kitisa Added Shotgun settings for metadata tags. #jira UEENT-1175 Change 4033909 by Anousack.Kitisa Added wrapper function to sync Content Browser to assets for scripting. #jira UEENT-1218 Change 4034951 by Matt.Hoffman Media Tracks now highlight when added to a Sequence/UMG animation. Change 4034966 by Jamie.Dale Added GIL locks around post_init code that can be called from C++ Change 4035019 by Matt.Hoffman UMG Render Transforms + Margins now support infinite sections. Change 4035470 by Andrew.Rodham Introduced a common base class for all movie scene channel data, FMovieSceneChannel. Removed IMovieSceneChannelInterface. Renamed FMovieSceneChannelEditorData to FMovieSceneChannelMetaData. Renamed FMovieSceneChannel and TMovieSceneChannel to FMovieSceneChannelData and TMovieSceneChannelData, to make way for common channel base class. Renamed instances of 'specialized' channel editor data to 'extended' channel editor data. Introduced non-templated FMovieSceneChannelHandle and a templated version. Changed internal implementation to use a lookup rather than a directly resolved weak ptr. Various pieces of documentation and cleanup. Change 4037112 by Max.Chen Sequencer: Added some missing RF_Transactional flags to newly created sections. Change 4037121 by Max.Chen Sequence Recorder: Timecode recording Introduced an FSourceTimecode which is saved as editor only data to the MovieSceneSection and MovieScene. FSourceTimecode consists of an FFrameNumber delta that correlates the section's initial start time to an FTimecode. The FFrameNumber is adjusted whenever the section is moved. One use case for this is through sequence recorder, which captures the timecode at the start of recording and saves an FSourceTimecode per movie scene section it creates. If the section is moved, it can always be returned to its source timecode by the section's right click menu, "Sync to Source Timecode". #jira UESEQ-406 Change 4038462 by Jamie.Dale Added support for using Python callables with delegates All the "x_function" methods on delegates and multicast delegates now have an "x_callable" equivalent that take a Python callable (we attempt basic validation of the signature, but that only allows us to check the input argument count is what we expect). Internally the callable is wrapped in a UObject, so certain GC restrictions are present (and is why coercion is disabled for callables). Delegates wrapped in Python (including as a direct property of an object or struct, or inside a container) will be kept alive via the Python reference collection, however once there are no Python references left the proxy object will be allowed to die unless something external has taken a reference to the proxy object. Change 4039123 by James.McNatton Remove dependency on SteamController in VirtualCamera #rb none Change 4039162 by Jamie.Dale Fixed linter warnings about unescaped backslashes in docstrings Change 4039170 by Jamie.Dale No longer expose deprecated functions or properties if they clash with another Python exposed item Change 4039429 by Max.Chen Sequence Recorder: Swap to editor actors on end PIE if the actors to record were set to the PIE actors Change 4039442 by Max.Chen Sequence Recorder: Find the existing object binding and record into it if it exists. When recording to an existing object binding, if the track exists, remove all animation data and reuse the track. Change 4039477 by Jamie.Dale Added warnings for conflicting Python type and field names Change 4039478 by Jamie.Dale Fixed warnings for conflicting Python type and field names Change 4039511 by Max.Chen Sequencer: Remove all animation data for spawn track Change 4040649 by James.McNatton Multiple Virtual Camera bug fixes - Removed QAGame mannequin from test map - Fixed errors being generated when trying to load preset - Presets now properly load and save axis settings - Deleted presets should no longer linger in menus - Presets now save and load favorite status Change 4041356 by Max.Chen Sequence Recorder: Takes system #jira UESP-544 Change 4041589 by Jamie.Dale Added C++ source information (plugin, module, and file) to the Python doc string Change 4041746 by Jamie.Dale Made ScriptOperator more relaxed about its signature validation as long as the additional input parameters are defaulted Change 4041757 by James.McNatton Virtual Camera Bug Fixes - The Input Source dropdown now accurately reflects user selection - Input source changed to EditDefaultsOnly - Focus should no longer be set when the settings menu is open Change 4041823 by Jamie.Dale Made ScriptOperator more relaxed about its signature validation for defaulted input parameters Existing Blueprint exposed operator functions may both default required arguments, and add additional default arguments. ScriptOperator will now accept both of these as long as there are enough arguments, but not too many non-defaulted arguments. Change 4042956 by James.McNatton VirtualCamera bug fixes related to focus plane visualization - Removed extra focus plane that was being displayed - Added logic to adjust for nonuniform scaling of objects when settings up tracking focus Change 4043400 by James.McNatton Multiple bug fixes related to saving various values - Now saves matte opacity and updates on load - Now saves filmback format name and updates on load - Now saves desired distance units and updates on load Change 4043481 by James.McNatton Fixed issue in Virtual Camera where joystick movement would not properly apply locks after rotating #rb none Change 4044358 by Jamie.Dale Fixed some cases where empty default values would be lost from UHT Eg, empty strings, null objects Change 4044362 by Jamie.Dale Fixed old-style enums being missed by the Python glue generation if they're only referenced by a property of function Change 4044371 by Jamie.Dale Fixed default value application for some struct types that use a custom default value format when exported by UHT Change 4044417 by Max.Chen Sequence Recorder: Better default group names with an underscore separator for letters Change 4045164 by Jamie.Dale Hardened usage of CopyScriptStruct to ensure that the source type is a child of the destination type, and that the destination type is used to copy (to still allow slicing of derived data) Change 4045195 by Jamie.Dale Updated FPropValueOnScope::GetValue to be able to return the value for a particular array index Change 4045589 by James.McNatton Fixed packaging error for VirtualCamera plugin - Plugin is now a runtime plugin rather than developer - Fixed up associated warnings with saving and loading in editor Change 4046208 by James.McNatton Virtual Camera bug fixes - Adjusted how mattes and filmback works together - Should now always respond properly to changing filmback settings in UI - Should now match the correct view size within the matte under all circumstances Change 4046372 by Max.Chen Sequencer: Fix subsequence binding ids. #jira UE-55337 Change 4046694 by Max.Chen Sequence Recorder: Compile the template before finding the camera sequence id since the precompiled template is not up to date. Change 4046801 by Jamie.Dale Improved default values and return types used in the unreal.py stub file - Object and Struct types generate an __init__ function with the correct signature. - Struct __init__ functions list the correct default values (including when using make/break functions). - Methods now list the correct default values. - Get/Set getters return a value of the correct type. - Get/Set setters are no longer exported for read-only properties. - Constants resolve to the correct type and value. #jira UETOOL-1377 Change 4047023 by Jamie.Dale Added missing hook-up for % and %= in Python Change 4047100 by Jamie.Dale Operators are now exposed to unreal.py and generate docs stating which overloads are available Change 4047105 by Jamie.Dale String is now "str" in doc strings to match the Python type Change 4047714 by Max.Chen Sequencer: Resolved merge conflicts with Dev-Sequencer Change 4048150 by Jamie.Dale Fixed single-culture PO import/export failing #jira UE-47079 Change 4048653 by Andrew.Rodham Sequencer: Automatic re-evaluation is now suppressed for external changes that modified only default values on channels - The issue is that moving an object that is partially-keyed in sequencer, with auto-key off, will set default values for the non-keyed channels. Doing so will dirty the sequence, which causes a re-evaluation, which re-evalutes the keyed channels, which effectively undoes the external change. - This is now fixed by suppressing the automatic re-evaluation for a specific signature of a specific sequence, if that is the only thing that has dirtied the sequence. Any subsequent changes to the sequence will cause a re-evaluation, and the suppression to be wiped. #jira UE-57519 #jira UE-58487 Change 4048814 by Jamie.Dale Fixed syntax error if an enum had an unknown value Change 4048819 by Jamie.Dale Fixed struct init functions having the wrong default values Change 4048856 by JeanLuc.Corenthin - Removed LOD & collision functions from UEditorLevelLibrary - Created a new class, UEditorMeshLibrary, to hold onto functionalities related to StaticMeshes - Added method to set LODs on a static mesh - Added method to remove LODs from a static mesh - Added method to get number of LODs on a static mesh - Added method to get number of simple collisions onto a static mesh - Added method to get number of convex collisions onto a static mesh - Added method to add convex collision onto a static mesh - Added method to remove all collisions onto a static mesh #jira UEENT-1232 #jira UEENT-1233 Change 4048961 by Jamie.Dale Improved formatting of output parameters in doc strings #jira UETOOL-1376 Change 4048988 by Jamie.Dale Fixed context leakage between the console and files, and import "unreal" by default now in the console #jira UETOOL-1379 Change 4049912 by Max.Chen Sequence Recorder: Minor recording group name improvements. - Initialize newly created actor group with existing actor group's base path. - When duplicating, use the current group's name as the base. - When typing in a name, if it fits the group format, the name should be allowable if it doesn't conflict with existing group names/assets. Change 4049934 by Andrew.Rodham Sequencer: Minor clean-up of sequencer interfaces and overloads - Replaced remaining instances of void* with FMovieSceneChannel* now that we mandate a common base class - Changed remaining explicit calls to SetDefault to SetChannelDefault overload so it works correctly with the SupportsDefaults trait - Exposed ability to manually implement an ISequencerChannelInterface rather than using the default templated one Change 4050608 by conan.reis Was getting link error about use of FFrameTime in ULevelSequencePlaybackController::PlayFromBeginning() in the VirtualCamera plugin so added TimeManagement to its dependant modules so it compiles again. Change 4050899 by Max.Chen Sequencer: Allow actor components for synchronization #jira UE-58468 Change 4050900 by Max.Chen Sequence Recorder: Don't create a spawn section if the object is a possessable #jira UE-58272 Change 4050904 by Max.Chen Curve Editor: Fix for evaluation a section of time when one key is non-weighted and the other is weighted. What we do is evaluate them both as being weighted, but we don't have the weight value for the non-weighted tangent. The weight of the non-weighted tangent is implicilty 1/3rd the distance between the two points, so we just calculate that if needed. #jira UE-58573 Change 4050905 by Max.Chen Curve Editor: When calculating vertical extents find feature points where slopes are zero and check them in addition to the keys if the curve is cubic. Curves now fit correclty vertically. Also changed fudge to 5% from 10% to match up old editor. Tighter fits seems better. #jira UE-58571 Change 4050972 by James.McNatton Added functions to ISequenceRecorder - Calling StartRecording with an empty array now triggers recording without clearning queued recordings - Added function to queue an actor to be recorded - Added function to check the next take number for a given actor when using groups Change 4050994 by James.McNatton Bug fixes for Virtual Camera - Preset menu now shows dates in the timestamp - Resetting offsets now alerts the system to update UI Change 4051431 by David.Hibbitts Added a component and blueprint library to access LiveLink data in blueprints which also works in editor. Deprecated LiveLink Driven component #jira UESP-577 Change 4051475 by Patrick.Boutot Rename EditorMeshLibrary Merge AssetScriptingUtilititesEditor with EditorScriptingUtilities. Add Redirects. Change 4051558 by Patrick.Boutot EngineCustomTimeStep returns true when we also want to perform the default engine code. Change 4052106 by Andrew.Rodham Sequencer: Adding an example that creates a sequence out of the current editor selection Change 4052205 by Anousack.Kitisa Fixed selected asset paths referenced by selected actors when using context Shotgun menu. Added function to retrieve the work area directory for Shotgun. #jira UEENT-1220 Change 4052951 by James.McNatton Virtual Camera Sequence Recorder updates to integrate new take system - Takes no longer display unless sequence recorder has a group selected - Adjusted fix to packaging error - FPS value will no longer appear if sequence recorder isn't available Change 4053130 by mason.seay Updated Game Mode Override Change 4053273 by James.McNatton Virtual Camera cleanup adjustments Change 4053627 by Max.Chen Sequencer: Disable bind sequencer to PIE/simulate while recording. Change 4053628 by Max.Chen Sequence Recorder: Fix target animation not persisting #jira UE-58508 Change 4053871 by Max.Chen Image Plate: Fix icon path Change 4054370 by Patrick.Boutot Remove LiveLink warning. Create base a class for FLiveLinkFrameRate as suggested in GenericPlatformCompilerPreSetup.h Change 4054447 by Darren.Pegg AJA low level device API Blackmagic low level API MediaIOCore changes to support AJA/Blackmagic changes AJA Module converted to use MediaIOCore Blackmagic Module changes for MediaIOCore Blackmagic/AJA Binary files Change 4054769 by Patrick.Boutot Packaging error issue introduce with CL 4054370. #jira UE-58749 Change 4055443 by Max.Chen Sequencer: Fix crash in adding filler shot #jira UE-58767 Change 4056577 by JeanMichel.Dignard Fixed crash with automation tests. We would bind the default UEditorEngine to Automation and on map load, it would call PIE on GEditor but with recent changes, PIE is called on this and the default UEditorEngine is not initialized so it would crash with a null GameViewportClass. Now we'll bind Automation on UEditorEngine InitializeObjectReferences so that we're in a good state and it's only called for GEditor. #jira UE-58792 Change 4057238 by Jamie.Dale Fixed crash when renaming Python generated classes or structs Change 4058435 by Jamie.Dale Fixed lingering exception state when converting a dict to a struct Change 4058486 by mason.seay Removed remote.host call from map [CL 4060164 by JeanMichel Dignard in Main branch]
2018-05-09 10:24:50 -04:00
FVoidPtrParam Result(Ar.GetData(), Ar.TotalSize());
Ar.ReleaseOwnership();
return Result;
}
// null
return FVoidPtrParam::NullPtr();
}
void URuntimeAssetCacheBuilder_ObjectBase::GetFromCacheAsync(const FOnAssetCacheComplete& OnComplete)
{
OnAssetCacheComplete = OnComplete;
GetFromCacheAsyncCompleteDelegate.BindDynamic(this, &URuntimeAssetCacheBuilder_ObjectBase::GetFromCacheAsyncComplete);
CacheHandle = GetRuntimeAssetCache().GetAsynchronous(this, GetFromCacheAsyncCompleteDelegate);
}
void URuntimeAssetCacheBuilder_ObjectBase::GetFromCacheAsyncComplete(int32 Handle, FVoidPtrParam DataPtr)
{
if (Handle != CacheHandle)
{
// This can sometimes happen when the world changes and everything couldn't cancel correctly. Just ignore any callbacks that don't match handles.
if (DataPtr.Data != nullptr)
{
FMemory::Free(DataPtr.Data);
}
return;
}
if (DataPtr.Data != nullptr)
{
// Success! Finished loading or saving data from cache
// If saving, then we already have the right data and we can just report success
if (Asset == nullptr)
{
// If loading, we now need to serialize the data into a usable format
// Make sure Asset is set up to be loaded into
OnAssetPreLoad();
FBufferReader Ar(DataPtr.Data, DataPtr.DataSize, false);
SerializeAsset(Ar);
// Perform any specific init functions after load
OnAssetPostLoad();
}
// Free the buffer memory on both save and load
// On save the buffer gets created in Build()
// On load the buffer gets created in FRuntimeAssetCacheBackend::GetCachedData()
FMemory::Free(DataPtr.Data);
CacheHandle = 0;
// Success!
OnAssetCacheComplete.ExecuteIfBound(this, true);
}
else
{
// Data not on disk. Kick off the creation process.
// Once complete, call GetFromCacheAsync() again and it will loop back to this function, but should succeed.
if (!bProcessedCacheMiss)
{
bProcessedCacheMiss = true;
OnAssetCacheMiss();
}
else
{
// Failed
OnAssetCacheComplete.ExecuteIfBound(this, false);
}
}
}
void UExampleTextureCacheBuilder::OnSetAsset(UObject* NewAsset)
{
Texture = Cast<UTexture2D>(NewAsset);
}
void UExampleTextureCacheBuilder::OnAssetCacheMiss_Implementation()
{
// Override and create the new asset here (this is where we would render to a render target, then get the result)
// For this example we will simply load an existing texture
UTexture2D* NewTexture = LoadObject<UTexture2D>(nullptr, *AssetName);
// Make sure the new asset gets properly cached for next time.
SaveNewAssetToCache(NewTexture);
}
void UExampleTextureCacheBuilder::SerializeAsset(FArchive& Ar)
{
if (Texture && Texture->PlatformData)
{
FTexturePlatformData* PlatformData = Texture->PlatformData;
UEnum* PixelFormatEnum = UTexture::GetPixelFormatEnum();
Ar << PlatformData->SizeX;
Ar << PlatformData->SizeY;
Ar << PlatformData->NumSlices;
if (Ar.IsLoading())
{
FString PixelFormatString;
Ar << PixelFormatString;
Copying //UE4/Dev-Core to //UE4/Dev-Main (Source: //UE4/Dev-Core @ 3314870) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3284872 on 2017/02/03 by Graeme.Thornton Seperate pak cache granularity from pak signing chunk size Change 3285765 on 2017/02/03 by Graeme.Thornton Fix stats warnings because each slate new loading screen thread has the same stat name, but is assigned to a different thread #jira UE-41478 Change 3286913 on 2017/02/04 by Ben.Marsh IncludeTool: Merging fixes. * Don't remove existing forward declarations unless explicitly instructed to do so. Files are optimized with these declarations in place, so removing them can cause output files to fail to build. It can be a useful separate step though, so expose it as a command-line option instead. * Add a specific option for which files should be output by the tool. Any files which are excluded from this list are treated specially when generating output files, so as to prevent them from causing files to be omitted from other files that include them. Also add an option to force this mode for all headers, for use when testing formatting/include path generation. Change 3287100 on 2017/02/05 by Ben.Marsh UBT: Move platform settings into platform-specific TargetRules objects. Change 3287106 on 2017/02/05 by Ben.Marsh Merge UEBuildPlatformContext into UEBuildPlatform. Now that targets can have platform-specific settings, there is no need to separate a platform class which contains target-specific information. Change 3287398 on 2017/02/06 by Steve.Robb Fix for UHT failing when -WarningsAsErrors and -Verbose are specified together. Change 3287399 on 2017/02/06 by Steve.Robb Log verbosities made more readable in the debugger. Change 3287410 on 2017/02/06 by Steve.Robb Fix for TStructOpsTypeTraits where WithCopy gives a different result between specializing the traits and not providing WithCopy and not specializing the traits at all. #fyi marc.audy Change 3288020 on 2017/02/06 by Ben.Marsh Prevent forward declaration of the ITextData class. We need to include the header for the debugger visualizers to work correctly. Change 3291817 on 2017/02/08 by Steve.Robb New EBlueprintCompileReinstancerFlags used to construct FBlueprintCompileReinstancer, instead of lots of bools. Change 3292090 on 2017/02/08 by Graeme.Thornton Crash fix - don't update font engine services if it was never created #jira UE-33953 Change 3292993 on 2017/02/08 by Ben.Marsh Add an option to disable force-including PCHs for files in the non-unity working set. (bAdaptiveUnityDisablesPCH) Change 3293231 on 2017/02/08 by Ben.Marsh BuildGraph: Allow overriding the changelist that a badge should be displayed for (with the Change="" attribute on the Badge declaration in XML), so the code changelist can be used if necessary. Also link to the failed step if only one has failed. Change 3294213 on 2017/02/09 by Ben.Marsh EC: Allow setting a property on frequent CI jobs that allows us to exclude it from job searches for generating the dashboard. Filtering on the client side is causing dashboard pages to be almost empty. Change 3294753 on 2017/02/09 by Ben.Zeigler #jira UE-41151 Fix UObjectLibrary::RemoveObject to remove from the correct array, and add comment mentioning that the dynamic use of Object Library is semi-deprecated Change 3296070 on 2017/02/09 by Ben.Zeigler Explicitly turn off Copy for a struct that has a linked list internally. I think turning Copy on by default for all non POD Types is pretty risky and is likely to crash for other games. In this case it was being copied for network replication, and it didn't have one defined so the default C++ one copied the linked list and crashed on destruction. Change 3296420 on 2017/02/10 by Graeme.Thornton Remove remaining references to AES_KEY, instead using the encryption key delegates to access the key where needed Refactored encryption and signing key access in unrealpak to make it easier to use Change 3296609 on 2017/02/10 by Ben.Marsh BuildGraph: Fix error running the <Copy> task with an empty "From" argument. * FileSystemReference.IsUnderDirectory() was not correctly handling cases where the directory was a root directory (and has to end in a path separator) * FilePattern.AsDirectoryReference() with an empty token would append a path separator to an empty string, resulting in it referencing the root directory rather than the given base directory. Change 3297440 on 2017/02/10 by Ben.Marsh UBT: Move the FileFilter class into UnrealBuildTool. Change 3297725 on 2017/02/10 by Ben.Zeigler #jira UE-39199 Fix issue with enum value redirects using the wrong short or long name, it now fully supports both. Clean up a lot of confusingly named and broken functions on UEnum: #jira UE-41348 Deprecate FindEnumIndex, GetEnum, GetEnumName, replace with GetIndexByName, GetNameByIndex, and GetNameStringByIndex and clean up warnings #jira UE-38187 Deprecate GetDisplayNameText and GetEnumText, replaced both with GetDisplayNameTextAtIndex which is now callable outside the editor and has a better comment Deprecate FindEnumRedirects and replace with GetIndexByNameString. Fix code to not check the redirects array 5 times per enum lookup Fix GetValueAsString to actually act on a value, not an index. This matches common usage and the function's name While fixing deprecation warnings on internal games, fixed dozens of cases where it was using Index functions when it should have been using Value functions Delete some now redundant enum editor code and pipe everything through UEnum Change 3297979 on 2017/02/10 by Ben.Zeigler Fix issues parsing Enums that are literally the string "None", which is allowed but leads to some odd behavior Change 3298299 on 2017/02/10 by Steve.Robb TTuple improvements: - equality comparable - serializable - in the correct folder 2-tuples are specialized to be syntactically compatible with both TPair and TTuple. TPair is now an alias for a 2-tuple and is no longer bound to TPairInitializer. #fyi robert.manuszewski,ben.marsh Change 3298460 on 2017/02/11 by Ben.Marsh UGS: Set the correct result from running custom tasks. Change 3298462 on 2017/02/11 by Ben.Marsh UBT: Fix some deprecated messages that have the wrong release version, and add a better message for how ModuleRules constructors need to be updated. Change 3299447 on 2017/02/13 by Graeme.Thornton Fix AES and pak signing key embedding for content only projects - Force temp target when any keys are specified by project config Change 3299649 on 2017/02/13 by Steve.Robb PLATFORM_HAS_DEFAULTED_OPERATORS fixed. Other obsolete compiler switches removed. Change 3299787 on 2017/02/13 by Steve.Robb IsAbstract() for testing if a reflected native type contains pure virtual functions. Needed for BP nativization. #fyi robert.manuszewski Change 3300576 on 2017/02/13 by Ben.Marsh EC: Add support for starting builds on any agent type. Mapping from agent types to resource pools is stored in an EC property sheet (/Generated/<Stream>/AgentTypes), allowing EC procedures to map it to a resource pool from a parameter. Change 3300600 on 2017/02/13 by Ben.Marsh EC: Add the -ClearHistory argument to UAT run to export BuildGraph settings, to allow running on incremental workspaces. Change 3300624 on 2017/02/13 by Ben.Marsh Switch incremental builds for all streams to start up on the incremental agent. Change 3302134 on 2017/02/14 by Steve.Robb UnrealCodeAnalyzer removed. #fyi ben.marsh,robert.manuszewski Change 3302639 on 2017/02/14 by Ben.Zeigler Fix crash cooking odin with default command line #jira UE-41952 Delete StealthTeleport map that crashes on load, and update default cook list that gets used if nothing specified Change 3303002 on 2017/02/14 by Ben.Zeigler #jira UE-41061 Fix it so editor only filtering on savepackage is uniformly applied regardless of if it's at package or object level #jira UE-41880 Rewrite editor/client/server only filtering logic in SavePackage to fix various bugs. It now does all of the filtering up front, and won't process any filtered objects for imports or exports Rename NotForEditorGame to NotAlwaysLoadedForEditorGame and improve comments, this flag says that the asset should be loaded EVEN IF it is editor only, it does not affect loading for normal objects Change the non-map cook flags to RF_Public instead of RF_Standalone. Blueprint classes aren't RF_Standalone so were only being cooked before due to an accident of the dependency checker Change it so anything with a Transient outer is marked transient at save time. These objects would not save out properly anyway Fix it so -cooksinglepackage works properly again and excludes localization and startup packages Tested with Fortnite and Odin, Odin works but with lots of warnings with nativization on which I need to investigate Change 3303084 on 2017/02/14 by Ben.Zeigler Attempt to get Nativization and EDL working without warnings Change 3305153 on 2017/02/15 by Ben.Zeigler Fix Fortnite and Orion cook, I don't understand why this passed my local testing Fix the CDO subobject finder to actually return things instead of doing nothing, and fix a shadow variable warning Change 3305959 on 2017/02/16 by Gil.Gribb UE4 - Tweaked out the EDL loader for the switch with benefits to all platforms. Change 3306159 on 2017/02/16 by Ben.Marsh Fix path to target binaries when building non-monolithic in a unique build environment. Change 3306584 on 2017/02/16 by Steve.Robb UEnum internal functions renamed from Index to Value. GetValueAsString_Internal() parameter now takes an int64, as is expected for enum values. #fyi ben.zeigler Change 3307836 on 2017/02/16 by Ben.Zeigler #jira UE-42055 Load very old redirects in cooked builds. Matinee has no way of resaving redirects, so as long as matinee exists we need to keep them around forever, or fix matinee manually Fixes lighting in Infiltrator demo Change 3307929 on 2017/02/16 by Ben.Zeigler #jira UE-42055 Second half of matinee redirector fix Change 3308840 on 2017/02/17 by Matthew.Griffin Reimplementing CL#3305808 from 4.15 Changed QA label build process so that it only allows version with 3 components (we always add the .0 for initial releases) Change 3309115 on 2017/02/17 by Ben.Marsh Windows: Fix the GetModulesDirectory() function always returning the engine binaries directory. It's possible to build non-monolithic targets which output all engine binaries to the game binaries directory - a requirement to being able to set game-specific defines or build settings, because we don't want shared engine binaries to be tainted with them. The module manager needs to be able to operate early on, before many of the game settings have been initialized, so just return the directory containing the Core module instead. Change 3309120 on 2017/02/17 by Ben.Marsh Fix support for creating modular builds which don't use the shared build environment. Change 3309125 on 2017/02/17 by Ben.Marsh Require that -CookDir arguments are specified separately on the command line. '+' is a valid path character (and common in build versions), so we shouldn't treat it as an argument separator. Change 3309128 on 2017/02/17 by Ben.Marsh Fix UnrealPak failures when enumerating all files from a source directory, if that directory happens to contain spaces. Change 3309131 on 2017/02/17 by Ben.Marsh Fix list of discovered assets being cleared by second call to FindFilesRecursive() when building DDC. Disable the -cookdir parameter again. Change 3309140 on 2017/02/17 by Ben.Marsh UAT: Fix exception moving a file from one location to another if the target directory does not exist. Change 3309212 on 2017/02/17 by Ben.Marsh Fixes/improvements for mod editor and code mods: * A separate top-level project is generated for each code mod in the Visual Studio solution. * Plugin descriptors now have a flag to identify themselves as mod as opposed to a regular game plugin, which prevents project plugins from getting their own VS project. New mods created with the mod editor will have this set by default, as do the three existing sample mods. * Cleaning and building code mods will never modify engine binaries. Presence of the Engine/Build/InstalledProjectBuild.txt file is used to indicate running in this environment. This flag also disables options to edit metadata for non-mod plugins in installed builds. * Plugin browser now includes a separate category for mods. * Mod editor now behaves as an "installed" program by default, and will use the user's home folder for storing settings. Change 3309231 on 2017/02/17 by Steve.Robb Fix for Ar << bSomeBool where Ar is a derived class which overrides an operator<<. #jira UE-42052 Change 3309248 on 2017/02/17 by Ben.Marsh Add support for hot-reloading game plugin modules from Visual Studio, as long as their module returns IsGameModule() = true. Change 3309257 on 2017/02/17 by Ben.Marsh Prevent game binaries from being renamed for hot reload when working with installed projects. Change 3309355 on 2017/02/17 by Steven.Hutton Changes to make the website compatible with the new database changes. Change 3309371 on 2017/02/17 by Ben.Marsh Fix exception on shutdown when running asset registry with threads disabled. #jira UE-41951 Change 3309389 on 2017/02/17 by Ben.Zeigler #jira UE-42051 Fix ensure and crash when loading a null asset ID via the LoadAsset BP node Change 3309570 on 2017/02/17 by Gil.Gribb UE4 - Switch load time performace tweaks, plus abstracted the IO tracker and handle manager for other platforms and applied it to the PS4. Change 3310039 on 2017/02/17 by Ben.Marsh BuildGraph: Prevent exception when trying to delete a file that does not exist. Change 3311484 on 2017/02/20 by Chris.Wood CrashReportProcess crash add retry logic improvements (CRP v1.2.16) Change 3311600 on 2017/02/20 by Matthew.Griffin Updated StripSymbols functions so that all platforms can deal with the source and target file being the same Change 3311675 on 2017/02/20 by Steve.Robb FNativeClassHeaderGenerator::CurrentSourceFile stack replaced with C++ stack. Change 3311893 on 2017/02/20 by Ben.Marsh UGS: Add support for notifying users if CIS steps fail for content changes. Badges which test content should be listed in the [Notifications] section of the project-specific INI file, through +ContentBadges= lines. Change 3313966 on 2017/02/21 by Ben.Marsh Fix EC parsing of error messages output by the editor in the form "LogXYZ:Error:". Greedy optional subexpression in regex was matching everything until a space, so terminate a colon too. Change 3314398 on 2017/02/21 by Ben.Zeigler #jira UE-42212 Fix shutdown of AnimGraph module to be safer [CL 3315211 by Ben Marsh in Main branch]
2017-02-21 15:51:42 -05:00
PlatformData->PixelFormat = (EPixelFormat)PixelFormatEnum->GetValueByName(*PixelFormatString);
}
else if (Ar.IsSaving())
{
Copying //UE4/Dev-Core to //UE4/Dev-Main (Source: //UE4/Dev-Core @ 3314870) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3284872 on 2017/02/03 by Graeme.Thornton Seperate pak cache granularity from pak signing chunk size Change 3285765 on 2017/02/03 by Graeme.Thornton Fix stats warnings because each slate new loading screen thread has the same stat name, but is assigned to a different thread #jira UE-41478 Change 3286913 on 2017/02/04 by Ben.Marsh IncludeTool: Merging fixes. * Don't remove existing forward declarations unless explicitly instructed to do so. Files are optimized with these declarations in place, so removing them can cause output files to fail to build. It can be a useful separate step though, so expose it as a command-line option instead. * Add a specific option for which files should be output by the tool. Any files which are excluded from this list are treated specially when generating output files, so as to prevent them from causing files to be omitted from other files that include them. Also add an option to force this mode for all headers, for use when testing formatting/include path generation. Change 3287100 on 2017/02/05 by Ben.Marsh UBT: Move platform settings into platform-specific TargetRules objects. Change 3287106 on 2017/02/05 by Ben.Marsh Merge UEBuildPlatformContext into UEBuildPlatform. Now that targets can have platform-specific settings, there is no need to separate a platform class which contains target-specific information. Change 3287398 on 2017/02/06 by Steve.Robb Fix for UHT failing when -WarningsAsErrors and -Verbose are specified together. Change 3287399 on 2017/02/06 by Steve.Robb Log verbosities made more readable in the debugger. Change 3287410 on 2017/02/06 by Steve.Robb Fix for TStructOpsTypeTraits where WithCopy gives a different result between specializing the traits and not providing WithCopy and not specializing the traits at all. #fyi marc.audy Change 3288020 on 2017/02/06 by Ben.Marsh Prevent forward declaration of the ITextData class. We need to include the header for the debugger visualizers to work correctly. Change 3291817 on 2017/02/08 by Steve.Robb New EBlueprintCompileReinstancerFlags used to construct FBlueprintCompileReinstancer, instead of lots of bools. Change 3292090 on 2017/02/08 by Graeme.Thornton Crash fix - don't update font engine services if it was never created #jira UE-33953 Change 3292993 on 2017/02/08 by Ben.Marsh Add an option to disable force-including PCHs for files in the non-unity working set. (bAdaptiveUnityDisablesPCH) Change 3293231 on 2017/02/08 by Ben.Marsh BuildGraph: Allow overriding the changelist that a badge should be displayed for (with the Change="" attribute on the Badge declaration in XML), so the code changelist can be used if necessary. Also link to the failed step if only one has failed. Change 3294213 on 2017/02/09 by Ben.Marsh EC: Allow setting a property on frequent CI jobs that allows us to exclude it from job searches for generating the dashboard. Filtering on the client side is causing dashboard pages to be almost empty. Change 3294753 on 2017/02/09 by Ben.Zeigler #jira UE-41151 Fix UObjectLibrary::RemoveObject to remove from the correct array, and add comment mentioning that the dynamic use of Object Library is semi-deprecated Change 3296070 on 2017/02/09 by Ben.Zeigler Explicitly turn off Copy for a struct that has a linked list internally. I think turning Copy on by default for all non POD Types is pretty risky and is likely to crash for other games. In this case it was being copied for network replication, and it didn't have one defined so the default C++ one copied the linked list and crashed on destruction. Change 3296420 on 2017/02/10 by Graeme.Thornton Remove remaining references to AES_KEY, instead using the encryption key delegates to access the key where needed Refactored encryption and signing key access in unrealpak to make it easier to use Change 3296609 on 2017/02/10 by Ben.Marsh BuildGraph: Fix error running the <Copy> task with an empty "From" argument. * FileSystemReference.IsUnderDirectory() was not correctly handling cases where the directory was a root directory (and has to end in a path separator) * FilePattern.AsDirectoryReference() with an empty token would append a path separator to an empty string, resulting in it referencing the root directory rather than the given base directory. Change 3297440 on 2017/02/10 by Ben.Marsh UBT: Move the FileFilter class into UnrealBuildTool. Change 3297725 on 2017/02/10 by Ben.Zeigler #jira UE-39199 Fix issue with enum value redirects using the wrong short or long name, it now fully supports both. Clean up a lot of confusingly named and broken functions on UEnum: #jira UE-41348 Deprecate FindEnumIndex, GetEnum, GetEnumName, replace with GetIndexByName, GetNameByIndex, and GetNameStringByIndex and clean up warnings #jira UE-38187 Deprecate GetDisplayNameText and GetEnumText, replaced both with GetDisplayNameTextAtIndex which is now callable outside the editor and has a better comment Deprecate FindEnumRedirects and replace with GetIndexByNameString. Fix code to not check the redirects array 5 times per enum lookup Fix GetValueAsString to actually act on a value, not an index. This matches common usage and the function's name While fixing deprecation warnings on internal games, fixed dozens of cases where it was using Index functions when it should have been using Value functions Delete some now redundant enum editor code and pipe everything through UEnum Change 3297979 on 2017/02/10 by Ben.Zeigler Fix issues parsing Enums that are literally the string "None", which is allowed but leads to some odd behavior Change 3298299 on 2017/02/10 by Steve.Robb TTuple improvements: - equality comparable - serializable - in the correct folder 2-tuples are specialized to be syntactically compatible with both TPair and TTuple. TPair is now an alias for a 2-tuple and is no longer bound to TPairInitializer. #fyi robert.manuszewski,ben.marsh Change 3298460 on 2017/02/11 by Ben.Marsh UGS: Set the correct result from running custom tasks. Change 3298462 on 2017/02/11 by Ben.Marsh UBT: Fix some deprecated messages that have the wrong release version, and add a better message for how ModuleRules constructors need to be updated. Change 3299447 on 2017/02/13 by Graeme.Thornton Fix AES and pak signing key embedding for content only projects - Force temp target when any keys are specified by project config Change 3299649 on 2017/02/13 by Steve.Robb PLATFORM_HAS_DEFAULTED_OPERATORS fixed. Other obsolete compiler switches removed. Change 3299787 on 2017/02/13 by Steve.Robb IsAbstract() for testing if a reflected native type contains pure virtual functions. Needed for BP nativization. #fyi robert.manuszewski Change 3300576 on 2017/02/13 by Ben.Marsh EC: Add support for starting builds on any agent type. Mapping from agent types to resource pools is stored in an EC property sheet (/Generated/<Stream>/AgentTypes), allowing EC procedures to map it to a resource pool from a parameter. Change 3300600 on 2017/02/13 by Ben.Marsh EC: Add the -ClearHistory argument to UAT run to export BuildGraph settings, to allow running on incremental workspaces. Change 3300624 on 2017/02/13 by Ben.Marsh Switch incremental builds for all streams to start up on the incremental agent. Change 3302134 on 2017/02/14 by Steve.Robb UnrealCodeAnalyzer removed. #fyi ben.marsh,robert.manuszewski Change 3302639 on 2017/02/14 by Ben.Zeigler Fix crash cooking odin with default command line #jira UE-41952 Delete StealthTeleport map that crashes on load, and update default cook list that gets used if nothing specified Change 3303002 on 2017/02/14 by Ben.Zeigler #jira UE-41061 Fix it so editor only filtering on savepackage is uniformly applied regardless of if it's at package or object level #jira UE-41880 Rewrite editor/client/server only filtering logic in SavePackage to fix various bugs. It now does all of the filtering up front, and won't process any filtered objects for imports or exports Rename NotForEditorGame to NotAlwaysLoadedForEditorGame and improve comments, this flag says that the asset should be loaded EVEN IF it is editor only, it does not affect loading for normal objects Change the non-map cook flags to RF_Public instead of RF_Standalone. Blueprint classes aren't RF_Standalone so were only being cooked before due to an accident of the dependency checker Change it so anything with a Transient outer is marked transient at save time. These objects would not save out properly anyway Fix it so -cooksinglepackage works properly again and excludes localization and startup packages Tested with Fortnite and Odin, Odin works but with lots of warnings with nativization on which I need to investigate Change 3303084 on 2017/02/14 by Ben.Zeigler Attempt to get Nativization and EDL working without warnings Change 3305153 on 2017/02/15 by Ben.Zeigler Fix Fortnite and Orion cook, I don't understand why this passed my local testing Fix the CDO subobject finder to actually return things instead of doing nothing, and fix a shadow variable warning Change 3305959 on 2017/02/16 by Gil.Gribb UE4 - Tweaked out the EDL loader for the switch with benefits to all platforms. Change 3306159 on 2017/02/16 by Ben.Marsh Fix path to target binaries when building non-monolithic in a unique build environment. Change 3306584 on 2017/02/16 by Steve.Robb UEnum internal functions renamed from Index to Value. GetValueAsString_Internal() parameter now takes an int64, as is expected for enum values. #fyi ben.zeigler Change 3307836 on 2017/02/16 by Ben.Zeigler #jira UE-42055 Load very old redirects in cooked builds. Matinee has no way of resaving redirects, so as long as matinee exists we need to keep them around forever, or fix matinee manually Fixes lighting in Infiltrator demo Change 3307929 on 2017/02/16 by Ben.Zeigler #jira UE-42055 Second half of matinee redirector fix Change 3308840 on 2017/02/17 by Matthew.Griffin Reimplementing CL#3305808 from 4.15 Changed QA label build process so that it only allows version with 3 components (we always add the .0 for initial releases) Change 3309115 on 2017/02/17 by Ben.Marsh Windows: Fix the GetModulesDirectory() function always returning the engine binaries directory. It's possible to build non-monolithic targets which output all engine binaries to the game binaries directory - a requirement to being able to set game-specific defines or build settings, because we don't want shared engine binaries to be tainted with them. The module manager needs to be able to operate early on, before many of the game settings have been initialized, so just return the directory containing the Core module instead. Change 3309120 on 2017/02/17 by Ben.Marsh Fix support for creating modular builds which don't use the shared build environment. Change 3309125 on 2017/02/17 by Ben.Marsh Require that -CookDir arguments are specified separately on the command line. '+' is a valid path character (and common in build versions), so we shouldn't treat it as an argument separator. Change 3309128 on 2017/02/17 by Ben.Marsh Fix UnrealPak failures when enumerating all files from a source directory, if that directory happens to contain spaces. Change 3309131 on 2017/02/17 by Ben.Marsh Fix list of discovered assets being cleared by second call to FindFilesRecursive() when building DDC. Disable the -cookdir parameter again. Change 3309140 on 2017/02/17 by Ben.Marsh UAT: Fix exception moving a file from one location to another if the target directory does not exist. Change 3309212 on 2017/02/17 by Ben.Marsh Fixes/improvements for mod editor and code mods: * A separate top-level project is generated for each code mod in the Visual Studio solution. * Plugin descriptors now have a flag to identify themselves as mod as opposed to a regular game plugin, which prevents project plugins from getting their own VS project. New mods created with the mod editor will have this set by default, as do the three existing sample mods. * Cleaning and building code mods will never modify engine binaries. Presence of the Engine/Build/InstalledProjectBuild.txt file is used to indicate running in this environment. This flag also disables options to edit metadata for non-mod plugins in installed builds. * Plugin browser now includes a separate category for mods. * Mod editor now behaves as an "installed" program by default, and will use the user's home folder for storing settings. Change 3309231 on 2017/02/17 by Steve.Robb Fix for Ar << bSomeBool where Ar is a derived class which overrides an operator<<. #jira UE-42052 Change 3309248 on 2017/02/17 by Ben.Marsh Add support for hot-reloading game plugin modules from Visual Studio, as long as their module returns IsGameModule() = true. Change 3309257 on 2017/02/17 by Ben.Marsh Prevent game binaries from being renamed for hot reload when working with installed projects. Change 3309355 on 2017/02/17 by Steven.Hutton Changes to make the website compatible with the new database changes. Change 3309371 on 2017/02/17 by Ben.Marsh Fix exception on shutdown when running asset registry with threads disabled. #jira UE-41951 Change 3309389 on 2017/02/17 by Ben.Zeigler #jira UE-42051 Fix ensure and crash when loading a null asset ID via the LoadAsset BP node Change 3309570 on 2017/02/17 by Gil.Gribb UE4 - Switch load time performace tweaks, plus abstracted the IO tracker and handle manager for other platforms and applied it to the PS4. Change 3310039 on 2017/02/17 by Ben.Marsh BuildGraph: Prevent exception when trying to delete a file that does not exist. Change 3311484 on 2017/02/20 by Chris.Wood CrashReportProcess crash add retry logic improvements (CRP v1.2.16) Change 3311600 on 2017/02/20 by Matthew.Griffin Updated StripSymbols functions so that all platforms can deal with the source and target file being the same Change 3311675 on 2017/02/20 by Steve.Robb FNativeClassHeaderGenerator::CurrentSourceFile stack replaced with C++ stack. Change 3311893 on 2017/02/20 by Ben.Marsh UGS: Add support for notifying users if CIS steps fail for content changes. Badges which test content should be listed in the [Notifications] section of the project-specific INI file, through +ContentBadges= lines. Change 3313966 on 2017/02/21 by Ben.Marsh Fix EC parsing of error messages output by the editor in the form "LogXYZ:Error:". Greedy optional subexpression in regex was matching everything until a space, so terminate a colon too. Change 3314398 on 2017/02/21 by Ben.Zeigler #jira UE-42212 Fix shutdown of AnimGraph module to be safer [CL 3315211 by Ben Marsh in Main branch]
2017-02-21 15:51:42 -05:00
FString PixelFormatString = PixelFormatEnum->GetNameByValue(PlatformData->PixelFormat).GetPlainNameString();
Ar << PixelFormatString;
}
int32 NumMips = PlatformData->Mips.Num();
int32 FirstMip = 0;
int32 LastMip = NumMips;
TArray<uint32> SavedFlags;
if (Ar.IsSaving())
{
// Force resident mips inline
SavedFlags.Empty(NumMips);
for (int32 MipIndex = 0; MipIndex < NumMips; ++MipIndex)
{
SavedFlags.Add(PlatformData->Mips[MipIndex].BulkData.GetBulkDataFlags());
PlatformData->Mips[MipIndex].BulkData.SetBulkDataFlags(BULKDATA_ForceInlinePayload | BULKDATA_SingleUse);
}
// Don't save empty Mips
while (FirstMip < NumMips && PlatformData->Mips[FirstMip].BulkData.GetBulkDataSize() <= 0)
{
FirstMip++;
}
for (int32 MipIndex = FirstMip + 1; MipIndex < NumMips; ++MipIndex)
{
if (PlatformData->Mips[FirstMip].BulkData.GetBulkDataSize() <= 0)
{
// This means there are empty tail mips, which should never happen
// If it does, simply don't save any mips after this point.
LastMip = MipIndex;
break;
}
}
int32 NumMipsSaved = LastMip - FirstMip;
Ar << NumMipsSaved;
}
if (Ar.IsLoading())
{
Ar << NumMips;
LastMip = NumMips;
PlatformData->Mips.Empty(NumMips);
for (int32 MipIndex = 0; MipIndex < NumMips; ++MipIndex)
{
PlatformData->Mips.Add(new FTexture2DMipMap());
}
}
uint32 LockFlags = Ar.IsSaving() ? LOCK_READ_ONLY : LOCK_READ_WRITE;
for (int32 MipIndex = FirstMip; MipIndex < LastMip; ++MipIndex)
{
FTexture2DMipMap& Mip = PlatformData->Mips[MipIndex];
Ar << Mip.SizeX;
Ar << Mip.SizeY;
int32 BulkDataSizeInBytes = Mip.BulkData.GetBulkDataSize();
Ar << BulkDataSizeInBytes;
if (BulkDataSizeInBytes > 0)
{
void* BulkMipData = Mip.BulkData.Lock(LockFlags);
if (Ar.IsLoading())
{
int32 ElementCount = BulkDataSizeInBytes / Mip.BulkData.GetElementSize();
BulkMipData = Mip.BulkData.Realloc(ElementCount);
}
Ar.Serialize(BulkMipData, BulkDataSizeInBytes);
Mip.BulkData.Unlock();
}
}
// Restore flags
if (Ar.IsSaving())
{
for (int32 MipIndex = 0; MipIndex < NumMips; ++MipIndex)
{
PlatformData->Mips[MipIndex].BulkData.SetBulkDataFlags(SavedFlags[MipIndex]);
}
}
}
}
void UExampleTextureCacheBuilder::OnAssetPreLoad()
{
// Create an object to load the data into
UTexture2D* NewTexture = NewObject<UTexture2D>();
NewTexture->PlatformData = new FTexturePlatformData();
NewTexture->NeverStream = true;
SetAsset(NewTexture);
}
void UExampleTextureCacheBuilder::OnAssetPostLoad()
{
Texture->UpdateResource();
}
int64 UExampleTextureCacheBuilder::GetSerializedDataSizeEstimate()
{
int64 DataSize = sizeof(FTexturePlatformData);
Copying //UE4/Dev-Framework to //UE4/Dev-Main (Source: //UE4/Dev-Framework @ 3779049) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 3626305 by Phillip.Kavan #jira UE-49269 - Workaround fix for crash after packaging a nativized QAGame build with all AnimBP assets disabled for nativization by default. Change 3627162 by Phillip.Kavan #jira UE-49239 - Fix an invalid cast emitted to nativized codegen for converted AnimBP types. - Regression introduced in CL# 3613358. Change 3756887 by Ben.Zeigler #jira UE-52380 Fix inconsistency with how FSoftObjectPtr case is managed between FLinkerSave and FArchiveSaveTagImports, which would cause a cook ensure under some circumstances Copy of CL #3756788 Change 3756888 by Ben.Zeigler #jira UE-45505 Fix issue where FCoreUObjectDelegates::OnAssetLoaded was being called from an inner loop inside EndLoad. Maps would register components from that callback, and if those registers started their own loads, those objects would be returned in a partially loaded state. We now defer the asset loaded callback to the very end of the loop so recursive loads work properly Copy of CL #3753986 #thomas.sarkanen Change 3759254 by Ben.Zeigler Disable the duplicate PrimaryAssetId for editor only types like Maps. This can happen if content folk copy maps using the content browser, and does not actually cause a runtime problem. It still ensures for cooked types Change 3759278 by Ben.Zeigler Add IsTempPackage to FPackageName Fix issue where temp/memory packages shown in a content browser/asset audit window would spam the log when it failed to find source control info for them Change 3759613 by Phillip.Kavan Add support for casting between mismatched soft pointer types in nativized Blueprint C++ assignment statements and function calls. Change summary: - Extended FEmitHelper::GenerateAutomaticCast() to consider soft pointer terms and inject C++ code to explicitly cast the RHS when needed. #jira UE-52205 Change 3760040 by Dan.Oconnor Add Call Stack control for viewing Blueprint call stacks when paused at a breakpoint, available from the Developer Tools menu #jira UE-2296 Change 3760955 by Phillip.Kavan Fix conditional (SA/CIS issue). Change 3761356 by Ben.Zeigler Fix DLC staging rules to handle metadata correctly and remove debug log I accidentally added. The DLC staging now iterates in a similar way to the normal staging, it just may also excluded Engine Change 3761859 by Zak.Middleton #ue4 - Fix crash in UStaticMesh::GetAssetRegistryTags() when FindObject is used during saving. Added Lex::ToString for physics enums ECollisionTraceFlag, EPhysicsType, and EBodyCollisionResponse. #jira UE-52478 #tests QA game, content browser Change 3761860 by mason.seay Submitting test content for Async Load issue Change 3762559 by Ben.Zeigler #jira UE-52407 Fix it so FText can be specified in blueprint functions as default parameters. The UI showed up before but the data was lost Change GetDefaultsAsString on Pin to always return an internal string so it can correctly be import texted, add GetDefaultsAsText for display purposes Change 3764459 by Marc.Audy PR #4224: Fix LoadLevelInstanceBySoftObjectPtr (Contributed by phlknght) #jira UE-52415 Change 3764580 by Ben.Zeigler Clean up delegates in UObjectGlobals.h, fixing several incorrect comments and moving some editor delegates into WITH_EDITOR Change 3764602 by Ben.Zeigler #jira UE-52487 Fix it so OnAssetLoaded gets correctly called for Assets that were async loaded while in the editor/standalone editor game. This is necessary because they would not get registered with various editor systems for the rest of the editor session, even if opened manually Change 3764603 by Ben.Zeigler Related to UE-52487, now that async loading blueprints in the editor properly registers them with the blueprint actions, we need to unregister them when automated tests want them to unload. Add a ClearEditorReferences function to UBlueprint that calls the OnUnloaded editor delegate, so EngineTest doesn't need to include the editor module Change 3764768 by Ben.Zeigler #jira UE-52524 Fix null access crash when pasting an invalid macro instance node Change 3766415 by Fred.Kimberley Removing invalid assets. Most of these are out of date. Change 3766417 by Fred.Kimberley Add warnings when we try to export a package without a type. Change 3766514 by Fred.Kimberley Added a #include to fix the build. Change 3766542 by Fred.Kimberley Added a #include to fix the build. Change 3766558 by Fred.Kimberley Rename variables to avoid warnings about hiding previous variable declarations. Change 3767619 by Marc.Audy bActorIsBeingDestroyed must be part of transaction history #jira UE-51796 Change 3767993 by Dan.Oconnor Preserve graph editor controls when clicking on a hyper link, this speeds up navigation via the debugger 'step' command and Find in Blueprints control #jira UE-52596 Change 3768146 by Marc.Audy Fix material instance dynamic not correctly finding object in details panel customization as a result soft path changes #jira UE-52488 Change 3769586 by Marc.Audy Fix expose on spawn related error messages Change 3769863 by Dan.Oconnor Blueprint call stack now has access to frame offsets and can highlight nodes that are active on previous stack frames #jira UE-52452 Change 3771200 by Dan.Oconnor CIS fix - add missing DO_BLUEPRINT_GUARD Change 3771555 by Ben.Zeigler Add transactions for several pin class changing actions which were missing them Change 3771589 by Ben.Zeigler #jira UE-52665 Fix it so changing the type of a create widget or spawn actor node will correctly propagate the type change to reroute/wildcard nodes instead of disconnecting Change 3771683 by Dan.Oconnor Call Stack polish: background color no longer changes when undocked, prettify-ing "ExecuteUbergraph_blahblah" in to "Event Graph", resizing works correctly, added overlay message when no call stack is available #jira UE-52567 Change 3771734 by Dan.Oconnor Add entries for native code in the blueprint call stack view, clarifying re-entrancy Change 3774293 by Ben.Zeigler #jira UE-52665 Minimal fix for making sure type changes propagate through multiple rerout nodes, going to make a larger refactor in a second checkin Change 3774328 by Ben.Zeigler #jira UE-52665 Refactor knot nodes so there is one type propagation function that takes a direction, this fixes an issue where the second knot node in a chain would not have it's type changed when input type changed Change 3774342 by Ben.Zeigler #jira UE-52661 Fix crash when using blueprinted components created by a specialized subclass of UBlueprint, from PR #4249 Change 3774476 by Fred.Kimberley Add class and function info to pin names for async nodes. This fixes a problem where redirectors for async node pins did not work. https://udn.unrealengine.com/questions/402882/propertyredirect-fails-with-uk2node-latentgameplay.html?childToView=403808 Change 3774645 by Ben.Zeigler #jira UE-41743 Fix it so struct split pins handle renames correctly, both for user structs and native structs Refactor the variable rename checking in make/break struct to use the generic one I just added Change 3775412 by Phillip.Kavan UX improvements for Blueprint single-step debugging and breakpoints. Also added Step Out and Step Over debugging commands. Change summary: - Remapped the existing Step In command from F10 to F11 hotkey. - Mapped existing Step Over command to F10 and existing Step Out command to ALT-SHIFT-F11 hotkeys. - Added new (repurposed) icon assets for single-step debugging toolbar commands. - Modified FPlayWorldCommands::BuildToolbar() to add new Step Over and Step Out commands to the toolbar. - Modified FCompilerResultsLog::CalculateStableIdentifierForLatentActionManager() to remove special-case code for intermediate Tunnel Instance nodes, as these are now reverse-mapped through FullSourceBacktrackMap. - Modified FKismetDebugUtilities::CheckBreakConditions() to more generally manage the current graph stack (i.e. not just for Blueprint Function graphs). Also fixed a bug where we had failed to reset the target graph stack depth after completing a Step Out/Over iteration. - Modified FBlueprintDebugData::FindAllCodeLocationsFromSourceNode() to remove the additional iteration for the special Macro source node table (no longer required). - Modified FBlueprintDebugData::RegisterNodeToCodeAssociation() to remove the Macro-specific parameters and the additional insertions into the special Macro tables (no longer required). - Modified UK2Node_MathExpression::ValidateNodeDuringCompilation() to remove the special-case for Macro Instance source nodes, as Macro source nodes are now being mapped through the same table. - Added FindMatchingTunnelInstanceNode() as a utility method for now in BlueprintConnectionDrawingPolicy.cpp in order to match up Macro/Composite graph source nodes with nested Tunnel Instance nodes at the current graph level. *** TODO: For 4.19 we probably should revert back to using a secondary table in the debug data to map Tunnel Instance node hierarchies to code offsets in order to result in a faster lookup time here. *** - Modified FKismetConnectionDrawingPolicy::BuilldExecutionRoadmap() to replace the special-case for Macro Instance source nodes with a more general check for Tunnel Instance nodes that also handles Composite source nodes. - Revised UK2Node_TunnelBoundary to strip out most of what was being used to support the profiler, while keeping its basic compiled goto behavior in order to still function as a NOP node. - Added FKismetCompilerContext::SpawnIntermediateTunnelBoundaryNodes(). - Modified FKismetCompilerContext::ExpandTunnelsAndMacros() to no longer overwrite intermediate Macro source node mappings in the lookup table with the Macro Instance source node that triggered the Macro graph expansion. Also revised the TunnelNode case to spawn intermediate TunnelBoundary (NOP) nodes around Macro and Composite gateways; this allows breakpoints to hit on the Tunnel nodes around a source graph expansion. - Modified FScriptBuilderBase::EmitInstrumentation() to remove special-case handling for Macro and Tunnel source nodes. These are now being mapped directly through the SourceBacktrackMap instead. - Removed alternate breakpoint icon assets for Macro Instance and Composite nodes (no longer needed). - Removed UK2Node::GetActiveBreakpointToolTipText() and its UK2Node_MacroInstance override (no longer required). - Removed special case in SGraphNodeK2Base::GetOverlayBrushes() for Macro Instance and Composite nodes (no longer needed). - Removed special-case mappings and interface methods for Tunnel nodes in FCompilerResultsLog (no longer required). - Removed the LineNumberToMacroSourceNodeMap and LineNumberToMacroInstanceNodeMap members from the FDebuggingInfoForSingleFunction struct (no longer in use). - Removed FBlueprintDebugData::FindMacroSourceNodeFromCodeLocation() and FindMacroInstanceNodesFromCodeLocation(). - Removed FKismetDebugUtilities::FindMacroSourceNodeForCodeLocation() (no longer in use). - Removed special-case handling for Macro Instance nodes in FKismetDebugUtilities::OnScriptException() (no longer required). Macro source nodes are no longer being mapped to code offsets through a separate table, and we don't need to worry about saving/restoring the Active Object when debugging with a Macro Graph in the active tab. #jira UE-2880 #jira UE-16817 Change 3776606 by mason.seay Updated content to prevent warning from appearing Change 3777051 by Dan.Oconnor ComponentTemplate references in UBlueprint can no be cleared after compiling the (blueprint defined) component #jira UE-52484 Change 3777108 by Dan.Oconnor Look up call stack frame source name when caching a script call stack for display. This relies on debug data being generated for event stubs #jira UE-52717, UE-52719 Change 3778277 by Marc.Audy Fixed potential null material reference causing crash. #jira UE-52803 Change 3778288 by Marc.Audy PR #3957: Making FAlphaBlend BlueprintType in order to fix a bunch of broken UPROPERTY's as of 4.17 (Contributed by ill) #jira UE-49082 Change 3778321 by Phillip.Kavan Fix for a regression in BP script execution behavior related to misidentified latent node expansions from a macro source graph. Change summary: - Removed FCompilerResultsLog::FullSourceBacktrackMap (no longer in use). - Restored FCompilerResultsLog::IntermediateTunnelNodeToTunnelInstanceMap (which was in place prior to CL# 37754112); this table was being used to map intermediate nodes resulting from a tunnel instance node expansion back to the outer tunnel instance node that triggered the expansion. Its once again being used for that reason, but I reduced the scope a bit to only include the execution path within the expansion, as that's the only mapping that we need. - Restored FCompilerResultsLog::RegisterIntermediateTunnelNode(), but renamed it to NotifyIntermediateTunnelNode() to be consistent with the other parts of the MessageLog interface, and also removed the part of the implementation that was adding to a secondary macro expansion-to-source backtrack map (since macro expansion node lookup is now done through the main source backtrack map). - Restored FCompilerResultsLog::GetIntermediateTunnelInstance(). - Modified FCompilerResultsLog::NotifyIntermediateObjectCreation() to remove the part of the implementation that was adding to the secondary node-only-to-source backtrack map (it was previously just a redundant copy of the main one except in the case of macro expansions). - Modified FCompilerResultsLog::CalculateStableIdentifierForLatentActionManager() to restore the calculation of a stable UUID for nodes sourced from a macro expansion, where we had incorporated the outer intermediate tunnel instance node chain. #jira UE-52872 Change 3778329 by Marc.Audy PR #4241: Enforce calling superclass on ActorComponent::BeginPlay (Contributed by rlefebvre) #jira UE-52574 Change 3778349 by Marc.Audy Minor cleanup Change 3759702 by Ben.Zeigler #jira UE-52287 Prevent cook metadata like DevelopmentAssetRegistry.bin from being packed into a shipping game, by moving it into a Metadata subdirectory and updating deployment scripts to avoid that directory. Right now it doesn't package them at all, we could change it to package them as Debug Non-UFS if desired Change it so the asset audit UI will only load DevelopmentAssetRegistry.bin files, the cooked registry files don't have enough information any more to be useful Remove ability for runtime game to load DevelopmentAssetRegistry.bin, this ended up not being useful #jira UE-52158 Fix it to refresh the list of possible asset audit platforms when the refresh button is pushed Change 3766414 by Fred.Kimberley Data validation plugin Change 3769923 by Ben.Zeigler #jira UE-30347 Change ResourceSize mode enum from Inclusive to EstimatedTotal, which includes UObject serialization data as well as data for any subobjects. It now does NOT include externally referenced assets, which it did for some assets but not others Fix Texture EstimatedTotal memory to handle LOD bias, it now reports the largest possible size in a cooked game of any platform Fix many GetResourceSizeEx calls to match the new definition and improve accuracy Switched several editor tools to use EstimatedTotal now that it is more useful, and removed some unused memory stats Remove ResourceSize from UObject asset registry tags as it was misleading and inaccurate, for now it is only possible to get this for loaded objects Remove MapFileSize from Worlds as it redundant with the generic file size. Fixed the generic file size to display using the Size format Several UI fixes for Asset Audit and Size Map to deal with this change. Asset Audit no longer has the memory size columns, and the memory size drop down in Size Map is disabled for cooked builds Change 3771365 by Ben.Zeigler #jira UE-52670 Add project setting bValidateUnloadedSoftActorReferences that is true by default to match current behavior. If you set it to false it will no longer load packages to look for soft actor references when deleting/renaming actors. [CL 3779057 by Marc Audy in Main branch]
2017-11-29 16:03:05 -05:00
DataSize += sizeof(FString) + (sizeof(TCHAR) * 12); // Guess the size of the pixel format string (most are less than 12 characters, but we don't need to be exact)
DataSize += Texture->GetResourceSizeBytes(EResourceSizeMode::EstimatedTotal); // Size of all the mips
DataSize += (sizeof(int32) * 3) * Texture->GetNumMips(); // Each mip stores its X and Y size, and its BulkDataSize
return DataSize;
}