Notifications
Clear all
[Closed] Collect scene materials in Multi/-SubObject
Sep 07, 2017 8:46 am
Hi!
Is there a script around that would let me do the following?:
Collect all materials from a scene, removal of duplicates (even if they have different settings, what counts is that they’re calling the same texture file) and then lists all of them combined in a Multi/-SubObject material? Assignments to objects in the scene do not matter for now.
Thank you!
2 Replies
Sep 07, 2017 8:46 am
FileNames = #()
Materials = #()
for b in (getclassinstances bitmaptexture) where (f = b.filename) != undefined do
if appendifunique FileNames f do
for r in refs.dependents b where iskindof r material do appendifunique Materials r
Now you can create a MultiMaterial from Materials array.