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]
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]
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]
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]
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]
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]
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]
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]
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]
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]