I'm trying to scale a pathItem using Javascript in Photoshop CC. I need to scale it with the TOPCENTER constraint. This pathItem is tied to a text layer (for type on a path).
When you scale a text layer that is bound to a path in Photoshop, it scales the path, not the text. So I tried scaling the actual layer - but it didn't behave as expected. This just scales the text itself.
app.activeDocument.activeLayer.resize(100, amount, AnchorPosition.TOPCENTER);
It appears "resize" is not one of the methods of the pathItem object. I know you can scale paths in Illustrator with Javascript, but it doesn't work here.
app.activeDocument.pathItems[1].resize(100, amount, AnchorPosition.TOPCENTER);
This documentation for Photoshop seems to suggest that there is no such method. Am I missing something? Or is there some alternate way, like directly changing the position of the points on the path?
I'll take a guess that you haven't selected the path item first. This should work for you