The function that the
Effects Editor window uses to change the direction is
Editor.Shapes.SetShapeDirection however the parameters for this are the ID of the shape and the direction object that should be set. The object is not just a name but an item with various parameters which I'm not sure will be possible to access or create in macros. As a key frame shape is still a shape you should be able to use the standard shape functions to make changes but may mean that the UI does not update properly. You can select key frame shapes in the
Shape Menu by pressing
Edit followed by
Select Shape and then use the
Direction options within the shape menu.
Code: Select all
<macro id="Avolites.Macros.ProgrammerShapes.Direction.RightToLeft" name="Programmer Shapes Right to Left">
<description>Select all programmer shapes and set the direction to Right to Left.</description>
<sequence>
<!-- Get all the programmer shapes including key frame shapes -->
<step>Editor.Shapes.ProgrammerShapesList()</step>
<!-- Select all the programmer shapes -->
<step condition="!Editor.Shapes.ProgrammerShapes.Empty">Editor.Shapes.SelectAllShapes()</step>
<!-- Set the direction of the selected shapes -->
<step condition="!Editor.Shapes.EditShapesEmpty">Editor.Shapes.SetCurrentShapesDirection("RightToLeft")</step>
</sequence>
</macro>
<macro id="Avolites.Macros.ProgrammerShapes.Direction.LeftToRight" name="Programmer Shapes Left to Right">
<description>Select all programmer shapes and set the direction to Left To Right.</description>
<sequence>
<!-- Get all the programmer shapes including key frame shapes -->
<step>Editor.Shapes.ProgrammerShapesList()</step>
<!-- Select all the programmer shapes -->
<step condition="!Editor.Shapes.ProgrammerShapes.Empty">Editor.Shapes.SelectAllShapes()</step>
<!-- Set the direction of the selected shapes -->
<step condition="!Editor.Shapes.EditShapesEmpty">Editor.Shapes.SetCurrentShapesDirection("LeftToRight")</step>
</sequence>
</macro>