Notifications
Clear all
[Closed] Rotate with selection center pivot
May 30, 2009 10:37 pm
Hi!
How can I rotate the selected objects in maxscript as in 3dsmax you use the rotate tool using view as reference coordinate system and selection center as pivot?
2 Replies
May 30, 2009 10:37 pm
Hi Alberto,
following code applies the rotation relative to selection center in currently active grid, which means it works as expected in each viewport only if there aren’t custom active grids in the scene. If you got a custom grid, store it in a temp variable, set activeGrid to undefined (world) apply the transform, then reactivate your custom grid.
(
-- create some objects
Box pos:[-30, 0, 0]
Sphere pos:[70, 0, 0]
-- select new objects
select geometry
-- apply the transform
about selection in coordsys grid rotate selection (EulerAngles 0 0 60)
)
- Enrico
May 30, 2009 10:37 pm
Check “Applying Standard Transformations” on the reference for info on how to rotate. And check “coordsys” for info on how to deal with different coordinate systems.