Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script not working #1

Open
artxinyuan opened this issue Sep 15, 2019 · 7 comments
Open

Script not working #1

artxinyuan opened this issue Sep 15, 2019 · 7 comments

Comments

@artxinyuan
Copy link

I believe that the script has been correctly installed, including Intel texture work, but the PS will prompt "Error 8800: the general photoshop Error occurred. This functionality may not be available in this version of photoshop.
-the parameters for command "save"are not currently valid.
The line: 266
ExecuteAction (idsave, des135, DialogModes.NO);
The script was terminated at the last line, and I recorded the saving process with scriptinglistener. I found that the script could not correctly use intelTextureWork, but it worked well when I recorded with scripts like "TGA" "JPG". I am looking forward to your answer, thank you

@yogensia
Copy link
Owner

Hi,

I've tested but have not been able to reproduce the error you describe.

Can you let me know what version of Photoshop do you use? If not sure Open Photoshop, go to the menu Help -> About Photoshop.... There should be a version number below the logo.

Since you mention ScriptingListener, you could try recording the action of saving with the Intel Works plugin as DDS and compare the listener output to that on the script, which you can find near the end of the file.

If there are any other relevant details you can provide feel free to do so.

Thanks.

@artxinyuan
Copy link
Author

Thanks for your reply. In fact, I have tested the following versions: PS cs6, PS cc2015, PS cc2019,
I tried to locate the problem, and when I used ScriptingListener, it didn't seem to listen to IntelTextureWork,
I was wondering if the Intel plug-in was installed incorrectly?The following is my installation method. I copied intelTextureWorks.8bi into the plug-ins folder, and I was able to successfully export DDS with PhotoShop SaveAs intelDDS.
Here is the script I detected using a ScriptingListener

var idsave = charIDToTypeID( "save" );
    var desc14 = new ActionDescriptor();
    var idAs = charIDToTypeID( "As  " );
        var desc15 = new ActionDescriptor();
        var idpres = charIDToTypeID( "pres" );
        desc15.putString( idpres, """Fallout Color (BC1)""" );
       var id = stringIDToTypeID( "" );//This line is not listening to IntelTextureWorks,i tyied to add "Intel® Texture Works Intel® Texture Works" ,And then he will prompt me with the error that I mentioned earlier//
    desc14.putObject( idAs, id, desc15 );
    var idIn = charIDToTypeID( "In  " );
    desc14.putPath( idIn, new File( "G:\\PSPlug\\test.dds" ) );
    var idDocI = charIDToTypeID( "DocI" );
    desc14.putInteger( idDocI, 1500 );
    var idsaveStage = stringIDToTypeID( "saveStage" );
    var idsaveStageType = stringIDToTypeID( "saveStageType" );
    var idsaveBegin = stringIDToTypeID( "saveBegin" );
    desc14.putEnumerated( idsaveStage, idsaveStageType, idsaveBegin );
executeAction( idsave, desc14, DialogModes.NO );

I tried to export DDS using PhotoShop action record and it worked,
I guess it's probably because JSX can't call IntelTexturreWorks, but I believe scripts are normal with you. Do you have any good Suggestions?
Thanks again for your help

@artxinyuan
Copy link
Author

Added a message, I used IntelTextureWorks' version is 1.0.4

@yogensia
Copy link
Owner

Hi,

That's really odd, and makes me think something is off with the Intel DDS plugin, my first suggestion if you haven't tried already is to reinstall that plugin. I also use v1.0.4 (it hasn't received any updates since I wrote this script).

You could also try:

  • Making sure there are no permissions issues by running Photoshop as administrator.
  • Making sure Antivirus software isn't blocking the script/script listener. This is a long shot though. For reference I used Avast in the past, I use Windows Defender now, either has given me any issue but other AV might.
  • Check if the script listener fails only with the Intel DDS plugin or it works with other save formats.

If none of that helps then I'm afraid I can't really tell what might be wrong, maybe google searches regarding this issue with scripting listener might help.

If nothing helps, it's worth mentioning I have another tool for Fallout texture conversion called FalloutTextureWatcher. This one has a different workflow, as it expects you to save TGA files in a source folder and then it will convert them to DDS on the output path you select. Instead of the Intel plugin, this uses TexConv, a commandline tool from Microsoft. Not sure if that will be useful in your workflow but feel free to give it a look. I'll see about publishing a release soon, but you can compile it yourself if you have VS.

FalloutTextureWatcher

@yogensia
Copy link
Owner

PS: Here's the compiled version of the other tool, in case it helps: https://github.com/yogensia/FalloutTextureWatcher/releases/tag/1.0

It's an early version from last year that I didn't have time to test and document enough. I've re-tested it before releasing it though, and have had no issues. An important thing to mention though is that it will only detect files ending in _d.tga, _s.tga and _n.tga, other files will be ignored. For full usage details check the readme in the repository.

@artxinyuan
Copy link
Author

Thanks for your help, I will try to turn off the firewall or run PhotoShop as an administrator.If there are any new developments, I will let you know here.
Real-time monitoring is a solution, but does TexConv support more compression?Like BC7,
Or lossless DDS?

@yogensia
Copy link
Owner

Regarding TexConv, you can find all the details of the command line tool in the wiki link I posted earlier. As you'll see there it is very flexible and does support BC7, GPU compression, and has many alpha and color settings... I'd say it's more complete than Intel's plugin, but harder to use due to being a command line tool, and to get all those features you'd have to run the tool manually or make a custom script. My watcher tool just uses the best compression settings I found for _d _s and _n files.

I'm not sure about its lossless support though, I've never needed that in DDS formats.

In that repository from Microsoft you can also find https://github.com/microsoft/DirectXTex/wiki/Texdiag. Again this one is also a command line tool, but used to get detailed info from existing DDS files, which can be very useful at times, as well.

So If you have very specific needs regarding DDS, I strongly recommend you take a look at those tools.

Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants