Skip to main content
Peter James Zielinski
Known Participant
June 7, 2022
Frage

Is there a shortcut or script to toggle the Clone Tool's Flip Horizontal and Flip Vertical states?

  • June 7, 2022
  • 1 Antwort
  • 565 Ansichten

Looking for a way to toggle the Flip Horizontal and Flip Vertical states in the Clone Source Panel.

 

Ideally by either launching a script or tying it to a keyboard shortcut instead of having to fish through the menu and manually click each time I need it.

 

Does anyone know if this is possible? Thanks!

Dieses Thema wurde für Antworten geschlossen.

1 Antwort

Legend
June 7, 2022

I've tried different ways and it doesn't seem to be possible to change the flipX and flipY brush options. The script works without errors, the object is changed, however, at the moment the set command is applied, these parameters are ignored. ¯\_(ツ)_/¯

 


#target photoshop
var s2t = stringIDToTypeID;

(ref = new ActionReference()).putProperty(s2t('property'), p = s2t('tool'));
ref.putEnumerated(s2t('application'), s2t('ordinal'), s2t('targetEnum'));
var cTool = executeActionGet(ref).getEnumerationType(p);

if (cTool == s2t('cloneStampTool')) {
    var brush = executeActionGet(ref).getObjectValue(s2t('currentToolOptions')).getObjectValue(s2t('brush'));
    (r = new ActionReference()).putEnumerated(s2t("brush"), s2t("ordinal"), s2t("targetEnum"));
    (d = new ActionDescriptor()).putReference(s2t("target"), r);
    d1 = new ActionDescriptor();
    d1.putBoolean(x = s2t("flipX"), !brush.getBoolean(x)); //nothing changes
    d1.putBoolean(y = s2t("flipY"), !brush.getBoolean(y)); //nothing changes
    d.putObject(s2t("to"), s2t("brush"), d1);
    executeAction(s2t("set"), d, DialogModes.NO);
}

 

I love bugs  Photoshop!

Legend
June 7, 2022

Everything works in cs6 and cc2108. Or I didn't understand.

Legend
June 8, 2022

посмотри тут https://community.adobe.com/t5/photoshop-ecosystem-discussions/could-we-get-the-property-of-the-clone-source-pannel/m-p/10344096#M230110

я пасс.


Легче не стало 🙂


Found that these options become available only when we change tool brush to one of the standard ones (from Default Brushes.abr). As soon as any brush parameter changes, they disappear (until the next brush change). At the moment when these parameters are available, they can only be read, not write.

 

At the same time, I did not find these parameters in the abr file itself (they are only inside the brush descriptor, but not the tool) ¯\_(ツ)_/¯