I'm no expert, but if I remember correctly $ is the current selected object. I don't think it can be multiple, and if it can, I don't think you can apply 1 modifier to multiple objects. Probably you have to cycle through all selected objects and add the modifier per object. Maybe something like (not max syntax I'm sure)…
Hello all! I've been keeping busy trying to learn MEL script but since most of my office use Max, I started doing a bit of Maxscript too. I'm completely self taught at this point and I'm having a little issue. I'm sure it's something simple but I haven't been able to solve this. I have a button with the function as…
this is because if you have multiple object selected you`ll be working with an array instead of just one object. what you`ll need to do is go over each element and run that same bit of code so for example on ButtonSmooth pressed do ( ViewPortVal = SIterations.value RenderVal = RIterations.value for obj in selection do ( if…
2cat is right, you need to loop the selection. However, you can apply a single modifier (instance) to multiple objects, but I don't think that's his intention. I've gotten in the habit of not using $ when making tools for others. Instead I always operate on the selection. To fix your code, just use a variable to adjust the…