Example
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.” |
From Titan v15 on ClearAll() requires two parameters, see Programmer.Editor.ClearAll.
Simply change the relevant line(s) to Programmer.Editor.ClearAll(false, false)
.
<?xml version="1.0" encoding="utf-8"?> <avolites.macros> <macro id="Avolites.Macros.ReverseAllShapes" name="Reverse All Shapes"> <sequence> <step>Editor.Shapes.ConnectShapesList()</step> <step condition="!Editor.Shapes.ProgrammerShapes.Empty">Editor.Shapes.SelectAllShapes()</step> <step condition="!Editor.Shapes.EditShapesEmpty"> ActionScript.SetProperty.Boolean("Editor.Shapes.EditingPlaybackShapes", true) </step> <step>Editor.Shapes.Reverse()</step> <step>Programmer.Editor.ClearAll()</step> </sequence> </macro> </avolites.macros>
This explains the functional steps within the sequence. For all the other XML details please refer to Formats and syntax
Editor.Shapes.ConnectShapesList()
lists and highlights all running shapesEditor.Shapes.SelectAllShapes()
selects all shapes from the programmer if there are anyEditor.Shapes.EditingPlaybackShapes
flag is set if there are any shape being editedEditor.Shapes.Reverse()
actually reverses all shapes currently being editedProgrammer.Editor.ClearAll()
finally clears programmer and editor