This project was about creating and editing RenderMan attributes in Maya. preshapemel
attribute was imported to the objects in the scene to switch the points of the actual object with a rib archive or a simple sphere before prman takes the scene over. The interface is created with the help of an rman script which does the heavy lifting of MEL UI programming.
First video on the right is the model without alterations, as seen in the Maya viewport. Second video is with the injected spheres, and the third one is with the custom rib archives.
xxxUI.rman script generates the xxxUI.mel script which is the graphical user interface for the newly created keyable parameters. xxxRI.mel is the actual script file that contains the backend of the replacement process. It calls the procedure in xxxUI.mel file to query the interface and pick up the values. Below are the complete scripts
I added a few more controls to the interface as well as centralizing them on a null (yes they are called nulls, not locators). New controls include the display of the original surface in the render, number of points to be used for injection, and some more experimental (read non-functioning) channels. The reason I wanted everything to be controlled from a null is because there may be more than one object in the scene where an artist might want to slap these injections on.
I have been experimenting with blobby surfaces as well as converting the vertices to particles so that they can generate curves, like a motion trail. This part of the code needs a lot of work, and I also have to find an elegant way to make the converted particles follow the vertices.
NOTE: If you need to delete the rman parameters from your scene and start over and don't have a clean scene file in hand, save your scene file as Maya ascii (it will hang maya for a while if you are on unix), search for all the lines that include "rman" and delete them. RenderMan UI is very buggy in terms of refreshing. Also if you used the script, there should be expressions attached to each shape node linking them to the control null, you will have to go thru each shape node and break the connections manually before removing the RenderMan attributes from the attribute editor. Otherwise you will encounter an epic bug that will force you use the ascii method.