ShaderNode: Add save/load
This commit is contained in:
@@ -27,6 +27,8 @@ class ShaderGraph
|
||||
std::size_t AddOutput(std::string name, InOutType type);
|
||||
std::size_t AddTexture(std::string name, TextureType type);
|
||||
|
||||
void Clear();
|
||||
|
||||
inline const InputEntry& GetInput(std::size_t inputIndex) const;
|
||||
inline std::size_t GetInputCount() const;
|
||||
inline const std::vector<InputEntry>& GetInputs() const;
|
||||
@@ -39,6 +41,9 @@ class ShaderGraph
|
||||
inline std::size_t GetTextureCount() const;
|
||||
inline const std::vector<TextureEntry>& GetTextures() const;
|
||||
|
||||
void Load(const QJsonObject& data);
|
||||
QJsonObject Save();
|
||||
|
||||
Nz::ShaderAst::StatementPtr ToAst();
|
||||
|
||||
void UpdateInput(std::size_t inputIndex, std::string name, InOutType type, InputRole role, std::size_t roleIndex);
|
||||
|
||||
Reference in New Issue
Block a user