# V-Ray Proxy Visibility Lists via mel / python?

**URL:** <https://forums.chaos.com/t/v-ray-proxy-visibility-lists-via-mel-python/94636>\
**Category:** General\
**Created:** [June 27, 2019, 5:32pm UTC](https://forums.chaos.com/t/v-ray-proxy-visibility-lists-via-mel-python/94636 "2019-06-27T17:32:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![brobins](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/brobins/32/5913_2.png) [@brobins](https://forums.chaos.com/u/brobins)\
**Post date:** [June 27, 2019, 5:32pm UTC](https://forums.chaos.com/t/v-ray-proxy-visibility-lists-via-mel-python/94636/1 "2019-06-27T17:32:24Z")

</div>

Hi there,

Would anyone be able to tell me if its possible to access the proxy mesh visibility lists via script? For example, if you had a list of many meshes you wanted to change the visibility of but didn’t really want to trawl through the list and double click each one?

Would appreciate any advice.

Thank you!

---

<div class="post-metadata">

**Author:** ![ali\_cgi](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@ali\_cgi](https://forums.chaos.com/u/ali_cgi)\
**Post date:** [June 28, 2019, 10:13am UTC](https://forums.chaos.com/t/v-ray-proxy-visibility-lists-via-mel-python/94636/2 "2019-06-28T10:13:03Z")

</div>

Was trying to get some info on this myself but havnt got an answer yet, this would be a great feature though!.  
I was thinking if possible then this could be controlled via an xml lists for differernt configurations of visibility,  
Somebody please help  
[https://forums.chaosgroup.com/forum/v-ray-for-maya-forums/v-ray-for-maya-sdk/1038574-conrol-proxy-mesh-visibility-via-xml-file](https://forums.chaosgroup.com/forum/v-ray-for-maya-forums/v-ray-for-maya-sdk/1038574-conrol-proxy-mesh-visibility-via-xml-file)

---

<div class="post-metadata">

**Author:** ![brobins](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/brobins/32/5913_2.png) [@brobins](https://forums.chaos.com/u/brobins)\
**Post date:** [June 28, 2019, 10:44am UTC](https://forums.chaos.com/t/v-ray-proxy-visibility-lists-via-mel-python/94636/3 "2019-06-28T10:44:22Z")

</div>

Yes this would be great. Any info appreciated.

Many Thanks

---

<div class="post-metadata">

**Author:** ![Miro](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/miro/32/2302_2.png) [@Miro](https://forums.chaos.com/u/Miro)\
**Post date:** [June 28, 2019, 12:08pm UTC](https://forums.chaos.com/t/v-ray-proxy-visibility-lists-via-mel-python/94636/4 "2019-06-28T12:08:37Z")

</div>

Hi,

You can use `setAttr mesh_vraymesh.visibilityListNames[n] x` where **n** is the index of the object in the list you want hidden and **x** is the state (1 is hidden, 0 is visible when set to Exclude).

And the example below will change the visibility of a specific object by name, in this case pCylinderShape1

```auto
int $size = `getAttr -s mesh_vraymesh.objectListNames`;
int $i;
for ($i=0; $i<$size; $i++) {
    if (`getAttr mesh_vraymesh.objectListNames[$i]`=="pCylinderShape1") {
        setAttr mesh_vraymesh.visibilityListNames[$i] 1;
    }
}

```

---

<div class="post-metadata">

**Author:** ![francomanko](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/francomanko/32/1722_2.png) [@francomanko](https://forums.chaos.com/u/francomanko)\
**Post date:** [June 28, 2019, 12:16pm UTC](https://forums.chaos.com/t/v-ray-proxy-visibility-lists-via-mel-python/94636/5 "2019-06-28T12:16:14Z")

</div>

yeah i wanted the same thing, so just added the commands to a marking menu. Probably not as pretty as the solution above but works on what you have selected.

```auto

string $ft[] = `ls -sl`;

for($i=0; $i<size($ft); $i++)
{
setAttr ($ft[$i]+ "_vraymesh.geomType") 0;
}

```

then made a separate one with geomType 1, 2 or 3
