Announcement

Collapse
No announcement yet.

Is there a Callback when vray object/light properties are changed?

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

  • Is there a Callback when vray object/light properties are changed?

    Is there any kind of callback I can monitor to check for changes to object vray properties. If not, is this something that can be implemented?
    I want to be able to have the values in the UI of the plugin I'm working on update automatically when a user changes vray object properties.

    Thanks
    p.
    Patrick Macdonald
    Lighting TD : http://reformstudios.com Developer of "Mission Control", the spreadsheet editor for 3ds Max http://reformstudios.com/mission-control-for-3ds-max/




  • #2
    Since VRay object properties are persisted as user properties on the node, I would say use #preNodeUserPropChanged or #postNodeUserPropChanged general event callbacks or the equivalent node event system callbacks, except that those only seem to catch replacements of single properties in the property buffer. Since VRay is most likely using SetUserPropBuffer to set the entire buffer at once, the events are not being fired.

    If you're feeling really hacky, you could take advantage of the fact the VRay object properties dialog is modal, and register for the #mainWindowEnabled general event callback. It won't tell you which nodes have changed, and will fire more times than you actually need it, but not nearly enough to be a nuisance. It also will not fire if another script changes VRay user properties manually. If you do go this route, you can skip updating if the notification param in the callback is false (if 3dsmax is losing focus).

    Comment

    Working...
    X