Page 1 of 1

select all running shapes

Posted: 01 Jan 2019, 11:43
by sideshowbond
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.

Re: select all running shapes

Posted: 02 Jan 2019, 13:54
by Gregory
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>
    <!-- Get all the running shapes -->
    <!-- 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>

Re: select all running shapes

Posted: 06 Jan 2019, 00:13
by sideshowbond
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?

Re: select all running shapes

Posted: 06 Jan 2019, 11:05
by niclights
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.

Re: select all running shapes

Posted: 06 Jan 2019, 15:24
by sideshowbond
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 :)