3D-Palace Community Forums
 
 
3D-Palace ed209

3d-Palace Video Tutorials Sponsor 3d-palace Training DVD Shop Gamedev 2 (ED209) Commercial Training DL Shop
Go Back   3D-Palace Community Forums > Application Specific and Hardware Subforums > MAYA

MAYA Autodesk's Maya is one of the industries most popular applications, held under contract my many studios around the world it is used in Film, TV, Games, Advertising, Visualisation and a lot more.

» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Site Navigation
3d-Palace
Training DVD Shop
IRC Support channel
Main Forum
Video Tutorials
Paid Memberships
3D Book Store
Advertise with us
» From The Shop
ED209 Gamedev Set
The ATMT Set
The APU Set
The CRUX Set
The Cutty Sark
The Dreadnought
Game Development 1
The Master Seminar
The Obelisk
Stormbringer/Firefly
» Forums List
News and Announcements
3D-Palace Chat
Written Tutorials
Non 3D-Conversation
Review Forum
Competition Forum
Sponsor Lounge
Regular Member Lounge
Bugs Forum
Mentoring Forum
3DS Max Forum
Cinema 4D Forum
Softimage XSI FOrum
Maya Forum
Finished Works Gallery
Member Portfios
WIP Forum
» Today's Birthdays
None
» Stats
Members: 99,974
Threads: 16,649
Posts: 152,855
Top Poster: olblue (7,236)
Welcome to our newest member, moliempormexy
» Online Users: 66
12 members and 54 guests
ashton, dmacb, jorgem, Kristopher_Lee, lovingsaskia, martinr1000, moliempormexy, Pedrit1fo, senor-cojones, Shark84, supertom44, vyeshaun
Most users ever online was 419, 07-02-2007 at 01:19 AM.

3D Palace Training DVDs. Best in the World and Free Postage Too

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 01-03-2008, 03:33 PM
myself44's Avatar
Senior Member
Posts quite a lot
 
Join Date: Jul 2006
Posts: 113
myself44 is an unknown quantity at this point
Credits: 469
Applying material to instances; is it possible?

Hello
Im working on a scene with a couple hundred of chairs, all instanced.
So when I click on one, all the rest gets 'seleceted' along.

But when I right-click on the material and choose "assign material to selected", it only applies to the one I clicked, not the othe hundreds..
so is there a way to assign one time the material on one object and get all the instanced ones applied too ?

It would take me so long to manually select them all

thx
__________________
All glory comes from daring to begin...

It is better to fail in originality than to succeed in imitation.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 01-03-2008, 03:40 PM
InProgress's Avatar
Quite suprisingly clever
Sinister 3D Overlord
 
Join Date: Aug 2007
Location: Between 2 desks
Posts: 1,009
InProgress will become famous soon enoughInProgress will become famous soon enough
Credits: 18,259
Send a message via ICQ to InProgress Send a message via MSN to InProgress
Go into the hypershade window, select your instance, right click on the desired material and select assign to selected. Voila!
__________________
Embrace this moment, REMEMBER, WE ARE eternal. All this pain is AN ILLUSION...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 01-03-2008, 06:37 PM
myself44's Avatar
Senior Member
Posts quite a lot
 
Join Date: Jul 2006
Posts: 113
myself44 is an unknown quantity at this point
Credits: 469
Yea that's what I did first.
The problem is that the material is only applied to the object i selected, and not the other hundreds of instances.
So basically, to apply a same material on all instanced object, I still have to select them one by one and apply.
Im trying to figure a way of applying the material without clicking on every instance.

any ideas ?
__________________
All glory comes from daring to begin...

It is better to fail in originality than to succeed in imitation.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 01-03-2008, 06:39 PM
InProgress's Avatar
Quite suprisingly clever
Sinister 3D Overlord
 
Join Date: Aug 2007
Location: Between 2 desks
Posts: 1,009
InProgress will become famous soon enoughInProgress will become famous soon enough
Credits: 18,259
Send a message via ICQ to InProgress Send a message via MSN to InProgress
Can't you box select all the chairs? If you can try the method from above, with all the chairs selected.
__________________
Embrace this moment, REMEMBER, WE ARE eternal. All this pain is AN ILLUSION...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 01-04-2008, 12:35 AM
hovercrafter's Avatar
Digital Insomniac
Finder of ye hidden forum
 
Join Date: Feb 2005
Location: Ohio
Posts: 396
hovercrafter is on a distinguished road
Credits: 2,725
If all your chairs are named numerically, you could do it with a simple Mel script

for ($r=2;$r<10;$r++){
string $name="pCube" + $r;
string $sel =`select -r $name`;
sets -e -forceElement blinn1SG;
}

Change the $r=2 to the first number in your instanced copies and the $r<10 to the last number (plus 1). Then change the pCube to whatever the names are minus the numbers. Finally change the blinn1SG to the name of the shader you are applying

So if you have chair1 (the original) chari2 chair3 chair4 chair5....chair200 and the sg is named chairSG the script would look like this:

for ($r=2;$r<201;$r++){
string $name="chair" + $r;
string $sel =`select -r $name`;
sets -e -forceElement chairSG;
}
__________________
"In a world gone mad, we will not spank the monkey, but the monkey will spank us. "
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 01-04-2008, 11:24 AM
supertom44's Avatar
Senior Member
Sinister 3D Overlord
 
Join Date: Jul 2005
Location: Uk - Cannock
Posts: 1,048
supertom44 is on a distinguished road
Credits: 15,189
Or go into the outliner and select all the chairs with a simple shift click or two, and then apply the material to them all.
__________________
Si vis pacem, para bellum!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 01-04-2008, 10:00 PM
myself44's Avatar
Senior Member
Posts quite a lot
 
Join Date: Jul 2006
Posts: 113
myself44 is an unknown quantity at this point
Credits: 469
Quote:
Originally Posted by hovercrafter View Post
If all your chairs are named numerically, you could do it with a simple Mel script

for (=2;<10;++){
string ="pCube" + ;
string =`select -r `;
sets -e -forceElement blinn1SG;
}

Change the =2 to the first number in your instanced copies and the <10 to the last number (plus 1). Then change the pCube to whatever the names are minus the numbers. Finally change the blinn1SG to the name of the shader you are applying

So if you have chair1 (the original) chari2 chair3 chair4 chair5....chair200 and the sg is named chairSG the script would look like this:

for (=2;<201;++){
string ="chair" + ;
string =`select -r `;
sets -e -forceElement chairSG;
}
omg it works!!
I never really read about or checked the MEL. Just the word script freaks me out :P

anyway thx very much, that saved me a lot of time!
__________________
All glory comes from daring to begin...

It is better to fail in originality than to succeed in imitation.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 01-04-2008, 10:49 PM
hovercrafter's Avatar
Digital Insomniac
Finder of ye hidden forum
 
Join Date: Feb 2005
Location: Ohio
Posts: 396
hovercrafter is on a distinguished road
Credits: 2,725
Those are about the handiest few lines of MEL there is. I keep a MEL tab with basically that same code in my script editor. I haven't learned a lot of the commands in MEL yet, but it's easy to find them by doing the operation once and copying the command from the script editor into your loop.
__________________
"In a world gone mad, we will not spank the monkey, but the monkey will spank us. "
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0.1
Sponsored Links
3D-Palace ed209


All times are GMT. The time now is 04:09 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Advertisement System V2.5 By   Branden
3d-Palace