Update F3X to use PivotTo where possible #148
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, F3X always individually moved all of the parts in the selection even if they were under models. This is not optimal, if all the parts are under a single model then it suffices to make a single PivotTo call transforming the model.
Change SyncRotate/SyncMove into SyncRootTransform/SyncPartTransform which are both used by Rotate and Move. In the case where the "Local" mode is used, each part is moved indiviudally, and synced via SyncPartTransform. In the case where "Center" or "Last" is used, the set of rootmost PVInstances is moved via PivotTo and synced via SyncRootTransform.
The code specific to updating pivots has been removed, as PivotTo automatically updates WorldPivots when moving the hierarchy.
One minor behavior change here is that when using "Local" mode with the Rotate tool, the rotation of the model's pivot is no longer updated. Maintaining that behavior under this new syncing scheme added unnecessary complexity and it was probably a mistake to include that behavior in the first place when updating F3X to respect pivots.