Commit Graph

288 Commits

Author SHA1 Message Date
jeremy moore
319d0a96cd Skip work for null MaterialResources
[CL 23039020 by jeremy moore in ue5-main branch]
2022-11-08 16:00:43 -05:00
massimo tristano
f96aa8b162 Fix crash occurring in UEFN when the creates a MaterialLayer or a MaterialFunction and opens it in the Material Editor.
#rb jason.nadro, laura.hermanns
#preflight 6360176599482e1476d5cd0d

[CL 22917972 by massimo tristano in ue5-main branch]
2022-11-02 11:46:32 -04:00
Arne Schober
075e43786d Prepare to move StaticSwitchData from EditorOnlyData into RuntimeData in preparation to make StaticSwitches dynamic
#preflight 635993e25d49a96f7b00d3df

[CL 22832676 by Arne Schober in ue5-main branch]
2022-10-28 13:54:13 -04:00
Charles deRousiers
2190bdd38e Add Strata debug mode into the level view menu.
This gives direct access to all Strata view mode, which helps with discoverability.

All strata view mode are also available with CVar: r.Strata.ViewMode

#rb none
#jira none
#preflight 635a22c68d56375d45d65e15
#fyi sebastien.hillaire

[CL 22806075 by Charles deRousiers in ue5-main branch]
2022-10-27 02:52:45 -04:00
sebastien hillaire
a831062e45 Sparse volumetexture initial commit.
Sparse Volume Texture asset from imported OpenVDB (only a single float channel for now). Static or animated sequence.
It will be possible to generate SVT at runtime from GPU later.
Using FEditorBulkData for handling raw source without loading everything when not caching or cooking.
BulkData used at runtime for loading. No streaming yet.
Importer with dependency on OpenVDB is in a SparseVolumeTexture module only loaded when in editor

Sparse volume texture can be sampled from any materials (sample, sample parameter) and overridden on material instance and material instance dynamic.

Added support for uint in compiler (fetch from page table, see SparseVolumeTextureGetVoxelCoord)
Volume texture with u8 VirtualTextureLayerIndex!=255 (INDEX_NONE) are sparse texture. The layer index then represent what texture/attribute to sample.

#preflight https://horde.devtools.epicgames.com/job/6346a466f93be0f6345af86c
#rb Patrick.Kelly, Charles.deRousiers

[CL 22551963 by sebastien hillaire in ue5-main branch]
2022-10-16 02:28:34 -04:00
Arne Schober
6ddc4d3c47 Only try and check for a matching expression to error on when we at least have one result in the Expressions Array as there might be cases where we pass GraphCompilation but than later get errors from the backend compiler which do not have a coresponding entry in the expression array.
#preflight trivial

[CL 22400932 by Arne Schober in ue5-main branch]
2022-10-07 10:48:13 -04:00
Arne Schober
9073930315 M - Implement double click on MaterialEditor Errors to jump to the MaterialNode (if any) that caused the error.
#preflight 633dcca7a712a61df1f5d5b1

[CL 22360144 by Arne Schober in ue5-main branch]
2022-10-05 14:34:18 -04:00
massimo tristano
72aea7736e Fix crash when copy pasting nodes in the Material Editor.
#jira UE-164139
#rb jeremy.moore
#preflight 6334375b10030508062ea74d

[CL 22232296 by massimo tristano in ue5-main branch]
2022-09-28 17:58:06 -04:00
bryan sefcik
b93a6cf7ed Pass 1 on editor include fixes:
Removed redundant private include paths from build.cs files.
Fixed include paths to be relative to the private or public folders.
Hid or removed includes that reached into other private module folders.
Updated PublicInclude paths when necessary.

#jira
#preflight 631e283bec5b0c765fc0ffdb

[CL 21960084 by bryan sefcik in ue5-main branch]
2022-09-11 18:33:06 -04:00
Charles deRousiers
5ef5c3f21d New material created with Strata enable, no longer contains a legacy conversion but a slab node instead.
#rb none
#jira none
#preflight 63087aab3042e94f9f7ef5fd
#fyi sebastien.hillaire

[CL 21586932 by Charles deRousiers in ue5-main branch]
2022-08-26 04:06:24 -04:00
massimo tristano
b0f2eb49b5 Added MaterialEditor override for "FEditorUndoClient::MatchesContext()" function to limit the undo operations only to Material related UObjects.
This fixes the issue of the user undoing something unrelated to the Material and the MaterialEditor erroneously flagging the Material as dirty, causing the "Save Material" dialog to show up when the user closest he MaterialEditor window.

#jira UE-145484
#preflight 62ffa02e7d17941e9f8a7cd0

[CL 21457393 by massimo tristano in ue5-main branch]
2022-08-19 10:44:39 -04:00
Sebastien Hillaire
b0c4655f47 Strata - added material graph preview on node.
This is simply done by an added PreviewColor on the FStrataData that flows between the node to be able to work with parameter blending or StrataTree BSDF composition. Can be updated later to anything else.
#rb none
#preflight https://horde.devtools.epicgames.com/job/62f10d02a035cdf05e9b6a90
#fyi charles.derousiers

[CL 21269064 by Sebastien Hillaire in ue5-main branch]
2022-08-08 11:04:57 -04:00
massimo tristano
dbb452c096 Fixed assertion fired when the input or output preview of a collapsed node is expanded.
Issue was caused by the code assuming that the expression always has at least one output.

#rb jason.nadro
#preflight 62d6cb5cdc4397d3840b660d
#jira UE-155891

[CL 21163269 by massimo tristano in ue5-main branch]
2022-07-19 11:45:19 -04:00
dave jones2
ffcfa0aaca UE-131224 - Fix LWC preview issue in FMaterialEditor::OnNodeDoubleClicked
We currently have Blueprint real number support for all of the basic core types, including FVector4f. We can remove the LWC_TODO, and change the PreviewValue to a FVector4f.

#jira UE-131224
#rb jason.nadro
#preflight 62c70d2fa6654f9729dbe100

[CL 20989323 by dave jones2 in ue5-main branch]
2022-07-07 14:51:56 -04:00
Robb Surridge
64d1e34588 Support multiple tooltip sources and multiple base URLs for documentation.
- When the editor checks for enhanced tooltip content, it now looks in the Documentation/Source folder within the project folder and all enabled plugin folders.
- If the enhanced tooltip content contains a variable named ToolTipOverride, the content of that variable is used to override the default content for the initial simple tooltip.
- Documentation links can now use custom base URLs instead of always having the page ID appended to DocumentationURL in BaseEditor.ini.
- New base URLs can be defined in BaseEditor.ini or in DefaultEditor.ini within the project folder, as follows:
[/Script/Documentation.DocumentationSettings]
+DocumentationBaseUrls=(Id="ID",Url="http://myBaseUrl/{PAGEID}")
- They can also be added programmatically by calling IDocumentation::RegisterBaseUrl(), so plugins can add their own.
- The base URL can be specified anywhere a doc link is used. For links in code, the IDocumentation methods now accept an optional base URL parameter. For links taken from enhanced tooltip files, the ID of the base URL can now be specified at the file level in the BaseUrl metadata, or at the excerpt level in the [VAR:BaseUrl] variable.
- We now use {PAGEID} as a placeholder for where the doc link should go within the base URL.
#jira UE-139773
#rb jamie.dale
#preflight 62b08abdde510ae06e51f1dd

[CL 20936555 by Robb Surridge in ue5-main branch]
2022-07-04 14:37:49 -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
Josie Yang
af65e53764 Inline edit support to material expression inputs
- Inline edit support for UPROPERTY of type float, int32, uint32, uint8, enum, bool.
- Editable UPROPERTYs with "OverridingInputProperty" metadata are created as inline widgets next to their corresponding inputs.
- Rest of the editable UPROPERTYs may specify "ShowAsInputPin" metadata to become inline edit pins, with 2 choices: "Primary" - show in primary view, "Advanced" - show in in advanced view.
- Update a bunch of material expressions to reflect the changes, rest of the expressions still need to be worked through.

#jira UE-145276
#rb kevin.Ortegren
#preflight 627a3cc8937a047d62282ba7

[CL 20122451 by Josie Yang in ue5-main branch]
2022-05-10 09:53:13 -04:00
Lauren Barnes
6248f8d412 Replacing legacy EditorStyle calls with AppStyle
#preflight 6272a74d2f6d177be3c6fdda
#rb Matt.Kuhlenschmidt

#ROBOMERGE-OWNER: Lauren.Barnes
#ROBOMERGE-AUTHOR: lauren.barnes
#ROBOMERGE-SOURCE: CL 20057269 via CL 20070159 via CL 20072035 via CL 20072203
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)
#ROBOMERGE-CONFLICT from-shelf

[CL 20105363 by Lauren Barnes in ue5-main branch]
2022-05-09 13:12:28 -04:00
Jason Nadro
fc3dcee397 Restore backed out CL, with fixes.
Also restores follow-up CLs 19973746, 19973782
FStaticParameterSet::MaterialLayers can't be deprecated, since a property with the same name is included via FStaticParameterSetRuntimeData
So instead, FMaterialLayersFunctionsRuntimeData is updated with SerializeFromMismatchedTag, to allow serializing a full FMaterialLayersFunction.
When this happens, the EditorOnly portion is stored in a separate heap allocation, and then transferred to FStaticParameterSet::EditorOnly::MaterialLayers
#preflight 626c3405e31dbb512cef1e98

[Backout] - CL19973745
#fyi bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL19964485
#fyi Ben.Ingram
Original CL Desc
-----------------------------------------------------------------
Add 'Optional' EditorOnly data for UMaterialInterface and UMaterialFunctionInterface
These are separate UObject hierarchies that store editor-only UPROPERTIES, but can be included with cooked content, which allows full editor support.
In principle, all editor-only properties could be moved over.  So far, this has been limited to UMaterialExpressions, and data related to material parameters.
FStaticParameterSet, FMaterialLayersParameters, and FMaterialCachedExpressionData have all been split into separate editor-only/non-editor-only classes,
which allows the editor-only portion to be stored on the optional editor-only UObject.
#preflight 626ab21dad56c0cbbea32dc4
#rb jason.nadro, francis.hurteau
#jira FORT-463329

[CL 20043286 by Jason Nadro in ue5-main branch]
2022-05-04 12:21:52 -04:00
Marc Audy
82b04b5ae9 Fix static analysis warnings
#fyi Mateo.Egey, Sebastien.Hillaire, john.vanderburg
#rnx
#preflight

[CL 20030018 by Marc Audy in ue5-main branch]
2022-05-03 14:59:07 -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
Sebastien Hillaire
22cf010b9a Strata - added contextual pin menu to add most used Strata nodes. For input or ouput pins.
#rb none
#preflight https://horde.devtools.epicgames.com/job/6270361a283fccd7387096d0
#fyi charles.derousiers

[CL 20014706 by Sebastien Hillaire in ue5-main branch]
2022-05-02 16:13:24 -04:00
Sebastien Hillaire
97511ef9f0 Strata - added material editor context to simply create/link a Slab node from the context of a pin.
#rb none
#preflight https://horde.devtools.epicgames.com/job/626fede7ad00dced62c5afad
#fyi charles.derousiers

[CL 20008945 by Sebastien Hillaire in ue5-main branch]
2022-05-02 11:08:21 -04:00
bob tellez
34d8d5badd [Backout] - CL19964485
#fyi Ben.Ingram
Original CL Desc
-----------------------------------------------------------------
Add 'Optional' EditorOnly data for UMaterialInterface and UMaterialFunctionInterface
These are separate UObject hierarchies that store editor-only UPROPERTIES, but can be included with cooked content, which allows full editor support.
In principle, all editor-only properties could be moved over.  So far, this has been limited to UMaterialExpressions, and data related to material parameters.
FStaticParameterSet, FMaterialLayersParameters, and FMaterialCachedExpressionData have all been split into separate editor-only/non-editor-only classes,
which allows the editor-only portion to be stored on the optional editor-only UObject.
#preflight 626ab21dad56c0cbbea32dc4
#rb jason.nadro, francis.hurteau
#jira FORT-463329

[CL 19973745 by bob tellez in ue5-main branch]
2022-04-28 20:08:12 -04:00
Ben Ingram
448b0a9807 Add 'Optional' EditorOnly data for UMaterialInterface and UMaterialFunctionInterface
These are separate UObject hierarchies that store editor-only UPROPERTIES, but can be included with cooked content, which allows full editor support.
In principle, all editor-only properties could be moved over.  So far, this has been limited to UMaterialExpressions, and data related to material parameters.
FStaticParameterSet, FMaterialLayersParameters, and FMaterialCachedExpressionData have all been split into separate editor-only/non-editor-only classes,
which allows the editor-only portion to be stored on the optional editor-only UObject.
#preflight 626ab21dad56c0cbbea32dc4
#rb jason.nadro, francis.hurteau
#jira FORT-463329

[CL 19964485 by Ben Ingram in ue5-main branch]
2022-04-28 12:56:28 -04:00