ScriptSpot

Forum topic · General Scripting

Multi/sub Object

By itay tzafrir · 2019-10-27

Description

Hello

I want to assign a Multi/sub Object material to an object by script
I have a Multi/sub Object material named ‘Industrial’ and I want to put it on the object ‘Buildings’

Thanks

Comments (1)

barigazy · 2019-11-18

Try to read MaxScript Help document.
https://help.autodesk.com/view/3DSMAX/2017/ENU/?guid=__files_GUID_7ECB1E…

Lat's say you have an object in the scene "Building" which have multiple Face ID's for
every building element (window, door, etc.) and you create Multymaterial in Material Editor called "Building_Material" in sample slot 3.


-- you can place object and material in some variables
obj = $Building
mtl = meditMaterials["Building_Material"] -- or meditMaterials[3]
obj.material = mtl -- or obj.mat = mtl