Files
UnrealEngineUWP/Engine/Source/Runtime/XmlParser/Private/XmlFile.cpp

814 lines
19 KiB
C++
Raw Normal View History

// Copyright Epic Games, Inc. All Rights Reserved.
#include "XmlFile.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 "Misc/FileHelper.h"
#include "Misc/ScopeExit.h"
FXmlFile::FXmlFile(const FString& InFile, EConstructMethod::Type ConstructMethod)
: RootNode(nullptr), bFileLoaded(false)
{
LoadFile(InFile, ConstructMethod);
}
bool FXmlFile::LoadFile(const FString& InFile, EConstructMethod::Type ConstructMethod)
{
// Remove any file stuff if it already exists
Clear();
// So far no error (Early so it can be overwritten below by errors)
ErrorMessage = NSLOCTEXT("XmlParser", "LoadSuccess", "XmlFile was loaded successfully").ToString();
TArray<FString> Input;
if(ConstructMethod == EConstructMethod::ConstructFromFile)
{
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
// Read and split the file
if (!FFileHelper::LoadFileToStringArray(Input, *InFile))
{
ErrorMessage = NSLOCTEXT("XmlParser", "FileLoadFail", "Failed to load the file").ToString();
ErrorMessage += TEXT("\"");
ErrorMessage += InFile;
ErrorMessage += TEXT("\"");
return false;
}
}
else
{
// Parse input buffer into an array of lines
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
InFile.ParseIntoArrayLines(Input, /*bCullEmpty*/false);
}
// Pre-process the input
PreProcessInput(Input);
// Tokenize the input
TArray<FString> Tokens = Tokenize(Input);
// Parse the input & create the nodes
CreateNodes(Tokens);
// All done with creation, set up necessary information
if(bFileLoaded == true)
{
if(ConstructMethod == EConstructMethod::ConstructFromFile)
{
LoadedFile = InFile;
}
}
else
{
LoadedFile = TEXT("");
RootNode = nullptr;
}
// Now check the status flag of the creation. It may have actually failed, but given us a
// partially created representation
if(bCreationFailed)
{
Clear();
}
return bFileLoaded;
}
FString FXmlFile::GetLastError() const
{
return ErrorMessage;
}
void FXmlFile::Clear()
{
if(bFileLoaded)
{
check(RootNode != nullptr);
RootNode->Delete();
delete RootNode;
RootNode = nullptr;
bFileLoaded = false;
LoadedFile = TEXT("");
ErrorMessage = NSLOCTEXT("XmlParser", "ClearSuccess", "XmlFile was cleared successfully").ToString();
}
}
bool FXmlFile::IsValid() const
{
checkSlow(bFileLoaded ? RootNode != nullptr : RootNode == nullptr);
return bFileLoaded;
}
const FXmlNode* FXmlFile::GetRootNode() const
{
return RootNode;
}
FXmlNode* FXmlFile::GetRootNode()
{
return RootNode;
}
bool FXmlFile::Save(const FString& Path)
{
FString Xml = TEXT("<?xml version=\"1.0\" encoding=\"UTF-8\"?>") LINE_TERMINATOR;
const FXmlNode* CurrentNode = GetRootNode();
if(CurrentNode != nullptr)
{
WriteNodeHierarchy(*CurrentNode, FString(), Xml);
}
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
if (!FFileHelper::SaveStringToFile(Xml, *Path, FFileHelper::EEncodingOptions::ForceUTF8WithoutBOM))
{
ErrorMessage = NSLOCTEXT("XmlParser", "FileSaveFail", "Failed to save the file").ToString();
ErrorMessage += FString::Printf(TEXT("\"%s\""), *Path);
return false;
}
return true;
}
/** Checks if the passed character is a whitespace character */
static bool IsWhiteSpace(TCHAR Char)
{
// Whitespace will be any character that is not a common printed ASCII character (and not space/tab)
if(Char == TCHAR(' ') ||
Char == TCHAR('\t') ||
Char < 32 ) // ' '
{
return true;
}
return false;
}
void FXmlFile::PreProcessInput(TArray<FString>& Input)
{
// Note: This implementation is written simply and will not handle all cases. It
// is made for the simple cases where FXmlFile is to be used.
// Assumptions/Misc:
// - Well-formatted file with 1 entry per line
// - Ignoring versions, encodings, and doctypes
// Remove white space at the beginning of lines
for(int32 i = 0; i < Input.Num(); ++i)
{
int32 NumWhiteSpace = 0;
for(int32 j = 0; j < Input[i].Len(); ++j)
{
if(!IsWhiteSpace(Input[i][j]))
{
break;
}
++NumWhiteSpace;
}
if(NumWhiteSpace > 0)
{
Input[i].MidInline(NumWhiteSpace, MAX_int32, false);
}
}
// Cull any text that can be removed on a line-based parse
for(int32 i = 0; i < Input.Num(); ++i)
{
// Find <!DOCTYPE or <?xml and remove those lines
if(Input[i].StartsWith(TEXT("<!DOCTYPE")) || Input[i].StartsWith(TEXT("<?xml")))
{
Input[i] = TEXT("");
}
}
// Cull any text inside of comments
bool bInComment = false;
int32 CommentLineStart = -1;
int32 CommentIndexStart = -1;
for(int32 i = 0; i < Input.Num(); ++i)
{
if(Input[i].Len() == 3)
{
if(bInComment)
{
if(Input[i][0] == TCHAR('-') && Input[i][1] == TCHAR('-') && Input[i][2] == TCHAR('>'))
{
// Found comment end, perform removal (simply replace all text with whitespace to be ignored by tokenizer)
bInComment = false;
int32 CommentLineEnd = i;
int32 CommentIndexEnd = 2;
WhiteOut(Input, CommentLineStart, CommentLineEnd, CommentIndexStart, CommentIndexEnd);
}
}
}
if(Input[i].Len() < 3)
{
continue;
}
int32 Indx1 = 0, Indx2 = 1, Indx3 = 2, Indx4 = 3;
for(; Indx4 < Input[i].Len(); ++Indx1, ++Indx2, ++Indx3, ++Indx4)
{
// Looking for the start of a comment
if(!bInComment)
{
if(Input[i][Indx1] == TCHAR('<') && Input[i][Indx2] == TCHAR('!') && Input[i][Indx3] == TCHAR('-') && Input[i][Indx4] == TCHAR('-'))
{
// Found comment start, mark it
bInComment = true;
CommentLineStart = i;
CommentIndexStart = Indx1;
}
}
// Looking for the end of a comment
else
{
if( (Input[i][Indx2] == TCHAR('-') && Input[i][Indx3] == TCHAR('-') && Input[i][Indx4] == TCHAR('>')) ||
(Input[i][Indx1] == TCHAR('-') && Input[i][Indx2] == TCHAR('-') && Input[i][Indx3] == TCHAR('>')) )
{
// Found comment end, perform removal (simply replace all text with whitespace to be ignored by tokenizer)
bInComment = false;
int32 CommentLineEnd = i;
int32 CommentIndexEnd = Indx4;
WhiteOut(Input, CommentLineStart, CommentLineEnd, CommentIndexStart, CommentIndexEnd);
}
}
}
}
}
void FXmlFile::WhiteOut(TArray<FString>& Input, int32 LineStart, int32 LineEnd, int32 IndexStart, int32 IndexEnd)
{
if(LineEnd < LineStart)
{
// Error!, malformed file with comment ends
}
// White-out first line
if(LineEnd - LineStart > 0)
{
for(int32 i = IndexStart; i < Input[LineStart].Len(); ++i)
{
Input[LineStart][i] = TCHAR(' ');
}
}
// White-out middle lines
if(LineEnd - LineStart > 1)
{
int32 NumLines = LineEnd - LineStart - 1;
int32 MidStart = LineStart + 1;
for(int32 i = MidStart; i < MidStart + NumLines; ++i)
{
Input[i] = TEXT("");
}
}
// White-out last line
if(LineEnd - LineStart > 0)
{
for(int32 i = 0; i <= IndexEnd; ++i)
{
Input[LineEnd][i] = TCHAR(' ');
}
}
// White-out if comment is only on 1 line
if(LineStart == LineEnd)
{
for(int32 i = IndexStart; i <= IndexEnd; ++i)
{
Input[LineStart][i] = TCHAR(' ');
}
}
}
/** Checks if the passed character is an operator */
static bool CheckTagOperator(const TCHAR* PtrStart, const TCHAR* Ptr, const TCHAR* PtrEnd)
{
checkSlow(PtrStart <= Ptr && Ptr < PtrEnd);
TCHAR Ch = *Ptr;
if(Ch == TCHAR('/'))
{
const TCHAR* PtrNext = Ptr + 1;
if(PtrNext != PtrEnd && *PtrNext == TCHAR('>'))
{
return true;
}
// check either the next or previous chars are tag closures - otherwise, this is just a slash
if(Ptr != PtrStart && *(Ptr - 1) == TCHAR('<'))
{
return true;
}
}
else if(Ch == TCHAR('<') || Ch == TCHAR('>'))
{
return true;
}
return false;
}
/** Checks if the passed character is an operator */
static bool IsPartOfTagOperator(TCHAR Char)
{
if(Char == TCHAR('<') ||
Char == TCHAR('/') ||
Char == TCHAR('>'))
{
return true;
}
return false;
}
/** Checks if the passed character is a quote */
static bool IsQuote(TCHAR Char)
{
return Char == TCHAR('\"');
}
void FXmlFile::Tokenize(FStringView Input, TArray<FString>& Tokens)
{
FString WorkingToken;
ON_SCOPE_EXIT
{
// Add working token if it still exists
if (WorkingToken.Len())
{
Tokens.Add(MoveTemp(WorkingToken));
}
};
enum TOKENTYPE { OPERATOR, STRING } Type = STRING;
bool bInQuote = false;
const TCHAR* PtrStart = GetData(Input);
const TCHAR* PtrEnd = PtrStart + GetNum(Input);
for (const TCHAR* Ptr = PtrStart; Ptr != PtrEnd; ++Ptr)
{
TCHAR Ch = *Ptr;
if(IsWhiteSpace(Ch) && !bInQuote)
{
// End the current token
if(WorkingToken.Len())
{
Tokens.Add(MoveTemp(WorkingToken));
checkSlow(WorkingToken.Len() == 0);
}
continue;
}
// Mark the start of a token
if(!WorkingToken.Len())
{
WorkingToken += Ch;
if(CheckTagOperator(PtrStart, Ptr, PtrEnd))
{
// Add the working token if it's final (ie: ends with '>')
if (Ch == TCHAR('>'))
{
Tokens.Add(MoveTemp(WorkingToken));
checkSlow(WorkingToken.Len() == 0);
}
else
{
Type = OPERATOR;
}
}
else
{
Type = STRING;
}
continue;
}
// Already in a token, so continue parsing
if(Type == OPERATOR)
{
// Still the tag, so add it to the working token
if(CheckTagOperator(PtrStart, Ptr, PtrEnd))
{
WorkingToken += Ch;
// Add the working token if it's final (ie: ends with '>')
if (Ch == TCHAR('>'))
{
Tokens.Add(MoveTemp(WorkingToken));
checkSlow(WorkingToken.Len() == 0);
}
}
// Not a tag operator anymore, so add the old token and start a new one
else
{
Tokens.Add(MoveTemp(WorkingToken));
checkSlow(WorkingToken.Len() == 0);
WorkingToken += Ch;
Type = STRING;
}
}
else // STRING
{
if (IsQuote(Ch))
{
bInQuote = !bInQuote;
}
// Still a string. Allow '>' within a string
if(!CheckTagOperator(PtrStart, Ptr, PtrEnd) || (bInQuote && Ch == TCHAR('>')))
{
WorkingToken += Ch;
}
// Moving back to operator
else
{
Tokens.Add(MoveTemp(WorkingToken));
checkSlow(WorkingToken.Len() == 0);
WorkingToken += Ch;
bInQuote = false;
// Add the working token if it's final (ie: ends with '>')
if (Ch == TCHAR('>'))
{
Tokens.Add(MoveTemp(WorkingToken));
checkSlow(WorkingToken.Len() == 0);
}
else
{
Type = OPERATOR;
}
}
}
}
}
TArray<FString> FXmlFile::Tokenize(const TArray<FString>& Input)
{
TArray<FString> Tokens;
Tokens.Reserve(Input.Num());
for(const FString& Line : Input)
{
Tokenize(Line, Tokens);
}
return Tokens;
}
/** Checks if the passed string is an important tag operator */
static bool IsTagOperator(FString ToCheck)
{
if(ToCheck == TEXT("<") ||
ToCheck == TEXT(">") ||
ToCheck == TEXT("</") ||
ToCheck == TEXT("/>"))
{
return true;
}
return false;
}
void FXmlFile::AddAttribute(const FString& InToken, TArray<FXmlAttribute>& OutAttributes)
{
int32 EqualsIdx;
if(InToken.FindChar(TEXT('='), EqualsIdx))
{
bool bQuotesRemoved = false;
FString Value = InToken.Mid(EqualsIdx + 1);
Value.TrimQuotesInline(&bQuotesRemoved);
// The xml spec allows single and double quotes, so this is a valid case to support: https://www.w3.org/TR/xml/#NT-AttValue
if (!bQuotesRemoved)
{
Value.TrimCharInline('\'', &bQuotesRemoved);
}
if(bQuotesRemoved)
{
int32 AmpIdx;
if(Value.FindChar(TEXT('&'), AmpIdx))
{
Value.ReplaceInline(TEXT("&quot;"), TEXT("\""), ESearchCase::CaseSensitive);
Value.ReplaceInline(TEXT("&amp;"), TEXT("&"), ESearchCase::CaseSensitive);
Value.ReplaceInline(TEXT("&apos;"), TEXT("'"), ESearchCase::CaseSensitive);
Value.ReplaceInline(TEXT("&lt;"), TEXT("<"), ESearchCase::CaseSensitive);
Value.ReplaceInline(TEXT("&gt;"), TEXT(">"), ESearchCase::CaseSensitive);
}
OutAttributes.Add(FXmlAttribute(InToken.Left(EqualsIdx), Value));
}
}
}
FXmlNode* FXmlFile::CreateNodeRecursive(const TArray<FString>& Tokens, int32 StartIndex, int32* OutNextIndex)
{
// Algorithm (Draft):
// - First found token should always be a '<'
// - Extract tag
// - Check next token
// - If '<', recursively deepen
// - If string token, parse until '<' found to recursively deepen
// - Continue parsing until </tag> for self is found
// - Return own constructed node (and index of next starting point
const int32 RecursiveStartIndex = StartIndex;
int32 SavedIndex = StartIndex;
// Get the tag & any attributes
FString Tag;
TArray<FXmlAttribute> Attributes;
bool bInTag = false;
for(int32 i = StartIndex; i < Tokens.Num(); ++i)
{
if(bCreationFailed)
{
break;
}
if(Tokens[i].Len() == 0 || Tokens[i] == TEXT("\n") || Tokens[i] == TEXT("\r") || Tokens[i] == TEXT("\n\r"))
{
continue;
}
// Looking for tag start
if(!bInTag)
{
if(Tokens[i] == TEXT("<"))
{
bInTag = true;
}
else
{
// Error: Found text before any operators (ex: plist>)
bCreationFailed = true;
ErrorMessage = NSLOCTEXT("XmlParser", "MalformedXMLFile", "Malformed Xml File").ToString();
}
}
// Already found tag start, reading inside of it now
else if(bInTag)
{
// Text for the tag
if(!IsTagOperator(Tokens[i]))
{
if(Tag.Len())
{
// this could be an attribute
AddAttribute(Tokens[i], Attributes);
}
else
{
Tag = Tokens[i];
}
}
// Found another tag operator
else
{
// Closing the tag starting
if(Tokens[i] == TEXT(">"))
{
SavedIndex = i + 1; // We want to find the content starting here possibly
break;
}
// Closing the tag and also finalizing it
else if(Tokens[i] == TEXT("/>"))
{
FXmlNode* NewNode = new FXmlNode();
NewNode->Tag = Tag;
NewNode->Attributes = Attributes;
Copying //UE4/Dev-Editor to //UE4/Dev-Main (Source: //UE4/Dev-Editor @ 3279756) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3229490 on 2016/12/09 by Cody.Albert Integrated fix to support named changelists in SVN Change 3229574 on 2016/12/09 by Simon.Tourangeau Fix actor mobility getting changed on scene reimport #jira UE-39102 Change 3229692 on 2016/12/09 by Cody.Albert Fixing an XML Parser assert when parsing a root tag that completes on the same line. #jira UE-30393 Change 3230582 on 2016/12/12 by Matt.Kuhlenschmidt PR #3024: Correct the outdated error message instructions for how to fix being unable to launch on an iOS device. (Contributed by CleanCut) Change 3231470 on 2016/12/12 by Matt.Kuhlenschmidt Eliminate editor sounds that play when you PIE, simulate or possess the player. They get in the way of game sounds, are annoying to hear when you are constantly starting and stopping pie, and flush async loading that the game might be doing when they load. Change 3231475 on 2016/12/12 by Alex.Delesky #jira UE-39023 - Using the High Resolution screenshot tool with the "custom depth as mask" option checked should no longer crash the editor or a PIE viewport when the screen percentage is not set to 100. Change 3231476 on 2016/12/12 by Alex.Delesky #jira UE-39380 - Thumbnails for static meshes in the foliage paint mode window should now update to show the correct mesh if the thumbnail pool has been exhausted. This also increases the number of foliage thumbnals that can exist onscreen at once. Change 3231477 on 2016/12/12 by Alex.Delesky #jira none - Extending the IPluginWizardDefinition interface to allow it to return the descriptor type of the plugin. This fixes a merge conflict from Odin where the new plugin wizard was modified to allow for multiple template selection. Change 3231479 on 2016/12/12 by Alex.Delesky #jira UE-39376 - Changing the number of players or changing the dedicated server options in PIE settings should now always persist on editor shutdown. Change 3231480 on 2016/12/12 by Alex.Delesky #jira UE-39417 - A texture will now match to update a dropped in file if the source path differs from that of the dropped in file Change 3231508 on 2016/12/12 by Alex.Delesky Removing todo comment #jira none Change 3231603 on 2016/12/12 by Matt.Kuhlenschmidt Exposed a 0-1 UV set and the scaled pixel size for Box and Border brushes Also added a material function that exposes all of the current UV sets with nice names instead of indexed coordinates Change 3231618 on 2016/12/12 by Alex.Delesky #jira UE-38732 - When editing a spin box with a delta value, committing the value with the Enter key and then clearing the focus from the spin box will no longer change the internal value to match the snapped value. Change 3231638 on 2016/12/12 by Matt.Kuhlenschmidt Add RF_Transactional to the list of default flags for creating or importing new assets. All should be transactional by default Change 3231642 on 2016/12/12 by Matt.Kuhlenschmidt Brighten up the output log by default Change 3231648 on 2016/12/12 by Alex.Delesky #jira UE-38033 - Selecting a Named Slot that's part of a widget in a Widget Switcher will now show that widget instead of the widget at index 0. This also applies to any content set inside the named slot. Change 3231666 on 2016/12/12 by Alex.Delesky #jira UE-38952 - Widgets that have been copied and pasted into the same hierarchy will now retain the same name in the hierarchy. This does not fix widgets that have been previously copied and pasted from other widgets, nor copies of those widgets. Change 3231674 on 2016/12/12 by Alex.Delesky #jira UE-37106 - When using or simulating touch for Widget Components, the hover/clicked state will now be accurately determined rather than showing hover on initial touch. Change 3231745 on 2016/12/12 by Alex.Delesky Back out changelist 3231477 to fix build error C2259 Change 3232417 on 2016/12/13 by Simon.Tourangeau Add the following attributes to the Editor.Usage.FBX.Import EngineAnalytics event - FBX Version - Filename Hash - Import Type #jira UE-37453 Change 3232477 on 2016/12/13 by Michael.Dupuis #jira UE-39675 : There was an issue when the Neutral Value == the Min or Max value, so we simply prevent using the concept of neutral value if min or max == neutral as it mean you only want a log on one side. Change 3232571 on 2016/12/13 by Alex.Delesky Back out changelist 3231745 #jira none - Extending the IPluginWizardDefinition interface to allow it to return the descriptor type of the plugin. This fixes a merge conflict from Odin where the new plugin wizard was modified to allow for multiple template selection. Change 3232675 on 2016/12/13 by Alexis.Matte Fix a crash when reordering material with a fbx containing unused materials, add a fbx automation test to prevent similar issue. #jira UE-39692 Change 3232975 on 2016/12/13 by Alex.Delesky Fix to build error C2259 for the IPluginWizardDefinition API change. Change 3233146 on 2016/12/13 by Michael.Dupuis #jira UE-38766 : Added eye dropper to select flatten height Fixed a rounding errors resulting in not flattening to the specified height Fixed a rounding error resulting in LandscapeDataAccess::GetTexHeight not always returning the appropriate value Change 3233153 on 2016/12/13 by Alexis.Matte We cannot anymore change the instance override materials array topology, the topology is limited by the mesh materials array #jira UE-38827 Change 3234406 on 2016/12/14 by Matt.Kuhlenschmidt Fix window handle and device context being accessed by scene viewports after the underlying window has been destroyed by the OS. This is an invalid state on linux and using some vr devices. #jira UE-7388 Change 3234485 on 2016/12/14 by Michael.Dupuis tentative build fix for Mac Change 3234495 on 2016/12/14 by Matt.Kuhlenschmidt Made a setting to control if PIE enter and exit sounds are played. Off by default Change 3236709 on 2016/12/15 by Simon.Tourangeau Fix camera export rotation offset #jira UE-34692 #jira UE-39740 Change 3236782 on 2016/12/15 by Jamie.Dale Fixed EmitTermExpr failing to use the correct package ID FBPTerminal::Source used to be set to the pin, however when pins were moved away from being UObjects, FBPTerminal::SourcePin was added and FBPTerminal::Source is typically null. Change 3236853 on 2016/12/15 by Alexis.Matte Fix the serialization of the staticmesh property FMeshSectionInfoMap Change 3236890 on 2016/12/15 by Matt.Kuhlenschmidt Remove old define Change 3239328 on 2016/12/18 by Richard.TalbotWatkin Fixed Focus Viewport action in Static Mesh Viewport. Problem was that the conversion to Orbit Camera for storing the camera position was trashing the desired position during cvamera transitions. Orbit camera position is now only stored at the end of a transition. #jira UE-39825 - Key "F" for Focus acts Sporadically in the Static Mesh Editor Viewport Change 3239660 on 2016/12/19 by Alex.Delesky #jira UE-38968, UE-36826 - Components attached to actors can now be directly scaled to negative values using the transform gizmo for that component. Change 3239662 on 2016/12/19 by Alex.Delesky #jira UE-39007 - The data table row editor now contains a Reset to Default control. Change 3239663 on 2016/12/19 by Alex.Delesky #jira UE-39698 - Importing CSV files will now show the name of the file in the import dialog. Change 3240696 on 2016/12/20 by Michael.Dupuis #jira UETOOL-1009: Added paddiing to columns view Added auto resize of column when double clicking on splitter handle in the header Remove right number alignment after discussion with Matt K. Change 3240758 on 2016/12/20 by Michael.Dupuis added missing non abstract implementation Change 3240782 on 2016/12/20 by Michael.Dupuis Added missing documentation for content browser column auto resizing Change 3240817 on 2016/12/20 by Alex.Delesky #jira UE-38940 - Copying a Material-Custom node with a tab character should now correctly render the tab. Change 3240834 on 2016/12/20 by Michael.Dupuis tentative fix for build error Change 3240984 on 2016/12/20 by Michael.Dupuis Removed unnecessary functions Change 3241174 on 2016/12/20 by Matt.Kuhlenschmidt Fix compile errors Change 3241966 on 2016/12/21 by Chris.Wood Fixed Typo and changed execution order in "ComboBoxString" Component [UE-38994] - GitHub 2971 : Fixed Typo and changed execution order in "ComboBoxString" Component PR #2971: Fixed Typo and changed execution order in "ComboBoxString" Component (Contributed by eXifreXi) #github https://github.com/EpicGames/UnrealEngine/pull/2971 Change 3242126 on 2016/12/21 by Alexis.Matte Back out changelist 3236853 We have to back out this change list because the change was implement in the 4.15 release branch and the EditorObjectVersion.h change is now implement in the ReleaseObjectVersion.h. Change 3244492 on 2017/01/02 by Jamie.Dale Improved error message Change 3244545 on 2017/01/02 by Nick.Darnell Navigation - Making it so we don't attempt to load HotReload during shutdown, we only access it if it's still loaded. Change 3244549 on 2017/01/02 by Nick.Darnell Slate - Implementing custom hardware cursor loading across Windows, Mac and Linux and supports loading cursors from PAK files. All platforms support loading PNGs through the FHardwareCursor interface. Some platforms support additional formats, for multiresolution support, but there's a naming convention that can be used on PNGs for the same capability. All of it is documented in the FHardwareCursor header. The platform layer for ICursor, now has support for replacing cursor shapes as an override, and can be reset safely. The FHardwareCursor supports loading cursors from raw pixel buffers as well, the plan is to allow for the option to UTextures to also be used for hardware cursors. Now users through C++ can load and replace the hardware cursors with custom ones of their own, e.g. FSlateApplication::Get().RegisterCursor(EMouseCursor::Default, MakeShareable(new FHardwareCursor(FPaths::GameContentDir() / "Slate/FancyPointer", FIntPoint(0,0)))); The next step is to expose a game friendly layer that supports caching cursors, and letting users change them out by name, without a bunch of destruction of OS resources. Change 3244845 on 2017/01/03 by Jamie.Dale Fixing typo #jira UE-39920 Change 3244903 on 2017/01/03 by Jamie.Dale PR #3044: fix link error when FAssetData::PrintAssetData() is used in project (Contributed by kayama-shift) Change 3245125 on 2017/01/03 by Alexis.Matte Put back the dev-editor version because there was some data create before we back it out Change 3246106 on 2017/01/04 by Chris.Wood Removed broken CrashReportReciever pre-upload phase from CrashReportClient. [UE-40153] - CrashReportClient fails when used in legacy mode with a CrashReportReciever Change 3246251 on 2017/01/04 by Alex.Delesky #jira UE-39869 - Moving an asset before saving it and then hitting Save All from the file menu will no longer save the asset in its original location. Change 3246252 on 2017/01/04 by Alex.Delesky #jira UE-39793 - Fixes an issue with the AutoReimporter where specifying a non-existent mount point (a directory in the content browser) would cause a crash when attempting to auto-import an asset from a monitored directory, as well as ensuring that valid mount points will be able to create new assets from auto-import. The "Map Directory To" field when setting directories to monitor for auto-reimport has also been changed to use the content browser path picker instead of relying on the user to manually enter a mount point. Change 3247620 on 2017/01/05 by Nick.Darnell Automation - Removing an adjustment to the number of shots we take for high res shots. Change 3247621 on 2017/01/05 by Nick.Darnell Automation - Adding a few more rendering tests to the cornell box. Change 3247629 on 2017/01/05 by Nick.Darnell Automation - Improving the comparison row display for screenshots so it's obvious what each image represents. Change 3248811 on 2017/01/05 by Matt.Kuhlenschmidt PR #3091: Removed unnecessary UPackage casts (Contributed by projectgheist) Change 3248860 on 2017/01/06 by Matt.Kuhlenschmidt Made the plugin browser select the "built in" category by default instead of the 2D category. There is no reason for a sub-category to be selected first as it makes searching for plugins globally an extra click because you have to click on the base category first Change 3249264 on 2017/01/06 by Matt.Kuhlenschmidt Fixed automation test warnings #jira UE-40198 Change 3249481 on 2017/01/06 by Michael.Dupuis #jira UE-37875 : Fill empty layers of components on assignation or creation Also fill new component added with the tool from neighbours predominance Change 3249505 on 2017/01/06 by Matt.Kuhlenschmidt PR #3093: Include guard cleanup (Contributed by projectgheist) Change 3249544 on 2017/01/06 by Michael.Dupuis #jira UE-40299: validate if UISettings is valid Change 3250738 on 2017/01/09 by Nick.Darnell UMG - The WIC now checks if the Widget is enabled before it claims that it's over an interactable or keyboard focusable widget. #jira UE-39845 Change 3250865 on 2017/01/09 by Nick.Darnell Slate - Updating EAutoCenter and ESizingRule to use the newer enum class style enums. Change 3250867 on 2017/01/09 by Nick.Darnell Slate - Adding more logging to the hardware cursor code so that it reports more information when it doesn't find an exact match when it comes to cursor size. Change 3250936 on 2017/01/09 by Nick.Darnell Automation - Refactoring the screenshot comparison tool to no longer require one one generated report. Doing screenshot comparions now generates individual reports for each failed comparison so that they can be evaluated in bits, and as changes occur as the user reviews aspects, we can remove the reports. There is now async image loading for the comparison view so that it doesn't hitch. Change 3250937 on 2017/01/09 by Nick.Darnell Automation - Adding another example to the CornellBox test. Change 3250958 on 2017/01/09 by Nick.Darnell Slate - Fixing some other cases where people were referring to ESizingRule::Type. Change 3251162 on 2017/01/09 by Nick.Darnell Slate - Fixing some other cases where people were referring to ESizingRule::Type. Change 3251254 on 2017/01/09 by Matt.Kuhlenschmidt Attempt to fix static analysis warnings Change 3251373 on 2017/01/09 by Nick.Darnell Core - Now writing a log warning instead of ensuring if calling LoadModule wouldn't have been safe to do here, depending on load order. Change 3251525 on 2017/01/09 by Nick.Darnell Automation - Fixing a build issue in ImageComparer. Change 3252321 on 2017/01/10 by Alex.Delesky #jira UE-40164 - Importing multiple files to overwrite existing assets such as sounds will now correctly persist the "Yes to All" / "No to All" dialog selections. Change 3252354 on 2017/01/10 by Nick.Darnell Image Compare - Fixing a potential threading hazard in the image comparer. Change 3252356 on 2017/01/10 by Nick.Darnell Automation - The screenshot metadata now captures the commit/CL that the screenshot was taken at and records it in the metadata. Change 3252601 on 2017/01/10 by Alexis.Matte Fbx automation test, reload feature implementation Change 3252761 on 2017/01/10 by Jamie.Dale Fixing some IWYU errors with PCH disabled Change 3252765 on 2017/01/10 by Jamie.Dale Fixing some static analysis warnings Change 3252793 on 2017/01/10 by Jamie.Dale Fixing FText natvis The text data visualizers have to be defined before the text visualizer Change 3253987 on 2017/01/11 by Matt.Kuhlenschmidt PR #3108: Git Plugin: use asynchronous "MarkForAdd" and "CheckIn" operations for the initial commit (Contributed by SRombauts) Change 3254378 on 2017/01/11 by Matt.Kuhlenschmidt Refactor scene importing to allow for plugins to make scene importers Change 3254679 on 2017/01/11 by Matt.Kuhlenschmidt Fix calling LoadModule in perforce source control off the main thread Change 3256472 on 2017/01/12 by Jamie.Dale Improved error reporting from IncludeTool - The error reporting was using zero-based line indices which was misleading. - The error reporting now includes the offending line to remove ambiguity. Change 3256725 on 2017/01/13 by Jamie.Dale IncludeTool can now parse typedef in Fwd headers Change 3256758 on 2017/01/13 by Jamie.Dale Added support for String Tables String Tables provide a way to centralize your localized text into one (or several) known locations, and then reference the entries within a string table from other assets or code in a robust way that allows for easy re-use of localized text. String Tables can be defined in C++ (using the LOCTABLE family of macros), loaded via CSV file, or created as an asset. They can be referenced in C++ using either the LOCTABLE macro, or the static FText::FromStringTable function. INI files can reference them using the LOCTABLE macro syntax, and FText properties in assets can reference them via the advanced settings combo. Change 3257018 on 2017/01/13 by Alexis.Matte FbxAutomationTest fix the import reload operation, it was calling garbagecollect with no keep flag Change 3257168 on 2017/01/13 by Jamie.Dale Removed code that was writing null into bytecode during save Change 3257344 on 2017/01/13 by Jamie.Dale Backing out changelist 3256725, and excluding my header from the scan instead Change 3257426 on 2017/01/13 by Nick.Darnell Slate - Adding the ability to invert alpha when drawing slate textures. Going to be used in the future for rendering render targets for the scene which have inverted alpha. Change 3257572 on 2017/01/13 by Nick.Darnell Slate - Fixing a build error. Change 3257970 on 2017/01/14 by Jamie.Dale Fixing exclude path Change 3258458 on 2017/01/16 by Matt.Kuhlenschmidt PR #3135: GameViewportClient: FOnCloseRequested is now a multicast delegate (Contributed by Nadrin) Change 3258472 on 2017/01/16 by Matt.Kuhlenschmidt PR #3126: Fix to load editor style assets (Contributed by projectgheist) Change 3258473 on 2017/01/16 by Matt.Kuhlenschmidt PR #3124: Fix wrong result with Image-DrawAsBox with PaperSprite. (Contributed by valval88) Change 3258539 on 2017/01/16 by Nick.Darnell Slate - Pixel Snapping has been moved to the GPU for the RHI rendering policy. Additionally, widgets with a render transform of Scale, Rotation or Sheer, and their children are no longer pixel snapped, this should reduce some of jittering seen by users when animations are applied to widgets. NOTE: This only affects render transforms, any transform in layout space is still subject to pixel snapping. Change 3258607 on 2017/01/16 by Nick.Darnell Fixing the mac build. Change 3258661 on 2017/01/16 by Matt.Kuhlenschmidt Actors with experimental components no longer say "Uses experimental class: Actor" when selecting the actor root in the details panel #jira UE-40535 Change 3258678 on 2017/01/16 by Nick.Darnell Platform - Introducing a way to get the mimetype for a file on Windows. Other platforms don't yet have an implementation outside of returning application/unknown. Change 3258924 on 2017/01/16 by Nick.Darnell Platform - Implementing a fallback for the generic platform http, that can do some basic mimetype lookups. Change 3258929 on 2017/01/16 by Nick.Darnell UMG - Fixing the animation to finish the evaluation before it notifies that the animation completed. Change 3259109 on 2017/01/16 by Nick.Darnell Platform - The GetMimeType function now only takes in FilePath, since some platforms will require that actually resolve to a file on disk in order to determine the true mimetype. Change 3259111 on 2017/01/16 by Alexis.Matte Avoid to move the camera when we re-import in the static mesh editor #jira UE-40613 Change 3259275 on 2017/01/16 by Matt.Kuhlenschmidt Fix crash when a slate window is resized and calls into a scene viewport during loading code when the scene viewport is not in a slate hierarchy and thus has no widget Change 3259300 on 2017/01/16 by Nick.Darnell UMG - Introducing PreConstruct and NativePreConstruct to the base UUserWidget. Users can now visualize non-binding based changes in the designer by evaluating a very limited amount of the blueprint code. In the event your user widget crashes on load, due to calling something unsafe, you can disable evaluation in the editor preferences under Widget Designer. Change 3259306 on 2017/01/16 by Nick.Darnell Games - Removing the Game Specific implementations of PreConstruct. Change 3260182 on 2017/01/17 by Matt.Kuhlenschmidt Fix static analysis Change 3261049 on 2017/01/17 by Nick.Darnell Slate - Putting in some fixes for the non-gpu pixel snapping mode, and disabling gpu snapping while we dig into why it looks weird. Change 3261434 on 2017/01/17 by Nick.Darnell Fixing the mac build. Change 3261435 on 2017/01/17 by Nick.Darnell Slate - Tweaking some aspects of the slate rounding code on the GPU. There's still some precision loss somewhere causing subtle differences in where the snap occurs, that's different from previously. Change 3261460 on 2017/01/17 by Nick.Darnell UMG - Tweaking the defintiions of NativePreConstruct, dropping passing in design time since that is readily available in native code. Change 3261833 on 2017/01/18 by Alexis.Matte Fix all warning for fbx automation tests #jira UE-40208 Change 3261874 on 2017/01/18 by Matt.Kuhlenschmidt PR #3136: Fix Submit to Source Control Window for Git plugin : use CanCheckIn() to filter out unmodified assets files (Contributed by SRombauts) Change 3262000 on 2017/01/18 by Jamie.Dale Updated Slate to allocate widgets using MakeShared This saves one allocation per-widget Change 3262003 on 2017/01/18 by Nick.Darnell UMG - Widget Interaction Components now ignore Visible(false) Widget Components when tracing. #jira UE-40523 Change 3262052 on 2017/01/18 by Alexis.Matte Put back the staticmesh skinxx workflow #jira UE-40782 Change 3262775 on 2017/01/18 by Nick.Darnell Slate - Ditching moving vertex rounding to the GPU, some precision issues could not be overcome. Ended up writing a clean way to implement it on the CPU. Change 3262818 on 2017/01/18 by Alex.Delesky #jira UE-40668 - Editor preferences will now save for data pin styles Change 3263679 on 2017/01/19 by Nick.Darnell Slate - Adding some comments to the Slate Vertex Rounder. Change 3265154 on 2017/01/19 by Nick.Darnell Slate/UMG - Putting in some more time into pixel snapping. I've re-introduced the old constructors, and decided to go with the templated approach, as to not break old code that relied on the FSlateVertex working a certain way. Change 3265478 on 2017/01/20 by Chris.Wood Added config support for hang detection time and switching hang detection on/off in UnrealWatchdog [UE-40838] - Make hang time configurable and increase default in UnrealWatchdog Change 3265600 on 2017/01/20 by Nick.Darnell Slate - Making some const local variables const. Change 3265714 on 2017/01/20 by Alex.Delesky #jira UE-40791 - The ForceFeedback thumbnail's Play and Stop icons will now render correctly, and will only be visible while an effect is playing or when the cursor hovers over the icon. Change 3265865 on 2017/01/20 by Alex.Delesky #jira UE-40511 - The Content Browser file path will now update when inside a folder that is deleted from the Sources Panel. Change 3267989 on 2017/01/23 by Jamie.Dale Exposed String Tables to Blueprints Change 3268018 on 2017/01/23 by Jamie.Dale Small API clean-up for string tables Change 3268455 on 2017/01/23 by Matt.Kuhlenschmidt Fix SaveAs (Which says SaveCurrentAs) not saving the current level and only saving the persistent level and then reloading everything thus causing work to be lost if editing a sub-level #jira UE-40930 Change 3269388 on 2017/01/24 by Chris.Wood Refactored tick timing in UnrealWatchdog to stop bug where it doesn't close. [UE-40839] - UnrealWatchdog running and blocking use of Unreal Game Sync for internal users Standalone tool code only - doesn't touch engine Change 3270205 on 2017/01/24 by Cody.Albert Updated FUnrealEdMisc::OnMessageTokenActivated to properly traverse up the outer hierarchy of an object. Change 3270231 on 2017/01/24 by Cody.Albert Renamed and exposed GetFullScreenAlignment and GetViewportAnchors for consistency with the setters Change 3271734 on 2017/01/25 by Michael.Dupuis #jira UE-38631 Add sorting for landscape target layer, user can now sort alphabetical, material based or custom Added a new vertical box SDragNDropVerticalBox to handle drag & drop of FSlot Fixed SDropTarget to only consider the drop action if it was started by it Added visibility toggle to only show used layers in the currently loaded data Change 3271797 on 2017/01/25 by Jamie.Dale Renamed HasBeenAlreadyMadeSharable to DoesSharedInstanceExist as the old name was nonsense Change 3271813 on 2017/01/25 by Jamie.Dale Fixed bad access of a shared this during widget destruction when a context menu was open Change 3271988 on 2017/01/25 by Nick.Darnell Slate - Removing some old checkbox deprecated code from the 4.3 and 4.6 days. Change 3271992 on 2017/01/25 by Nick.Darnell Blueprints - Making the checked call better to log out more information when dragging and dropping a missing property. Change 3272134 on 2017/01/25 by Jamie.Dale Updated the GatherText commandlet to no longer hold a ConfigFile pointer while it runs This pointer is internal to GConfig, and may be updated (or invalidated) when other config files are loaded (as can happen via game code while gathering text). Change 3272301 on 2017/01/25 by Nick.Darnell Slate - More cleanup from the removal of a old legacy enum that people were still using. Change 3273070 on 2017/01/26 by Chris.Wood Fix CIS errors in landscape code from CL 3271734 Change 3273123 on 2017/01/26 by Chris.Wood Fix crash during init of CRC when running packaged without access to main engine config hierarchy. Change 3273194 on 2017/01/26 by Nick.Darnell Fixing some build warnings. Change 3273242 on 2017/01/26 by Michael.Dupuis #jira UE-39948 : if we detect there is multiple levels in the current persistent when we add a new foliage asset we ask to save the foliage as an asset to permit paiting over multiple levels Change 3273279 on 2017/01/26 by Jamie.Dale String Table INI redirects are now in the "Core.StringTable" section (rather than "/Script/Engine.Engine") Change 3273483 on 2017/01/26 by Alex.Delesky #jira UE-32047 - Made changes to the FixupRedirects commandlet to ensure that files that are marked for delete are moved from the default changelist to the pending changelist and submitted when using Perforce. Also makes a slight change to the ResavePackages commandlet to submit files marked for delete. Change 3273568 on 2017/01/26 by Alex.Delesky Modifying changes made to SPluginWizard to have the plugin loading phase determined by the wizard's definition rather than from the first selected template. #jira none Change 3273855 on 2017/01/26 by Alex.Delesky #jira UE-41117 - Updating the tooltip on the "Allow Paint of all LODs" option for mesh paint mode. Change 3274200 on 2017/01/26 by Alex.Delesky For IPluginWizardDefinition, temporarily adding function bodies to two methods instead of having them be pure virtual methods. Change 3274317 on 2017/01/26 by Jamie.Dale Deleting a seemingly corrupted asset that was accidentially submitted Change 3275072 on 2017/01/27 by Michael.Dupuis #jira UE-38631 tweaks Fix typo error Iterate all components, not only active one Force expand the Target Layers widget Change 3275249 on 2017/01/27 by Alexis.Matte Color grading controls: Keep the vector ratio when changing the master slider #jira UETOOL-1098 Change 3275282 on 2017/01/27 by Alexis.Matte Color grading controls: Cosmetic changes #jira UETOOL-1099 Change 3275292 on 2017/01/27 by Alexis.Matte Make sure the build is called once when we import a staticmesh. #jira UE-40947 Change 3275430 on 2017/01/27 by Alexis.Matte Add some fbx automation tests - Import a mesh with no material - Import corrupted asset with no section in a LOD - Import morph targets - Materials name clash - Max Multimap material ordering Change 3275683 on 2017/01/27 by Michael.Dupuis #jira UE-41215 : when saving an asset do not register the transaction, and make sure that the duplicate wont keep a copy in the transaction buffer as an asset can't be undo Change 3276237 on 2017/01/27 by Jamie.Dale Deleting a seemingly corrupted asset that was accidentially submitted Change 3276266 on 2017/01/27 by Jamie.Dale Fix for accessing a potentially null pointer Change 3277065 on 2017/01/30 by Chris.Wood Move crash report temp files to saved config and cleanup on schedule. [UE-39506] - CrashReportClient ini folders are not cleaned when opening the editor Change 3277236 on 2017/01/30 by Matt.Kuhlenschmidt Fix crash when cancelling SaveCurrentLevelAs #jira UE-41182 Change 3277409 on 2017/01/30 by Jamie.Dale Improved text rendering when the last resort font is missing The last resort font is no longer included in shipping builds, so this change makes some improvements to text rendering when it's missing. - The legacy font cache no longer tries to use the last resort font if it's not available (preventing warnings). - The Slate font renderer no longer tries to use the last resort font if it's not available. - Text shaping will use the last resort character if none of the available fonts can render a given character (likely because the last resort font is missing). - HarfBuzz shaped text now uses the fallback character correctly. Change 3277749 on 2017/01/30 by Nick.Darnell Slate - Moving ESlateDrawEffect & ESlateBatchDrawFlag over to be enum class, found cases where users were improperly assuming the enum order, and so now it won't be possible to just treat an int32 or a bool as the draw effect value. Core - Adding EnumHasAllFlags and EnumHasAnyFlags, templated functions to make it easier to check for the existance of a flag on enum classes. Change 3277805 on 2017/01/30 by Nick.Darnell Rendering - Changing some LoadModuleChecked calls to GetModuleChecked, as these calls are not happening on the main thread and are not safe to make. Change 3277914 on 2017/01/30 by Matt.Kuhlenschmidt Fix Niagara slate style warning on startup Change 3278058 on 2017/01/30 by Matt.Kuhlenschmidt Fixed compile error Change 3278132 on 2017/01/30 by Nick.Darnell Fixed compile error Change 3278133 on 2017/01/30 by Matt.Kuhlenschmidt Fixed compile errors Change 3278186 on 2017/01/30 by Nick.Darnell Fixed compile error Change 3278525 on 2017/01/30 by Nick.Darnell Fixed compile error Change 3278534 on 2017/01/30 by Nick.Darnell Automation - Clearing up several warnings/errors with automation results, trying to get Automation Tests to at least yellow before integration. Change 3278941 on 2017/01/31 by Nick.Darnell Fixing a build warning due to build team refactor. Change 3278949 on 2017/01/31 by Nick.Darnell Fixing incrmenetal build issues. Change 3278953 on 2017/01/31 by Nick.Darnell Fixing some incrmental linux build issues. Change 3278964 on 2017/01/31 by Nick.Darnell FIxing more incremental build issues. Change 3279256 on 2017/01/31 by Michael.Dupuis #jira UE-41319 #jira UE-41315 #jira UE-41316 Instead of getting the Landscape Actor, call GetLandscapeProxy so all case are handled, either proxy or landscape actor Change 3279270 on 2017/01/31 by Chad.Garyet re-updating the automation test pool [CL 3279775 by Matt Kuhlenschmidt in Main branch]
2017-01-31 15:22:49 -05:00
if (OutNextIndex != nullptr)
{
*OutNextIndex = i + 1;
}
return NewNode;
}
// Error
else
{
// Error: malformed file (ex: <key<)
bCreationFailed = true;
ErrorMessage = NSLOCTEXT("XmlParser", "MalformedXMLFile", "Malformed Xml File").ToString();
}
}
}
}
// Create a new node for the current tag
FXmlNode* NewNode = new FXmlNode();
NewNode->Tag = Tag;
NewNode->Attributes = Attributes;
// Got the tag. Continue and try to get the content
FString Content;
FString FinalTag;
bInTag = false;
for(int32 i = SavedIndex; i < Tokens.Num(); ++i)
{
if(bCreationFailed)
{
break;
}
if(Tokens[i].Len() == 0 || Tokens[i] == TEXT("\n") || Tokens[i] == TEXT("\r") || Tokens[i] == TEXT("\n\r"))
{
continue;
}
if(!bInTag)
{
// Found the start of another tag
if(Tokens[i] == TEXT("<"))
{
// Recursively enter function creating a child at the new tag
FXmlNode* Child = nullptr;
if (i > RecursiveStartIndex)
{
Child = CreateNodeRecursive(Tokens, i, &SavedIndex);
}
// Save child to parent
if(Child != nullptr)
{
NewNode->Children.Add(Child);
}
// Error creating a child
else
{
// Some error occurred in creating a child. The algorithm should abort
bCreationFailed = true;
ErrorMessage = NSLOCTEXT("XmlParser", "MalformedXMLFile", "Malformed Xml File").ToString();
break;
}
// Continue algorithm at the returned index
i = SavedIndex - 1; // (-1) because continuing will increment i;
continue;
}
// Found what should be the end of the current tag
else if(Tokens[i] == TEXT("</"))
{
// Continue, getting the tag and checking to make sure it matched
bInTag = true;
}
// Error
else if(IsTagOperator(Tokens[i]))
{
// Error: Invalid token such as '<key>>'
bCreationFailed = true;
ErrorMessage = NSLOCTEXT("XmlParser", "MalformedXMLFile", "Malformed Xml File").ToString();
}
// Not an operator, save the text
else
{
if(Content.Len() > 0)
{
Content += TEXT(" ");
}
Content += Tokens[i];
}
}
// In the finalizing tag
else
{
// Text for the tag
if(!IsTagOperator(Tokens[i]))
{
if(FinalTag.Len())
{
// Ignore this bit of text then (they may be like options or modifiers or some such)
}
else
{
FinalTag = Tokens[i];
}
}
else
{
// Found the end of the final tag
if(Tokens[i] == TEXT(">"))
{
// Error: Tag and ending tag don't match
if(Tag != FinalTag)
{
// Error: Tag and ending tag don't match
bCreationFailed = true;
ErrorMessage = NSLOCTEXT("XmlParser", "MalformedXMLFile", "Malformed Xml File").ToString();
}
// Check to make sure tags match and create the node and return it
SavedIndex = i + 1;
if(OutNextIndex != nullptr) // Might be null because of the top-level node not sending it in
{
*OutNextIndex = SavedIndex;
}
NewNode->Content = Content;
return NewNode;
}
// Error
else
{
// Error: malformed file (ex: <key>stuff</key/>)
bCreationFailed = true;
ErrorMessage = NSLOCTEXT("XmlParser", "MalformedXMLFile", "Malformed Xml File").ToString();
}
}
}
}
// Something bad happened, return NULL!
delete NewNode;
return nullptr;
}
void FXmlFile::HookUpNextPtrs(FXmlNode* Node)
{
if(Node == nullptr)
{
return;
}
for(int32 i = 0; i < Node->Children.Num(); ++i)
{
HookUpNextPtrs(Node->Children[i]);
if(i != Node->Children.Num() - 1)
{
Node->Children[i]->NextNode = Node->Children[i + 1];
}
}
}
void FXmlFile::CreateNodes(const TArray<FString>& Tokens)
{
// Assumption..There is only 1 top-level node which contains everything inside of it
bCreationFailed = false;
FXmlNode* Root = CreateNodeRecursive(Tokens, 0);
if(Root)
{
bFileLoaded = true;
// Hook up next ptrs
HookUpNextPtrs(Root);
// Save it
RootNode = Root;
}
else
{
bFileLoaded = false;
ErrorMessage = NSLOCTEXT("XmlParser", "NodeCreateFail", "Failed to parse the loaded document").ToString();
}
}
void FXmlFile::WriteNodeHierarchy(const FXmlNode& Node, const FString& Indent, FString& Output)
{
// Write the tag
Output += Indent + FString::Printf(TEXT("<%s"), *Node.GetTag());
for(const FXmlAttribute& Attribute: Node.GetAttributes())
{
FString EscapedValue = Attribute.GetValue();
EscapedValue.ReplaceInline(TEXT("&"), TEXT("&amp;"), ESearchCase::CaseSensitive);
EscapedValue.ReplaceInline(TEXT("\""), TEXT("&quot;"), ESearchCase::CaseSensitive);
EscapedValue.ReplaceInline(TEXT("'"), TEXT("&apos;"), ESearchCase::CaseSensitive);
EscapedValue.ReplaceInline(TEXT("<"), TEXT("&lt;"), ESearchCase::CaseSensitive);
EscapedValue.ReplaceInline(TEXT(">"), TEXT("&gt;"), ESearchCase::CaseSensitive);
Output += FString::Printf(TEXT(" %s=\"%s\""), *Attribute.GetTag(), *EscapedValue);
}
// Write the node contents
const FXmlNode* FirstChildNode = Node.GetFirstChildNode();
if(FirstChildNode == nullptr)
{
const FString& Content = Node.GetContent();
if(Content.Len() == 0)
{
Output += TEXT(" />") LINE_TERMINATOR;
}
else
{
Output += TEXT(">") + Content + FString::Printf(TEXT("</%s>"), *Node.GetTag()) + LINE_TERMINATOR;
}
}
else
{
Output += TEXT(">") LINE_TERMINATOR;
for(const FXmlNode* ChildNode = FirstChildNode; ChildNode != nullptr; ChildNode = ChildNode->GetNextNode())
{
WriteNodeHierarchy(*ChildNode, Indent + TEXT("\t"), Output);
}
Output += Indent + FString::Printf(TEXT("</%s>"), *Node.GetTag()) + LINE_TERMINATOR;
}
}