diff --git a/modules/editor/shadertools/converter/functions/customfunction.h b/modules/editor/shadertools/converter/functions/customfunction.h index 4dd4063f8..911fb2ba9 100644 --- a/modules/editor/shadertools/converter/functions/customfunction.h +++ b/modules/editor/shadertools/converter/functions/customfunction.h @@ -150,7 +150,7 @@ class CustomFunction : public ShaderNode { } QString defaultValue(const string &key, uint32_t &type) const override { - QVariant value = property(key.c_str()); + QVariant value = property(qPrintable(m_funcName + "/" + key.c_str())); if(value.type() == QVariant::String) { return value.toString(); @@ -189,8 +189,7 @@ class CustomFunction : public ShaderNode { bool event(QEvent *e) override { if(e->type() == QEvent::DynamicPropertyChange && !signalsBlocked()) { QDynamicPropertyChangeEvent *ev = static_cast(e); - QString name = ev->propertyName().split('/').back(); - QVariant value = property(qPrintable(name)); + QVariant value = property(qPrintable(ev->propertyName())); if(value.isValid()) { emit updated(); }