Answered
any Selection Shape area to rectangular selection shape photoshop Scripts
Please Can You Help Me ?
Change from any selection shape area to rectangular selection shape photoshop Scripts
Please Can You Help Me ?
Change from any selection shape area to rectangular selection shape photoshop Scripts
Courtesy of @c.pfaffenbichler
/* https://community.adobe.com/t5/photoshop-ecosystem-discussions/how-can-i-automatically-create-a-rectangular-layer-mask-from-an-irregularly-shaped-selection/m-p/4905764 */
// make selection rectangular
// 2013, use it at your own risk;
#target photoshop
if (app.documents.length > 0) {
var myDocument = app.activeDocument;
try {
var theBounds = myDocument.selection.bounds;
var theArray = [[theBounds[0], theBounds[1]], [theBounds[2], theBounds[1]], [theBounds[2], theBounds[3]], [theBounds[0], theBounds[3]]];
myDocument.selection.select(theArray, SelectionType.REPLACE, 0, false);
}
catch (e) { }
}
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.