CurveTableAsset
CurveTableAsset (.mcurvetable): named rows of curves, UE's CurveTable. One row per tuning value ("Damage", "XpToLevel") so a designer edits every curve of a system in one asset and imports them from a spreadsheet. A row is a CurveAsset channel, which is what lets the curve editor, its undo snapshots and the evaluate path serve tables unchanged; only the document root and the importers differ.
- Module
- AssetSystem
- Header
#include "AssetSystem/Assets/CurveTableAsset.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
const char* | DocumentRoot | |
size_t | GetRowCount | |
const FRichCurve* | FindRow | |
float | EvalRow | |
bool | ImportCSV | Header cell 0 labels the row column; a numeric header cell is that column's time, any other header cell takes its column position, so a data table export (named property columns) imports as index-keyed rows. |
bool | ImportCSVFile | |
bool | ImportJSON | {"Row": {"0": 1, "10": 5}}, {"Row": [1, 5, 9]} (the index is the time) or {"Row": [[0, 1], [10, 5]]}. |
bool | ImportJSONFile | |
bool | ImportDataTable | Every numeric property column of a data table becomes a key at its column index, one row per data table row. |
std::string | ExportCSV | The union of every row's key times as columns, each cell the row's value there, so rows with different key times still land on one grid. |
std::string | ExportJSON | {"Row": {"0": 1, "10": 5}}: each row's own keys by time, the first form ImportJSON reads, so a row keeps exactly the key times it has. |
Function details
DocumentRoot
const char* DocumentRoot() const overrideGetRowCount
size_t GetRowCount() constFindRow
const FRichCurve* FindRow(const std::string& rowName) constEvalRow
float EvalRow(const std::string& rowName, float time, float def = 0.0f) constImportCSV
bool ImportCSV(const std::string& text)Header cell 0 labels the row column; a numeric header cell is that column's time, any other header cell takes its column position, so a data table export (named property columns) imports as index-keyed rows. Linear keys: a spreadsheet's values are the samples, not tangent control.
ImportCSVFile
bool ImportCSVFile(const std::string& path)ImportJSON
bool ImportJSON(const std::string& text){"Row": {"0": 1, "10": 5}}, {"Row": [1, 5, 9]} (the index is the time) or {"Row": [[0, 1], [10, 5]]}.
ImportJSONFile
bool ImportJSONFile(const std::string& path)ImportDataTable
bool ImportDataTable(const DataTableAsset& table)Every numeric property column of a data table becomes a key at its column index, one row per data table row.
ExportCSV
std::string ExportCSV() constThe union of every row's key times as columns, each cell the row's value there, so rows with different key times still land on one grid.
ExportJSON
std::string ExportJSON() const{"Row": {"0": 1, "10": 5}}: each row's own keys by time, the first form ImportJSON reads, so a row keeps exactly the key times it has.