Editing Custom material from modal dialog vs panel mode

I would not say wrong as it depends on what events the UI wants to react to.

ContentParam event should be always triggered if some value of a content has changed.
ContentSelection event should be always triggered if the selection in the content editor changes.
ContentDatabase event should be triggered if some change happens in the content database like a content was attached, detached, replaced and so on.

In which use cases does the ContentParam case not work? Is it easy to describe the case?

Regards,Max

In my case (this is under Windows)

  • I create my custom environment on the environment panel.
  • I switch to the render panel and there I select 360 environment.
  • from the list of environments I change to my environment
  • click on the pencil button to edit it in modal dialog
  • change some parameters, click OK

and my custom environment - which is active on the environment panel was not triggered by ContentParam (maybe because the env panel was hidden when I clicked on the OK button?)

Márton

I did the steps you wrote (on Windows) and put some breakpoints to check what events are triggered. I noticed that ContentParam is not triggered. I would have expected it to be triggered. This could be an internal bug, not yet sure.

However I can see that on Windows the sections listen for a ContentDatabase event. And I can see that the ContentDatabase event is triggered (attached and reason change). I think this has to do with the Modal Dialog case, where it actually changes a content that is not attached to the document and when one clicks on OK it will take the content copy and write (change the real content) in the content database.

I would say that it is OK to listen for the ContentDatabase event.

Thanks for clarifying it!

Márton