title: Setting layer visibility in Forge viewer
body: <p>Following <a href="https://forge.autodesk.com/blog/toggle-sheet-layer-visibility" rel="nofollow noreferrer">https://forge.autodesk.com/blog/toggle-sheet-layer-visibility</a> I tried implementing setting layer visibility but the viewer seems to act totally randomly when I call setLayerVisible. There are three possible outcomes:</p>
  <ol>
  <li>The layer becomes invisible just fine.</li>
  <li>The layer does not become invisible but the layer selector UI shows the crossed over eye.</li>
  <li>The layer does not become invisible and the layer selector UI is also unchanged.</li>
  </ol>
  <p>Is the viewer functionality buggy or is there something else affecting this? When actually is it safe to call setLayerVisible to get the wanted effect if I want to hide some layers immediately after the model has loaded? Is it when Autodesk.Viewing.MODEL_LAYERS_LOADED_EVENT fires?</p>
  <p>Also, somewhat related, the layer selector UI never shows the first layer in the list as hidden even if I click on it to hide it.</p>