.. _layergroups:

.. image:: ../_images/folder.svg
    :align: left
    :alt: Add New Layer Group.
    :width: 15%


Layer Groups
--------------



Larger, or more complex 3D venues can comprise many :ref:`layers<usinglayers>`. Layer Groups exist to allow these to be managed more effectively, as they can bring order and structure to the :ref:`Layer Manager<layermanager>`. Layer Groups can also have :ref:`transformations<transformations>` applied to them, which in a hierarchal sense are applied to all the groups children. Layer Groups can contain either visual layers, and crucially, other groups.

**Adding a Group**
    To add a Layer Group to the layers list simply press the add group button on the top bar of the :ref:`Layer Manager<layermanager>`, which is the icon in the shape of a folder. This will present a new controller where you can give the group a name to identify it. When this controller is dismissed, the group will exist in the layers list, with the distinguishing feature of an arrow to the left of it. Clicking the group within the layers list will expand and collapse the groups.

**Transformations**
    :ref:`Transformations<transformations>` can be applied to Layer Groups using the group's :ref:`edit pencil<input>`.

**Adding Layers to a Group**
    With a Layer Group already existing in the layers list, to assign a :ref:`layer<usinglayers>` to the group, simply click the :ref:`layer<usinglayers>` and drag it on to the group. The group, as the destination for the assignment, will turn green just prior to the assignment. The :ref:`layer<usinglayers>` will now reposition itself under the group and will be indented slightly from the left.
    Several :ref:`layers<usinglayers>` can be moved at once: Shift-click to select a range (or Ctrl/Cmd-click to select individual layers) and drag the multi-selection into the group together.

**Removing Layers from a Group**
    To remove a :ref:`layer<usinglayers>` from a group that it is already assigned to, expand the group by clicking it, so the members are all visible. Click the :ref:`layer<usinglayers>` in question and drag it to the top of the layers list, until such time as the background colour of the header turns green. Release the mouse, and the :ref:`layer<usinglayers>` will no longer be a member of the group. The :ref:`layer<usinglayers>` will now relocate to the bottom of the sources list.

**Expanding and Collapsing Groups**
    Groups can be expanded or collapsed, to keep the layers list ‘clean’ and free of clutter. To do this, simply click the name of the group in the layers list, and all members will be collapsed. Repeat this process again, and all the members will be expanded.


.. image:: ../_images/layergroup.JPG
    :alt: Layer Groups.
    :width: 80%
    :align: center