Python script: replace all selected materials with new ones


I need a script to replace all selected materials with new ones.
The reason is that I can’t export redshift materials in a fbx file. But I want to keep the material slots.
With c4d materials the export works.
Also I need a way to change all rs-materials to c4d materials.

The problem is that I haven’t python experience.

help would be great.


Hi I made this video, so you get the full process :slight_smile:

Let me know if having the full process for a answers is something you like or only the result script interest you. I may do more video like this if people don’t find them too boring :stuck_out_tongue:


Many thanks. Great tutorial.

Is there a way to revert a script effect?


Thanks @gr4ph0s for the illustration

Take a lot at the StarUndo, EndUndo and AddUndo functions.


Quite a neat video. I would like to start a python script to convert cinema materials to and from indigo for cinema 4d, would you think it would be feasible?