[Closed] Material add OBJ – custom link checkbox with radiobuttons
I will have many objects, and I need to divide materials and objects. I will always have all the selection.
Really I want to make: I have a car model. All wheels will be ID1 and I need to use black materials only for wheels. The windows will be ID2 and I only need to assign them materials – glass of “different shades”. The sheets on the car will be ID3 and I only need to add metallic colors there.
I will create 3 different listboxes with materials and I will always randomly add material only to selected ID1 or ID2 or ID3 objects.
Sounds like all you need is a single multimaterial with N submaterials
Changing one submtl won’t affect others if that’s what you need. This will limit you to only one material for each ID.
If you need multiple submaterials for each ID that’s whole different story and you won’t be able solve it with multimaterial
Yes, I need multiple submaterials for each ID. How can this problem be solved? It is possible?
Actually you can try to use multimaterial
Just make a separate ID ranges that won’t intersect with each other
i.e
ID#1 uses 1…10
ID#2 uses 11…20
and so on
this way you can have up to 10 random materials for each ‘ID’ and of course you’ll have to modify geometry ID’s to use that kind of randomization
Yes, I understand the material would be one multi / sub and I would change the random ID object, so I will automatically change the materials. I should be able to do this.
Maybe I found a solution. The material must be a multi / sub material. In multi / sub I can change the ID perfectly. I’ve tested one material and it’s okay “Material # 35” but I’ll have a lot of materials, I can write to make this change for all materials / names in the listbox?
on id_change pressed do
(
currentMaterialLibrary[“Material #35”].materialIDList[1] = idSpn.value
)
I don’t know. This piece of code tells almost nothing. Test it and see if it is what you need
Yes the code works, change the ID according to the spinner. But the ID only changes the material “Material # 35”. I would need to get all the names from the listbox.