Rock Generator Plugin for Maya (Using Python)

I coded a plugin/shelf tool that allows the user to create rocks within a few clicks. It gives the user a convenient method of quickly generating many rocks with slight variations including modeling, UV unwrapping, and texturing.

The user will be able to reuse this tool to generate rocks in the same file as long as the user names it a unique name. Maya does not handle duplicate names well, except in a few cases where it will increment a counter to the name, hence when creating this plugin, I took caution to naming and revolve most naming around a user entered input with a counter attached.

I implemented a system where the user gets to choose the number of rocks and whether the rocks will be randomly distributed or placed along a curve that the user selects. The code will place the rocks evenly along the said curve.

The user also has the option to add textures and there is a main color the user picks that can be varied. Another option is that the rocks can have moss on them. This is solely created by layering textures on the material. To ensure user friendliness, the tool does not require any external textures, all the textures used are Maya default or come with the default Maya plugin of lookdevKit.mll.

Code here: