macros:example:reverseallshapes
Table of Contents
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.” |
From Titan v15 on ClearAll() requires two parameters, see Programmer.Editor.ClearAll.
Simply change the relevant line(s) to Programmer.Editor.ClearAll(false, false)
.
functions
affected properties
control structures
Code
- ReverseAllShapes.xml
<?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>
Explanation
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
How to use it
- e.g. fire a playback with a shape
- fire this macro - the running shape will be inverted and runs in the other direction
You could leave a comment if you were logged in.
macros/example/reverseallshapes.txt · Last modified: 2021/06/10 19:07 by icke_siegen