• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to record an action for healing brush/clone tool ?

Explorer ,
Aug 23, 2017 Aug 23, 2017

Copy link to clipboard

Copied

Hi,

most of you who know photoshop so well, know it's a fact it's impossible to record an healing brush or a stamp tool to apply. Also is knowns the patch tool is the only way to make theses kinds of corrections and record them but the patch tool is not doing a great job as the healing brush, if you know your stuff.

This situation is never the less something many can experience, shooting products and having the same spots, dust and scratch to remove over 600 images is a major challenge.

I know when photoshop cannot record tools or specific task then scripting is the way to go.

Will scripting can open new possibilities to use healing brush corrections over an image to apply over many others doing the same corrections ?

Also I'll post this in the request for new versions or updates coming up in photoshop family page.

Mark

TOPICS
Actions and scripting

Views

8.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Engaged ,
Aug 23, 2017 Aug 23, 2017

Copy link to clipboard

Copied

Hi Mark,

if you have the very same spots to retouch over and over again (aka a dusty sensor), is it conceivable to create Path points and then Stroke them using the Spot Healing Brush Tool?

I know you can stroke entire paths, I've just tested single points and it works the same.

Hope this helps,

Davide

Davide Barranca
PS developer and author => www.ps-scripting.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 24, 2017 Aug 24, 2017

Copy link to clipboard

Copied

If you do not install Adobe Scriptlistener plug-in you should be able to record an action to do that.  You can enable tool recording to record your spot healing brush strokes.   When one install the Scriptlistener plug-in Adobe disables the tool recording feature in the Action palettes option.  You should include a  little script in the action like my  orient.jsx which will  rotate portrait images 90 to landscape so the spots will be in the same location,  Then apply the brush stroke and use orient.jsx a second time to rotate documents the were rotated back to portrait. However Adobe design in a bug in CC 2015.5 and CC 2017 you need to add garbage to the info metadata field first if you using the latest Photoshop versions to get around the bug. That can be done with a open document event handler, Use this script.

if (app.activeDocument.info.instructions.indexOf("Garbage") == -1 ) app.activeDocument.info.instructions = app.activeDocument.info.instructions + "Garbage";

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 24, 2017 Aug 24, 2017

Copy link to clipboard

Copied

JJMack, do you think, in line of principle, that processing an Action that has recorded brush strokes in it through XBytor's Action2JSX could effectively produce the code of scripted brush strokes (among the rest)? I have to test it, but I've vague recollections of having done such experiment in the past resulting in a frozen Photoshop.

Besides, while there's code to programmatically enable/disable ScriptListener logging, I'm not aware of similar code to enable/disable brush strokes logging. Since an Action, as you pointed out, can record them – and SL works based on the same internal events system, there should be a way to do so... maybe. Or maybe not.

Davide Barranca
PS developer and author => www.ps-scripting.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 24, 2017 Aug 24, 2017

Copy link to clipboard

Copied

Davide_Barranca  wrote

JJMack  do you think, in line of principle, that processing an Action that has recorded brush strokes in it through XBytor's Action2JSX could effectively produce the code of scripted brush strokes (among the rest)? I have to test it, but I've vague recollections of having done such experiment in the past resulting in a frozen Photoshop.

Besides, while there's code to programmatically enable/disable ScriptListener logging, I'm not aware of similar code to enable/disable brush strokes logging. Since an Action, as you pointed out, can record them – and SL works based on the same internal events system, there should be a way to do so... maybe. Or maybe not.

No recording  tool used  was added to the Actions. Recordings of tool usages are not actions steps.  So X's script Acton2JSX could not process what is recorded for tools used.

I control in a fashion the scriptlistener plug-in. I can start and stop recording edit and clear its log and extract steps in the background using a Windows BAT command in a small window.  The scriptlistener is installed and loaded in Photoshop so Adobe disable tools recording when I record actions recording tool usage is not possible the option is grayed out in the actions palett's fly-out menu.

The other approach of creating Paths and stroking the work path with tools like the  spot healing brush will work and have the same limitation as recorder tools that all documents process must be the same size and resolution.

Also the tools uses must be set correctly before using this type of actions.   How the tools setting are is the way the strokes will be performed,

    @Echo Off

:loop

    CLS

    rem Display Log File Size

    Dir "%USERPROFILE%\Desktop\ScriptingListenerJS.log" /T:W /4 | find "%ScriptingListenerJS.log"

    rem Display Log Attributes  R read only Locked no R log is Unlocked

    Attrib "%USERPROFILE%\Desktop\ScriptingListenerJS.log"

    Rem If timeout is use the above display lines will refresh over time else you need to use enter or number

    CHOICE /C 123456 /N /T 300 /D 6 /M "Enter:1 to Lock, 2 to Unlock, 3 to Edit, 4 to Clear, 5 To Exit :"

    Echo %ERRORLEVEL%

    if %ERRORLEVEL%==6 goto timeout

    if %ERRORLEVEL%==1 goto one

    if %ERRORLEVEL%==2 goto two

    if %ERRORLEVEL%==3 goto three

    if %ERRORLEVEL%==4 goto four

    if %ERRORLEVEL%==5 goto five

    goto loop

:timeout

    goto loop

:one

    Attrib +R "%USERPROFILE%\Desktop\ScriptingListenerJS.log"

    goto loop

:two

    Attrib -R "%USERPROFILE%\Desktop\ScriptingListenerJS.log"

    goto loop

:three

    Rem inline command use CMD independate command use start

    CMD /C notepad "%USERPROFILE%\Desktop\ScriptingListenerJS.log"

rem Start notepad "%USERPROFILE%\Desktop\ScriptingListenerJS.log"

    goto loop

:four

    Rem If the script log file is unlocked not read only  this echo will clear it

    Echo. > "%USERPROFILE%\Desktop\ScriptingListenerJS.log"

    goto loop

:five

    EXIT

.

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 13, 2018 Mar 13, 2018

Copy link to clipboard

Copied

Where is this script listener executable found? Where is the script interpreter found?

I have the same problem as the topmost post here. I WAS able to record tool movements, and the script would have 'use tool' after it was used. That 'use tool' is no longer seen when recording. In other words, use of that tool is not recorded. However, it did before! It's gone away!

What has happened? This occured upon the upgrade to Photoshop CC 2018, 9.1.1.  I was advised by Facebook's Photoshop page to upgrade to 9.1.2., but Creative cloud didn't tell me I had an upgrade available.  I did that -- installed the upgrade. It still does not record 'use tool'. It only records 'select tool'.

Now, I have contacted Adobe support. I talked to a tech. She didn't even understand how to create a script, so she passed me to a higher level tech. He couldn't get the 'use tool' to show, and told me that 'this is the way it behaves on his computer'. NOT CORRECT! So he escalated my problem to the trash can. I was told over a week ago that I'd get a telephone call. That call hasn't happened yet. It's been  ten days.

Now, this used to work. I have scripts that I created and 'use tool' is shown. Said scripts worked. They no longer do. So, this is another problem. Here are both of them.

1 When creating scripts, 'use tool' is not recorded.
2. Scripts that have 'use tool' in them already and are known to work, do not work. 'use tool' is not recognized.

DOES ANYONE ELSE HAVE THIS PROBLEM? I really want to know if it's my computer (nothing has changed except the new upgrade (or should I call it downgrade?)), or if other people are experiencing this same problem.


I do not own this program yet, and never will, but I have paid close $500 for it. It's not working as expected. And, it seems that with every upgrade, something else breaks. The last time around it was my fonts. My favorites were not saved from session to session, and the previews of fonts were not displayed. That has returned, only to find out that recording actions fails to record 'use tool'.

I'm tired of paying for this program! I expect it to work.  DOES ANYONE ELSE have THIS problem?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 24, 2017 Aug 24, 2017

Copy link to clipboard

Copied

most of you who know photoshop so well, know it's a fact it's impossible to record an healing brush or a stamp tool to apply.

That is untrue as JJMack already pointed out.

But recording such Tools in an Action can be problematic … if I remember correctly changing the diameter of the tool tip for example does not get recorded.

As for the sensor dust I would recommend considering using Camera Raw for this – »Sync Settings« allows to transfer Spot Removal to multiple files for example.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 24, 2017 Aug 24, 2017

Copy link to clipboard

Copied

I seem to remember your right about the brush settings.  I also had problems with the amount of data recorded between slow machines an fast machine.  Action recorded on fast machine there was a great amount of data recorded amount for tool used the actions would overtax slow machines. Some Brush type require sampling a sourse spot first like the healing brush. So the depend on the image content which can also be a Problem recording tools.  I do not use tool recoding....

There are application for sensor dust problems beside ACR for cleaning up RAW files.  If your camera is expensive have your sensor cleaned professionally. I'm a coward  to use more then a bower on my old Canon my newer cannon has a sensor cleaner function.  I still manage to get dust spots at time and only use  ACR and the spot healing brush when needed.

Capture.jpg

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 02, 2017 Oct 02, 2017

Copy link to clipboard

Copied

thanks guys for your input

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 08, 2021 Aug 08, 2021

Copy link to clipboard

Copied

@c.pfaffenbichler – agreed, I would think that ACR would be the preferred way to do this.

 

Another option, if all of the originals are the same dimensions in px and have the same areas to fix... Fix a copy of a single image, then create a difference mask from the fixed image vs. the original image. One can then batch process by recording an action that would load a selection off the difference mask image and use fill (content-aware). 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 13, 2018 Mar 13, 2018

Copy link to clipboard

Copied

I have found the answer.

Navigate to this page:

Record tools in actions in Photoshop

Though this is meant for CS6, it works in CC.

RedGreenBlue1024

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 13, 2018 Mar 13, 2018

Copy link to clipboard

Copied

I did not know about possibility to record your drawings. Because I had grayed 'Allow Tool Recording' I had to find this:

CS6 How to set option Allow Tool Recording ? / in 19.1.2 you still have to disable ScriptListener to use it this option

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 13, 2018 Mar 13, 2018

Copy link to clipboard

Copied

The scriptlisener in an optional download a plug-in most user do not even know it exists.  Installing Scriptlistener diasble tool recording.

IMO Tool recording is not useful generally it may have limited special case use. Tool recording is also not well implemented you need to record steps into these action to compensate for the poor implementation things that should have been recorded like brush tip size change etc are not recorded. So recording actions that use tool recording have many pitfalls.  And Document you play the actions on must be the same size and resolution as the document the action was recorded on. You will not be able to turn Photoshop into a vector pating applicatiom. I do not have a single action that used tool recoring.

Scriptlisener may simply disable it because of its poor implmentation or because Tool Recording does not record action steps and the amount of tool recording data can be huge.

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 14, 2018 Mar 14, 2018

Copy link to clipboard

Copied

The hack ))


Make a copy of the original ScriptListener.8li file.
Open it with any binary editor. Find the text "toolRecording".
Change any letter. Let it be, for example, "toolRRcording". Save the file.
Launch photoshop. Enable the option "Allow tool recording" if not enabled.
Create any Action. Turn on the recording. Draw something, or use an arbitrary tool.
In the file ScriptingListenerJS.log you will see a huge code (not always a huge) code for any tool.

UPD.

proof

1111111.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 14, 2018 Mar 14, 2018

Copy link to clipboard

Copied

Indeed that works and SL content for single drawing is really huge:

(function(){

     (fle = File('~/desktop/ScriptListener.8li')).open('r')

     fle.encoding = 'binary'; var r = fle.read().replace

     (/toolRecording/, 'toolrecording')

     fle.open('w'), fle.write(r), fle.close()

})()

Quite similar code to that which is created when you print something.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 14, 2018 Mar 14, 2018

Copy link to clipboard

Copied

Yes but Brush type tools brush strokes will be huge.  It is most likely why Scriptlisener disable Tool Recording.  Myself I doe not feel the need to use Tool Recording.  I'll leave it OFF.  Actions that have tool recordings will still play fine if the document is the right size..

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 14, 2018 Mar 14, 2018

Copy link to clipboard

Copied

All this is nonsense, this recording of tools. On CS6 it works poorly, on CC2018 it's better, but also garbage. It is almost impossible to accurately put a point, because strongly depends on the zoom scale.

Example entry PathTool and PathSelectTool.
The first screenshot shows the playback of the Action with a ~ 90% scale.
On the second, the same Action is executed when the scale is ~ 2%. The CS6 is still worse.

a1.png

a2.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 14, 2018 Mar 14, 2018

Copy link to clipboard

Copied

I'm sorry for off topic: would you be able to add some Action Descriptor code to ScriptListener.8li that would be recorded to ScriptListenerJS.log? I have no idea what that could be. Just theorically something simple that could be used as regular code.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 14, 2018 Mar 14, 2018

Copy link to clipboard

Copied

I do not quite understand what you mean. Specify in other words.

I once tried to write code for the Path Select Tool (Direct Select Tool, Pen Tool). I managed. But I can not exactly specify the coordinates of the click in order to get to the point, for example, to select a SubPath or a specific point.

In toolRecordingData, all coordinates are specified as Float Value (4 bytes) and they represent some screen coordinates or mouse coordinates. Their accuracy is clearly inadequate. So I "spat" on the whole thing.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 14, 2018 Mar 14, 2018

Copy link to clipboard

Copied

I mean when you have ScriptListener.8li loaded to Plugins or Required folder in your Ps folder you can record many things you do in Photoshop that at same moment you can have avilable in ScriptListenerJS.log. So is that possible for you to add some extra code to ScriptListener.8li that would be recorded to ScriptListenerJS.log along others there already are? I don't know exactly what, but for example something there is already recorded but with more informations or something there isn't recorded yet but would be useful it was.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 15, 2018 Mar 15, 2018

Copy link to clipboard

Copied

I think this can be done by someone who can write anew (or rewrite) the plugin itself using the Adobe SDK. Unfortunately I have absolutely no experience in this (and time).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 04, 2021 Aug 04, 2021

Copy link to clipboard

Copied

Let me ask you one more question. I noticed in CS6 we can't record enabling / disabling 'Allow Tool Recording' by the script, so that menu option (as introduced for the first time in 2012) probably had no its event yet. I don't know from which version of CC we can turn it on / off., but in the current one (22.4.3) it works.

 

Then I recorded by Action an activation of it in latest version. I saved the action to the disk and launched CS6 where I loaded this action. Unfortunately as I expected, the action item for 'Allow Tool Recording' had no name and it didn't work.

 

My question is: do you know how to (de)activate 'Allow Tool Recording' in CS6 by scripting?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Aug 04, 2021 Aug 04, 2021

Copy link to clipboard

Copied

quote

My question is: do you know how to (de)activate 'Allow Tool Recording' in CS6 by scripting?


By @Kukurykus

 

No, I do not know. And why is this even needed? For what? You can play around with hotkeys, but this is complete bullsh*t.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 04, 2021 Aug 04, 2021

Copy link to clipboard

Copied

Crazy idea 🙂 In the later CC you can detect some events when the Brush Tool was used on canvas. In CS6 there's no chance to do it until you Allow Tool Recording and start recording action. So I wanted by the script to enable tool recording to disable it later by the script after I stop recording action (that's a thing to remove as remained trash that was needed only to listen to Brush Tool clicks).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Aug 05, 2021 Aug 05, 2021

Copy link to clipboard

Copied

Nonsense and a waste of time

IMHO

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines