Copy link to clipboard
Copied
Hi again, I was wondering, is there any way to fix tilted text? I got about a thousand text layers on psd files that have been tilted using the free transform tool, and I need those layers to be straight, normal, I can fix some of them manually, but some others are not so easy to spot and end up messing my work, so I was wondering if there's some kind of script that undoes(?) that. Maybe even a script that makes a new clean copy of the layer? I honestly dunno how this can be fixed, so I'd love some help here. Thanks.
Here's a little visual representation of my problem. Thanks again 🙂
The following "Undeform" script automates this and works on multiple selected layers:
var layer0 = app.activeDocument.activeLayer;
var r = new ActionReference();
r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("textKey"));
r.putEnumerated(stringIDToTypeID("layer"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
var textKey = executeActionGet(r).getObjectValue(stringIDToTypeID("textKey"));
textKey.erase(stringIDToTypeID("transform"));
var r = new ActionReference();
r.putClass(st
...
Copy link to clipboard
Copied
If the text is a Smart Object, you can right click on the text layer in the Layers panel and choose Reset Transform from the list of commands.
If the text is not a Smart Object, there's no easy way to reset it.
Copy link to clipboard
Copied
Double click the text layer to load it all, and select it with Ctrl/Cmd C
That puts the text with same font, settings, and original size (if size was changed with the Free Transform) into the clipboard.
Click in the document window with Type tool selected, and use Ctrl v to paste the text from the clipboard. That works if you are OK with it being the original size and aspect ratio.
Copy link to clipboard
Copied
This is actually working, is doing pretty much what I wanted, but i gotta do it layer by layer, any idea on how to automate this?
Copy link to clipboard
Copied
The following "Undeform" script automates this and works on multiple selected layers:
Copy link to clipboard
Copied
WHAAAAT!?!?!?!? It does exactly what i want, and even keeps the effects, so it's perfect.
Thank you so much!!!!
Copy link to clipboard
Copied
var layer0 = app.activeDocument.activeLayer;
var r = new ActionReference();
r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("textKey"));
r.putEnumerated(stringIDToTypeID("layer"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
var textKey = executeActionGet(r).getObjectValue(stringIDToTypeID("textKey"));
textKey.erase(stringIDToTypeID("transform"));
var r = new ActionReference();
r.putClass(stringIDToTypeID( "textLayer"));
var d = new ActionDescriptor();
d.putReference(stringIDToTypeID("null"), r);
d.putObject(stringIDToTypeID("using"), stringIDToTypeID("textLayer"), textKey);
executeAction(stringIDToTypeID("make"), d, DialogModes.NO);
layer0.remove();