PDA

View Full Version : Free Photoshop utility for CG Creation



bradl
09-13-2003, 01:19 AM
A quick side note. I too wish CG was working and in fact improved in many ways not even mentioned. Until it is fixed, I am very happy with Photoshop as my main CG. It is fast, has every tool imaginable... it's well... Photoshop... Just to elaborate a little more, I use only PNG's out of it as there is no need to fool with alpha 'channels' and all that rot, as PNG's support 'transparency' at the layer level. Now for the cu-de-gras...

Having to 'save-as', pick the format, name the file, etc., etc. was getting a bit tedious, especially if I had 50 or so 'layers'. Started looking around for a scripting solution. I found dozens of people who were looking for working javascript (PS 7.0 supports Javascript with a download from Adobe) for this exact thing and no one was able to get it right or weren't offering it for free if they did.

I jumped in and not really knowing what the heck I was doing (ok I knew a little...), learned a lot about Javascript and Photoshop automation and behold... I have a working script!

One click (or hotkey) and all your visible layers are saved in a new CG directory where your PSD file resides. Each image is named the same as the layer was, any 'un-rendered' text or layer effects are applied (to the save file only, your original layer remaining totally editable) and it even check for 540 height and will 486 it if needed. Since all your layers are editable in the PSD file, changes are a breeze, make the change, and set only the ones you want updated to visible (the eyeball) and bang, updated...

If there is sufficient interest I will try to find a site where I can post it for download (maybe Paul will let me put it on the FTP server, it is a very small size). I am only charging $50... Just kidding... it's yours if you want it.

Norman
09-13-2003, 07:51 AM
If you don't hear from NewTek today, they're not as smart as I think they are. I'm hoping they have it on their website by the end of next week.

Paul Lara
09-13-2003, 09:52 AM
Brad,
e-mail me the file, making sure that the instructions are included in the zip file, and I'll happily post this as a public download.

Norman
09-13-2003, 10:51 AM
I knew you'd be contacted today!

SBowie
09-13-2003, 12:27 PM
Originally posted by bradl
Until it is fixed, I am very happy with Photoshop as my main CG. It is fast, has every tool imaginable... it's well... Photoshop...
Photoshop? What's Photoshop?

Heheh ... just kidding Brad, 'way ta go' :)

bradl
09-13-2003, 09:21 PM
Originally posted by Paul Lara
Brad,
e-mail me the file, making sure that the instructions are included in the zip file, and I'll happily post this as a public download.

Will do Paul. It may be Monday before you get it but I will try to send it tomorrow (Sunday) when I am at the office...

bradl
09-15-2003, 08:24 AM
Originally posted by Paul Lara

...and that utility has now been uploaded to our Public FTP Server (ftp://ftp.newtek.com/pub/VideoToaster/Downloads/CreateCGPagesJavaScript2.zip)




(which seems to be down at the moment...)

Paul Lara
09-15-2003, 09:29 AM
Originally posted by bradl
(which seems to be down at the moment...)

it's up and running here, Brad.
Anyone else out there having difficulty hitting ftp.newtek.com ?

Peter Palesh
09-15-2003, 12:18 PM
it's up and running here, Brad.

I keep getting a "Server Not Found" error "page cannont be displayed"

Norman
09-15-2003, 03:08 PM
I had no trouble getting the file, but, I get this error message when I try to run it on my non-VT3 machine.

bradl
09-16-2003, 11:59 AM
Anybody else having this "Move" error? It works fine here on two machines, one VT3 and one not. We are running PS 7.01 on XP. Norman let me know if it continues to fail.

I did find one oversight. The 'clean up' of the names function was added at the last minute and it basically strips everything except alpha-numeric characters and underscore. I did not notice that 0 was not included. To fix, in the "function validate(string)" near the bottom add 0 to the string of valid characters:

valid="_123456789abcdefg...

Should become:

valid="_0123456789abcdefg...

Sorry for the oversight. As you will discover the names of your layers are the key to saving files so be careful when making changes and adding new layers so you don't lose any originals.

UPDATE: I fixed this and Paul updated the ZIP file on the Public FTP Server (ftp://ftp.newtek.com/pub/VideoToaster/Downloads/CreateCGPagesJavaScript2.zip). It is named CreateCGPagesJavaScript2.zip and the script is now version 1.1.

Norman
09-16-2003, 01:10 PM
Brad,

I made the change in the script you suggested and I still get the same error. I too am running XP and PhotoShop 7.01

Norman
09-16-2003, 01:11 PM
Brad,

I'm running XP home on a laptop, if that makes any difference.

bradl
09-16-2003, 03:00 PM
Norman,

The Move command at that point is referring to moving the New empty layer created in the temporary document. The empty layer is moved below the Text layer where Merge Down can then be applied which rasterizes everything down to one layer.

FYI, you can run the script in the Debug mode by running the script from FILE | AUTOMATE | SCRIPTS then hold down ALT and the DEBUG option will be available.

Norman, maybe for some reason the new layer is not being created or not being created above the text layer. When the script halts is there a blank layer (named Layer 1) above your Text layer in a temporary document? If not, describe what you do have or what has happened up to this point.

Here is the rough outline of events:

Starts loop of visible layers
Duplicates first visible layer to a new document
Creates temp empty layer
Moves temp layer below Text layer
Merges down Text layer into temp layer
Resizes to 486, if needed
Creates folder
Cleans up name
Saves PNG file
Begins loop on next visible till done.

Norman
09-16-2003, 10:59 PM
Brad,

I have run the script several times and what happens is, the new document is created, but, the old document is is not interacting with the new one, the script just stops. I ran the script in debug mode and that just confused the heck out of me! I'll try it again tomorrow morning, after I've had a chance to re-energize my few remaining brain cells and see if I can wrap my mind around that debug option again. Thanks for hanging in there with me. Does anyone else have it running properly?

bradl
09-16-2003, 11:31 PM
I hope we can get you going. I have a couple of tests we can do but I am not at the office and tomorrow is booked solid. The Debugger can be used to step through the code using the down arrow. At any time you can enter a variable or command item in the input window and get feedback for your current position in the script. Those cryptic commands were grabbed from the 'Action Manager' using the scriptlistener since I couldn't figure out a direct command to do those few steps. Can't imagine why it is stalling, as it works so nice for us here on two machines. Maybe something in your options, preferences or permissions?

I have ordered two books about Javascript and Adobe scripting from Amazon. Maybe they will shed some light on replacing those cryptic commands.

One last thing to look for, you mentioned the temp doc is created but nothing after that, well the temp doc (if I remember correctly) was created by the command (in the Layer Menu) 'Duplicate Layer', Destination: 'New'. At that point a new doc containing your text layer should be sitting there. Does the new doc contain your Text layer or is it blank?

In the mean time, if someone else could try the script and report your findings, I would appreciate it.

FYI- there is a commerical program called Layer Splitter (http://www.metadma.com/LayerSplitter.html) for $50 but it had some drawbacks like no PNG support, you had to flatten your text layers first, it is run outside of PS and it is an all (layers) or nothing deal.

Norman
09-17-2003, 04:50 AM
Brad,

I ran the script a couple more times this morning and discovered a few things. The script is saving the .png files, but it is saving them as separate layers, not merged together. When I deleted the locked background layer, the script appeared to work, but no empty layer was created, nor was there a new merged layer, but, all the new layers were saved in .png format in the appropriate folder, again, just not flattened.

I was testing the script with only a text layer and the background layer, if that makes a difference.

I have to go walking now, so I'll do some more testing when I get back. Thanks!

bradl
09-18-2003, 08:20 AM
Sounds like it is working. Just to make sure we are on the same page, it will save a graphic for each visible normal layer (text or art) as a PNG. It does not flatten the original layers together. The flattening of the temp (actually merging) is a background process that insures your Layer Effects are applied on each temp just prior to PNG saves then it is closed. In the end you will only have your original PSD and a folder full of PNG's, one for each visible layer you started with.

Having unusual options set, adjustment layers, layers sets, etc. are not recommended and will produce unpredictable results. Ideally, you should have a normal Text layer or Artlayer with transparency as needed on that layer with or without Layer Effects (shadow, emboss, etc.).

Keith Gandy
09-18-2003, 03:45 PM
I made an addition to the script, should anyone be interested. Since we use a lot of png files, I added a subroutine that will save all the png files in a subdirectory named after the original file name. This keeps all resulting files from being overwritten, should a second file use the same layer name, plus it keeps things much more orderly.

Norman
09-18-2003, 09:05 PM
Brad,

I finally got your script to work, at least partially. Turns out the problem was My backgroung layer being locked. I deleted the background layer and now, I don't get the error message anymore, but, the script does not finish. All individual pages are saved to my hard drive, but, the flattened image never appears.

bradl
09-21-2003, 12:42 AM
Norm,

That is the way it is supposed to be. The PNG's are the goal. You should have your original PSD basically untouched left open. It is not altered or flattened so you can pull it up later and make any changes or additions and run the script again, this time only on the ones you changed or added by selecting only them with visibility.

bradl
09-21-2003, 12:50 AM
Forgot to mention about the locked background. I could see how that might not duplicate or render properly. I almost always turn it into a regular layer or delete it. Of course, just don't make it visible when you run the script and no problems...

One tip, double click the locked Background layer and you will turn it into a regular layer!

Another tip, use the guides to set up safe-title boundries and center lines and your Text will snap in place.


Enjoy! :cool:

bradl
09-21-2003, 12:05 PM
Reminder:

You must install PS 7 scripting support available from Adobe before this or any script will work:
"Photoshop 7.0 Scripting plug-in v.1.0.2a" (http://www.adobe.com/support/downloads/detail.jsp?ftpID=1535) or from the main Photoshop Windows download page "Photoshop for Windows Downloads" (http://www.adobe.com/support/downloads/product.jsp?product=39&platform=Windows)

Warning:

One point that seems to confuse many people on the Adobe Forums (http://www.adobe.com/support/forums/main.html) is the use of the ScriptListener plugin: ScriptListener.8li that comes in the download.

Do not install this plug-in to the plug-ins directory by default. You can move it there when needed (see docs) but if you leave it there it logs all activity in PS slowing it down and creating huge log files on your C drive named ScriptingListenerJS.log and ScriptingListenerVB.log

Norman
09-21-2003, 12:53 PM
Thyanks Brad,

Everything is working as it should. ScriptListener.8li was not included in my download, or at least it was not installed, but no big deal, your script works fine.

eon5
11-25-2003, 01:18 PM
How i can import the PNG files in ToasterCG ?

bradl
12-02-2003, 11:51 PM
We have discovered you will get an error if you run the script on a PSD saved using UNC paths. If your PSD and the PNG's will be on another workstation, you must map the drive to your computer or create them locally, then move them over.

I have not tried it yet, but, the new Photoshop CS is supposed to have a new feature that will do what my script does as well as many other 'video' friendly features and improvements.

eon5
02-20-2004, 09:59 AM
will any1 make a walkthrought (adding the links to the files) ?

tkx in advance

bradl
02-20-2004, 11:44 AM
Originally posted by eon5
will any1 make a walkthrought (adding the links to the files) ? The link was referenced above:

Create CG Pages JavaScript (ftp://ftp.newtek.com/pub/VideoToaster/Downloads/CreateCGPagesJavaScript2.zip)

Included with the download is a thorough explaination. Post back here if you have any problems. I am still using it with PS CS, no problems.

eon5
02-20-2004, 09:40 PM
i know... i know...

but you said
You must install PS 7 scripting support available from Adobe before this or any script will work...

what is this, i cant understand... excuseme

bradl
02-23-2004, 10:28 AM
Scripting support is an add-on for Photoshop 7 but now comes with Photoshop CS (8). Adobe Downloads has the scripting support installer with instructions. Here is the Adobe Photoshop for Windows - Downloads (http://www.adobe.com/support/downloads/product.jsp?product=39&platform=Windows) link where you can find it.

Be careful with the ScriptListener.8li as it can slow you down and use up hard drive space (see warning above).