VfxGraphAsset
.mvfx — a particle emitter authored as a node graph across Emitter / Spawn / Update / Render stages. MDF-backed Asset. The graph compiles to the same runtime emitter config a property-authored .mparticle produces, so a graph drives the identical CPU/GPU simulation and renderer.
- Module
- AssetSystem
- Header
#include "AssetSystem/Assets/VfxGraphAsset.h"- Namespace
Mowo
Constructors
| Signature | Name | Description |
|---|---|---|
VfxGraphAsset() | VfxGraphAsset | |
~VfxGraphAsset() override | ~VfxGraphAsset |
Public functions
| Returns | Name | Description |
|---|---|---|
bool | Load | |
void | Unload | |
bool | SaveToFile | |
std::string | SerializeToString | |
bool | LoadFromString | |
void | CollectDependencyIDs | |
void | CollectDependencyPaths | |
FVfxGraph& | Graph | |
const FVfxGraph& | Graph | |
int32_t | GetActiveEmitter | The emitter of the system the editor is showing (0 = the first, the graph itself; n = extra emitter n-1). |
void | SetActiveEmitter | |
FVfxGraph& | ActiveGraph | |
const FVfxGraph& | ActiveGraph | |
FVfxGraphNode* | FindNode | Node editing surface used by the editor panel, on the active emitter. |
std::string | AddNode | |
void | RemoveNode | |
bool | Connect | |
void | Disconnect | |
void | AddEmitter | Adds an extra emitter (the starter graph under a fresh name) and makes it active; removes the active extra emitter (the first cannot be removed). |
bool | RemoveActiveEmitter | |
std::string | RenameActiveEmitter | Renames the active emitter, keeping names unique, and repoints every SubEmitter node in the system that named it. |
bool | Compile | Compile to the runtime emitter config (module list + settings). |
bool | ApplyTo | Compile then push onto a live emitter component, ready to simulate. |
void | EnsureDefault | Populate a starter graph (Emitter -> SpawnRate/Burst -> Initialize -> Shape -> Velocity -> Color -> Render) matching the default emitter. |
void | FromParticleAsset | Rebuild the graph so it represents an existing property-authored emitter. |
Function details
VfxGraphAsset
VfxGraphAsset()~VfxGraphAsset
~VfxGraphAsset() overrideLoad
bool Load(const std::string& path) overrideUnload
void Unload() overrideSaveToFile
bool SaveToFile(const std::string& path) constSerializeToString
std::string SerializeToString() constLoadFromString
bool LoadFromString(const std::string& source)CollectDependencyIDs
void CollectDependencyIDs(std::vector<UUID>& out) const overrideCollectDependencyPaths
void CollectDependencyPaths(std::vector<std::string>& out) const overrideGraph
FVfxGraph& Graph()Graph
const FVfxGraph& Graph() constGetActiveEmitter
int32_t GetActiveEmitter() constThe emitter of the system the editor is showing (0 = the first, the graph itself; n = extra emitter n-1). Editor state, never saved.
SetActiveEmitter
void SetActiveEmitter(int32_t index)ActiveGraph
FVfxGraph& ActiveGraph()ActiveGraph
const FVfxGraph& ActiveGraph() constFindNode
FVfxGraphNode* FindNode(const std::string& id)Node editing surface used by the editor panel, on the active emitter.
AddNode
std::string AddNode(EVfxStage stage, const std::string& moduleType, float x, float y)RemoveNode
void RemoveNode(const std::string& id)Connect
bool Connect(const std::string& from, const std::string& to)Disconnect
void Disconnect(const std::string& from, const std::string& to)AddEmitter
void AddEmitter()Adds an extra emitter (the starter graph under a fresh name) and makes it active; removes the active extra emitter (the first cannot be removed).
RemoveActiveEmitter
bool RemoveActiveEmitter()RenameActiveEmitter
std::string RenameActiveEmitter(const std::string& name)Renames the active emitter, keeping names unique, and repoints every SubEmitter node in the system that named it. Returns the name it got.
Compile
bool Compile(FVfxEmitterConfig& out) constCompile to the runtime emitter config (module list + settings).
ApplyTo
bool ApplyTo(ParticleEmitterComponent& emitter) constCompile then push onto a live emitter component, ready to simulate.
EnsureDefault
void EnsureDefault()Populate a starter graph (Emitter -> SpawnRate/Burst -> Initialize -> Shape -> Velocity -> Color -> Render) matching the default emitter.
FromParticleAsset
void FromParticleAsset(const ParticleAsset& asset)Rebuild the graph so it represents an existing property-authored emitter.