Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- scale the curretly selected cue(s) down to 45% of their current size
- -- (specificially, this was useful for resizing all the video cues for the PYT Dance Company Leiden tour 2015!..)
- -- if one or more cues are selected, it should scale each cue in turn
- -- if any groups are selected, it won’t modify any cues contained within!
- -- if no cues are selected (usually happens when you change cue list), this should do nothing
- set scaleValue to 0.45
- tell front workspace
- set selectedCues to (selected as list)
- if (count selectedCues) is 0 then -- If no cues are selected, do nothing - maybe pop up an alert?
- display dialog "No cues selected!" with title "Whoops!" with icon 2 buttons {"Cancel"} default button 1
- else
- set doneSomething to false
- repeat with eachCue in selectedCues
- if (q type of eachCue) is "Video" then
- -- display dialog "Video Cue" with title "Info" with icon 1 buttons {"OK"} default button 1
- set translation x of eachCue to scaleValue * (translation x of eachCue)
- set translation y of eachCue to scaleValue * (translation y of eachCue)
- set scale x of eachCue to scaleValue * (scale x of eachCue)
- if not preserve aspect ratio of eachCue then set scale y of eachCue to scaleValue * (scale y of eachCue)
- set doneSomething to true
- else if (q type of eachCue) is "Titles" then
- -- display dialog "Titles Cue" with title "Info" with icon 1 buttons {"OK"} default button 1
- set translation x of eachCue to scaleValue * (translation x of eachCue)
- set translation y of eachCue to scaleValue * (translation y of eachCue)
- set scale x of eachCue to scaleValue * (scale x of eachCue)
- if not preserve aspect ratio of eachCue then set scale y of eachCue to scaleValue * (scale y of eachCue)
- set doneSomething to true
- else if (q type of eachCue) is "Fade" then
- -- display dialog "Fade Cue" with title "Info" with icon 1 buttons {"OK"} default button 1
- if do translation of eachCue then
- set translation x of eachCue to scaleValue * (translation x of eachCue)
- set translation y of eachCue to scaleValue * (translation y of eachCue)
- set doneSomething to true
- end if
- -- display dialog "Fade Cue: " & fade mode of eachCue with title "Info" with icon 1 buttons {"OK"} default button 1
- -- warning - ‘fade mode’ seems to always be ‘absolute’ regardless of the actual mode of the cue!..
- if (do scale of eachCue) and (fade mode of eachCue is absolute) then
- set scale x of eachCue to scaleValue * (scale x of eachCue)
- if not preserve aspect ratio of eachCue then set scale y of eachCue to scaleValue * (scale y of eachCue)
- set doneSomething to true
- end if
- end if
- end repeat
- if not doneSomething then display dialog "No cues scaled!.." with title "Whoops!" with icon 2 buttons {"Cancel"} default button 1
- end if
- end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement