How to buy
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © 2025 Autodesk Inc. All rights reserved
Hello! I'm a native C4D user trying to transition to Maya. In C4D, I can alt-drag a material on top of another to replace/overwrite that material everywhere in a scene. Is there an easy way to do this sort of thing in Maya? Maybe something to do with replacing node connections? No idea... Any help is greatly appreciated.
I need a quick method for this because my workflow often requires receiving sketchup models that have multiple shades of colors and I need a quick way of consolidating these... NEED to use maya for Unreal export capabilities.
Solved! Go to Solution.
middle mouse button, drags nodes shaders and most things in maya, welcome to the maya super race. Oh and if you don't know anything about maya, its unstable as balls, save, save and save some more.
You can do this in multiple ways (as most things in Maya), though one easy way is:
In the Hypershade, right-click and hold on a material and choose "Select Objects With Material". Right-click and hold on the material you want to assign and choose "Assign Material To Selection".
thanks guys. i've heard of the 'select objects with material' 'assign material to selection' method before, but i need something with fewer clicks/movements. what do you mean by middle mouse click? which outputs do i connect?
also, back to the many material problem - are there any scripts that can overwrite multiple materials with one? or is there a way to select object assignments of multiple materials at once and reassign those to one material? again, i often get tons of grey colors from sketchup which should just be one grey. this would make it so much easier than having to recreate the materials in unreal when i export. thanks
The MEL script is quite easy (maybe it can be done in a more efficient way, but this works):
$target = `ls -sl -tl 1`;
select -tgl $target;
$selection = `ls -sl`;
for ($material in $selection) {
hyperShade -objects $material;
hyperShade -assign $target;
}
Select the materials you want to replace, select the target material last and run the script.
With the optimize scene command in the file menu you can afterwards remove all unused shading nodes.
Awesome. I will try this after work (this is for a freelance project).
Also, I would do this in C4D, but the way C4D exports doesn't work correctly for UE4. I've narrowed it down to a material problem, as C4D saves FBX with its multiple material tags (a C4D specific thing), and UE4 overwrites them all with a single material. I've been working on a python script for it, but my programming skills are limited, so I've found it easier to learn Maya.
Great script! Totally works. One thing. Is there a way to add an undo just in case I do something stupid? My monkey brain does funny things sometimes that I regret and undos really help to counteract it (if only they were included in real life as well).
I've tried the C4D through maya thing before, but sometimes it imports a little weird, so I figure why not just learn Maya and join the masses who both worship and hate the all-powerful Autodesk?
With two extra lines the complete script can be undone in one go:
undoInfo -ock;
$target = `ls -selection -tail 1`;
select -tgl $target;
$selection = `ls -sl`;
for ($material in $selection) {
hyperShade -objects $material;
hyperShade -assign $target;
}
undoInfo -cck;
You're awesome. Thanks
This is so perfect, it saved me hours of tedious clicking. Thank you!
How to buy
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © 2025 Autodesk Inc. All rights reserved
Type a product name