Commit Graph

43 Commits

Author SHA1 Message Date
wouter burgers
8ff2c6c41f SourceControl: Add start/finish delegates to AssetViewUtils sync operations.
[REVIEW] [at]dave.belanger, [at]manuel.lang, [at]brooke.hubert
#preflight none

#localization none
#tests manual

[CL 24412834 by wouter burgers in ue5-main branch]
2023-02-24 19:03:48 -05:00
stuart hill
60cdf1962c When moving an asset to a different folder in the Editor, do not show the "Check Out Assets" dialog if the Automatically Checkout on Asset Modification option is selected.
Moving an asset can replace the original asset with a redirector, so the source control system will consider the asset in the old location to be modified and the asset in the new location to be added.

#preflight 63e400085c0ce8f11b030df3

[CL 24090216 by stuart hill in ue5-main branch]
2023-02-08 22:01:06 -05:00
wouter burgers
0aa122ff5c SourceControl: Added notification if sync fails when getting latest, similar to the warning shown by FSourceControlWindows::PromptForCheckin for checkin fails.
In addition, I refactored AssetViewUtils::SyncPathsFromSourceControl somewhat.
- Added alternative (preferred) way to get affected files/packages using the FSyncPreview operation as opposed to querying the AssetRegistry.
- Added support for hot reloading the world if one of its external packages (actor/object) got synced so those changes are reflected in the viewport.
- Added support for passing in either content paths or absolute paths to sync.

- Deprecated the 'bIsSyncLatestOperation' parameter from SyncPackagesFromSourceControl.

Note that SyncPackagesFromSourceControl now has a single internal caller (FAssetSourceControlContextMenuState::ExecuteSCCSync).
Note that SyncPathsFromSourceControl now has a single internal caller (FSourceControlWindows::SyncLatest).

[REVIEW]
#preflight 63e3a014244dc45a201c918d

[CL 24074948 by wouter burgers in ue5-main branch]
2023-02-08 12:17:26 -05:00
jamie dale
5fa5b98920 Added additional FPackageName::ObjectPathToX functions
The following functions are new:
 - ObjectPathToPathWithinPackage, eg) "/Game/MyAsset.MyAsset:SubObject.AnotherObject" -> "MyAsset:SubObject.AnotherObject"
 - ObjectPathToOuterPath, eg) "/Game/MyAsset.MyAsset:SubObject.AnotherObject" -> "/Game/MyAsset.MyAsset:SubObject"
 - ObjectPathToSubObjectPath, eg) "/Game/MyAsset.MyAsset:SubObject.AnotherObject" -> "SubObject.AnotherObject"

The behavior of ObjectPathToObjectName has also been fixed to always return the leaf-most object name within the path (eg, "/Game/MyAsset.MyAsset:SubObject.AnotherObject" -> "AnotherObject"). Any code that relied on the old behavior should use ObjectPathToSubObjectPath instead.

#preflight 63e2677e1020773a3f32f55b
#rb Matt.Peters

[CL 24057677 by jamie dale in ue5-main branch]
2023-02-07 15:29:21 -05:00
wouter burgers
192829d351 SourceControl: Refactored UsesCustomProjectDir / GetSourceControlLocations usage pattern.
[CL 23965223 by wouter burgers in ue5-main branch]
2023-02-02 03:44:18 -05:00
stuart hill
df6df596f7 Ensure the camera does not reset when we are syncing or reverting a file or all files via source control
A scoped class is added to retain and restore all camera views which is used when we reload or sync packages.

#preflight 63d2766de55deff624ed1b5a

[CL 23867883 by stuart hill in ue5-main branch]
2023-01-26 10:15:04 -05:00
marco anastasi
96fdec112c Fixed: SkeinUE does not sync latest if only non-package files have changed
[REVIEW] [at]manuel.lang, [at]wouter.burgers

[CL 23821510 by marco anastasi in ue5-main branch]
2023-01-23 16:16:19 -05:00
marco anastasi
b29f599449 * Refactored Sync Latest operation to improve performance
* Sync Latest no longer listing and reloading all packages when the source control provider provides a sync preview functionality. When a Sync Preview is available, Sync Latest unloads only the files that are going to be overwritten by the sync operation, and then reloads them and the world

* Refactored Revert All operation to improve performance
* Revert All no longer lists and reloads all packages when the source control provider provides a sync preview functionality. Instead it unloads only the files that may be overwritten by the revert operation (i.e. submittable files), and then reloads them and the world
* Replaced RevertAndReloadAllPackages with RevertAndReloadWorld, no longer listing and reloading all packages (see https://p4-swarm.epicgames.net/reviews/23244245/)

This review is a combination of the two archived reviews https://p4-swarm.epicgames.net/reviews/23736137 and https://p4-swarm.epicgames.net/reviews/23736282

#rb wouter.burgers, stuart.hill, brooke.hubert, francis.hurteau
#preflight 63c9c7786a00f3cc8ead6779

[CL 23796067 by marco anastasi in ue5-main branch]
2023-01-20 15:31:16 -05:00
Patrick Boutot
6e02de5817 Fix memstomp with color picker. Prepare SColorPicker for API change. Update AssetViewUtilis::PathColors to use FLinearColor instead of shared pointer. The shared pointer was only needed for the SColorPicker.
#jira UE-173303, UE-173454
#review-23672715 23617361,23611673
#rb daren.cheng
#preflight 63c0b12b1a06fc61059f2fa3

[CL 23672712 by Patrick Boutot in ue5-main branch]
2023-01-12 20:33:08 -05:00
wouter burgers
591eb1d989 SourceControl: Applied fix to AssetViewUtils::SyncPackagesFromSourceControl which was previously applied to AssetViewUtils::SyncPathsFromSourceControl in #20222478.
#preflight none

[CL 23475564 by wouter burgers in ue5-main branch]
2022-12-11 23:21:26 -05:00
stuart hill
9311376d2d Add the process of storing and restoring the camera location and rotation when source control is syncing packages
If a sync with source control reloads the map then it will perform a camera reset.
We can improve the user experience by restoring the camera position and rotation to prevent the camera moving each time a user syncs.

#rb Marco.Anastasi, wouter.burgers
#preflight 637cbe28fa348e8480c94440

[CL 23235166 by stuart hill in ue5-main branch]
2022-11-22 10:05:36 -05:00
henrik karlsson
fa90b399a4 Added includes for future change. This changelist only contains added #include and a couple of empty placeholder files
Tested compiling fortnite, unrealeditor, lyra, qagame with non-unity/pch

#preflight 63635997876630122adeab9f
#rb none

[CL 22958990 by henrik karlsson in ue5-main branch]
2022-11-03 14:18:47 -04:00
christian savoie
adba372f50 Move Source control menu bindings into AssetManagerEditor so they appear on all menus that operate on assets (i.e. Asset menu in editors).
* Force uncached status update if any items in selected aren't up-to-date
* Removed Refresh option since it's done every time the menu is opened
* Make Source control menu update state asynchronously so menu doesn't stall
* Update Checkout to Sync and Checkout so it can all be done at once
* Add Partial Checkout state when files are selected and show users locking files in tooltip
* Add options to Make Writeable and Revert Writeable
* Add error state if source control is unavailable
* Hide options, like checkout, that are not available for the current SCC provider
* Always show all options so users can learn bettern muscle memory
* Add Warning when doing any source control option on selections larger than 25 (currently hardcoded)
* There's still some slight difference in behavior between file and folder selection. If only files are selected the async update will not show any options availabe until the full scan is done and there are some additional features like partial checkout. If there are any folders then options become available the moment one asset is available for an action.

#tests Tested all button scenarios, tested small and large sets of folders, assets and a mix.

[CL 22918013 by christian savoie in ue5-main branch]
2022-11-02 11:47:25 -04:00
dave belanger
6480013ab3 FResultMessage cleanup
#rb Scott.Nelson
#preflight 635aa14e4710dd6af8575766

[CL 22823551 by dave belanger in ue5-main branch]
2022-10-28 00:30:20 -04:00
JeanFrancois Dube
ae4e553a4b Convert usage of GIsEditorLoadingPackage to TGuardValue.
#jira none
#rb sebastien lussier
#preflight 633ad2ea2a5690003a0e03f4

[CL 22298365 by JeanFrancois Dube in ue5-main branch]
2022-10-03 08:33:10 -04:00
scott nelson
b0eb92d8b4 Add new EditorDelegate OnPreAssetDestructiveAction
#preflight 63349d8e141f314ed6017ae3
#rb Julien.StJean

[CL 22244134 by scott nelson in ue5-main branch]
2022-09-29 02:24:24 -04:00
robert millar
f278cf318f FNames containing asset paths are deprecated. FSoftObjectPath or FTopLevelAssetPath should be used instead.
Fixups for AssetTools.

#jira UE-161932
#rb none
#preflight 631f7fce5f25b56420615fc1

[CL 21976429 by robert millar in ue5-main branch]
2022-09-12 19:54:11 -04:00
jamie dale
1cac2e67c1 Fixed incorrect cook path length for plugins mounted from outside of the engine/project directory, and removed a bunch of temporary FString instances
#preflight 62d89ca4110da0f944819d32
#rb Jason.Stasik
#rnx

#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 21199916 via CL 21200683 via CL 21200747 via CL 21200772
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21202831 by jamie dale in ue5-main branch]
2022-07-21 12:27:36 -04:00
marc audy
0edc19c939 Duplicating assets should keep a perforce relationship to the original file
#rb Brooke.Hubert
#jira

#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 21119014 via CL 21119416 via CL 21119491
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21142516 by marc audy in ue5-main branch]
2022-07-17 22:46:56 -04:00
jason stasik
d238bcf377 Add global name filter across editor for asset paths
#rb dave.belanger
#preflight 6296ad96545b9a93abbddd73

#ROBOMERGE-AUTHOR: jason.stasik
#ROBOMERGE-SOURCE: CL 20454648 via CL 20454680 via CL 20454686 via CL 20454689
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v952-20449836)

[CL 20460837 by jason stasik in ue5-main branch]
2022-06-01 18:12:39 -04:00
robert manuszewski
d1443992e1 Deprecating ANY_PACKAGE.
This change consists of multiple changes:

Core:
- Deprecation of ANY_PACKAGE macro. Added ANY_PACKAGE_DEPRECATED macro which can still be used for backwards compatibility purposes (only used in CoreUObject)
- Deprecation of StaticFindObjectFast* functions that take bAnyPackage parameter
- Added UStruct::GetStructPathName function that returns FTopLevelAssetPath representing the path name (package + object FName, super quick compared to UObject::GetPathName) + wrapper UClass::GetClassPathName to make it look better when used with UClasses
- Added (Static)FindFirstObject* functions that find a first object given its Name (no Outer). These functions are used in places I consider valid to do global UObject (UClass) lookups like parsing command line parameters / checking for unique object names
- Added static UClass::TryFindType function which serves a similar purpose as FindFirstObject however it's going to throw a warning (with a callstack / maybe ensure in the future?) if short class name is provided. This function is used  in places that used to use short class names but now should have been converted to use path names to catch any potential regressions and or edge cases I missed.
- Added static UClass::TryConvertShortNameToPathName utility function
- Added static UClass::TryFixShortClassNameExportPath utility function
- Object text export paths will now also include class path (Texture2D'/Game/Textures/Grass.Grass' -> /Script/Engine.Texture2D'/Game/Textures/Grass.Grass')
- All places that manually generated object export paths for objects will now use FObjectPropertyBase::GetExportPath
- Added a new startup test that checks for short type names in UClass/FProperty MetaData values

AssetRegistry:
- Deprecated any member variables (FAssetData / FARFilter) or functions that use FNames to represent class names and replaced them with FTopLevelAssetPath
- Added new member variables and new function overloads that use FTopLevelAssetPath to represent class names
- This also applies to a few other modules' APIs to match AssetRegistry changes

Everything else:
- Updated code that used ANY_PACKAGE (depending on the use case) to use FindObject(nullptr, PathToObject), UClass::TryFindType (used when path name is expected, warns if it's a short name) or FindFirstObject (usually for finding types based on user input but there's been a few legitimate use cases not related to user input)
- Updated code that used AssetRegistry API to use FTopLevelAssetPaths and USomeClass::StaticClass()->GetClassPathName() instead of GetFName()
- Updated meta data and hardcoded FindObject(ANY_PACKAGE, "EEnumNameOrClassName") calls to use path names

#jira UE-99463
#rb many.people
[FYI] Marcus.Wassmer
#preflight 629248ec2256738f75de9b32

#codereviewnumbers 20320742, 20320791, 20320799, 20320756, 20320809, 20320830, 20320840, 20320846, 20320851, 20320863, 20320780, 20320765, 20320876, 20320786

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 20430220 via CL 20433854 via CL 20435474 via CL 20435484
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20448496 by robert manuszewski in ue5-main branch]
2022-06-01 03:46:59 -04:00
wouter burgers
88114e6351 SourceControl: Group multiple sync operations in one.
#jira none
#review-20325733
#preflight 628b860bf1421422ea68c927

[CL 20345020 by wouter burgers in ue5-main branch]
2022-05-24 03:37:13 -04:00
julien lheureux
c97187b8c3 Fixed crash on interacting with garbage collected packages after their deletion through a sync in source control.
#rnx
#rb jamie.dale, takashi.suzuki
#preflight 627eb8569650a27733a21686
#jira UE-104597

[CL 20222478 by julien lheureux in ue5-main branch]
2022-05-16 09:03:46 -04:00
Matt Peters
7ad238a806 AssetRegistry includes (Engine/Source): change #include "AssetData.h" -> #include "AssetRegistry/AssetData.h", and similar for the other moved AssetRegistry headers.
#rb Zousar.Shaker
#rnx
#preflight 6270509a220f89f0ad573030

[CL 20016982 by Matt Peters in ue5-main branch]
2022-05-02 18:06:48 -04:00
Patrick Enfedaque
d31019c9e9 - FLinkerInstancingContext: Add Tag support
- Use FLinkerInstancingContext Tag to load all external actors instead of using a global map

#rb richard.malo, jeanfrancois.dube, francis.hurteau
#preflight 624aea29c51908059ae6b82f
#rnx

[CL 19607995 by Patrick Enfedaque in ue5-main branch]
2022-04-04 09:31:43 -04:00