lockNode keeps being added in two places in some files I’ve been working with. I can’t figure out why. When I reference those scenes, they appear broken because of it. Removing the two lines fixes the problem, but they’ll magically reappear pretty often.
Thanks for the input. Still can’t figure this out though. I’m annoyed… it appears my understanding of a “new scene” in maya is incorrect.
1:open a fresh maya and save the scene as empty1.ma
2:hit ctrl-n for a new scene, not saving.
select -ne initialShadingGroup;
lockNode;
save that scene as empty2.ma
3:hit ctrl-n for a new scene. save it has empty3.ma
Now look at the scenes in a text editor. The initalShadingGroup is locked in scenes #2 AAAAAAND #3!!! NOT JUST #2. GRRRRRR! Why is the locked setting being applied to #3???
Maybe the reason for the locking problem has to do with the initialShadingGroup being already “read-only”. Personally, I don’t touch the ISG unless I use it very temporarily while rigging or something. Many other problems are caused by using these nodes. I only use new shader groups for making my own shaders. I really don’t like how Maya creates duplicate shaders can choke your scene too. I’ve worked with scenes with hundreds of shaders (created automatically by Maya) causing the hypergraph to make Maya really chug. For me, this can use some major improvement, but since I haven’t used 2012 all that much for shading I don’t really know if it has been improved, I highly doubt it.
Yeah, hopefully this has been fixed in newer releases (this is 2008), but maybe it’s a “feature” that I don’t understand, instead of a bug.
We’re working with a bunch of pre-existing Maya scenes, and they’ll randomly break every once in a while, when opening a referencing scene. The lockNode is the cause of the problem, and it’s easy to fix on a case by case basis, but is a nasty feature/bug… because opening one scene with the problem will affect any other scenes opened and saved during that Maya session. Nasty bug!
If you really wanted to, you could put hooks into the maya MEL file which opens scenes, and automatically unlock it there every time a scene is opened. I believe the file is pv_performAction.mel
Can you describe how these scenes are “breaking” when you reference them? Your description is a bit vague.
As far as I can recall, those two nodes (initialShadingGroup and initialParticleSE) have always been locked - they’re default required nodes in the scene and should never be deleted, kinda like the default persp camera.
I’ve been working on a project making heavy use of Maya file referencing for the last 3-4 years and never had any issues with either of those nodes being locked… which is why I’m really interested to know what it is that’s breaking?
It sounds to me like trying to unlock those nodes is not the solution you want. The cause of your problems is likely to be something else.
"// Error: file: …Art/Tests/Awesome2.ma line 235: This command requires at least 1 argument(s) to be specified or selected; found 0. // "
The line number always refers to “lockNode;” that follows “select -ne initialShadingGroup;…”
So that error is your first sign that something is wrong, and usually the geometry has lost all of its materials, and is just “wrong” ;).
I believe the initalShadingGroup and initialParticleSE are NOT locked by default, as is the case in scenes saved from a new session in Maya. This problem arose for me in working with scenes that (seemingly) randomly have those two nodes locked, which affected other scenes during that same Maya session.
Let me know if you have any input! I haven’t run into this before either…