Jump to content

Sniff


AndalayBay

Recommended Posts

AndalayBay

Zilav has released a new version with regular expression support for search and replace. He's asked me to check it out. Uploading here in case in anybody else wants to check it out.

Attachment removed - new version has been released on download page.

 

Full package with description of the features is on Nexus: Sniff download page.

Link to comment
Share on other sites

AndalayBay

I use Sniff to replace asset paths. It has a lot of other features that I don't know what they mean let alone how to use them!

Here's how to use Sniff for a simple search and replace:

image.png

I've set it up to replace the meshes in place. It will find all meshes with the texture on the first line and update them to use the texture on the second line, so it replaces ...\LowerStairs01.dds with ...\BMLowerStairs01.dds. It fixes the entire path.

Here's a search and replace using the new regular expression syntax:

image.png

This time it will place all the updated meshes in a separate folder ...\Sniff\Out. Regular expressions are handy when you have several similarly named textures you wish to replace. Sniff will search for all meshes in the specified directory tree with textures named bravilintwall01.dds, bravilintwall02.dds, bravilintwall03.dds... bravilintwall09.dds and replace them with BMWallInt01.dds, BMWallInt02.dds... BMWallInt09.dds. The \d matches a single digit. (\d) makes it a group which will be replaced with the value in $1, so 1 is replaced with 1, 2 is replaced with 2 etc.

All special characters need to be escaped in regular expressions, so the backslash \ in the path needs to be replaced with \\, where backslash is the escape character.

If you just want to search for a texture, just tick off the Report only box.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...