CGTalk > Software Specific Forums > Autodesk Maya
To minimize the ads you see on this page create a CGTalk account and log in HERE
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 04-02-2013, 07:09 AM   #1
JakeJK
Know-it-All
 
JakeJK's Avatar
portfolio
Jake Juel Kousholt
Modeller
Framestore
London, United Kingdom
 
Join Date: Apr 2004
Posts: 333
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-02-2013, 07:21 AM   #2
kosingcg
Tatlong Dimension
 
kosingcg's Avatar
portfolio
Oliver Magno
Render TD
MPC - Montreal
Canada
 
Join Date: Feb 2013
Posts: 77
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-02-2013, 07:21 AM   #3
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 06:52 PM.


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