Commit Graph

359 Commits

Author SHA1 Message Date
jordan hoffmann
ce19d1c65c [Feature] DetailsSplitter
This is a splitter that can dynamically connect matching properties as well as provide buttons for copying values between the two details panels.
#rb ben.hoffmann, dave.jones, karen.jirak
#jira UE-181566
#preflight 64386ecf930b3b84925271d9

[CL 25050248 by jordan hoffmann in ue5-main branch]
2023-04-14 17:07:14 -04:00
jordan hoffmann
0c42c42400 [Feature] Review tool Comments utilizing the swarm API
#rb justin.hare, dan.oconnor
#jira UE-176427
#preflight 64247c40b72410fc174fe2e9

[CL 24848140 by jordan hoffmann in ue5-main branch]
2023-03-29 19:20:07 -04:00
marco anastasi
98c234f46d Removed orphaned code referencing removed assets
#preflight none
#rb wouter.burgers, manuel.lang

[CL 24762979 by marco anastasi in ue5-main branch]
2023-03-23 11:58:04 -04:00
graham wihlidal
d1bd26aca8 Texture Painting Improvements - from Jacob Nelson (jacob.nelson@disbelief.com) from the Coalition
#rb graham.wihlidal, brian.karis
#preflight skip

This changelist contains all of the improvements we've made to the texture painting system during our development time.

Here is the full list of included CLs:

1)
"
Improved texture painting debug draw
Before this change, debug draw for the vertex/texture painting tool only displayed vertex colors. This changelist improves the debug draw to show the texture painting data on the mesh proxy in a similar way as the vertex painting.

As part of this changelist, I fix a bug found in FColoredTexturedMaterialRenderProxy::GetParameterValue. The problem was that the FColoredTexturedMaterialRenderProxy overrides a color and a texture parameter, but we only considered the texture parameter. This was preventing the texture painting to display different color channels on request.
Full list of changes:
Added directory of new special material, TexturePaintingMaskMaterial, to BaseEngine.ini
Updated Engine.h/UnrealEngine.cpp to keep a texture painting mask material. (TexturePaintingMaskMaterial.uasset). This material splits has a color parameter and a texture parameter. The texture parameter is filtered based on the color parameter for RBG channels. When all channels (RBG) are set to 0, we display the alpha as the color purple instead of opacity because alpha is typically used as a texture mask in the use cases for texture painting.
Updated FColoredTexturedMaterialRenderProxy::GetParameterValue to call base class functions in order to correctly query the color parameter.
Added the transient weak object pointer "OverridePaintTexture" to "UMeshPaintingSubsystem". This is set by the texture painting system to override the texture painting debug draw during active drawing.
Added the weak object pointer global "GVertexViewModeOverrideTexture" which is used to propagate debug draw behavior to relevant meshes that are being painted. This follows the method already in place for the vertex color debug draw.
Updated StaticMeshRender.cpp/SkeletalMesh.cpp to now handle the new "GVertexViewModeOverrideTexture" weak object pointer.
Added the enum class "EMeshPaintActiveMode" which is used by the paint mode subsystem when setting the viewport color mode. This is used to differentiate when to show debug draw for normal color, weights, and texture. The names chosen here follow the same names as the tools themselves.

"


2)
"
Support for Texture Painting Flood Fill tool
This changelist adds the feature for a "Flood Fill" tool option for Texture painting.
To use the new feature:
1) Change to Mesh Paint Mode using the gamemode drop-down in the top right corner of the editor.
2) Change to the "Textures" tab in the Mesh Paint window.
3) Click on the new "Paint Bucket" button near the paint button on the texture painting tool to fill the texture using the current options.
The flood fill tool takes into consideration the UV channel, brush texture, alpha channel, and all color channels on the option configuration. This is accomplished by using the same texture painting shader passes as normal painting. The difference is there is now a new permutation for the paint bucket fill which no longer limits the draw to just the selected area.
Full list of changes:
Added the boolean "bUseFillBucket" to FMeshPaintParameters to pass forward whether or not we are using the fill bucket tool.
Updated "UMeshPaintMode::BindCommands" with a new action for the paint bucket "TextureFill".
Updated UMeshPaintMode with a new function "FillWithTextureColor" which is bound to the paint mode command "TextureFill".
Updated "MeshPaintPixelShader.usf" with the shader permutation macro for "MESH_PAINT_USE_FILL_BUCKET" which will output a simple flood if no paint brush is selected. If a paint brush is selected, it will fill the texture using the brush texture which respects an input rotation.
Added permutation FMeshPaintUseFillBucket to "TMeshPaintVertexShader".
Added logic in "UMeshTexturePaintingTool::OnTick" to handle paint bucket requests.
"

3)
"
Fixes for Mesh Painting Texture Filter, Infinite Loop
This change resolves two mesh painting UI bugs.

The first issue was the Paint Texture filter always returning no results, resulting in only the first texture in the list being paintable.  This was due to the filtering function using a generic editor asset name instead of the candidate texture's full name when comparing against the list of valid paintable textures.  This change resolves this issue by using the full name from the asset's associated UTexture2D instead.

The second issue was an infinite loop that freezes the editor UI.  This would occur when opening the texture painting options for a mesh with a non-instance material associated to it.  This change resolves this issue by adding the appropriate break condition to handle this case.

"

4)
"
Fixed Material Texture Parameter Override not refreshing

Before this change, the texture painting system would not properly show active textures being drawn on layered materials. This was because "UMaterialInstance::OverrideTextureParameterValue" only overrode the surface level material and did not consider parent materials.

To fix this, I have now updated "UMaterialInstance::OverrideTextureParameterValue" to also call this function on any existing parents. Along with this, "UMaterialInstance::ResetAllTextureParameterOverrides" is now recursive on its parent for proper texture parameter override cleanup.
As part of this change, I have now also updated IMeshPaintComponentAdapter::DefaultQueryPaintableTextures to query parent material instances for suitable textures for painting. This is needed because parent paintable textures were not being shown in the texture painting tool.
"

5)
"
Fixing a mesh painting bug due to the source texture not being checked for validity. This happens on a "Default_RenderTarget_Clear" texture that has  no source texture.
"


6)
"
Texture Painting - Improved material parameter visiblity

Before this change, the texture painting tool only considered textures visible on the top level of a material script. This meant artists needed to to purposely expose any textures needed for painting outside of any material functions in order to paint the texture using the tool. This changelist fixes this problem by now iterating on a given material's texture parameters when filtering out paintable textures.

Full list of changes:
Added helper function "IsTextureSuitableForTexturePainting" in "IMeshPaintComponentAdapter.cpp" to avoid code duplication.
Updated "IMeshPaintComponentAdapter::DefaultQueryPaintableTextures" to iterate through texture parameter values.
Removed the local boolean "bIsTextureUsed" from "UMeshTexturePaintingTool::StartPaintingTexture". This is because "IMeshPaintComponentAdapter::DefaultQueryPaintableTextures" already filters out any unused textures, so filtering again here is unnecessary.
This change was needed in this CL because "UTexturePaintToolset::DoesMeshComponentUseTexture" does not consider texture parameters. I opted to completely remove "bIsTextureUsed" instead of updating the function. This is to prevent any future bugs relating to "DoesMeshComponentUseTexture" not matching "DefaultQueryPaintableTextures".
"

7)
"
Improved texture painting undo/redo stability
Before this change, a 2 crashes could occur when rapidly hitting the undo/redo key when using the texture painting tool. This changelist fixes both crashes.
The first crash would happen due to the internal bulk data being invalid. This can happen when texture streaming is cancelled mid-stream and a new texture 2D is assigned. To fix this, I now use the "Texture2D::Modify" function to refresh the bulk data if needed and wait for any streaming before doing any painting.
The second crash would happen if undo/redo was triggered while the user is currently painting. This is because the function "UMeshTexturePaintingTool::StartPaintingTexture" would assume that the current texture is streamed in if "bStartedPainting" is true. However, this isn't the case if the user "undos" a painting operation while holding down the paint button. To fix this, I now condition both "bStartedPainting" and "bIsSourceTextureStreamedIn" when attempting to continue a painting operation.
"

8)
"
Fixing a Texture Painting crash that occurs when editor is using SM6
"

9)
"
Feature Support for Texture Painting Brushes

Before this changelist, it was only possible to use the texture painting tool to paint a single color using a solid brush. This changelist adds support for custom texture painting brushes on the texture painting tool.
To use the new feature:
1) Change to Mesh Paint Mode using the gamemode drop-down in the top right corner of the editor.
2) Change to the "Textures" tab in the Mesh Paint window.
3) Use the "Paint Brush" parameter to select from any texture in-editor as a brush.
4) Use the "Paint Brush Rotation Offset" parameter to set the initial 2D rotation of the texture on a mesh.
5) Optionally select "Rotate Brush Towards Direction" to continously paint a texture in a given direction on a mesh.
6) Paint onto any surface

Full list of changes:
Added the variable "BrushPosition2D" to FMeshPaintParameters which is now used for tracking our current and previous 2D brush position.
Added the variable "PaintBrushRenderTargetTexture" to "FPaintTexture2DData" to hold  a local copy of any texture brush being used for painting.
Updated "MeshPaintPixelShader.usf" with seperate painting paths for applying a paint brush texture.
Updated "TMeshPaintPixelShader" to now bind and pass in the new paint brush parameters.
Updated "TMeshPaintPixelShader" with two new permutation domains (FMeshPaintUsePaintBrush and FMeshPaintUseRotateTowardDirection).
Fixed a small bug in SetMeshPaintShaders where the normal mesh paint pass was using the GMeshPaintDilateVertexDeclaration instead of the GMeshPaintVertexDeclaration declaration. I have opted to correct this in this changelist since I was already editing this area of code with the new permutation vectors.
Updated "FMeshPaintShaderParameters" with the new paint brush related parameters.
Updated "UMeshTexturePaintingToolProperties" with the new paint brush related parameters.
Added optional parameter to "UMeshTexturePaintingTool::PaintTexture" to pass in last attempt's parameters which is used for calculating our 2D movement vector for the "Rotate Brush towards direction" feature.
Updated "UMeshTexturePaintingTool" to now keep track of LastPaintRayResults to use when determining the 2D movement vector.

Potential improvements:
Update the dilate texture painting to also support the texture painting brushes. Currently, it doesn't seem that artists are using the dilate feature, so this changelist only targets the normal texture painting.
Add support for triplanar mapping.
"

10)
"
Updated Active Texture Painting Selection

This changelist is a quality of life improvement for texture painting to always have paintable texture selected if one is available.
Before this change, it was possible to have no paint texture selected even if we have available options. This ended up causing confusion when debug draw was enabled. In this case, the debug draw would show no texture painting information because the draw shows only the currently active paintable texture.
This changelist fixes that by now recaching the paint texture in the function "UMeshTexturePaintingTool::OnTick" when a paintable texture is available but the texture properties has the active texture set to nullptr.
"

11)
"
Default UV Channel to light map coordinate index

Before this change, the default value for UV Channel was always 0 which doesn't always align with what the user would like to paint. This caused confusion when trying to paint, but the channel was incorrect. This change updates the constructor for UMeshTexturePaintingToolProperties to now set the default UVChannel value to the light map coordinate index of the first selected mesh. It is still possible to change the UVChannel manually, but this index is likely the one users would be wanting to paint when using the mesh painting tool.

"

12)
"
Fixed texture parameters not taken for consideration for texture painting

Before this change, it was not possible to texture paint a material's texture if that texure was registered as a texture parameter. This was clearly not intentional because the texture painting tool gathers texture parameters as paintable textures in the function "IMeshPaintGeometryAdapter::DefaultQueryPaintableTextures". The reason why texture parameters weren't being painted is because the "UMaterialInterface::OverrideTexture" editor only function did not consider texture parameters when assigning an override texture. This meant that the painted texture would never override the texture parameter actually being used for render.

To fix this, I have now updated the "OverrideTexture" method to also override any appropiate texture parameters. I believe this is an overlooked edge case of the override texture functionality, so it is necessary to modify the function here instead of creating a workaround in the texture painting system. My implementation  in this changelist stores an array of "texture parameter overrides" which is a custom struct with an object pointer to the old texture and the new one, and then on setting new textures, we reference this array. This is editor-only.

With these changes, I have tested the texture painting tool on materials with and without texture parameters along with the following scenarios:
saving/loading texture painted materials in-progress and committed/saved.
undo/redo
copy/paste
destroy/creation
moving/edit transform
All cases tested worked as expected.
Detailed changes:
Updated UMaterialInstance::GetTextureExpressionValues to consider the override textures. This function is used to collect all textures used by a given material instance.
Updated UMaterialInstance::OverrideTexture to now also override the texture parameter value.
Updated UMaterialInstance::Serialize to reset all texture parameter overrides on serialize to avoid serializing any in-progress texture parameters.
Updated UMaterialInstance::ClearParameterValuesInternal to reset the texture parameter overrides if we are resetting the normal texture parameters.
Created the new function "UMaterialInstance::OverrideTextureParameterValue", which is used to manage any registered overridden textures in editor. Requesting an override texture with "nullptr" will remove a given entry from the overrides. This function is meant to work the same way on the texture parameters as "UMaterialInstance::OverrideTexture" does on the internal texture transient overrides.
Created the new helper function "UMaterialInstance::ResetAllTextureParameterOverrides" which iterates through all of our overrides and properly removes them.
Made the function "UMaterialInterface::GetTextureParameterValue" virtual and created the function "UMaterialInstance::GetTextureParameterValue" which overrides any relevant texture parameter value using the internal transient texture parameter overide array. Outside of editor, the function will end up only calling the base function.
Updated "UMeshTexturePaintingTool::OnTick" to clear all texture overrides when a recache is necessary. This fixes a problem where "undo" wasn't reflecting in the texture at times because a stal texture override was being used. By clearing at this spot, any necessary texture overrides will be registered later.

"

13:
"
Fix Texture Painting Visualization

The visualization for texture painting was not showing before this change. The issue is that ShouldProxyUseVertexColorVisualization was returning false when it shouldn't be. GVertexViewModeOverrideOwnerName seems to be an empty string when it should still be the currently painted component name. The string is being set in UMeshTexturePaintingTool::CanBeginClickDragSequence but is then being immediately reset by a call to UMeshTexturePaintingTool::ClearAllTextureOverrides. To fix this I also set GVertexViewModeOverrideOwnerName in the function UMeshPaintModeSubsystem::SetViewportColorMode. This function gets called every frame and will re-register the name string after being cleared. It is also where another override variable, GVertexViewModeOverrideTexture, is already being re-registered.
"

#ushell-cherrypick of 24639501 by Jess.Kube

[CL 24667907 by graham wihlidal in ue5-main branch]
2023-03-16 01:21:33 -04:00
karen jirak
90a5731774 Updating append key icon in the curve table editor.
#jira UE-166833
#rb aditya.ravichandran
#preflight 6410b37eaf3fc3529226c5a4

[CL 24643857 by karen jirak in ue5-main branch]
2023-03-14 16:46:22 -04:00
karen jirak
a9708bd161 Text in palette buttons in Modeling mode can overrun their borders
#rb Lauren.Barnes
#preflight 640a2f993c2db4002932a436

[CL 24584200 by karen jirak in ue5-main branch]
2023-03-09 17:51:35 -05:00
mikalai sukhikh
76a155697d Fix missing Search icon in Material Editor
#jira UE-177916
#preflight none

[CL 24480980 by mikalai sukhikh in ue5-main branch]
2023-03-02 09:11:49 -05:00
max chen
e1225dbaa2 Sequencer: Set disabled styles for transport control buttons
#jira UE-178760
#rb andrew.rodham
#preflight https://horde.devtools.epicgames.com/job/63ff9e7aac6c61e2b5dec10a

[CL 24469585 by max chen in ue5-main branch]
2023-03-01 15:45:02 -05:00
Rune Stubbe
97cd750f78 Replaced "Root Geometry" vis mode with "Streaming Geometry" show flag and it into new Nanite show flags category along with "Nanite Meshes" from Advanced show flags.
#rb graham.wihlidal
#fyi brian.karis, krzysztof.narkowicz
#preflight 63ff73edef1b24bf9497d4b6

[CL 24463327 by Rune Stubbe in ue5-main branch]
2023-03-01 11:13:07 -05:00
richard malo
6583fa5db3 Allow editing data layers of level instance when editing the level instance
- When editing level instance, only show loaded/unloaded actors of this level
- When editing level instance, don't prefix actor label with parent level instance(s)
- Replaced import data layer menu option by drag and dropping level instance data layers into main world AWorldDataLayers
- Removed menu option "Create Data Layer under <other> DataLayer" as it will never be allowed for DataLayerInstanceWithAsset since created without any valid DataLayerAsset.
- Disabled changing visibility and editor loading of DataLayerInstances of editing level instance
- Allow editing data layer of level instance when editing the level instance even when main world is not partitioned
- Changed font from bold to bold+italic on DataLayerInstances containing actors part of editor selection
- Removed suffix "- WorldDataLayers" on parent node of DataLayerInstances in the DataLayer Outliner
- Colorize and append "(Current)" to WorldDataLayer of editing Level Instance in the DataLayer Outliner
- Support Make Current on Level instance DataLayerInstances when editing level instance
#rb patrick.enfedaque
#jira UE-178410
#jira UE-177386
#preflight 63f8f0f19009dd70d7b87224

[CL 24441128 by richard malo in ue5-main branch]
2023-02-28 08:35:38 -05:00
Thomas Sarkanen
502797ca50 Animation Curve Runtime & Editor Improvements
Runtime notes:
- Removes 'smart name' usage across the animation systems.
- Changed curve blending from a uniform array (sized per skeleton) to a sparse array of sorted named values. Blends and other combiners are performed using a dual iteration 'tape merge'.
- Skeleton curves are no longer guaranteed to cover all curve names that can be found at runtime.

Editor notes:
- Curve metadata (flags, bone links etc.) is still present on the skeleton, but can also now exist on a skeletal mesh
- Curve metadata (for morph targets) is still populated on import
- Curves can now be used arbitrarily at runtime

New features:
- New Find/Replace dialog that allows for batch-replacing curves and notifies across all of a project's assets
- New curve debugger tab in various Persona editors that allows for viewing curve values live. This also now allows viewing curves for specific pose watches.
- Pose watches now output curve tracks to the Rewind Debugger

#rb Jurre.deBaare,Nicholas.Frechette,Sara.Schvartzman,Helge.Mathee,Kiaran.Ritchie,Jaime.Cifuentes,Martin.Wilson,Keith.Yerex,Andrean.Franc (and more!)
#jira UE-167776
#jira UE-173716
#jira UE-110407
#preflight 63fc98c81206d91a2bc3ab90
#preflight 63f3ad4f81646f1f24c240c2

[CL 24421496 by Thomas Sarkanen in ue5-main branch]
2023-02-27 07:20:58 -05:00
charles derousiers
0fad76c4d7 Rename all user/editor-facing Strata name into Substrate.
This CL address only user-facing part, i.e. Property field, view modes, tool tips, ...) mentioning Strata. All internal (host code, shaders code, CVars) still contains the 'Strata' name.

#rb sebastien.hillaire
#jira UE-175169
#preflight 63f4db68cf37615300e71db5
#lockdown juan.canada

[CL 24350396 by charles derousiers in ue5-main branch]
2023-02-21 16:52:23 -05:00
Mikita Hauruk
7d5ce73ab7 Moved common style for blueprint/code references from StarshipStyle.cpp to StarshipCoreStyle.cpp
UnrealFrontend - Automated test names are not readable

#jira UE-176645
#rb adam.miezianko, chris.constantinescu, jerome.delattre, oleg_krasnov, saltanat_janybekova, mikalai_sukhikh
#preflight 63ef6a9b61378b7ea0166574

[CL 24318163 by Mikita Hauruk in ue5-main branch]
2023-02-20 12:45:42 -05:00
karen jirak
a6a08b80ab Toolkit and toolbar styling
#jira UE-171293
#rb Patrick.Boutot
#preflight 63ee274ab91ae11c1c2798bf

[CL 24270337 by karen jirak in ue5-main branch]
2023-02-16 17:39:16 -05:00
luc eygasier
8062afc2c3 Adds Landscape BP Brush visibility layer editing.
* Deprecate Render method for BP Brushes, RenderLayer should now be used
* Adds FLandscapeBrushParameters struct that should be used to pass arguments when rendering a layer
* Modifies ELandscapeToolTargetType to be an enum class, usable by blueprints
* Adds BP Brush visibility layer toggle in Landscape Editor
* Adds visibility layer editing for LandscapeCircleHeightPatches
* Adds visibility layer editing for LandscapeTexturePatches
* Adds helper method to determine if a layer info object name is a visibility layer

#jira UE-163386
#rb Jonathan.Bard
#preflight 63ebb119e92f139c51b2a842

[CL 24251734 by luc eygasier in ue5-main branch]
2023-02-16 01:57:40 -05:00
mikalai sukhikh
9f50cf7f0a Update Test Automation UI/UX
#jira UE-156781
#rb adam.miezianko, chris.constantinescu, jerome.delattre
#preflight 63e2597bb923ed4bdd145311
#preflight 63e24611786751d1e0e8b4e8

[CL 24251663 by mikalai sukhikh in ue5-main branch]
2023-02-16 01:55:24 -05:00
aditya ravichandran
92af102e65 Content Browser: Add new border for the unsupported asset text in the tooltip for items
#rb trivial

[CL 24058159 by aditya ravichandran in ue5-main branch]
2023-02-07 15:44:06 -05:00
karen jirak
8d97551ae2 Updates for Modular Class Display to add a widget registration system and get it working for BaseToolkit and toolbars.
#jira UE-171293
#rb Matt.Kuhlenschmidt
#preflight 63dbcb442d4aef3dd1642d7d

[CL 23984661 by karen jirak in ue5-main branch]
2023-02-02 19:01:00 -05:00
ludovic chabant
11900b8562 Sequencer: marked frames improvements
- Marked frames can now be selected, which allows the user to move them along with keys and sections
- This had to be implemented as a special case in FSequencerSelection. Ideally marked frames would have been moved over to the MVVM design so that their view-models could be added to the selection without much change, but this opened up giant cans of worms.
- Move operations for keys and sections now always move any selected marked frames too
- Being selectable, marked frames now have a "selected" state that makes them drawn white and bold
- To make interaction easier, marked frames labels can be used to drag and select, and a hover state has been added
- A "comment" field has been added on marked frames

#rb max.chen
#preflight 63d012e794644f3e8e3058fd
#jira UE-170205

[CL 23833512 by ludovic chabant in ue5-main branch]
2023-01-24 12:44:33 -05:00
Patrick Boutot
839492f6b2 Debugging BP utility.
NOTE need to request icon before submitting.
Tested in PIE/Simulated, multiplayers (different server type).
#preflight 63c59ddf2a6acaf1625484ac

[CL 23771915 by Patrick Boutot in ue5-main branch]
2023-01-19 07:47:55 -05:00
Vincent Gauthier
591506dc62 Fix to Software Cursor to render using DPI settings
Make the hand cursor bigger.

#jira UE-170842
#preflight 639c8b12c16855964dcd4dc9

[CL 23537932 by Vincent Gauthier in ue5-main branch]
2022-12-16 10:27:44 -05:00
aditya ravichandran
97be835210 Add alternating colors for rows in the Outliner and Content Browser
STableRow style: Add a default style with alternating row colors
#jira UE-171891
#rb sebastian.nordgren
#preflight 639b2f880a6715255066a4af

[CL 23526656 by aditya ravichandran in ue5-main branch]
2022-12-15 09:45:23 -05:00
aditya ravichandran
28eccf9aa0 Revision Control Iconography Update:
Update the default set of revision control icons
Create FRevisionControlStyleManager to manage the currently active revision control style and add a default style that is used by all providers
#rb lauren.barnes, brooke.hubert
#preflight 639364ee67018b14b5fb9891

[CL 23466976 by aditya ravichandran in ue5-main branch]
2022-12-09 14:18:01 -05:00
Charles deRousiers
af6aa8b792 * Add groom view mode menu to level editor
* Unify most groom debug rendering to go through view more rather than CVars

#rb none
#jira none
#preflight 63909a4b0d013d47ef1cee7e

[CL 23427771 by Charles deRousiers in ue5-main branch]
2022-12-07 09:21:47 -05:00
scott nelson
60da97c48a Add EULA style markdown to support RichText in slate
#rb Michael.Atchison
#preflight 6373c54a1c114bec05b23436

[CL 23182616 by scott nelson in ue5-main branch]
2022-11-17 15:30:08 -05:00