Notifications
Clear all

[Closed] Tiny Maxscript question

Hi!

How can I rewrite this code, so that instead of an object name, 3dsmax applies the script on the selected mesh:

 $truck.material = undefined
5 Replies
1 Reply
(@jeff_hanna)
Joined: 10 months ago

Posts: 0

for MyMesh in selection do MyMesh.material = undefined

$.material = undefined

Cant be better right? Thanks

Hey Haider,
$ is shorthand for selection, so if you had 5 objects selected, the above code would wipe all of them.
Likewise, you can mass-change other properties, such as $.height = 20
Which is really useful!

Thank you both.

I am more used to MEL, the Maya script language. I was expecting to write a bit more than just $.