change default material to incl textures

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 04 April 2013   #1
change default material to incl textures

Hi Guys,

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:

http://www.petemolinero.com/?p=227

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.
__________________

 
Old 04 April 2013   #2
Quote:
Originally Posted by JakeJK
Hi Guys,

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:

http://www.petemolinero.com/?p=227

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.


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.
 
Old 04 April 2013   #3
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 09:06 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.