How to keep names of imported materials in scene if they already exist in scene too?

How to keep names of imported materials in scene if they already exist in scene too?

Anonymous
Not applicable
1,547 Views
3 Replies
Message 1 of 4

How to keep names of imported materials in scene if they already exist in scene too?

Anonymous
Not applicable

Hello!


I need to import some meshes with same materials in one scene without changing their names. How to keep names of imported materials in scene if they already exist in scene too?


Thank you in advance,

Anna

0 Likes
1,548 Views
3 Replies
Replies (3)
Message 2 of 4

hamsterHamster
Advisor
Advisor

You can't have two shading nodes of the same name in Maya.. once you have Shader, the next will be auto-named Shader1, Shader2.. and so on. When you import anything that has same name, it can be prefixed by a specific string, or by the filename. You can enable RemoveDuplicateShadingNetworks, see File>Import(options)


,,,_°(O__O)°_,,,
Maya2019.1 @ Windows10 & GeForce GTX1080Ti

If the post was helpful, click the
 ACCEPT SOLUTION  button, so others might find it much more easily.

Message 3 of 4

stephenkmann
Collaborator
Collaborator

Maya doesn't really like having nodes have the same names..

 Best practice is to add a suffix, or use a namespace on the imported model. 

 That way you can easily find them and not get them mixed up with clashing node names

 

then you can re-assign the old shaders to the new geo 

 

hth

-=s

0 Likes
Message 4 of 4

askinner6CDVL
Contributor
Contributor

None of these solutions works for the OP's question. Remove duplicate shaders appears to make no difference and reassigning all the materials is not a practical workaround when you have a load of shaders on a model. If you are moving files back and forward between other packages then it's not feasible to be doing that each time.

 

If you use a namespace then try and remove it it will just go ahead and do the renaming anyway!

 

I don't see why if the shader name matches with one that's in the scene it can't simply use the one in the scene. If there's a better way I'd like to know about it, because I can't figure it out.

0 Likes