Scripting the NVIDIA Texture Tools Photoshop Plugin?

I am interested in writing a custom Photoshop script (using their Javascript scripting option) - and am wondering of the Nvidia Texture Tools photoshop plugin is accessible through the Photoshop scripting platform?

I basically need to split my Photoshop image into a 4x4 grid - and export each sub image as a .dds. I would like this scripted because I need to do this to a lot of files - over 300.

Any ideas? Anyone ever tried scripting the Texture Tools plugin before?

Hi johnnyturpin! Sorry for the delay, I just saw this (I usually watch the topics in the Development Tools > Other Tools forun).

The Texture Tools Exporter Photoshop plugin supports Photoshop scripting through both the Javascript and Visual Basic scripting option (as well as, as it turns out, through Windows COM), which I think runs through the same interface that Photoshop actions use internally.

It’s a bit intense, and possible to give the exporter very unusual options, which is why I usually point people to nvtt_export’s command line or recording Photoshop actions directly (which might be an easier way to go here in terms of splitting up images and then saving them out).

However, if you want to script this interface to the Texture Tools Exporter, here’s how to do it (presented somewhat generically, since the exact commands between JS, VB, and COM vary a bit):

  • Install Adobe’s ScriptingListener plugin from Downloadable plug-ins and content in Photoshop. This plugin records all calls to Photoshop’s internal API and saves them out as Javascript and Visual Basic scripts on your desktop.
  • If you save an image using DDS while the ScriptingListener plugin is active, it should record all of the commands and settings you’ll need to set the complete state of the DDS exporter. It’s going to be a bit long and comprehensive - I don’t know if all of them are needed, as the default options will work in many cases.

You can then use the commands it records to save a DDS file and modify them as you need to, or translate them to their COM equivalents to use them from a scripting language other than Javascript or Visual Basic - for instance, from Python.