Key Fram Shape Direction

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

Moderator: Moderators

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

Key Fram Shape Direction

Postby sideshowbond » 21 Dec 2018, 00:35

I managed to make direction work via macros

Code: Select all

          <step>ActionScript.SetProperty.Enum("Selection.Context.Programmer.Direction", "None")</step>
           <step>ActionScript.SetProperty.Enum("Selection.Context.Global.Direction", "None")</step>
           <step>ActionScript.SetProperty.Enum("Editor.Shapes.SetCurrentShapeDirection", "LeftToRight")</step>


What would I need to make the same work for Key Frame Shapes?

Code: Select all

Editor.KeyFrames.CurrentShapeDirection
or

Code: Select all

Editor.KeyFrames.SetCurrentShapeDirection
don't seem to work.
User avatar
Gregory
Posts: 1300
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

Re: Key Fram Shape Direction

Postby Gregory » 02 Jan 2019, 14:56

The function that the Effects Editor window uses to change the direction is Editor.Shapes.SetShapeDirection however the parameters for this are the ID of the shape and the direction object that should be set. The object is not just a name but an item with various parameters which I'm not sure will be possible to access or create in macros. As a key frame shape is still a shape you should be able to use the standard shape functions to make changes but may mean that the UI does not update properly. You can select key frame shapes in the Shape Menu by pressing Edit followed by Select Shape and then use the Direction options within the shape menu.

Code: Select all

<macro id="Avolites.Macros.ProgrammerShapes.Direction.RightToLeft" name="Programmer Shapes Right to Left">
  <description>Select all programmer shapes and set the direction to Right to Left.</description>
  <sequence>
    <!-- Get all the programmer shapes including key frame shapes -->
    <step>Editor.Shapes.ProgrammerShapesList()</step>
    <!-- Select all the programmer shapes -->
    <step condition="!Editor.Shapes.ProgrammerShapes.Empty">Editor.Shapes.SelectAllShapes()</step>
    <!-- Set the direction of the selected shapes -->
    <step condition="!Editor.Shapes.EditShapesEmpty">Editor.Shapes.SetCurrentShapesDirection("RightToLeft")</step>
  </sequence>
</macro>
<macro id="Avolites.Macros.ProgrammerShapes.Direction.LeftToRight" name="Programmer Shapes Left to Right">
  <description>Select all programmer shapes and set the direction to Left To Right.</description>
  <sequence>
    <!-- Get all the programmer shapes including key frame shapes -->
    <step>Editor.Shapes.ProgrammerShapesList()</step>
    <!-- Select all the programmer shapes -->
    <step condition="!Editor.Shapes.ProgrammerShapes.Empty">Editor.Shapes.SelectAllShapes()</step>
    <!-- Set the direction of the selected shapes -->
    <step condition="!Editor.Shapes.EditShapesEmpty">Editor.Shapes.SetCurrentShapesDirection("LeftToRight")</step>
  </sequence>
</macro>

Who is online

Users browsing this forum: No registered users and 24 guests