Announcement

Collapse
No announcement yet.

Light Path Expression Get and SetAttr

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

  • Light Path Expression Get and SetAttr

    Hi,

    I am trying to create an automated script to generate light selects with specific light expressions.

    Two inputs
    Filename Suffix - NAME A
    and
    Inside the Light Select, When We change Type = Light Path Expression.

    The field "Light Path Expression" become available.

    Is there a way I can have a setAttr or getAttr for this input? What would be the proper command? I prefer in python, but can be in mel too.

    I did try check full verbosity but the script editor gives me a lot information, maybe someone could help me figure out the correct Get and Set Attribute for the input.

    script editor give me like

    setAttr -type "string" vrayRE_Light_Select8.vray_lpe_lightselect `textField -q -tx AttributeEditor|MainAttributeEditorLayout|formLayo ut101|AErootLayout|AEStackLayout|AErootLayoutPane| AEbaseFormLayout|AEcontrolFormLayout|AttrEdVRayRen derElementSetFormLayout|scrollLayout4|columnLayout 168|AllExtraAttributes|frameLayout93|vrayAEMasterC olumnLayout|vrayLightSelectChannel_VRayRenderEleme ntSet|vray_lpe_lightselect_VRayRenderElementSet_ro w|vray_lpe_lightselect_VRayRenderElementSet`;

    but maybe there is a simpler key word to set and get this attribute, for these inputs?

    Filename suffix
    and
    Light Path Expression

    Image attached for the input I would love to have

    Thanks in advance
    Attached Files
    Last edited by Tyros; 11-02-2023, 04:15 PM.

  • #2
    Hi there
    You would need just the first part of what is returned to you in the script editor, which would be setAttr -type "string" vrayRE_Light_Select8.vray_lpe_lightselect "Name A"

    For mel if you'll need to create multiple LPEs you can try this and see if it works for you:
    $l = `vrayAddRenderElement LightSelectElement`;
    setAttr ($l+".vray_name_lightselect") -type "string" "Name_A";
    setAttr ($l+".vray_type_lightselect") 9;
    setAttr ($l+".vray_lpe_lightselect") -type "string" "C.*L";​
    Petya Georgieva
    Product Specialist
    V-Ray for Maya

    www.chaos.com

    Comment


    • #3
      Great! Thanks Petya

      Comment

      Working...
      X