Commit Graph

135 Commits

Author SHA1 Message Date
Marc Audy
36fd352f49 Allow dynamically adding game name redirects at runtime
[CL 2327200 by Marc Audy in Main branch]
2014-10-13 10:41:51 -04:00
Jaroslaw Palczynski
38a2dde054 CIS Fix.
[CL 2325383 by Jaroslaw Palczynski in Main branch]
2014-10-10 07:45:56 -04:00
Jaroslaw Palczynski
cc0f6d9a4e UObject custom constructors.
In order to use new feature user have to change GENERATED_UCLASS_BODY() macro to the new GENERATED_BODY(). Then no constructor is implicitly declared. If there is no constructor declared in UCLASS then PCIP one is declared and defined that passes PCIP down to super-class. On the other hand if there is a constructor declared then UObject system expects to have one of the default or PCIP constructor to initialize a class during loading from disk, default object creation, etc. and it expects that user will declare and define one.

There is a possibility now to create UCLASS with the default constructor (i.e. no PCIP).

New macro is encouraged by standard classes and in-editor wizards templates.

#codereview Robert.Manuszewski

[CL 2325282 by Jaroslaw Palczynski in Main branch]
2014-10-10 04:34:56 -04:00
Mikolaj Sieluzycki
67aba028a0 Make Core module public headers individually compilable. Part 1 of n.
#codereview Robert.Manuszewski

[CL 2325267 by Mikolaj Sieluzycki in Main branch]
2014-10-10 04:14:49 -04:00
Andrew Rodham
4ad1b987fc Improved progress reporting in the editor
FScopedSlowTask has been refactored to better allow for nesting of slow operations. This allows us to cascade nested scopes and provide accurate feedback on slow tasks. FScopedSlowTasks now work together when nested inside sub functions. Break up long functions that contain calls to multiple nested FScopedSlowTasks with FScopedSlowTask::EnterProgressFrame().

Example Usage:
void DoSlowWork()
{
    FScopedSlowTask Progress(2.f, LOCTEXT("DoingSlowWork", "Doing Slow Work..."));
    // Optionally make this show a dialog if not already shown
    Progress.MakeDialog();

    // Indicate that we are entering a frame representing 1 unit of work
    Progress.EnterProgressFrame(1.f);

    // DoFirstThing() can follow a similar pattern of creating a scope divided into frames. These contribute to their parent's progress frame proportionately.
    DoFirstThing();

    Progress.EnterProgressFrame(1.f);
    DoSecondThing();
}

This addresses TTP#338602 - NEEDS REVIEW: Editor progress bars nearly always just show 100%, don't offer useful indication of progress

[CL 2322391 by Andrew Rodham in Main branch]
2014-10-08 04:42:34 -04:00
John Pollard
aafe346f1e Add hooks so game code can detect when demos start playing
[CL 2320365 by John Pollard in Main branch]
2014-10-06 15:58:05 -04:00
Daniel Lamb
715846941d Stopped tick cook on the side from waiting on save package for async cooked items to cache.
Now editor will tick at a decent frame rate while building shaders / caching textures.
#codereview Josh.Adams, Daniel.Wright, Matthew.Griffin

[CL 2318857 by Daniel Lamb in Main branch]
2014-10-03 14:56:20 -04:00
Mikolaj Sieluzycki
c92ca070d1 Move references to UObjects from FCoreDelegates to FCoreUObjectDelegates
TTP #343071 CORE: FCoreDelegates should not have references to UObjects.
#codereview Robert.Manuszewski

[CL 2317144 by Mikolaj Sieluzycki in Main branch]
2014-10-02 06:13:35 -04:00
Michael Noland
cf61cf2c85 Core: Coding-standards fixes (TypeName [*|&] VariableName -> TypeName[*|&] VariableName)
[CL 2316335 by Michael Noland in Main branch]
2014-10-01 14:40:06 -04:00
Jaroslaw Surowiec
00856722fc Stats - Removed unused macros
[CL 2315976 by Jaroslaw Surowiec in Main branch]
2014-10-01 10:59:11 -04:00
Maciej Mroz
367a65a653 BP: FKismetCppBackend - a lot of fixes/improvements:
- Proper code for EventDispatcher
- UFUNCTION macro
- Delegate declaration..

[CL 2314013 by Maciej Mroz in Main branch]
2014-09-30 05:04:55 -04:00
Steve Robb
35c2fea8c4 Cast unification.
* Cast can be used for every UClass/interface cast:
  - Up/down UObject hierarchy.
  - From interfaces to UObjects.
  - From UObjects to interfaces.
  - Between interfaces.
* InterfaceCast has been deprecated.
* dynamic_cast can now be used instead of Cast.
* dynamic_cast between two UType pointers will be equivalent to Cast, but with dynamic_cast syntax and semantics.
* dynamic_cast of references is equivalent to a CastChecked - if it fails, it will fatally log rather than throw a std::bad_cast exception (UE doesn't support exceptions).
* If the two types involved are not UTypes, it should continue to act like a normal dynamic_cast.
* dynamic_cast<void*> works as expected.
* All/many Casts in CoreUObject changed to dynamic_cast to show this behaviour.
* Some refactoring.

#codereview robert.manuszewski,mike.fricker

[CL 2312800 by Steve Robb in Main branch]
2014-09-29 09:24:50 -04:00
Jaroslaw Surowiec
4fd7bd124c CoreUObject - Removed ConditionalShutdownAfterError, replaced with RegisterForShutdownAfterError, which needs to be called if an object requires such funcionality, this change will dramatically reduce the amount of memory required for calling FUObjectShutdown::ShutdownAfterError, from hundreds of MBs to a few KBs
#codereview Robert.Manuszewski

[CL 2312714 by Jaroslaw Surowiec in Main branch]
2014-09-29 06:39:02 -04:00
Jaroslaw Palczynski
65ba5d456f TArray documentation and a coupld of methods deprecation.
Changes mostly in Array.h. The changes in other files are only renames for deprecated functions.

[CL 2312616 by Jaroslaw Palczynski in Main branch]
2014-09-29 04:23:44 -04:00
Jaroslaw Palczynski
2a11232fd7 [GitHub] 332 : Script integration UObject helpers
#ttp 343283

[CL 2312605 by Jaroslaw Palczynski in Main branch]
2014-09-29 04:03:40 -04:00
Jaroslaw Surowiec
86b8450a18 CoreUObject - Added ability to reserve memory for the object annotations
[CL 2309625 by Jaroslaw Surowiec in Main branch]
2014-09-25 07:55:50 -04:00
Cody Haskell
c2b46ae4f0 #UE4
- Adding Native NetSerialize support to FastArrayReplication path
- Changed a few function to take in a UScriptStruct to avoid a cast inside SerializePropertiesForStruct

#codereview John.Pollard

[CL 2308612 by Cody Haskell in Main branch]
2014-09-24 14:30:04 -04:00
Maciej Mroz
f55429024e CPF_EditInline flag removed (replaced by metadata).
CPF_PersistentInstance  flag added.

#codereview Robert.Manuszewski, Nick.Whiting, James.Golding

[CL 2308211 by Maciej Mroz in Main branch]
2014-09-24 09:09:32 -04:00
Robert Manuszewski
343352654a UObjects: no longer require dummy UClasses in UStruct-only modules.
#change Added code to make sure the script package is created before UEnums and UStructs get registered

[CL 2306655 by Robert Manuszewski in Main branch]
2014-09-23 05:12:53 -04:00
David Ratti
13b2cb7683 -Add RepNotify conditions.
-Remove client side equality check for calling repnotifies on custom delta serilaized properties

#code review John.Pollard

[CL 2305741 by David Ratti in Main branch]
2014-09-22 13:09:16 -04:00
Maciej Mroz
8523cb31f0 The CPF_EditInline flag, will force the subobject instance to be persistent, but CLASS_DefaultToInstanced wonÆt imply CPF_EditInline anymore.
#codereview Ben.Zeigler, Robert.Manuszewski

[CL 2305323 by Maciej Mroz in Main branch]
2014-09-22 09:42:15 -04:00
Andrew Rodham
525b290de8 More work to tidy up the target hardware section of the project settings
Applied settings are now written as a string rather than an int
Also added UObject::GetDefaultConfigFilename()

[CL 2305291 by Andrew Rodham in Main branch]
2014-09-22 09:41:38 -04:00
Michael Noland
d01f8b5283 Core: Remove unused bChangesTopology member from FPropertyChangedEvent and removed most uses, in preparation for deprecating the three-argument constructor
#codereview matt.kuhlenschmidt

[CL 2304635 by Michael Noland in Main branch]
2014-09-19 19:00:52 -04:00
Nick Darnell
4dcac38b15 Core - Adding a way in UClasses to check if they contain a UProperty directly in it or a base class.
#codereview Robert.Manuszewski

[CL 2301437 by Nick Darnell in Main branch]
2014-09-17 15:27:27 -04:00
Jamie Dale
b1076751ff Made FName case-preserving by storing case-variant strings in its string table
This is controlled by the macro "WITH_CASE_PRESERVING_NAME", which is currently just set to "WITH_EDITORONLY_DATA" so that it works in editor builds (and UHT).

Added an extra NAME_INDEX entry to FName to store a second string table index for a case-variant string. The previous Index value (now called ComparisonIndex) is still used for comparison purposes (as FNames are still case-insensitive).

The Init process for an FName now works like this:
 1) It will find or add a string table entry for the given string (not matching case) - this entry index is stored in ComparisonIndex.
 2) It will then compare the string table entry string against the given string (matching case) to see if it also needs to add a case-variant entry for the FName.
 3) If it does, it finds or adds a second string table entry (matching case) for the string - this entry index is stored in DisplayIndex.

Hard-coded FNames (those listed in UnrealNames.h) do not support case-variants (due to existing network replication rules for hard-coded FNames), so they skip steps 2 and 3.

I added FMinimalName, which is the same size as FName was previously. This shouldn't really be used (and as such, is deliberately awkward to make/use) as it loses the case-preserving behaviour of FName, however it was required for some things (like stats) that had a hard-coded upper limit on FName size.

I added FScriptName, which always contains the extra display index (even when WITH_CASE_PRESERVING_NAME is disabled). This is used by Blueprint bytecode, as the types used by Blueprint bytecode must be a consistent size between all build configurations.

Other changes:

 - Fixed up any places that were passing an Index into the FName constructor which was supposed to take an EName.
     - Some places were doing this to make the number unique when replicating an object, but this was losing the case-variant information, so I had to fix them.
     - FName will now assert if the EName constructor is used with an value outside the range of hard-coded FNames.

 - Ensured that assets, actors, and blueprint components could all be renamed in a way that only changed their case, and that these changes were correctly persisted.

 - Added FLinkerNamePairKeyFuncs and TLinkerNameMapKeyFuncs for use with TSet and TMap.
     - These allow ULinkerSave and ULinkerLoad to correctly write out case-variants for FNames, and also fixes an issue where the linker would erroneously write out duplicate string table entries for FNames which had a different number (causing package bloat).

 - Bumped VER_MIN_SCRIPTVM_UE4 so that all Blueprint bytecode is recompiled using FScriptName.

ReviewedBy Robert.Manuszewski, Gil.Gribb

[CL 2300730 by Jamie Dale in Main branch]
2014-09-17 05:24:55 -04:00