Create Multiple Materials - Linked Thread


#1

Continuing the discussion from Create Material:

This thread had a custom script that can create a single material but would like to have it create multiple materials.

it failed on being fed a list. my beginner python skills weres no match.


#2

Assuming you mean the python node shown in this image:

https://discourse-cdn-sjc1.com/business6/uploads/dynamobim/original/3X/6/0/604bf99da98e7ffebc72d14d3ae3e609fbca517c.png

My recommended solution for a Python beginner would be to make a custom node out of the Python node, so you can use Dynamo’s built in list levels and lacing to deal with the replication.


#3

Hi @AdamHamilton,

Or you can use a custom node of an existing package.
Some other custom nodes might be useful to you.


#4

thanks guys. i will give these ideas a shot!


#5

i got this from that Genius Loci set…i think this is where i was getting tripped up. i kept getting expected input string getting list
image


#6

Yes with this part :

#Iterate through the input names list
for n, cl, sp, tar, spC, cp, cpC, trans in zip(names,colors,surfPat,fillPatTargets,surfPatCl,cutPat,cutPatCl,transparency):

#7

i was getting close…but as they say “horseshoes and hand grenades”


#8

I have released a beta of Orchid dealing with Materials and Assets, would you mind testing it?