Notifications
Clear all

[Closed] Copy material in C++?

Doing that in maxscript is trivial just:

objectA.material = copy objectB.material
objectA.material.name = "whateveryouwant"

Unfortunately using Clone in 3dsmax retrieves a ReferenceTarget* data instead of a new Material pointer.

Anyone has any tip?

Thank you!

2 Replies

doesn’t

Mtl* clonedMat = reinterpret_cast<Mtl*> (originalMat->Clone());

work ?

My bad I didn’t noticed that I can cast the return data to a Mtl pointer!