Commit Graph

20 Commits

Author SHA1 Message Date
steve robb
f029468598 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30729174 by steve robb in ue5-main branch]
2024-01-19 16:41:35 -05:00
nickolas drake
5b4f2d0acc PatternTool: Fixed a bug causing the tool to not emit any actors when a normal StaticMeshActor is used. Now the tool properly emits FortStaticMeshActors.
#rb Jimmy.Andrews

[CL 29815558 by nickolas drake in ue5-main branch]
2023-11-17 14:00:58 -05:00
nickolas drake
f2c2906ae5 PatternTool: Fix undo/redo bugs due to ResetTransformGizmoPosition setting the transform gizmo's position in a way that creates a transaction.
We really only want manual changes to the gizmo to be recorded as transactions (click+drag changes). Calls to ResetTransformGizmoPosition generally mean something has changed in such a way that we must reset the gizmo's transform to keep it consistent with how it already is (i.e. we enabled 'centered', which means to keep the same pattern extent we need to move the gizmo), which shouldn't be viewed as a change from an undo/redo perspective.

This fixes an ensure related to undoing changes which result in ResetTransformGizmoPosition being called, and also fixes some bugs I discovered while trouble shooting that are not crashes but result in the gizmo behaving very oddly.

#rb jimmy.andrews
#jira UE-198298

[CL 28916993 by nickolas drake in ue5-main branch]
2023-10-19 09:49:46 -04:00
Jimmy Andrews
f3c7fb1579 Add option for pattern tool to randomly pick between elements rather than always using all elements
#rb rinat.abdrashitov

[CL 26016518 by Jimmy Andrews in ue5-main branch]
2023-06-15 11:41:25 -04:00
nickolas drake
a97a2b32d4 ModelingToolset: Make Pattern Tool emit correct actors using a new CreateNewActor function.
Added a CreateNewActor function to EditorModelingObjectsCreationAPI which finds a factory capable of producing actors of the same type as a provided template actor to create the new actor without needing to create entirely new assets as would have been necessary with the existing functions in EditorModelingObjectsCreationAPI.

#rb lonnie.li

[CL 25963642 by nickolas drake in ue5-main branch]
2023-06-13 17:05:45 -04:00
michael balzer
3eadf7a55b MeshModelingToolset: Disable ISM related properties/tools in restrictive mode
#preflight 64067a2ac13b7130d20eb00a
#rb ryan.schmidt, nathan.mitchell

[CL 24535915 by michael balzer in ue5-main branch]
2023-03-07 00:00:51 -05:00
lonnie li
c599e5ef53 Fixed PatternTool crash on accept in restricted mode.
#rb jimmy.andrews

[CL 23664477 by lonnie li in ue5-main branch]
2023-01-12 11:45:06 -05:00
Nickolas Drake
e7eeb19816 PatternTool: Use a gizmo to allow users to modify extents/radius in the viewport visually.
A single gizmo whose position relative to the tool's construction plane mechanic's gizmo is used to define Extent/ExtentX & ExtentY/Radius. The gizmo's movement is restricted depending on the current shape, axis/plane, and the orientation of the tool's construction plane frame. The visual appearance of the gizmo is modified by subclassing the actor builder for the existing combined transform gizmo and registering a 'new' gizmo type with the gizmo manager which is based on the existing combined transform gizmo.

#jira none
#rb semion.piskarev
#preflight 6373f666b663683828d066fd

[CL 23155451 by Nickolas Drake in ue5-main branch]
2022-11-16 11:42:54 -05:00
Nickolas Drake
f07a50121e PatternTool: Add support for relative transforms when using multiple source elements and add functionality to automatically adjust bounding boxes to accommodate relative transformations and Start Scale/Start Rotation
Previously, the pattern tool supported using multiple source elements under the assumption that they all had the same pivot, meaning that regardless of the relative positions of all of the source elements, they are all placed at the same position in the resulting pattern.

Jittering happens on a per pattern basis, meaning that the relative positions of all source elements are retained after jittering. Scaling and rotating are performed about the pivot of the first pattern element.

If Automatically Adjust is enabled, then the bounding box used for determining spacing in packed mode will be recomputed by baking the relative positions, start scale, and start rotations into the individual elements' bounding boxes and then computing a "CombinedPatternBounds" which contains all of the pattern elements and is used for determining spacing in packed mode.

Use Relative Transforms and Automatically Adjust (In Bounding Box dropdown when in Packed mode) allow all new functionality to be toggled.

#jira none
#rb Semion.Piskarev
#preflight 635fdafa1803be35c70f3282

[CL 22867319 by Nickolas Drake in ue5-main branch]
2022-10-31 13:51:53 -04:00
Nickolas Drake
45ce45dee5 PatternTool: Fix several issues related to the behavior of Proportional scaling.
bUniform was renamed to bProportional

Proportional scaling behaves almost the same but when a value is entered numerically, previously the approach to scaling would change the just entered value by finding a vector of the new vectors magnitude in the old vectors direction while the new approach scales the other two components up, resulting in more predictable behavior.

The minimum value for a component for the fields StartScale, EndScale, or Jitter in the scale category only is now 0.001 to be consistent with the clamping behavior in ApplyElementTransforms() and to prevent issues with dividing by extremely small (or 0) values when computing ScaleFactor in ApplyProportionalScale.

When proportional scaling is enabled and the reset to default button is pressed for a vector property, it now properly resets to the default. Previously, the resulting vector would be the same length as the default vector but it would maintain the direction of the previous value.

#jira UE-166106 UE-166683
#rb Jimmy.Andrews
#preflight 6346f114fa31324bb14785fb

[CL 22481394 by Nickolas Drake in ue5-main branch]
2022-10-12 13:15:31 -04:00
Nickolas Drake
893d45994b PatternTool: Fix some UI elements.
Seed should have no revert to default option and some tooltips are wrong after updating UI in previous CL.

#jira UE-166105
#rb Jimmy.Andrews
#preflight 633f343962762f4a1b66519e

[CL 22458016 by Nickolas Drake in ue5-main branch]
2022-10-11 10:46:34 -04:00
Nickolas Drake
456825c6df PatternTool: Improved UI for Jitter (enabled inline, proportional jitter changes in scale settings with bUniform)
#jira none
#rb Semion.Piskarev
#preflight 6328bf2ff45b523a63b981db

[CL 22362758 by Nickolas Drake in ue5-main branch]
2022-10-05 16:30:37 -04:00
nickolas drake
49a08497f1 PatternTool: Prevent tool from being activated with volume or skeletal meshes.
Overload CanBuildTool() to check that there exists some targetable components (at least 1) which are castable to either a static or a dynamic mesh component.

Additionally, overload InitializeNewTool() so that only targetable components which can be cast to static or dynamic mesh components are built into targets.

#jira UE-164940
#rb Semion.Piskarev, Lonnie.Li
#preflight 6335ce6ea852bd922cf4a20e

[CL 22307598 by nickolas drake in ue5-main branch]
2022-10-03 12:58:50 -04:00
nickolas drake
8d6c9e2018 PatternTool: First UI improvement pass.
Interpolate check boxes are now inline with their respective properties and don't occupy their own rows.

Uniform is still on its own row but is quite different in its behavior: instead of having 2 sets of properties for uniform vs. non-uniform scale where bUniform dictated which set was used, bUniform now toggles proportional scaling of StartScale and EndScale.

#jira none
#rb Semion.Piskarev
#preflight 6335c5d6f76de2d4d55defdc

[CL 22271181 by nickolas drake in ue5-main branch]
2022-09-30 11:09:37 -04:00
Nickolas Drake
b35a9c062a PatternTool: Add ability to project pattern elements into world along the tool's plane's normal.
The projection is done on per pattern item basis and will not project one pattern item onto another, meaning that projecting something like a vertical line of boxes down the Z axis will result in many overlapping boxes.

Projection offset can be used to fine tune the final distance between the result pattern and the components in the scene onto which the pattern is being projected, usually because the location of the pivot of the source mesh results in the projected pattern either floating above or intersecting the components after the projection.

#jira none
#rb Semion.Piskarev, David.Hill
#preflight 63234144c225e8be38fffb0e

[CL 22032022 by Nickolas Drake in ue5-main branch]
2022-09-15 13:14:41 -04:00
Nickolas Drake
3d8a227333 PatternTool: Fix circle shape not updating in XZ or YZ plane by orienting the CenterFrame of the radial pattern generator and adding logic to handle orientation along radial pattern.
#jira UE-162900
#rb semion.piskarev
#preflight 631a6c7ff448dc6e58c670b6

[CL 21906350 by Nickolas Drake in ue5-main branch]
2022-09-08 18:42:24 -04:00
nickolas drake
68b794245a PatternTool: Add random transform functionality to the pattern tool.
The translation and rotation jitter are relatively intuitive, but for scaling there are a couple of ways it could be done. From the user's perspective, scale jittering is accomplished in the same way as translation and rotation, but the scale along any axis cannot be negative.

The randomness is seeded so that the pattern is not completely different every time any parameter is changed (as long as the seed isn't changed, changing the scale along the z axis will just result in changes to the elements' scales along the z-axis, no other changes occur) and to allow the user to cycle through various patterns generated using a given set of parameters for the tool without needing to slightly move the pattern or alter any of the parameters to indirectly cause a call to MarkPatternDirty(). Instead, MarkPatternDirty() is called any time the seed changes.

#jira none
#rb semion.piskarev, ryan.schmidt, david.hill
#preflight 630fa40f556fc14dce9c0f25

[CL 21741835 by nickolas drake in ue5-main branch]
2022-09-01 11:22:10 -04:00
Ryan Schmidt
49fa44f977 ModelingTools: add Packed option to Pattern Tool, tiles objects densely based on bounding box extents
#rb none
#preflight 62fbd174200ff87e073f36f3

[CL 21409165 by Ryan Schmidt in ue5-main branch]
2022-08-16 13:57:48 -04:00
Ryan Schmidt
f2ba631e1f ModelingTools: fix static analysis issue in PatternTool
#rb none
#preflight 62ced2de471a2c28861fb9d5

[CL 21070878 by Ryan Schmidt in ue5-main branch]
2022-07-13 10:34:28 -04:00
Ryan Schmidt
7f760f8995 ModelingTools: add new Pattern Tool and expose in Modeling Mode. Pattern tool tiles input object(s) in linear/grid/radial patterns, with various transform options, and emits new actors in various ways
#rb none
#preflight 62cd8c02e7210cd0bea24b67

[CL 21057112 by Ryan Schmidt in ue5-main branch]
2022-07-12 11:36:32 -04:00