Author Topic: can no longer find the "delete duplicate materials" script  (Read 1117 times)

2024-10-18, 23:30:52

frv

  • Active Users
  • **
  • Posts: 436
  • Cheers Francois
    • View Profile
    • Web
Hi,
There was someone here at the forum who had a small script that deletes all duplicate materials. Very handy when working with Maxtree trees and plants and when using the C4D asset browser.

I lost the script when reinstalling my system so maybe someone still has it. I did a search but could not find it.

2024-10-21, 14:47:33
Reply #1

John_Do

  • Active Users
  • **
  • Posts: 198
    • View Profile

2024-10-21, 23:10:51
Reply #2

BigAl3D

  • Active Users
  • **
  • Posts: 930
    • View Profile
Is that a built-in script, or one written by a user? Would be nice if the C4D Remove Duplicate Materials worked with Corona mats.

2024-10-22, 00:44:45
Reply #3

frv

  • Active Users
  • **
  • Posts: 436
  • Cheers Francois
    • View Profile
    • Web
Yes John, that's the one. Any idea how I could get it again. Did you post it before.
It was written by a users. I accidentally deleted it when I wiped out my harddisk to install a new system.

2024-10-22, 08:42:19
Reply #4

John_Do

  • Active Users
  • **
  • Posts: 198
    • View Profile
I must have shared it here before but I'm too lazy to look for the post. It's in the attachment.

For context, it's a script from Aturtur that I've fixed and modified. It compares materials' names and merges all those with the same name with the one at the top of the list. It DOESN'T check if the materials data is the same so it might merge materials that are completely different. That's why I modified it to run only on the current material selection.

2024-10-23, 01:01:54
Reply #5

frv

  • Active Users
  • **
  • Posts: 436
  • Cheers Francois
    • View Profile
    • Web
That's exactly what I was looking for. It's a great script for Maxtree assets. Maxtree has done their plants with rather smart materials with all their versions of the same plant using the same materials. But when you open the assets you still get all the same materials loaded. They don't delete well with the C4D delete duplicate.

Thanks !

2024-10-23, 02:17:29
Reply #6

jojorender

  • Active Users
  • **
  • Posts: 265
    • View Profile
frv,
how do save the MT assets to your asset browser?
I always “overwrite” the 5 variations with the first material, so all 6 assets use the same material. Then I group all in a null before adding to the asset browser.
This way, when you load these assets into a scene they only use 1 set of materials for all variations.
But of course, John_Do’s scripts are brilliant!

2024-10-25, 11:23:08
Reply #7

frv

  • Active Users
  • **
  • Posts: 436
  • Cheers Francois
    • View Profile
    • Web
Tx Jojo,
good idea to group the variations. Will start doing that too.

Overwriting is still a hassle. I used to convert the materials to PB. But Stefan from 3Dtools wrote me once that the legacy materials are just as good to work with so I stopped doing so.
Happy I have the script again.