Home Technical Talk

Maya: Texture refreshing

polycounter lvl 11
Offline / Send Message
SelwynPhillips polycounter lvl 11
Heyup people, I have a small (yet really frustrating problem). What I want to do is pretty simple. I have a simple diffuse texture that I have edited and saved over in photoshop. In maya go to hit the 'reload' button and the texture doesn't change at all.

I've tried to:
- reload photoshop
- reload maya
- import all my props into a new maya file and try to reload the texture in that file
- restart my laptop
- reduce the file size

I also tried to save the edited file under another name but it doesn't appear in maya even though the file appears in it's file location with windows explorer. In fact any file I save there won't appear in it's file location when using maya.

Replies

  • SelwynPhillips
    Options
    Offline / Send Message
    SelwynPhillips polycounter lvl 11
    Nevermind I saved it in a new folder and it worked... Dunno why but at least it works now :)
  • Deadly Nightshade
    Options
    Offline / Send Message
    Deadly Nightshade polycounter lvl 10
    Here's a texture reload script:
    global proc reloader()
    {
    
    	string $texturename[] = `ls -tex`;
    	int $nothing = 0;
    	int $count = size($texturename);
    	string $whole;
    	while ($nothing < $count)
    	{
    		$whole = $texturename[$nothing] + ".fileTextureName"; 
    		textureReload $whole;
    		++$nothing;
    	}
    
    }
    
    global proc textureReload (string $ftn)
    {
    	string $currentFile = `getAttr $ftn`;
    	if ($currentFile != "")
    	{
    		int $i;
    		string $allTextures[] = `ls -textures`;
    
    		for ($i = 0; $i < size($allTextures); $i++)
    		{
    			if (`nodeType $allTextures[$i]` == "file")
    			{
    				string $ithFile = `getAttr ($allTextures[$i] + ".ftn")`;
    				if ($ithFile == $currentFile)
    				setAttr ($allTextures[$i] + ".ftn") -type "string" $currentFile;
    			}
    		}
    	}
    }
    
    reloader();
    
Sign In or Register to comment.