Example ====== Shapes - Reverse All Shapes ====== ^ by: | Sebastian Beutel, February 2020 | ^ published: | here | ^ description: | this macro reverses all running shapes | ^ remarks: | requested by Marco Rossoni \\ "is it possible to do a macro that invert the shape direction? thanks a lot ... , e.g. I have a symmetric circle running outwards and with that macro make that circle running inward." | {{tag>shape reverse circle}} **From Titan v15 on ClearAll() requires two parameters, see [[macros:function:programmer.editor.clearall|]].\\ Simply change the relevant line(s) to ''Programmer.Editor.ClearAll(false, false)''.** ==== functions ==== * [[:macros:function:Editor.Shapes.ConnectShapesList]] * [[:macros:function:Editor.Shapes.SelectAllShapes]] * [[:macros:function:ActionScript.SetProperty.Boolean]] * [[:macros:function:Editor.Shapes.Reverse]] * [[:macros:function:Programmer.Editor.ClearAll]] ==== affected properties ==== * [[:macros:property:Editor.Shapes.ProgrammerShapes.Empty]] * [[:macros:property:Editor.Shapes.EditShapesEmpty]] * [[:macros:property:Editor.Shapes.EditingPlaybackShapes]] ==== control structures ==== * [[macros:control_structures|condition]] ===== Code ===== Editor.Shapes.ConnectShapesList() Editor.Shapes.SelectAllShapes() ActionScript.SetProperty.Boolean("Editor.Shapes.EditingPlaybackShapes", true) Editor.Shapes.Reverse() Programmer.Editor.ClearAll() ===== 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.ConnectShapesList()'' lists and highlights all running shapes * ''Editor.Shapes.SelectAllShapes()'' selects all shapes from the programmer if there are any * ''Editor.Shapes.EditingPlaybackShapes'' flag is set if there are any shape being edited * ''Editor.Shapes.Reverse()'' actually reverses all shapes currently being edited * ''Programmer.Editor.ClearAll()'' finally clears programmer and editor ===== How to use it ===== - [[:macros:deploying|make this macro available]] - e.g. fire a playback with a shape - fire this macro - the running shape will be inverted and runs in the other direction ~~DISCUSSION~~