Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-50130

Property change notification are not coming for Qt3DRender::QNormalDiffuseMapAlphaMaterial properties when set

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.7.0
    • 5.6.0 Beta
    • Qt3D
    • None
    • Windows 7 64bit, Intel HD 4600
    • cf914c156308beaa49e57be33fecc5b550f3c6bd

      To repro, add the following bit to houseplant.cpp in materials-cpp example, at the end of the constructor:

          QObject::connect(m_plantMaterial, &Qt3DRender::QNormalDiffuseMapAlphaMaterial::textureScaleChanged,
                           [](float foobar){qDebug() << "new m_plantMaterial scale:" << foobar;});
          QObject::connect(m_plantMaterial, &Qt3DRender::QNormalDiffuseMapAlphaMaterial::shininessChanged,
                           [](float foobar){qDebug() << "new m_plantMaterial shininess:" << foobar;});
          QObject::connect(m_coverMaterial, &Qt3DRender::QNormalDiffuseMapMaterial::textureScaleChanged,
                           [](float foobar){qDebug() << "new m_coverMaterial scale:" << foobar;});
          QObject::connect(m_coverMaterial, &Qt3DRender::QNormalDiffuseMapMaterial::shininessChanged,
                           [](float foobar){qDebug() << "new m_coverMaterial shininess:" << foobar;});
      
          m_plantMaterial->setTextureScale(33);
          m_coverMaterial->setTextureScale(55);
          qDebug() << "scales are:" << m_plantMaterial->textureScale() << m_coverMaterial->textureScale();
          m_plantMaterial->setShininess(33);
          m_coverMaterial->setShininess(55);
          qDebug() << "shininesses are:" << m_plantMaterial->shininess() << m_coverMaterial->shininess();
      

      The m_plantMaterial is QNormalDiffuseMapAlphaMaterial while m_coverMaterial is QNormalDiffuseMapMaterial. The output is following:

      new m_coverMaterial scale: 55
      scales are: 33 55
      new m_coverMaterial shininess: 55
      shininesses are: 33 55
      ...
      

      As can be seen from the trace, change notifications come only for the m_coverMaterial, although the values are set properly for both materials when queried later.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            e0150566 Janne Roine
            e0348803 Miikka Heikkinen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes