Announcement

Collapse
No announcement yet.

maya: simultaneous on/off Render Element flags in Render settings?

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

  • maya: simultaneous on/off Render Element flags in Render settings?

    Hello,

    Is there a way to flag on/off several selected Render Elements at once in the Render Settings window?
    Like shift+select+Y/N or similar?

    I noticed that the "Attribute Spreadsheet Editor" can be used to flag Render Elements on/off en masse.
    Does anyone know the mel/python syntax to select Render Elements?


    Thanks,

    s

  • #2
    two ways to do that through mel:
    for all render elements on/off

    string $phx[]= `ls -type VRayRenderElement`;

    int $num = size ($phx);

    for ( $i=0; $i<$num; ++$i )
    {



    catchQuiet (`setAttr ( $phx[$i] + ".enabled" ) 0`);




    };

    and for selected would be:

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

    int $num = size ($phx);

    for ( $i=0; $i<$num; ++$i )
    {



    catchQuiet (`setAttr ( $phx[$i] + ".enabled" ) 0`);




    };

    you can also add a line before setAttr to do editrenderlayeradjustement to do layer overrides
    Dmitry Vinnik
    Silhouette Images Inc.
    ShowReel:
    https://www.youtube.com/watch?v=qxSJlvSwAhA
    https://www.linkedin.com/in/dmitry-v...-identity-name

    Comment


    • #3
      Hey Dmitry,

      I ended up doing this, which allows me to toggle several elements at once in the AttrSpreadSheet window.

      string $vRayElem[]= `ls -type VRayRenderElement`;
      select -r $vRayElem;
      SpreadSheetEditor;

      Super thanks,

      s.

      Comment

      Working...
      X