diff --git a/modules/editor/grapheditor/editor/graph/graphnode.cpp b/modules/editor/grapheditor/editor/graph/graphnode.cpp index 9064b4c04..c16a29576 100644 --- a/modules/editor/grapheditor/editor/graph/graphnode.cpp +++ b/modules/editor/grapheditor/editor/graph/graphnode.cpp @@ -280,6 +280,13 @@ QDomElement GraphNode::toXml(QDomDocument &xml) { } } + for(auto it : dynamicPropertyNames()) { + QDomElement valueElement = fromVariant(property(it), xml); + valueElement.setAttribute(gName, QString(it)); + + node.appendChild(valueElement); + } + return node; } diff --git a/modules/editor/shadertools/converter/functions/customfunction.h b/modules/editor/shadertools/converter/functions/customfunction.h index c82a4030f..62a6c0e22 100644 --- a/modules/editor/shadertools/converter/functions/customfunction.h +++ b/modules/editor/shadertools/converter/functions/customfunction.h @@ -41,8 +41,6 @@ class CustomFunction : public ShaderNode { m_inputs.push_back(make_pair(inputName.toStdString(), type)); - inputName = m_funcName + "/" + inputName; - QString value = inputElement.attribute("embedded"); if(value.isEmpty()) { value = inputElement.attribute("default"); @@ -149,7 +147,7 @@ class CustomFunction : public ShaderNode { } QString defaultValue(const std::string &key, uint32_t &type) const override { - QVariant value = property(qPrintable(m_funcName + "/" + key.c_str())); + QVariant value = property(key.c_str()); if(value.type() == QVariant::String) { return value.toString(); diff --git a/modules/editor/shadertools/converter/functions/function.h b/modules/editor/shadertools/converter/functions/function.h index 4d65e1f5d..2b5a5f708 100644 --- a/modules/editor/shadertools/converter/functions/function.h +++ b/modules/editor/shadertools/converter/functions/function.h @@ -118,6 +118,4 @@ class ShaderNode : public GraphNode { }; - - #endif // FUNCTION_H