Hi, I' trying to assign a material from one box to another
My code looks like this:
global Wall
global WallMaterial
for s in selection do
(
if s.name == 'WallObject' do
(
Wall = s
)
if s.name == 'WallObject' do
(
WallMaterial = s.mat
)
)
Wall.mat = WallMaterial
And on execution it throw me an error:
-- Unknown property: "mat" in Wall
-- MAXScript callstack:
-- thread data: threadID:16784
-- ------------------------------------------------------
-- [stack level: 0]
-- In top-level
Can someone help me please
Solved! Go to Solution.
Solved by miauuuu. Go to Solution.
Maybe something like this:
(
local WallObj = undefined
local WallMaterial = undefined
selObjsArr = selection as array
for s in selObjsArr where s.name == "WallObject" do WallMaterial = s.material
for s in selObjsArr where s.name != "WallObject" do s.material = WallMaterial
)
Can't find what you're looking for? Ask the community or share your knowledge.