QUOTE(HappyFunJay @ 03/14/06, 12:30 PM) [snapback]231072[/snapback]
For my purposes, I thought an MPxLocatorNode would be simpler and faster. If you care to explain the advantages of using a shape in this situation, I would be pleased to hear them.
locators were really never designed to be textured. They were designed to be a simple visual reference for an artist. Anything that requires texturing is not a quick visual reference. MPxLocator will never work with say, hardware shaders, materials types, environment mapping etc. If you wish these objects to become part of your final game, then you will increasingly walk down the route of hacks .
Rather than trying to re-write a particularly large section of maya (ie, what about materials, environment maps, bump maps, HW shaders, etc ? at some time your artists may want them, extending your locator to handle those situations would be pretty unpleasant work, and fairly unproductive). It will be better to re-use what you can that is already there. Now, joojaa has suggested creating a poly creator node. Basically if your objects are procedural (doesn't mention what game objects these are), this would be a very viable solution. Basically you write a node that outputs a mesh attribute which you can connect to a mesh. (you can also do things like force the mesh into a specific read only layer to prevent editing if needed).
If the objects have been modelled, then it may be better to simply use an input mesh attribute on a locator (as i mentioned before). This would allow you to keep the mesh editing tools, texturing, shading etc with no extra work for yourself. (If those objects are always the same, then you can simply use a file reference).
If you only want the artists to ever select your sepcific locator (rather than accidentally selecting the mesh), then you can use script jobs to prevent them selecting the mesh. Attributes on your locator can always connect to various texture/material properties via connectAttr.
The API itself is not the be-all-and-end-all of programing in maya. mel is just as important to get a plugin to work nicely with maya (often you end up doing more in mel than the API to make it look and feel like maya).
Anyhow, back to work for me. yeah, robthebloke is my site, joojaa's been pretty helpful in that as well...