Notifications
Clear all

[Closed] Auto Assign Material On Creation

Hey guys, first post here. I decided to throw myself head first into MaxScript yesterday and I’ve come across my first barrier.

I can’t figure out how to go about automatically assigning a material to an object upon creation. It was simple to assign a material to everything in the scene, but this is proving to be a lot more difficult. After searching through the MaxScript reference, I’m thinking I might have to do something with a callback script and #nodeCreated, but I’m not sure.

Any advice or input on how to go about doing this?

Thanks in advance.

12 Replies

Did you happen to find the topic “How To … Assign Materials Automatically” in the MAXScript Help?

But yes, using the callback you found would be even better.

Ah, how did I not see that before? I’ll see what I can do with that, and come back if I hit another wall.

Thanks for the response!

Hey PEN, that looks great. But when I tried to drag and drop the .mzp into the viewport, I get this error.

Any idea what the problem is?

 JHN

Do you have vista or win7 with UAC enabled? It probably didn’t allow the script to copy the file to a program directory folder.

-Johan

 PEN

Ya disable the UAC in win 7. It will work then.

Yup, that was it. Thanks guys.

 PEN

Let me know how that tool works out for you. I wrote it years ago for a friend and I don’t know many people that have used it other then him.

it’s the same story for me. Just curious, why does anyone need to assign a material on EVERY node created?

Page 1 / 2