# Render Hidden Lights OFF - Option to Bypass Hidden by Category

**URL:** <https://forums.chaos.com/t/render-hidden-lights-off-option-to-bypass-hidden-by-category/94591>\
**Category:** Requests\
**Created:** [June 25, 2019, 4:11pm UTC](https://forums.chaos.com/t/render-hidden-lights-off-option-to-bypass-hidden-by-category/94591 "2019-06-25T16:11:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mitchgates](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@mitchgates](https://forums.chaos.com/u/mitchgates)\
**Post date:** [June 25, 2019, 4:11pm UTC](https://forums.chaos.com/t/render-hidden-lights-off-option-to-bypass-hidden-by-category/94591/1 "2019-06-25T16:11:05Z")

</div>

It would be great to have an option for when you have render hidden lights OFF that it will ignore/bypass them being hidden in the display category level in Max. That way you can toggle the drawing of any lights in you viewports but still have V-Ray only render the ones that are unhidden at the node/layer level. For me using lights category-level hide is always about reducing viewport clutter and never about wanting to disable the effect of the lights.

---

<div class="post-metadata">

**Author:** ![\_Lele](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/_lele/32/49986_2.png) [@\_Lele](https://forums.chaos.com/u/_Lele)\
**Post date:** [June 27, 2019, 1:51am UTC](https://forums.chaos.com/t/render-hidden-lights-off-option-to-bypass-hidden-by-category/94591/2 "2019-06-27T01:51:16Z")

</div>

indeed, the .ishidden property stays false when hiding by category.

As a temporary workaround, add the two attached scripts to the pre and post render slots, and you’re set. 🙂  
Just so you know what they do without running them:  
the Pre-Render one:

```auto
(
    global wereLightsHidden = hideByCategory.lights --store the state in a global variable
    hideByCategory.lights = false --turn hide by category off for lights
)

```

The Post-Render one:

```auto
(
    if wereLightsHidden != undefined do --verify the global variable still exists
    (
        hideByCategory.lights = wereLightsHidden --set the category hiding to what it was before rendering
    )
)

```

They should not error, regardless of mistreatment. At most, they won’t do the re-hiding post render.  
[renderScripts.zip](https://forums.chaos.com/uploads/short-url/8w1z9RSWHrhiZzFwQbuKDGa1B3p.zip) (527 Bytes)
