Commit Graph

1225 Commits

Author SHA1 Message Date
henrik karlsson
b5164ac775 Fixes to make modules compile with IWYU. We've added to IWYU toolchain so it compiles "orphaned" headers which does not have a owning cpp file. This identified lots of headers that couldn't be compiled by themselves (or if they were to included first)
Change consist of only forward declaration and additional includes

#preflight 63789c1de30d438849c48188
#rb none

[CL 23218412 by henrik karlsson in ue5-main branch]
2022-11-21 03:22:23 -05:00
sebastian nordgren
4fd1dc3d47 Clear keyboard focus when setting an empty set of selected objects on an SDetailsView. This commits any pending changes before the widgets are destroyed.
This is necessary because although we register an OnRowReleased handler, we also register a Visibility handler in SDetailsViewBase::GetTreeVisibility(). The OnRowReleased delegate is called when the tree next Ticks(), but when the tree is cleared, it also gets its visibility set to Collapsed, which causes the next Tick() to not occur. Since there's no way to force the tree to Tick(), this is the next best thing.

Added a few trace macros.

#jira UE-162823
[REVIEW] [at]patrick.boutot
#rnx
#preflight 6376176b4f460e024c15a9cf

[CL 23174550 by sebastian nordgren in ue5-main branch]
2022-11-17 07:54:21 -05:00
sebastian nordgren
80f9e46d37 It is now possible to add external objects and hide the object root by specifying an FAddPropertyParams struct.
Reported on UDN.

#review-22858335 @lauren.barnes
#preflight 63738f30953c19d435797310

[CL 23134583 by sebastian nordgren in ue5-main branch]
2022-11-15 08:24:25 -05:00
sebastian nordgren
f440a95f20 IPropertyHandle::GetMetaData and related functions (GetBoolMetaData, etc.) now always check the instance metadata as well. This is what you would expect to happen when calling SetInstanceMetaData, but was only being applied selectively by certain widgets.
Added IPropertyHandle::GetDoubleMetaData().

Reported on UDN.

#rb lauren.barnes
#preflight 6373878332484253052694ab

[CL 23134410 by sebastian nordgren in ue5-main branch]
2022-11-15 07:58:57 -05:00
henrik karlsson
5b96352978 Fixes for c++ headerunits/modules.
* Adding forward declarations
* Adding "inline" in front of const/constexpr variables in headers
* Adding includes
* A few moves of ctor/dtor to cpp file

#preflight 6372b3ac0c74adb48b49f313
#rb none

[CL 23130896 by henrik karlsson in ue5-main branch]
2022-11-14 19:59:41 -05:00
jonathan bard
61d88bb08f Material list improvements:
* Added tooltips to Select material's texture in asset browser button in order to help understanding what this is about when there's no texture referenced by the material
* Disabled the button when there's no texture, since it's basically useless then

#rb jeremy.moore
#preflight 63721e42232e3d12cb4e8b48

[CL 23118414 by jonathan bard in ue5-main branch]
2022-11-14 10:45:51 -05:00
sebastian nordgren
945d078d66 Enabled FStringPrefixTree usage in details view.
Changes from previous submit:
- ExpandedCustomItems uses TStringBuilder::Join()
- FStringPrefixTree::GetAllEntries() uses a const FString& to avoid a potential memcpy crash.
- Added checks to FStringPrefixTree for empty prefixes being added to the tree.
- Fixed bug where re-adding a substring along a node split boundary (eg. "FooFoo", "FooBar", "FooBar") would cause the intermediate node to be marked as a leaf (instead of the child), added tests for it.

[REVIEW] [at]richard.talbotwatkins, [at]paul.chipchase
#rnx
#preflight 636a59dc450be1d9f8261079

[CL 23069417 by sebastian nordgren in ue5-main branch]
2022-11-09 20:53:49 -05:00
sebastian nordgren
edaa38b3f1 FStructurePropertyNode::GetValuePtrOfInstance() no longer checks() if the struct instance has been removed.
This was most apparent with DataTables that used EditConditions that had the EditConditionHides metadata. After clearing the table, the rows would still refresh for a single frame, and the edit condition parser would try to check the edit condition state. However, this would end up calling into FProperty::ContainerPtrToValuePtr(nullptr), which causes a check.

Now, GetValuePtrOfInstance() early outs before making the call.

Reported on UDN.

#review-23009532 @paul.chipchase
#preflight 636a5a9563037c1026442fc9

[CL 23027219 by sebastian nordgren in ue5-main branch]
2022-11-08 09:00:42 -05:00
aurel cordonnier
a67ce59368 [Backout] - CL23010059
[FYI] sebastian.nordgren
Original CL Desc
-----------------------------------------------------------------
Switched expanded nodes in SDetailsViewBase to use FStringPrefixTree.

This improved performance in one test case when calling RestoreExpandedItems() from ~500ms to ~100ms.

[REVIEW] [at]paul.chipchase
#rnx
#preflight 63650cc94b0e01486a51eb06

[CL 23019381 by aurel cordonnier in ue5-main branch]
2022-11-07 17:21:02 -05:00
nick darnell
e3d0199570 Editor - Fixing some indenting issues.
#trivial

[CL 23019370 by nick darnell in ue5-main branch]
2022-11-07 17:20:38 -05:00
sebastian nordgren
a82dc5670e Switched expanded nodes in SDetailsViewBase to use FStringPrefixTree.
This improved performance in one test case when calling RestoreExpandedItems() from ~500ms to ~100ms.

[REVIEW] [at]paul.chipchase
#rnx
#preflight 63650cc94b0e01486a51eb06

[CL 23011519 by sebastian nordgren in ue5-main branch]
2022-11-07 11:00:36 -05:00
sebastian nordgren
1f55cbcc9c Added FStringPrefixTree, which stores a set of strings as a tree of nodes that share common prefixes. This results in far fewer string comparisons if many strings share a common prefix, eg. with property paths.
The set "A.B", "A.C", "B" would result in a tree like this, with the asterisked nodes being leaf nodes:

|- A.
|  |- B *
|  |- C *
|- B *

[REVIEW] [at]paul.chipchase
#rnx
#preflight 6364fed81052c15f13ff64fe

[CL 22985542 by sebastian nordgren in ue5-main branch]
2022-11-04 09:19:08 -04:00
sebastian nordgren
9185506920 Removed inline forward declarations from PropertyNode.h.
#rb trivial
#rnx
#preflight 63611c1863608aee36edd202

[CL 22918396 by sebastian nordgren in ue5-main branch]
2022-11-02 11:59:22 -04:00
jeremie roy
dbbf515160 Add method to set the minimum right column width in a details panel
#preflight 63612fdc2b5338aceb3f3854
#rb sebastian.nordgren
#jira UE-165306

[CL 22883472 by jeremie roy in ue5-main branch]
2022-11-01 11:25:39 -04:00
sebastian nordgren
9a1f48bef6 After a details view is created, it is no longer refiltered every frame for N frames where N is the number of FPropertyNodes in the property tree, causing a noticeable slowdown.
When FPropertyNode::EnsureDataIsValid() returns ChildrenRebuilt, it was only marking itself as bChildrenRebuilt = false.

SDetailsViewBase now calls FPropertyNode::MarkChildrenAsRebuilt, which recursively clears the flag from everything.

[REVIEW] [at]lauren.barnes, [at]patrick.boutot, [at]jay.nakai
#preflight 635a889e0d3a231123cb1f6c

[CL 22810916 by sebastian nordgren in ue5-main branch]
2022-10-27 11:33:33 -04:00
jeremy moore
b291c61551 Add browe to nanite override material button on material list.
Only shows if a nanite material is set.
Waiting on custom icon, and uses duplicate of content browse icon for now.

[CL 22803519 by jeremy moore in ue5-main branch]
2022-10-26 23:19:58 -04:00
jamie dale
bb3c452b1b MaxLength fixes
- Updated text properties to respect the MaxLength meta-data
- Updated name properties to respect the MaxLength meta-data if it's smaller than the max length of an FName

#rb Rex.Hill
#rnx

[CL 22803456 by jamie dale in ue5-main branch]
2022-10-26 23:16:38 -04:00
sebastian nordgren
5d6da7f7a3 DetailsSectionsTests now correctly uses #if WITH_DEV_AUTOMATION_TESTS.
#rb trivial
#rnx

[CL 22802903 by sebastian nordgren in ue5-main branch]
2022-10-26 22:21:22 -04:00
sebastian nordgren
a5194b8131 CIS: Fixed non-unity compilation errors due to removed PropertyNode.h include.
#rb trivial

[CL 22802845 by sebastian nordgren in ue5-main branch]
2022-10-26 22:18:56 -04:00
sebastian nordgren
0fc598ba1b IWYU: Removed unnecessary PropertyNode.h include from PropertyEditor.h
[REVIEW] [at]paul.chipchase
#rnx

[CL 22802843 by sebastian nordgren in ue5-main branch]
2022-10-26 22:18:46 -04:00
vlad golovan
a0eec28409 Fix an issue where prior valid to generate properties were not generated if we only specified full path to the property
[REVIEW] [at]sebastian.nordgren
#rb sebastian.nordgren

[CL 22787097 by vlad golovan in ue5-main branch]
2022-10-26 15:32:05 -04:00
sebastian nordgren
83ea576740 No longer crash if a property with an EditCondition does not have a parent node, eg. in a single property view.
[REVIEW] [at]lauren.barnes
#rnx
#preflight 6356a870777a77c44031a67d

[CL 22783273 by sebastian nordgren in ue5-main branch]
2022-10-26 13:03:07 -04:00
henrik karlsson
b5b86c796c This change is a strategical submit for a coming change that removes lots of includes in headers that are included by many files. This change contains adding of includes in files that previously got those includes transitively from other inclkudes
#preflight 6355d4940313c24974b2107b
#rb none

[CL 22783162 by henrik karlsson in ue5-main branch]
2022-10-26 12:57:32 -04:00
karen jirak
bce8800e84 DetailView: Plugins - Model View Viewmodel shows up for QAGame Project Settings searches regardless of search.
In PropertyNode::FilterNodes, filter the property key node, if present, to prevent this.


#jira: UE-165084
#rb sebastian.nordgren
#preflight 63497bbace524ed356e3c61c

[CL 22580642 by karen jirak in ue5-main branch]
2022-10-17 17:41:35 -04:00
karen jirak
dd9dc72032 Fix for FName Error message and adding logging to SPropertyMenuActorPicker if the user has chosen an Actor with an invalid NamePrivate (FName).
#jira UE-165164
#rb sebastian.nordgren
#preflight 634d6fdb181aa2a00d82e80a

[CL 22572508 by karen jirak in ue5-main branch]
2022-10-17 15:01:35 -04:00