Announcement

Collapse
No announcement yet.

Spotlight with scripted attributes breaks VRayLightLister

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

  • Spotlight with scripted attributes breaks VRayLightLister

    Hi,

    I made a script to create a sort of "advanced" SpotLight which includes a while sphere at the end of it to simulate a real geometry which can get reflected in surfaces etc, basically to fake the "affect reflections" checkbox of the normal VRayLights.
    It includes a custom attribute under a new rollout in the light itself. Now it seems the VRayLightLister doesn't handle this well and crashes. Max file, and script attached.
    As soon as I remove the custom attributes from said script and the light itself is 100% standard with no additions, it works.

    Please note the attached max file was created with the section in the script responsible for the custom attribute commented out, so it works.
    If you run the script with the attributes section uncommented, the error occurs as soon as you open the lightLister after having created the light by the script.

    VRaySpotLight.zip
    Software:
    Windows 7 Ultimate x64 SP1
    3ds Max 2016 SP4
    V-Ray Adv 3.60.04


    Hardware:
    Intel Core i7-4930K @ 3.40 GHz
    NVIDIA GeForce GTX 780 (4096MB RAM)
    64GB RAM


    DxDiag

  • #2
    Hello,

    During the controls construction in the light lister there is a function to that obtains the values of the properties:

    fn getLightProp obj prop =
    (
    if (isProperty obj prop) and not (isProperty obj #delegate) then
    getProperty obj prop
    else
    if isProperty obj #delegate then
    if isProperty obj.delegate prop then
    getProperty obj.delegate prop
    else undefined
    else undefined
    )


    and when the custom properties rollout is added the second expression fails. This actually breaks the standard LightLister as well. I guess it would have worked for scripted plugins that extend the class, but in this case obj.delegate is a valid property that equals to undefined.

    I couldn't find way around it so far.

    Best regards,
    Alexander
    Alexander Kazandzhiev
    V-Ray for 3ds Max developer

    Comment


    • #3
      Hi,
      thanks for the reply. What would you suggest to make it work? Extending the class? SOrry I am not toooo experienced with that plugin stuff
      Software:
      Windows 7 Ultimate x64 SP1
      3ds Max 2016 SP4
      V-Ray Adv 3.60.04


      Hardware:
      Intel Core i7-4930K @ 3.40 GHz
      NVIDIA GeForce GTX 780 (4096MB RAM)
      64GB RAM


      DxDiag

      Comment

      Working...
      X