OK all you would-be programmers out there — the Autodesk Developer Network (ADN) Plug-in of the Month program was developed to show you just how easy it is to program one of our design application programs. Each month you can download a free plug-in for one of our design applications that includes the source code for plug-in.
// Download via the Autodesk Labs site
This month's plug-in is LocatorLib for Autodesk Maya. In addition to the source code, each plug-in comes with a Read Me that tells you everything you'd ever want to know about the plug-in. This month's Read Me mentions: This plug-in allows users to create different shapes of locators other than Maya's internal built-in locator. It provides a custom command, which has 5 built-in flags, allowing users to create 4 different basic types of locator, specifically an oval-shape locator, a square-shape locator, a cube-shape locator and a sphere-shape locator. It also provides a 'custom' locator which allows the user to define his/her own locator shape with 2 functional modes.
- Shape mode — The user can define a simple shape (2d or 3d) as a continuous closed polyline. This mode accepts files with a serie of 3d coordinates X, Y, Z.
- Solid mode — The user can define a simple solid as a series of triangles. This mode accepts files with a series of 3d coordinates X, Y, Z for vertices, and then a series of triangle vertex indexes.
The plug-in has been tested with Autodesk Maya 2013 and 2013 Extension. Once installed, inside Maya, call the command 'LocatorLibCmd' with one of the following options:
- -o or -oval to create an oval locator
- -s or -square to create a square locator
- -cu or -cube to create a cube locator
- -sp or -sphere to create to create a sphere locator
- -c or -custom to create a custom locator
You can also create an instance of the node locator by using the MEL command 'createNode':
- createNode ovalLocator;
- createNode squareLocator;
- createNode cubeLocator;
- createNode sphereLocator;
- createNode customLocator;
You can provide feedback on this plug-in or any of the other plug-ins of the month.
Shape location is alive in the lab.