Adding Attribute to Filetextures?

Adding Attribute to Filetextures?

Anonymous
Not applicable
874 Views
3 Replies
Message 1 of 4

Adding Attribute to Filetextures?

Anonymous
Not applicable

Hello to everybody.. thank you in advance for reading this..

 

to be honest.. i really suck scripting.. I have been trying to build this script for 8 hours and i don't have a single working line.. so i thought asking here first to see if this is easy or if it is complicated..

 

anyway, the thing is.. i render at 4k so i use really heavy textures.. which make maya work uncredably slow.. so what i do.. is two files of the same textures.. one called texture.jpg and another called texture_low.jpg.. so i work with the low res until the final render... however, in complicated scenes where i use lots of textures i lose time and make a lot of mistakes when replacing the low textures for the high textures.. so i thought I can add an attribute on all the 2d.files nodes called "low res".. a checkbox or something.. and when i check the box.. the file path of the file automatically changes to $filname+"_low"+$fileExtension.. and when i uncheck the box erase the "_LOW" from the name... and also create a button to UNCHECK and CHECK all the file nodes.

how hard is to do that???..

 

how hard is to make it default on maya on all the projects?

 

sorry... i know i'm asking for a complete script here.. but is reaally hard to build scripts..

 

thanks in advance.

 

 

0 Likes
Accepted solutions (1)
875 Views
3 Replies
Replies (3)
Message 2 of 4

pshwayka
Advisor
Advisor
Accepted solution

4Render -

If you decide that a script isn't the way to go, there's another way you could do this:

As you know, Maya by default will look for textures in the directory you have designated as the Source Images folder in your project window. If you create a second image folder and call it something like LowRes, you can switch your Source Image folder assignment back and forth between the default SourceImages and your alternate LowRes folder using the project window.

The only caveats to doing it this way are, you need to name the high and low res image files the same name in the two directories,  and you need to not have the path to the image file in the image name field when you first assign it. For example, you would normally call out a texture file as seen in the first image below, but if you omit the folder name, Maya will automatically look in the currently defined Source Images folder. Hopefully this makes sense...

Old.png

 

becomes

 

new.png

 

0 Likes
Message 3 of 4

Anonymous
Not applicable
u are the man pshwayka!.. not a problem.. i'm not lazy.. i just didn't notice that i could do that!.. thank you for the idea!!
0 Likes
Message 4 of 4

pshwayka
Advisor
Advisor

No problem! Glad you like it. Smiley Happy

0 Likes