Ok, so if you select an object and press "f" in the Outliner window, the mesh name gets highlighted and the outliner jumps to its location in the list.
However, if you want to find out which layer something is on, you seem to have to name it right from the start, in order to find it again. Is there no way to find a mesh by clicking it and getting Maya to tell me which layer it is on?
I'm sure this is a question that has been answered, but I couldn't find anything on it. I can select all meshes from a layer, so why can't I select layers from a mesh? It would be really handy to know if and how that works!
Thanks!
Replies
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 Maya guy but I may look into it if you don't know scripting/API. Just don't count that you will get it today .
if that isnt enough i could make you a little bit of python that finds and selects the layer of the selected object or prints the name.
off the top of my head here is the code to have have the layer name print to the console
I really prefer Maya to XSI, but it seems odd that there is no function that simply lets you rightclick on an object and say "find layer". That would be perfect. I don't really want to type a script, though I guess I could make it into a button!
Thanks Passerby, I will check that out. Wasn't aware this is really not in the core program. I like working with layers (too much perhaps).
>>EDIT: YOU ARE RIGHT! The layer is always the top entry in the INPUTS in the Channel Box. I never checked there for the layer name, but apparently that is the easiest way to find it! Thanks for the hint! I am still finding my way around Maya, looking for stuff
It will print:
Download:
http://www.mediafire.com/?m1qetmycuphdq93
@Sinking, ya layers are kinda odd, i either look at the channel box inputs section, or i create groups, assign the layer to just the group, and drag objects into said group.
in maya for pure organization i find groups do a better job, but i assign them to layers sometimes, so i can either set all the contents to not render, or set them to reference mode.
Fun? C# API is similar to C++ API, so translating this to C++ is piece of cake. Some may like it.
Beside this, if you get some new function in Maya 2015 you will not use it too because it's not available in other versions? So I suppose you are still using only Maya 1.0 functions?
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 implementing new nodes, tools, file translators, or anything that needs to iterate over a lot of data, but requires way way more code to do the simple things that the scripting engines can do with very easy to understand simple lines of code.
also legacy is important too since not that many have moved over to 2014 especially the game studios. i know a lot of people still on 2012 and some still on 2010.
@Sinking
if you would like i could make the script also toggle options for the layer the selected object is in too.
Cheers