1. Home
  2. Docs
  3. renderStacks
  4. Pass Modifier | Pmodifier
  5. LayerSet and SceneXref

LayerSet and SceneXref

renderStacks provide 8 different way to define a collection of object. Among them, the recommend method is LayerSet.

LayerSet is a set of layers(duh!). Whatever objects in that layers becomes the collection of objects you will use.

When you use a LayerSet, your Scene explorer becomes your layerset viewer and editor. If you utilize the nested layer and use Nested LayerSet, you will enjoy even greater flexibility.

But, there is one very important thing you need to remember when you use layer set with scene xref.

When you add scene xref in your scene, all the layers from scene xref are temporary layer which is link to the scene xref file. If you remove or disable the scene xref. The temp layers are removed from scene, too. When you re-import or enable the scene xref, the layers are created again with same name. This can be a problem. If you use renderStacks with GUID mode(As you should).
Like all things in 3dsMax, renderStacks GUID mode doesn’t care about names. That’s how renderStacks still knows an object, layer or whatever even when you change the name.If layers are re-created, the layer will have a new internal GUID for the layer, and this¬†¬† means the layer will lost the connection with layer/layer set assignment.
The solution for this issue is after loading scene xref, Making all scene xref layer as local layers which actually exists in your scene. How can do that? If you make any objects in the temporary layer, that layer is localized and scene xref will use this local layers. A localized layers stay as local even after you delete the objects.
From renderStacks version 1.246, it will register a callback for localizing scene xref layer when a xref scene is loaded. You don”t need to do anything. renderStacks will do for everything you. But, remember the layer will stay in the scene even when you remove the scene xref since they are permanently localized.