[FIXED] Gibt es eine Möglichkeit, eine Gruppe in Photoshop zu erweitern?

Ausgabe

Im Bedienfeld „Ebenen“ verfügt Photoshop über eine Dropdown-Option für „Alle Gruppen ausblenden“. Gibt es eine umgekehrte Option, um eine oder alle Gruppen zu erweitern, oder eine Möglichkeit, dies in Javascript zu tun?

Lösung

Bitte schön, die Antwort wird abgeleitet

https://community.adobe.com/t5/photoshop/expand-collapse-a-group-via-javascript/td-p/7286289/page/2?page=1%3F

var groupname = app.activeDocument.activeLayer.name // name of active layer 
var idungroupLayersEvent = stringIDToTypeID( "ungroupLayersEvent" ); // ungroup layer event 

var desc14 = new ActionDescriptor();

var idnull = charIDToTypeID( "null" );

var ref13 = new ActionReference();

var idLyr = charIDToTypeID( "Lyr " );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref13.putEnumerated( idLyr, idOrdn, idTrgt );
desc14.putReference( idnull, ref13 );

executeAction( idungroupLayersEvent, desc14, DialogModes.NO );

var idMk = charIDToTypeID( "Mk  " ); // make action , note the space
var desc15 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );

var ref14 = new ActionReference();

var idlayerSection = stringIDToTypeID( "layerSection" );
ref14.putClass( idlayerSection );
desc15.putReference( idnull, ref14 );
var idFrom = charIDToTypeID( "From" );

var ref15 = new ActionReference();

var idLyr = charIDToTypeID( "Lyr " ); // <-- note the space
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref15.putEnumerated( idLyr, idOrdn, idTrgt );
desc15.putReference( idFrom, ref15 );

executeAction( idMk, desc15, DialogModes.NO );
app.activeDocument.activeLayer.name = groupname // recall group name


Beantwortet von –
Vinay


Antwort geprüft von –
Gilberto Lyons (FixError Admin)

0 Shares:
Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like