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

Looking for a script to save as targa file

New Here ,
Feb 19, 2022 Feb 19, 2022

Copy link to clipboard

Copied

I'm looking for advice on creating a script to save a copy of my .psd file as .tga. Id like to be able to name the file the same name as a file that already exists in that directory, with the goal to overwrite that file. Is that possible? Any advice would be appreciated 🙂

TOPICS
Actions and scripting

Views

493

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

correct answers 1 Correct answer

LEGEND , Feb 19, 2022 Feb 19, 2022
with(activeDocument) saveAs(fullName, new TargaSaveOptions, true)

Votes

Translate

Translate
Adobe
New Here ,
Feb 19, 2022 Feb 19, 2022

Copy link to clipboard

Copied

Just to add, id like to select 24 bits/pixel if possible

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 ,
Feb 19, 2022 Feb 19, 2022

Copy link to clipboard

Copied

with(activeDocument) saveAs(fullName, new TargaSaveOptions, true)

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 ,
Feb 19, 2022 Feb 19, 2022

Copy link to clipboard

Copied


@Lewis229310445tu7 wrote:

I'm looking for advice on creating a script to save a copy of my .psd file as .tga. Id like to be able to name the file the same name as a file that already exists in that directory, with the goal to overwrite that file. Is that possible? Any advice would be appreciated 🙂


 

Just to be clear:

 

  1. Do you wish to overwrite any existing TGA with the same name as the PSD, retaining the PSD?
  2. Or do you wish to automatically remove the PSD once the TGA version has been saved?
  3. Or do you mean something else?

 

Can you post screenshots or flesh out a more detailed description or step by step?

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
New Here ,
Feb 20, 2022 Feb 20, 2022

Copy link to clipboard

Copied

I would like to retain the PSD - I am basically using photoshop to paint a car in a video game. The game looks for a .tga file sat in a specific folder, and the .tga file has to have a specific name in order to load. Hence why the script will need to overwrite the old file in this folder. I am essentially overwriting the old tga file every time i make a few changes to the paint job, so that i can see how these changes physically look on the 3d model of the car. I am currently manually hitting file > Save a copy > clicking the name of the old file and overwriting it with new .tga file which then immediately loads the paint job in game. Its not a particualarly difficult workflow but I take quite a lot of enjoyment out of painting these cars and a script like this would make the whole experience more streamlined. Thanks for any help you can offer!

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 ,
Feb 20, 2022 Feb 20, 2022

Copy link to clipboard

Copied

Have you tried the script from @Kukurykus ?

 

It uses the same name as the PSD and will silently overwrite any existing TGA with the same name as the PSD using 24-bit colour (alpha channels are not saved with this code, however, they could be with a minor addition).

 

Info on saving/installing scripts here:

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

 

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 ,
Feb 26, 2022 Feb 26, 2022

Copy link to clipboard

Copied

LATEST

Instead of creating new thread he could find similar: looking for a save as Targa script (where like here you marked my answer as correct solution I did so now over there for SuperMerlin).

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 ,
Feb 20, 2022 Feb 20, 2022

Copy link to clipboard

Copied

If the .tga has the same name as .psd then the script I offered is what you look for.

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