Announcement

Collapse
No announcement yet.

V-Ray Proxy Visibility Lists via mel / python?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

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

    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!

  • #2
    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/...y-via-xml-file

    Comment


    • #3
      Yes this would be great. Any info appreciated.

      Many Thanks

      Comment


      • #4
        Hi,

        You can use
        Code:
        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
        Code:
        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;
            }
        }
        Miroslav Ivanov
        Chaos Cosmos

        Comment


        • #5
          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.


          Code:
          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


          e: info@adriandenne.com
          w: www.adriandenne.com

          Comment

          Working...
          X