Example ====== Set Shapes (and KFS) Direction ====== ^ by: | Gregory Haynes, January 2019 | ^ published: | http://forum.avolites.com/viewtopic.php?f=20&t=5961 | ^ description: | Set keyframe shapes direction | ^ remarks: | | {{tag>keyframe shape direction}} >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. ==== functions ==== * [[:macros:function:Editor.Shapes.ProgrammerShapesList]] * [[:macros:function:Editor.Shapes.SelectAllShapes]] * [[:macros:function:Editor.Shapes.SetCurrentShapesDirection]] ==== affected properties ==== * [[:macros:property:Editor.Shapes.ProgrammerShapes.Empty]] * [[:macros:property:Editor.Shapes.EditShapesEmpty]] ==== control structures ==== * [[macros:control_structures|]] ===== Code ===== Select all programmer shapes and set the direction to Right to Left. Editor.Shapes.ProgrammerShapesList() Editor.Shapes.SelectAllShapes() Editor.Shapes.SetCurrentShapesDirection("RightToLeft") Select all programmer shapes and set the direction to Left To Right. Editor.Shapes.ProgrammerShapesList() Editor.Shapes.SelectAllShapes() Editor.Shapes.SetCurrentShapesDirection("LeftToRight") ===== Explanation ===== This explains the functional steps within the sequence. For all the other XML details please refer to [[:macros:formats_and_syntax#xml_format|Formats and syntax]] * ''Editor.Shapes.ProgrammerShapesList'' gets all the programmer shapes including key frame shapes * ''Editor.Shapes.SelectAllShapes'' selects all the programmer shapes if there are any * ''Editor.Shapes.SetCurrentShapesDirection("...")'' sets the direction of the selected shapes if there are any ===== How to use it ===== This is an example for two shape directions - you may add more macros for other directions. Put the macros on a button to quickly set the direction you want. ~~DISCUSSION~~