Signals for material changes

pcicconepciccone Posts: 634

Hi.

I need to receive notifications when a material has been changed in any way. This is from the Surfaces tab.

I connected to the settingsChanged() signal of DzMaterial and that works for any DzDefaultMaterial object but it does not send any notification if the material is of type DzShaderMaterial.

How do I set a material monitor to be notified of changes for any material?

Thanks in advance.

Comments

  • SylvanSylvan Posts: 2,277
    edited February 2014

    I have no idea, sorry ><<br /> But is this for the process of the DAZ version of Reality 3?
    Sorry to be nosy!
    Checking your logs regularly for updates on this and I am looking forward to its release :)
    Saw the screenies over at your site and it is looking very promising.

    Post edited by Sylvan on
  • pcicconepciccone Posts: 634
    edited December 1969

    Hello.
    Yes, this is for Reality 3, never a problem asking :)

    Thank you for your interest.

  • dtammdtamm Posts: 126
    edited December 1969

    Pret-A-3D said:
    Hi.

    I need to receive notifications when a material has been changed in any way. This is from the Surfaces tab.

    I connected to the settingsChanged() signal of DzMaterial and that works for any DzDefaultMaterial object but it does not send any notification if the material is of type DzShaderMaterial.

    How do I set a material monitor to be notified of changes for any material?

    Thanks in advance.

    settingsChanged is meant to do what you are wanting, but it appears there is a bug.

    Workaround:
    -> Iterate over each property in the material and connect to the currentValueChanged signal.

  • pcicconepciccone Posts: 634
    edited December 1969

    Hi Ammon.

    Thank you for the hint. So, it seems that DzShaderMaterial is blocking the signal. OK.

    I looked at the workaround suggested but there is no currentValueChanged in the DzProperty class.
    ?

  • SphericLabsSphericLabs Posts: 598
    edited December 1969

    Pret-A-3D said:
    Hi Ammon.

    Thank you for the hint. So, it seems that DzShaderMaterial is blocking the signal. OK.

    I looked at the workaround suggested but there is no currentValueChanged in the DzProperty class.
    ?

    Line #233 of dzproperty.h defines the signal currentValueChanged for DzProperty

  • pcicconepciccone Posts: 634
    edited December 1969

    You are right. I was looking at the SDK documentation.
    Thanks.

  • pcicconepciccone Posts: 634
    edited December 1969

    The workaround worked. Are you planning to fix the signal bug in 4.6.2?

    Thanks.

  • rbtwhizrbtwhiz Posts: 1,482
    edited February 2014

    DAZ Studio 4.6.2.x is frozen - 4.6.2.117. No more changes will be made to the code, with the exception of fixing critical "show stopper" caliber bugs, before the General Release. This issue will have to wait for 4.6.3.x, at the very least. Please report the issue to Technical Support so that it can be routed to the development team. Feel free to reference this thread in the report.

    -Rob

    Post edited by rbtwhiz on
Sign In or Register to comment.