home *** CD-ROM | disk | FTP | other *** search
Text File | 2001-09-12 | 34.8 KB | 1,326 lines |
- -- Animation Tools MacroScript File
- --
- -- Created: May 18 2000
- -- Last Updated: June 9 2000
- --
- -- Author : Frank DeLise
- -- Version: 3ds max 4
- --
- --
- -- This script adds tools for animation control
- --***********************************************************************************************
- -- MODIFY THIS AT YOUR OWN RISK
- --
- -- June 9, 2000 Added Explicit keys creation and deletion
-
- MacroScript Create_Key_Position
- ButtonText:"Create Key Position"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create a Position Key"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return (Try(Selection.count != 0)Catch())
- On isVisible return (Try(Selection.count != 0)Catch())
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- Try(AddNewKey Selection[i].pos.controller SliderTime)Catch()
- )
-
- )
- )
- MacroScript Delete_Key_Position
- ButtonText:"Delete All Keys Position"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Delete All Position Keys"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return (Try(Selection.count != 0)Catch())
- On isVisible return (Try(Selection.count != 0)Catch())
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- Try(
- SelectKeys Selection[i].pos.controller SliderTime
- DeleteKeys Selection[i].pos.controller #Selection
- )Catch()
- )
-
- )
- )
-
-
- MacroScript Create_Key_Position_X
- ButtonText:"Create Key Position X"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create a Position Key on X"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].pos.controller) == Position_list then
- (
- Try(AddNewKey Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].X_Position.controller SliderTime)Catch()
- )
- Else
- (
- Try(AddNewKey Selection[i].pos.X_Position.controller SliderTime)Catch()
- )
- )
-
-
- )
- )
- MacroScript Create_Key_Position_Y
- ButtonText:"Create Key Position Y"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create a Position Key on Y"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].pos.controller) == Position_list then
- (
- Try(AddNewKey Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].Y_Position.controller SliderTime)Catch()
- )
- Else
- (
- Try(AddNewKey Selection[i].pos.Y_Position.controller SliderTime)Catch()
- )
- )
-
-
-
-
- )
- )
- MacroScript Create_Key_Position_Z
- ButtonText:"Create Key Position Z"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create a Position Key on Z"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].pos.controller) == Position_list then
- (
- Try(AddNewKey Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].Z_Position.controller SliderTime)Catch()
- )
- Else
- (
- Try(AddNewKey Selection[i].pos.Z_Position.controller SliderTime)Catch()
- )
- )
-
-
- )
- )
- MacroScript Create_Explicit_Key_Position_X
- ButtonText:"Create Explicit Key Position X"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create Explicit Key Position X"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].pos.controller) == Position_list then
- (
- Try
- (
- AddNewKey Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].X_Position.controller SliderTime
- SelectKeys Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].Y_Position.controller SliderTime
- SelectKeys Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].Z_Position.controller SliderTime
- DeleteKeys Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].controller #Selection
-
- )
- Catch()
- )
- Else
- (
- Try
- (
- AddNewKey Selection[i].pos.X_Position.controller SliderTime
- SelectKeys Selection[i].pos.Y_Position.controller SliderTime
- SelectKeys Selection[i].pos.Z_Position.controller SliderTime
- DeleteKeys Selection[i].pos.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
- MacroScript Create_Explicit_Key_Position_Y
- ButtonText:"Create Explicit Key Position Y"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create Explicit Key Position Y"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].pos.controller) == Position_list then
- (
- Try
- (
- AddNewKey Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].Y_Position.controller SliderTime
- SelectKeys Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].X_Position.controller SliderTime
- SelectKeys Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].Z_Position.controller SliderTime
- DeleteKeys Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].controller #Selection
-
- )
- Catch()
- )
- Else
- (
- Try
- (
- AddNewKey Selection[i].pos.Y_Position.controller SliderTime
- SelectKeys Selection[i].pos.X_Position.controller SliderTime
- SelectKeys Selection[i].pos.Z_Position.controller SliderTime
- DeleteKeys Selection[i].pos.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
- MacroScript Create_Explicit_Key_Position_Z
- ButtonText:"Create Explicit Key Position Z"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create Explicit Key Position Z"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].pos.controller) == Position_list then
- (
- Try
- (
- AddNewKey Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].Z_Position.controller SliderTime
- SelectKeys Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].Y_Position.controller SliderTime
- SelectKeys Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].X_Position.controller SliderTime
- DeleteKeys Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].controller #Selection
-
- )
- Catch()
- )
- Else
- (
- Try
- (
- AddNewKey Selection[i].pos.Z_Position.controller SliderTime
- SelectKeys Selection[i].pos.Y_Position.controller SliderTime
- SelectKeys Selection[i].pos.X_Position.controller SliderTime
- DeleteKeys Selection[i].pos.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
-
-
- MacroScript Delete_Key_Position_X
- ButtonText:"Delete Key Position X"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Delete a Position Key on X"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].pos.controller) == Position_list then
- (
- Try
- (
- SelectKeys Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].X_Position.controller SliderTime
- DeleteKeys Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].X_Position.controller #Selection
- )
- Catch()
- )
- Else
- (
- Try
- (
- SelectKeys Selection[i].Position.X_Position.controller SliderTime
- DeleteKeys Selection[i].Position.X_Position.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
- MacroScript Delete_Key_Position_Y
- ButtonText:"Delete Key Position Y"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Delete a Position Key on Y"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].pos.controller) == Position_list then
- (
- Try
- (
- SelectKeys Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].Y_Position.controller SliderTime
- DeleteKeys Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].Y_Position.controller #Selection
- )
- Catch()
- )
- Else
- (
- Try
- (
- SelectKeys Selection[i].Position.Y_Position.controller SliderTime
- DeleteKeys Selection[i].Position.Y_Position.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
- MacroScript Delete_Key_Position_Z
- ButtonText:"Delete Key Position Z"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Delete a Position Key on Z"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].pos.controller) == Position_list then
- (
- Try
- (
- SelectKeys Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].Z_Position.controller SliderTime
- DeleteKeys Selection[i].pos.controller[ListCtrl.GetActive Selection[i].pos.controller].Z_Position.controller #Selection
- )
- Catch()
- )
- Else
- (
- Try
- (
- SelectKeys Selection[i].Position.Z_Position.controller SliderTime
- DeleteKeys Selection[i].Position.Z_Position.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
-
- MacroScript Create_Key_Rotation
- ButtonText:"Create Key Rotation"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create a Rotation Key"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return (Try(Selection.count != 0)Catch())
- On isVisible return (Try(Selection.count != 0)Catch())
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- Try(AddNewKey Selection[i].Rotation.controller SliderTime)Catch()
- )
-
- )
- )
- MacroScript Delete_Key_Rotation
- ButtonText:"Delete All Keys Rotation"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Delete All Rotation Keys"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return (Try(Selection.count != 0)Catch())
- On isVisible return (Try(Selection.count != 0)Catch())
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- Try(
- SelectKeys Selection[i].Rotation.controller SliderTime
- DeleteKeys Selection[i].Rotation.controller #Selection
- )Catch()
- )
-
- )
- )
-
-
- MacroScript Create_Key_Rotation_X
- ButtonText:"Create Key Rotation X"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create a Rotation Key on X"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_RotationXYZ()
- On isVisible return Filters.Is_RotationXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Rotation.controller) == Rotation_list then
- (
- Try(AddNewKey Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].X_Rotation.controller SliderTime)Catch()
- )
- Else
- (
- Try(AddNewKey Selection[i].Rotation.X_Rotation.controller SliderTime)Catch()
- )
- )
-
-
- )
- )
- MacroScript Create_Key_Rotation_Y
- ButtonText:"Create Key Rotation Y"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create a Rotation Key on Y"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_RotationXYZ()
- On isVisible return Filters.Is_RotationXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Rotation.controller) == Rotation_list then
- (
- Try(AddNewKey Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].Y_Rotation.controller SliderTime)Catch()
- )
- Else
- (
- Try(AddNewKey Selection[i].Rotation.Y_Rotation.controller SliderTime)Catch()
- )
- )
-
-
-
-
- )
- )
- MacroScript Create_Key_Rotation_Z
- ButtonText:"Create Key Rotation Z"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create a Rotation Key on Z"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_RotationXYZ()
- On isVisible return Filters.Is_RotationXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Rotation.controller) == Rotation_list then
- (
- Try(AddNewKey Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].Z_Rotation.controller SliderTime)Catch()
- )
- Else
- (
- Try(AddNewKey Selection[i].Rotation.Z_Rotation.controller SliderTime)Catch()
- )
- )
-
-
- )
- )
- MacroScript Create_Explicit_Key_Rotation_X
- ButtonText:"Create Explicit Key Rotation X"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create Explicit Key Rotation X"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_RotationXYZ()
- On isVisible return Filters.Is_RotationXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Rotation.controller) == Rotation_list then
- (
- Try
- (
- AddNewKey Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].X_Rotation.controller SliderTime
- SelectKeys Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].Y_Rotation.controller SliderTime
- SelectKeys Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].Z_Rotation.controller SliderTime
- DeleteKeys Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].Rotation #Selection
-
- )
- Catch()
- )
- Else
- (
- Try
- (
- AddNewKey Selection[i].Rotation.X_Rotation.controller SliderTime
- SelectKeys Selection[i].Rotation.Y_Rotation.controller SliderTime
- SelectKeys Selection[i].Rotation.Z_Rotation.controller SliderTime
- DeleteKeys Selection[i].Rotation.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
-
- MacroScript Create_Explicit_Key_Rotation_Y
- ButtonText:"Create Explicit Key Rotation Y"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create Explicit Key Rotation Y"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Rotation.controller) == Rotation_list then
- (
- Try
- (
- AddNewKey Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].Y_Rotation.controller SliderTime
- SelectKeys Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].X_Rotation.controller SliderTime
- SelectKeys Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].Z_Rotation.controller SliderTime
- DeleteKeys Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].controller #Selection
-
- )
- Catch()
- )
- Else
- (
- Try
- (
- AddNewKey Selection[i].Rotation.Y_Rotation.controller SliderTime
- SelectKeys Selection[i].Rotation.X_Rotation.controller SliderTime
- SelectKeys Selection[i].Rotation.Z_Rotation.controller SliderTime
- DeleteKeys Selection[i].Rotation.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
- MacroScript Create_Explicit_Key_Rotation_Z
- ButtonText:"Create Explicit Key Rotation Z"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create Explicit Key Rotation Z"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Rotation.controller) == Rotation_list then
- (
- Try
- (
- AddNewKey Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].Z_Rotation.controller SliderTime
- SelectKeys Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].Y_Rotation.controller SliderTime
- SelectKeys Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].X_Rotation.controller SliderTime
- DeleteKeys Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].controller #Selection
-
- )
- Catch()
- )
- Else
- (
- Try
- (
- AddNewKey Selection[i].Rotation.Z_Rotation.controller SliderTime
- SelectKeys Selection[i].Rotation.Y_Rotation.controller SliderTime
- SelectKeys Selection[i].Rotation.X_Rotation.controller SliderTime
- DeleteKeys Selection[i].Rotation.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
-
-
- MacroScript Delete_Key_Rotation_X
- ButtonText:"Delete Key Rotation X"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Delete a Rotation Key on X"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Rotation.controller) == Rotation_list then
- (
- Try
- (
- SelectKeys Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].X_Rotation.controller SliderTime
- DeleteKeys Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].X_Rotation.controller #Selection
- )
- Catch()
- )
- Else
- (
- Try
- (
- SelectKeys Selection[i].Rotation.X_Rotation.controller SliderTime
- DeleteKeys Selection[i].Rotation.X_Rotation.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
- MacroScript Delete_Key_Rotation_Y
- ButtonText:"Delete Key Rotation Y"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Delete a Rotation Key on Y"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Rotation.controller) == Rotation_list then
- (
- Try
- (
- SelectKeys Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].Y_Rotation.controller SliderTime
- DeleteKeys Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].Y_Rotation.controller #Selection
- )
- Catch()
- )
- Else
- (
- Try
- (
- SelectKeys Selection[i].Rotation.Y_Rotation.controller SliderTime
- DeleteKeys Selection[i].Rotation.Y_Rotation.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
- MacroScript Delete_Key_Rotation_Z
- ButtonText:"Delete Key Rotation Z"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Delete a Rotation Key on Z"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Rotation.controller) == Rotation_list then
- (
- Try
- (
- SelectKeys Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].Z_Rotation.controller SliderTime
- DeleteKeys Selection[i].Rotation.controller[ListCtrl.GetActive Selection[i].Rotation.controller].Z_Rotation.controller #Selection
- )
- Catch()
- )
- Else
- (
- Try
- (
- SelectKeys Selection[i].Rotation.Z_Rotation.controller SliderTime
- DeleteKeys Selection[i].Rotation.Z_Rotation.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
-
-
- MacroScript Create_Key_Scale
- ButtonText:"Create Key Scale"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create a Scale Key"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return (Try(Selection.count != 0)Catch())
- On isVisible return (Try(Selection.count != 0)Catch())
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- Try(AddNewKey Selection[i].Scale.controller SliderTime)Catch()
- )
-
- )
- )
- MacroScript Delete_Key_Scale
- ButtonText:"Delete All Keys Scale"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Delete All Scale Keys"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return (Try(Selection.count != 0)Catch())
- On isVisible return (Try(Selection.count != 0)Catch())
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- Try(
- SelectKeys Selection[i].Scale.controller SliderTime
- DeleteKeys Selection[i].Scale.controller #Selection
- )Catch()
- )
-
- )
- )
-
-
- MacroScript Create_Key_Scale_X
- ButtonText:"Create Key Scale X"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create a Scale Key on X"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_ScaleXYZ()
- On isVisible return Filters.Is_ScaleXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Scale.controller) == Scale_list then
- (
- Try(AddNewKey Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].X_Scale.controller SliderTime)Catch()
- )
- Else
- (
- Try(AddNewKey Selection[i].Scale.X_Scale.controller SliderTime)Catch()
- )
- )
-
-
- )
- )
- MacroScript Create_Key_Scale_Y
- ButtonText:"Create Key Scale Y"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create a Scale Key on Y"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_ScaleXYZ()
- On isVisible return Filters.Is_ScaleXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Scale.controller) == Scale_list then
- (
- Try(AddNewKey Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].Y_Scale.controller SliderTime)Catch()
- )
- Else
- (
- Try(AddNewKey Selection[i].Scale.Y_Scale.controller SliderTime)Catch()
- )
- )
-
-
-
-
- )
- )
- MacroScript Create_Key_Scale_Z
- ButtonText:"Create Key Scale Z"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create a Scale Key on Z"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_ScaleXYZ()
- On isVisible return Filters.Is_ScaleXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Scale.controller) == Scale_list then
- (
- Try(AddNewKey Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].Z_Scale.controller SliderTime)Catch()
- )
- Else
- (
- Try(AddNewKey Selection[i].Scale.Z_Scale.controller SliderTime)Catch()
- )
- )
-
-
- )
- )
- MacroScript Create_Explicit_Key_Scale_X
- ButtonText:"Create Explicit Key Scale X"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create Explicit Key Scale X"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_ScaleXYZ()
- On isVisible return Filters.Is_ScaleXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Scale.controller) == Scale_list then
- (
- Try
- (
- AddNewKey Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].X_Scale.controller SliderTime
- SelectKeys Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].Y_Scale.controller SliderTime
- SelectKeys Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].Z_Scale.controller SliderTime
- DeleteKeys Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].Scale #Selection
-
- )
- Catch()
- )
- Else
- (
- Try
- (
- AddNewKey Selection[i].Scale.X_Scale.controller SliderTime
- SelectKeys Selection[i].Scale.Y_Scale.controller SliderTime
- SelectKeys Selection[i].Scale.Z_Scale.controller SliderTime
- DeleteKeys Selection[i].Scale.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
-
- MacroScript Create_Explicit_Key_Scale_Y
- ButtonText:"Create Explicit Key Scale Y"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create Explicit Key Scale Y"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Scale.controller) == Scale_list then
- (
- Try
- (
- AddNewKey Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].Y_Scale.controller SliderTime
- SelectKeys Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].X_Scale.controller SliderTime
- SelectKeys Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].Z_Scale.controller SliderTime
- DeleteKeys Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].controller #Selection
-
- )
- Catch()
- )
- Else
- (
- Try
- (
- AddNewKey Selection[i].Scale.Y_Scale.controller SliderTime
- SelectKeys Selection[i].Scale.X_Scale.controller SliderTime
- SelectKeys Selection[i].Scale.Z_Scale.controller SliderTime
- DeleteKeys Selection[i].Scale.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
- MacroScript Create_Explicit_Key_Scale_Z
- ButtonText:"Create Explicit Key Scale Z"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create Explicit Key Scale Z"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Scale.controller) == Scale_list then
- (
- Try
- (
- AddNewKey Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].Z_Scale.controller SliderTime
- SelectKeys Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].Y_Scale.controller SliderTime
- SelectKeys Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].X_Scale.controller SliderTime
- DeleteKeys Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].controller #Selection
-
- )
- Catch()
- )
- Else
- (
- Try
- (
- AddNewKey Selection[i].Scale.Z_Scale.controller SliderTime
- SelectKeys Selection[i].Scale.Y_Scale.controller SliderTime
- SelectKeys Selection[i].Scale.X_Scale.controller SliderTime
- DeleteKeys Selection[i].Scale.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
-
-
- MacroScript Delete_Key_Scale_X
- ButtonText:"Delete Key Scale X"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Delete a Scale Key on X"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Scale.controller) == Scale_list then
- (
- Try
- (
- SelectKeys Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].X_Scale.controller SliderTime
- DeleteKeys Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].X_Scale.controller #Selection
- )
- Catch()
- )
- Else
- (
- Try
- (
- SelectKeys Selection[i].Scale.X_Scale.controller SliderTime
- DeleteKeys Selection[i].Scale.X_Scale.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
- MacroScript Delete_Key_Scale_Y
- ButtonText:"Delete Key Scale Y"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Delete a Scale Key on Y"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Scale.controller) == Scale_list then
- (
- Try
- (
- SelectKeys Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].Y_Scale.controller SliderTime
- DeleteKeys Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].Y_Scale.controller #Selection
- )
- Catch()
- )
- Else
- (
- Try
- (
- SelectKeys Selection[i].Scale.Y_Scale.controller SliderTime
- DeleteKeys Selection[i].Scale.Y_Scale.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
-
- MacroScript Delete_Key_Scale_Z
- ButtonText:"Delete Key Scale Z"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Delete a Scale Key on Z"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return Filters.Is_PosXYZ()
- On isVisible return Filters.Is_PosXYZ()
- On Execute Do
- (
-
-
- For i in 1 to selection.count do
- (
- If (Classof Selection[i].Scale.controller) == Scale_list then
- (
- Try
- (
- SelectKeys Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].Z_Scale.controller SliderTime
- DeleteKeys Selection[i].Scale.controller[ListCtrl.GetActive Selection[i].Scale.controller].Z_Scale.controller #Selection
- )
- Catch()
- )
- Else
- (
- Try
- (
- SelectKeys Selection[i].Scale.Z_Scale.controller SliderTime
- DeleteKeys Selection[i].Scale.Z_Scale.controller #Selection
- )
- Catch()
-
- )
- )
- )
- )
-
-
-
-
-
- MacroScript Create_Key_All
- ButtonText:"Create Key All Transforms"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create a Key for all Transforms"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
-
- On isEnabled return (Try(Selection.count != 0)Catch())
- On isVisible return (Try(Selection.count != 0)Catch())
- On Execute Do
- (
-
- If selection.count != 1 then
- For i in 1 to selection.count do
- (
- For N in 1 to $[3].numsubs do
- (
- Try(AddNewKey $[i][3][n].Controller SliderTime)Catch()
- )
- )
- Else
- (
- For N in 1 to $[3].numsubs do
- (
- Try(AddNewKey $[3][n].Controller SliderTime)Catch()
- )
- )
-
-
- )
- )
-
- MacroScript Create_Key_Source_Destination
- ButtonText:"Creates Source->Destination Keys"
- Category:"Keyframe Tools"
- internalCategory:"Keyframe Tools"
- Tooltip:"Create Keys Based off of a Source"
- -- Needs Icon
- --Icon:#("Max_edit_modifiers",1)
- (
- Local SD_Key_Float
-
- On isEnabled return (Try(Selection.count != 0)Catch())
- On isVisible return (Try(Selection.count != 0)Catch())
- On Execute Do
- (
-
-
- Rollout SD_Key_Roll "Source --> Destination Key Creation"
- (
-
-
- Spinner SD_Source "Source Frame:" Across:2 Type:#Integer Width:100 Align:#Left Offset:[30,0] Range:[AnimationRange.Start, AnimationRange.End, SliderTime]
- EditText SD_Dest "Destination:" Align:#Left Offset:[-30,0] Width:200 Text:((((SliderTime /160) as Integer) + 1) as string)
- Label SD_A1 "Example: Source:25 Destination: 0,50,10,24" Align:#Left
- Group "Transforms"
- (
- CheckBox SD_Pos "Position" Across:3 Checked:True
- CheckBox SD_Rot "Rotation" Checked:True
- CheckBox SD_Scale "Scale" Checked:True
- )
- Button SD_Create "Create Keys" Height:20 Align:#Center Width:200
-
- On SD_Create Pressed do
- (
- SD_Dest_Time = #((SD_Dest.text as integer))
- -- Removed Oct 13th 200 by Fred Ruff
- --SD_String = ("SD_Dest_Time = #(" + SD_Dest.text + ")")
- --Try (
- --Execute SD_String
-
- For s in 1 to Selection.count do
- (
- For i in 1 to SD_Dest_Time.count do
- (
-
- If SD_Pos.checked == True then
- (
- AddNewKey Selection[s].pos.controller SD_Dest_Time[i]
- Animate on
- (
- At time SD_Dest_Time[i] (Selection[s].pos = (at time SD_Source.value (Selection[s].pos)))
- )
- )
- If SD_Rot.checked == True then
- (
- AddNewKey Selection[s].Rotation.controller SD_Dest_Time[i]
- Animate on
- (
- At time SD_Dest_Time[i] (Selection[s].Rotation = (at time SD_Source.value (Selection[s].Rotation)))
- )
- )
- If SD_Scale.checked == True then
- (
- AddNewKey Selection[s].Scale.controller SD_Dest_Time[i]
- Animate on
- (
- At time SD_Dest_Time[i] (Selection[s].Scale = (at time SD_Source.value (Selection[s].Scale)))
- )
- )
-
- )
- )
- --)Catch (MessageBox "Invalid Key Array, Example: 20,50,60")
- )
-
- )
-
- -----------------------------------------------------
- ---------------------
- --------------
-
- --If SD_Key_Roll != undefined then DetroyDialog SD_Key_Roll
- CreateDialog SD_Key_Roll width:400 height:110
- --SD_Key_Float = NewRolloutFloater "Create Keyframes" 400 180
- --AddRollout SD_Key_Roll SD_Key_Float
-
- )
-
-
- )
-