For one of my modules I need to show some skills in a scripting language, so I took a simple MEL script that I wrote last year and built up on it. I also wanted anybody to be able to use the script, so I created a UI for it.
The script lets the user randomize transformation, rotation and scale for each in a selection of objects. It is meant to give a more natural look to objects like bricks, shingles or anything that has the typical look of duplicated meshes.
This is the window for the script. Some of my fellow students helped me to make it as easy to understand as I could, but for anyone who is a little confused about it, I added a little help button at the top. This was the first time that I created a window for a MEL script.
An example for the rotation feature and how I will probably apply it in the film I am currently working on. I can make shattered geometry look like a simulation ran on it.
I added incremental rotation to randomize objects with a specific amount of sides, like dice. In this case, the increments are 90 degrees, but they can be set to whatever value that is required.
And lastly, scale. Uniform scale was easy to do, but figuring out how to integrate disproportionate scale took me some time.
Just copy the text, paste it into the script editor and run it. This is the first script that I publish and I am sure that there are many things that could be improved. So leave a comment or send me an eamil if you would like to say something about it.
My next step will be to make a python verion of the script which I will publish here again.