Template and reference layer mode only affects some of the layer's objects

Template and reference layer mode only affects some of the layer's objects

Anonymous
Not applicable
4,796 Views
5 Replies
Message 1 of 6

Template and reference layer mode only affects some of the layer's objects

Anonymous
Not applicable

Hey guys.

 

I'm about to pull my hair off, so I thought I'd rather ask someone and make myself dinner while waiting for reply )

 

So I modeled this simple airship, using Maya 2013, and I have all parts in one big group, divided into several smaller groups (wings, engines,...).

 

In the Outliner I select my top group, click "Create a new group and assign selected objects".

So far so good - when I toggle the visibility of my new layer, everything hides.

 

However, when I toggle Template or Reference mode, only some of the objects do so!

 

I already tried to ungroup everything, delete all layers and do it again, but no help. Actually, it's always same parts that are not changing. Unfortunately, I could not find anything weird with those objects. Also my subgroups doesn't seem to be related. For example my sub-group "engines" contains both the wing engine and one at the back, but only wing engines are affected by template mode.

 

Any ideas?

 

Thank you very much for your time.

0 Likes
Accepted solutions (1)
4,797 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

hello

did you try to select  all your object in the viewport (not in the outliner) and then go to your tab layer at the bottom of your channel box  and create a new layer and assign all to this layer .Don't touch you outliner.

maybe after this in your tab layer you can template your object.

Or select all the object  and go to display --> object display ---> template

see the link below you can find  the solution.

template an object

0 Likes
Message 3 of 6

Anonymous
Not applicable

Hello and thank you for your reply.

 

Selecting objects in the scene instead of the Outliner, and then re-creating the layer, did not help. In fact it ended acting same - exactly same parts are refusing to go to template made.

 

However, I noticed something strange when playing with this and trying to figure it out.

 

I believe it all started happening when I went from modeling part to rigging part of this tutorial I'm following. Back then I had my airship layered into those sub-parts (wings etc.), but when I started rigging, I deleted all of them and created one global layer for my whole airship.

 

So I just loaded my old save with sub-layers, selected my airship and created my global layer without deleting sub-layers. Now whole airship won't go to template mode, only visibility toggle works. That's fine to me as all objects are now in two groups, and sub-layers are overriding ref/template toggle.

 

And now the interesting part. If I just "Delete Layer" any sub-layer, my global layer stays broken.

BUT if I "Empty layer" any sub-layer first, immediatelly the global layer template toggle starts working for those objects that were in that sub-layer.

 

To me that's indicating that if you just "Delete Layer", there is still some internal "invisible" connection, that's breaking my objects after I assign them to new layer.

 

Since I can't just undo that and Empty them first, as I already worked for several hours with these broken layers, I'd love to know a way how I can delete those invisible connections, or any other solution to make my layers work properly again.

 

Hope someone understands what I'm trying to say, my English is sometimes confusing even to myself... ))

 

Thank you for your time!

 

 

0 Likes
Message 4 of 6

Anonymous
Not applicable
Accepted solution

Alright guys, SOLVED, got reply from some guy at another forum, so here it is for future reference. Worked like a charm.

 

 

Originally Posted by djx
All transform and shape nodes have an attribute called ".overrideEnabled". When you add something to a displayLayer, a connection is made from the displayLayer to the thing you added, so now the displayLayer sets the overrideEnabled attribute via a direct connection. Then when you delete the layer, the connection is broken, but often you will notice that the sate of the overrideEnabled attribute will be still set to 1. Since these attributes exist at all levels in a heirarchy it is sometimes hard to work out where to go to correct the problem.

You can turn off all unconnected nodes as follows (python)

Code:
import pymel.core as pm
for n in pm.ls(type='transform'):
   try:
      n.overrideEnabled.set(0)
      n.getShape().overrideEnabled.set(0)
   except:
pass

 

0 Likes
Message 5 of 6

SkyDanley
Community Visitor
Community Visitor

There's an easier way without going into python:

 

Select the geometry that is disobeying.

 

Open its Attribute Editor (cntl a)

 

In the top tabs, select one to the right (starting from far left), which is the Shape node.

 

In the menu arrows below, Open the Object Display menu, then open the Drawing Overides menu, and uncheck Enable Overide.

 

The Geometry should work normal now, enabling both the Template and Reference functions to work in Layers.

 

Hope this helps,

 

--Sky

Message 6 of 6

Dautryl
Contributor
Contributor

It's not necessarily easier to use the GUI for that, as you might have multiple objects and shape spread out everywhere that cause the issue. And if you encounter the issue more than once, you might as well have the script to begin with.

0 Likes