mayaSwatches

maya

#1

While most people want to get rid of these, I was wondering where Maya stores the hypershade swatches for each shader node. I know I have seen them before, but I am not sure where. Since Maya displays them and has them rendered out if you have “Render swatches” checked under Settings/Display, I assume they are under some temp directory, but I can’t find them. Does anyone know where they might be?

And if it is not possible to find them, is there a way to generate thumbnails on all shaders for current open scene? I can’t seem to find an easy way that can be scripted. I know there is a way through the hypershade in 2016 to create a tab, set to Disk, and navigate it to point to textures… then Generate swatches from there, but that really isn’t viable to code easily with many of the commands embedded in MEL. Also trying to avoid creating a sphere and applying textures to render out a swatch.


#2

swatches are usually stored relative to the current project. Look for a folder named “.mayaSwatches” and for files with “.swatch” extension.


#3

Yep I have tried that. Unfortunately, the only swatches directory I see is one pertaining to the scene file. I can’t seem to figure out how or when Maya pushes out swatches for shaders.


#4

Good question here Ive made sure to generate and keep them in the past. Im about to search this out specifically for where the ARNOLD shader swatches are being saved to. Mainly it seems on my system the swatches are not updating for Arnold so i’m thinking i need to figure out how to force it!
Another thing i’ll be looking into is if my machine here at home hasnt updated. Im have updated at work, but i need to take a few minutes and update here.


#5

Any success on getting to the bottom of this ? I have been searching but there doesn’t seem to be much info. If they are all wrapped up in the scene swatch file, surely somebody has reverse engineered it over the years ?

I see people have written scripts that create swatch files for .ma or .mb files that may be imported shaders. One thing I must do is query the drag and drop of image from Renderview to hypershade, to see what happens when overriding default swatch, and what Maya is doing under the hood.


#6

Sorry I honestly gave up on this, as I couldn’t seem to find an answer to something I thought was so simple! Wish I could help more.