User Tools

Site Tools


macros:example:selectallrunningshapes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

macros:example:selectallrunningshapes [2019/03/10 10:55] (current)
icke_siegen created
Line 1: Line 1:
 +Example
  
 +====== Select all running shapes ======
 +
 +^ by: | Gregory Haynes, January 2019 |
 +^ published: | http://​forum.avolites.com/​viewtopic.php?​f=20&​t=5973 |
 +^ description:​ | Select all running shapes both from playbacks and in the programmer so the properties can be edited on the wheels. |
 +^ remarks: |  |
 +
 +{{tag>​select all shapes}}
 +
 +==== functions ====
 +  * [[:​macros:​function:​Editor.Shapes.ConnectShapesList]]
 +  * [[:​macros:​function:​Editor.Shapes.SelectAllShapes]]
 +  * [[:​macros:​function:​ActionScript.SetProperty.Boolean]]
 +
 +==== affected properties ====
 +  * [[:​macros:​property:​Editor.Shapes.ProgrammerShapes.Empty]]
 +  * [[:​macros:​property:​Editor.Shapes.EditShapesEmpty]]
 +  * [[:​macros:​property:​Editor.Shapes.EditingPlaybackShapes]]
 +
 +==== control structures ====
 +  * conditional steps, see [[macros:​control_structures|]]
 + 
 +===== Code =====
 +
 +>The Editor.Shapes.ConnectShapesRunning function is poorly named as the only thing that it does is determine whether there are any running shapes or not.
 +>
 +>You need to do something like this (which is equivalent to pressing Connect > Shape > Shape):
 +
 +<code xml SelectAllShapes.xml>​
 +<?xml version="​1.0"​ encoding="​utf-8"?>​
 +<​avolites.macros xmlns:​xsi="​http://​www.w3.org/​2001/​XMLSchema-instance"​ xsi:​noNamespaceSchemaLocation="​Avolites.Menus.xsd">​
 +  ​
 +  <macro id="​Avolites.Macros.SelectAllShapes"​ name="​Select 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>​
 +    </​sequence>​
 +  </​macro>​
 +  ​
 +</​avolites.macros>​
 +</​code>​
 +
 +
 +===== 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()''​ gets all running shapes
 +  * ''​Editor.Shapes.SelectAllShapes()''​ then selects all shapes if there are any
 +  * ''​ActionScript.SetProperty.Boolean("​Editor.Shapes.EditingPlaybackShapes",​ true)''​ commands that playback shapes can be edited if there are any
 +
 +===== How to use it =====
 +
 +  * [[:​macros:​deploying|make this macro available]]
 +  * fire the macro to select all running shapes for editing
 +
 +~~DISCUSSION~~
macros/example/selectallrunningshapes.txt ยท Last modified: 2019/03/10 10:55 by icke_siegen