Photoshop Flip a layer?
How can flip the image layer on the vertical or the Horizontal?
I can only find flip canvas in the library.
or
rotatecurrent layerangle -180 anchor positionbottom center
But not to flip the image?
iMac, Mac OS X (10.6.8)
How can flip the image layer on the vertical or the Horizontal?
I can only find flip canvas in the library.
or
rotatecurrent layerangle -180 anchor positionbottom center
But not to flip the image?
iMac, Mac OS X (10.6.8)
I have found this way but it does not react in quite the same way as selecting it in the menu of photoshop
tell current layer
scalehorizontal scale 100 vertical scale -100 anchor positionbottom center
end tell
I just dug this out my old script stuff. Photoshop has a scriptlistener plugin that you can install. As far as AppleScript is concerned it's JavaScript so you can use it with the do javascript command. It allows you much more access to Photoshop's capabilities as scriptable image editor. The syntax of the plugin output is Photoshop ActionManager code. You could also record your other question using this. Anyhow's this should work although it may look a little alien… Pass it a reference to a document and an app constant… As you can see I used to use this with CS2. Set the active layer first and test it's not background…
on Flip_HV(Doc_Ref, H_or_V)
tell application "Adobe Photoshop CS2"
if H_or_V is vertical then set H_or_V to "Vrtc"
if H_or_V is horizontal then set H_or_V to "Hrzn"
tell Doc_Ref
do javascript "Flip_HV(); function Flip_HV() {function cTID(s) { return app.charIDToTypeID(s); }; function sTID(s) { return app.stringIDToTypeID(s); }; var desc01 = new ActionDescriptor(); var ref01 = new ActionReference(); ref01.putEnumerated( cTID('Lyr '), cTID('Ordn'), cTID('Trgt') ); desc01.putReference( cTID('null'), ref01 ); desc01.putEnumerated( cTID('Axis'), cTID('Ornt'), cTID('" & H_or_V & "') ); executeAction( cTID('Flip'), desc01, DialogModes.NO ); };" show debugger on runtime error
end tell
end tell
end Flip_HV
Hi,
Also, you can use an action :
do action "Flip Vertical" from "Commands" -- flip current Layer
The Action Set "Commands" already exists, just add it to the actions palette.
Photoshop Flip a layer?