Python script: replace all selected materials with new ones


#1

Hi,
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.


#2

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:


#3

Many thanks. Great tutorial.

Is there a way to revert a script effect?


#4

Thanks @gr4ph0s for the illustration

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


#5

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?