|04 April 2013||#1|
Jake Juel Kousholt
London, United Kingdom
Join Date: Apr 2004
change default material to incl textures
I'm currently working on a simple script that allows me to change the default material to a material of choice. The purpose of this is to be able to set the "use default material" in the viewport and see all of my objects with a different material without actually assigning any new materials to the invidual objects.
The way I do it at the moment is using this technique:
The only problem is that, when you activate the "Use default material" in your viewport, it does not display textures, so my custom normal shader and my shader with an attached UV tile texture just shows up as grey. Is there a way to pass texture info through the "use default material" function or will I have to find another hack around to make these buttons work as expected?
Let me know if this doesn't make sense.
|04 April 2013||#2|
MPC - Montreal
Join Date: Feb 2013
if you want to execute the auto connect of texture to your default material when maya starts, you must need to edit your startupShader procedure to create a file node with the path of your texture and then connect the outColor of your file texture to the color of the startupShader.
or, create a simple script that create a file texture with the path of the texture and connects to the default shader, and put it to your shelf.
We are the captives of our own identities,
living in the prisons of our own creations.
|Thread Closed share thread|