View Full Version : assign material without mEdit
andrewjohn81 03-21-2005, 02:02 PM I don't want to open up the material editor every time I want to assing the same material to an object. I want to create a shortcut for it, but am having a hard time. I can create a shortcut for it, but it only works if the material editor is not only open, but it must be active for the shortcut to work. Do I really have to open the mEditor every time I want to assign a material?
|
|
Heya,
Off the top of my head i'd say that the material modifier might help you doing that, apply it to an object, choose a material, then just copy paste or copy instance your modifier to any number of objects - though i'm not sure that it would be a good way to do it.
You could simply select all your objects and apply a single material all at once.
mouj
frogspasm
03-22-2005, 01:23 AM
This is one of those things Maxscript is really nice for.
Assuming you have the material you want to apply to all these objects in slot 1 of the material editor, you could type this line into the MaxScript listener:
m = getMeditmaterial 1
Then select the text and drag and drop it onto a custom toolbar to make a button.
Pressing this button will copy the material you are working with to a variable called "m".
Then type this line in:
$.material = m
And do same thing, select the text and drag and drop it to a custom toolbar to make another button. Pressing this button will copy the material you copied with the last button to whatever objects you have selected.
If you want to copy a material from one object to another object you could make a button out of the last line, just reversed.
m = $.material
This will copy the material from whatever object you have selected into the variable "m".
Then use it with the last button you made to copy it to a new object. Just be sure you only have one object selected when you use this one or it wont work.
After you drag the buttons to the toolbar, you can set them to keyboard shortcuts.
Go to Customize>Customize User Interface and go to the Keyboard tab.
Then under "Category" you'll see a listing called "Drag and Drop". Choose that and then you'll see a list of all the macros you've just created, in the order you made them.
It sounds like you already know how to do the rest.
~Mike D.
CGTalk Moderation
03-22-2005, 01:23 AM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.