select all running shapes

This is a place for people to chare the custom macros they have written.

Moderator: Moderators

User avatar
sideshowbond
Posts: 146
Joined: 18 Nov 2016, 20:58

select all running shapes

Postby sideshowbond » 01 Jan 2019, 11:43

you can live edit shpaes that are currently running from playbacks. Is there a way to select all running shapes via macro?

Editor.Shapes.ConnectShapesRunning() only tells me wether there are shapes running but doesn't select them. I've found macros to select shapes in the programmer but not the ones playing back from playbacks.
User avatar
Gregory
Site Admin
Posts: 1097
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

Re: select all running shapes

Postby Gregory » 02 Jan 2019, 13:54

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: Select all

<!-- Macro to select all running shapes. Gregory Haynes 02/01/2019 -->
<macro id="Avolites.Macros.SelectAllShapes" name="Select All Shapes">
  <description>Select all running shapes both from playbacks and in the programmer so the properties can be edited on the wheels.</description>
  <sequence>
    <!-- Get all the running shapes -->
    <step>Editor.Shapes.ConnectShapesList()</step>
    <!-- Select all the shapes returned by the previous call -->
    <step condition="!Editor.Shapes.ProgrammerShapes.Empty">Editor.Shapes.SelectAllShapes()</step>
    <!-- Set that playbacks could be being edited -->
    <step condition="!Editor.Shapes.EditShapesEmpty">ActionScript.SetProperty.Boolean("Editor.Shapes.EditingPlaybackShapes", true)</step>
  </sequence>
</macro>
Attachments
SelectAllShapes.xml
(986 Bytes) Downloaded 67 times
User avatar
sideshowbond
Posts: 146
Joined: 18 Nov 2016, 20:58

Re: select all running shapes

Postby sideshowbond » 06 Jan 2019, 00:13

ok, I don't wanna say I fully understood but I see where this is going.

2 questions at this point:
- what is the exclamation mark in the step conditions for?
- this selects both shapes from playbacks and the programmer. Which is what I was after, thank you. Is there - additonally - a way to exclusively select the shapes coming from playbacks?
User avatar
niclights
The eManual
Posts: 4195
Joined: 24 Sep 2004, 01:06
Location: UK

Re: select all running shapes

Postby niclights » 06 Jan 2019, 11:05

In answer to your first question my understanding it that it means NOT (or 'not equal to'). The first part is validating if there are any shapes that can be selected. So 'if programmer shapes is not empty' then 'select the shapes'. Without the exclamation mark it would be saying 'if there are no shapes in the editor' then 'select them'. Which would go a bit wrong.
User avatar
sideshowbond
Posts: 146
Joined: 18 Nov 2016, 20:58

Re: select all running shapes

Postby sideshowbond » 06 Jan 2019, 15:24

awesome, thanks Nic.

My assumption was that it would basically invert the boolean result which pretty much lines up with your explanation. I just wanted to be sure :)

Who is online

Users browsing this forum: No registered users and 0 guests