Commit Graph

963 Commits

Author SHA1 Message Date
roey borsteinas
366d9e5e15 [Landscape]
Fix lingering hard reference to deleted landscapes being held by landscape info objects.

#rb jonathan.bard

[CL 36758879 by roey borsteinas in 5.5 branch]
2024-10-01 19:43:14 -04:00
jamie dale
29b79bcaf6 Audited existing usage of FText::FindText
[FYI] Leon.Huang
#rnx

[CL 36756757 by jamie dale in 5.5 branch]
2024-10-01 19:24:00 -04:00
alan roach
f2085c007f Fix wrong warning when importing landscape weightmap from 8bit source image.
Prevent cached result from attempted 16-bit import from preventing the 8bit attempt from running at all.  Make more of the import code aware of the intended usage of an import request, 8bit for weightmaps and 16bit for heightmaps.  Store those separately in the import cache to stop errors when the same file is imported as a weightmap and heightmap at the same time.

#jira UE-207756
#rb chris.tchou

[CL 36750405 by alan roach in 5.5 branch]
2024-10-01 18:13:49 -04:00
jonathan bard
0a22ae4079 Fixed crash when unloading a map while landscape mode is active
#jira UE-225191
#rb roey.borsteinas

[CL 36539904 by jonathan bard in 5.5 branch]
2024-09-24 12:19:41 -04:00
alan roach
fd936d0aee Disable Retopologize tool button when unsupported or when CVar landscape.EnableRetopologizeTool is false (default is false).
#jira UE-222291
#rb jonathan.bard
#p4v-cherrypick 36314945

[CL 36433097 by alan roach in 5.5 branch]
2024-09-19 10:55:18 -04:00
jonathan bard
de79dfbae7 Landscape mode paint panel :
* Added filter to target layers list (helps when too many layers are being used)
* Minor UX improvements

#jira UE-220683

#rb chris.tchou

[CL 36038899 by jonathan bard in ue5-main branch]
2024-09-05 10:17:13 -04:00
jonathan bard
53b0987e45 Fixed use after free when reassigning landscape layer info
#rb chris.tchou

[CL 35977986 by jonathan bard in ue5-main branch]
2024-09-03 15:42:11 -04:00
jonathan bard
dd53aaa708 Fixed assert when resizing landscape : the target layers list would get manually copied but since it's a LandscapeInherited property, it's already been copied before.
All the other such properties that were manually copied in FEdModeLandscape::ChangeComponentSetting have been removed since their copy is now automatically handled by the call to CopySharedProperties
Also, the new landscape actor's label is now set to be the same as the original actor's, so that changing the size of a landscape doesn't end up giving actor numbered names

#rb chris.tchou

[CL 35962984 by jonathan bard in ue5-main branch]
2024-09-03 05:47:33 -04:00
jonathan bard
12a3ca1e87 Removed ancient and unused landscape UX code
#rb chris.tchou

[CL 35925906 by jonathan bard in ue5-main branch]
2024-08-30 10:22:03 -04:00
jonathan bard
cac500f6d6 Various UX improvements for landscape "Select" tool :
* Don't display target layers, edit layers or BP brushes when using the Select tool, since it makes no sense there
* Display the Select tool in the Paint panel since it applies there too
* Refresh the landscape mode details panel when clearing the selection in order to hide the Select tool options immediately
* Moved the Select tool-specific options into a "Select Mask" category
* Moved the Select button to the end of the tool list for both Sculpt and Paint panel, since this is not really an editing tool and acts in both modes

#rb chris.tchou

[CL 35925440 by jonathan bard in ue5-main branch]
2024-08-30 10:09:34 -04:00
jonathan bard
f5146a5568 Removed useless cache in landscape "select components" brush
#rb luc.eygasier

[CL 35893710 by jonathan bard in ue5-main branch]
2024-08-29 08:29:01 -04:00
jonathan bard
b1def1e751 Fix for non-interpolated landscape brush tools
#rb luc.eygasier
#jira UE-222720, UE-221920

[CL 35893671 by jonathan bard in ue5-main branch]
2024-08-29 08:22:26 -04:00
jonathan bard
f900dd2c07 Fixed crash in landscape alpha brush thumbnails which wrongly assumed that the texture's resource was loaded. Now the thumbnail viewport will keep on being invalidated until it can render the texture
#jira UE-222039
#rb chris.tchou

[CL 35621506 by jonathan bard in ue5-main branch]
2024-08-19 05:37:51 -04:00
jonathan bard
d89ec42656 Unshelved from pending changelist '35350462':
Several fixes with landscape brush

Details:
* Reverted incorrect change (29959327) for computation of valid area in FLandscapeEditDataInterface::GetHeightDataInternal
* In TLandscapeEditCache, when extending the cache data (in the "interpolation case"), we were incorrectly using the "valid bounds" returned by GetWeightData because this function mutates its input attributes likewise but without actually caching more than what was requested. We now do the same as in the "no-interpolation case" (where GetWeightDataFast doesn't do a similar modification to its inputs...), and only use the cached bounds to extend the cache
* Unlike TLandscapeEditCache's GetCachedData, GetOriginalData didn't check whether the data was present or not before storing it, which could introduce random values to OriginalData
* Pretty much all landscape brushes were using mismatched inclusive/exclusive bounds, which led to a missing row/column on the the bottom/right

Misc changes :
* Added landscape.VisualLog.ShowBrushPhysics (0 by default) to avoid polluting the visual logger whenever we move the mouse when landscape sculpting/painting, since that is only relevant to debug the landscape brush
* Added visual logs when extending the landscape data cache when using the landscape brush + fixed those logs to extend by (-0.5, +0.5) beyond the cached region, in order to properly show the vertices that were sampled (i.e. that allows to show what was cached when the cached region contains a single landscape vertex in either the X or Y direction)
* Use standard namespace name in landscape editor

#rb chris.tchou
#jira UE-219746

[CL 35373355 by jonathan bard in ue5-main branch]
2024-08-07 13:13:30 -04:00
jonathan bard
c222420694 UX fix for landscape edit layer names overlapping with the "Alpha" text box
#rb chris.tchou
#jira UE-220032

[CL 35150237 by jonathan bard in ue5-main branch]
2024-07-29 16:00:36 -04:00
Giorgi Apriashvili
253307ef0d [Fix] Editor.Landscape.Water Tests are failing in empty project
https://jira.it.epicgames.com/browse/UE-215203

#rb ethan.wolfe
#jira UE-215203

[CL 34665851 by Giorgi Apriashvili in ue5-main branch]
2024-06-25 22:37:48 -04:00
chris tchou
4a4abd9d31 Fix for crash creating new landscape
Modify landscape creation code to handle failed region creation gracefully

This crash has only ever happened in 29.30, and not since mid-may, however the cause seems to be SpawnActor() failing and returning null.
It is unknown why this failure mode only happens in 29.30.

This code change was tested against forced null results.

#rb jonathan.bard

[CL 34627641 by chris tchou in ue5-main branch]
2024-06-24 19:34:35 -04:00
jonathan bard
d084fe7336 Use class display names in the lanscape edit layer class picker
#rnx
#rb roey.borsteinas

[CL 34031617 by jonathan bard in ue5-main branch]
2024-05-31 09:57:54 -04:00
jonathan bard
b852e5b9e0 Prevent user from accidently using a landscape target layer named after the reserved weightmap name for visibility
#rb chris.tchou, roey.borsteinas

[CL 34030925 by jonathan bard in ue5-main branch]
2024-05-31 09:14:23 -04:00
jonathan bard
bac7d0f946 * Improvement to the landscape target layers deprecation : if possible, try to deprecate the list of existing target layers instead of entirely relying on the analysis of the layer allocations within the landscape components. This allows not to lose landscape layer info pointers when loading map where a given layer is not used (i.e. there's no weightmap allocation associated with this layer)
* Prevent landscape target layers from being renamed to a layer name that's already in use

#jira UE-216036
#rb chris.tchou

[CL 34009471 by jonathan bard in ue5-main branch]
2024-05-30 15:00:09 -04:00
jonathan bard
9854f09b45 Landscape code cleanup : removed unused stuff
#rb roey.borsteinas
#rnx

[CL 33981954 by jonathan bard in ue5-main branch]
2024-05-29 14:37:41 -04:00
chris tchou
16344f35fa Fix for landscape visibility layer merge resulting in corrupted data when there is invalid layer infos assigned to layers
Also fixes a crash when assigning layer infos

#rb jonathan.bard

[CL 33950928 by chris tchou in ue5-main branch]
2024-05-28 16:07:10 -04:00
jonathan bard
4f86535327 Added info message when there are no target layers in landscape mode, to help the user understand the workflow now requires him to add layers either using the "Add" or the "Populate from materials" button
#jira UE-215535
#rb roey.borsteinas

[CL 33938002 by jonathan bard in ue5-main branch]
2024-05-28 08:29:42 -04:00
chris tchou
9d0d640a7c Fix for failing landscape test
Test is creating landscape at the default location, which was changed to the origin

#rb jonathan.bard
#jira UE-215464

[CL 33852408 by chris tchou in ue5-main branch]
2024-05-22 20:58:21 -04:00
chris tchou
3151aba544 Make default landscape creation location be the origin.
#rb jonathan.bard

[CL 33689628 by chris tchou in ue5-main branch]
2024-05-16 11:45:24 -04:00