just seems you were doing a lot of extra work in the api, when the exact same thing can be done with less code in mel, or python via cmds or pymel. when in the end execution is almost the same anyways. i tend to switch between the api, and scripting depending on the what needs to be done, and since the api is good for…
Slower way: You could list all layers in the scene and check which have your object. Faster way: If you look in node editor you will see that yourLayer.drawInfo output is connected to yourMesh.drawOverride input. Just check what is the name of the layer there with MEL/Python/C++/C# or whatever is your poison ;) . I'm not a…
Thanks for the replies guys! I come from using XSI and I simply find it a bit odd that the Maya layers have partly the same functionality. It just seems like you would want to know which object a layer is on, as opposed to only knowing which meshes are in a layer. I really prefer Maya to XSI, but it seems odd that there is…