class MAGES::SceneGraph::Editor::StoryboardImporter¶
Overview¶
Handles importing storyboard JSON into a scene graph. This includes parsing the storyboard JSON, creating action assets for each storyboard node, connecting the nodes according to the storyboard edges, and grouping nodes based on storyboard groups. The importer also adds Start and End nodes and connects them to the appropriate actions. Any issues encountered during import, such as unrecognized action types or payload fields, are collected as warnings in the import result. More…
class StoryboardImporter
{
public:
// classes
class ActionTypeResolution;
class BoundaryActions;
class ImportStage;
class StoryboardEdgeDto;
class StoryboardGraphDto;
class StoryboardGroupDto;
class StoryboardImportResult;
class StoryboardNodeDto;
// methods
static StoryboardImportResult Import(
SceneGraphData graphData,
string domainJson,
bool replaceExisting = true
);
};
Detailed Documentation¶
Handles importing storyboard JSON into a scene graph. This includes parsing the storyboard JSON, creating action assets for each storyboard node, connecting the nodes according to the storyboard edges, and grouping nodes based on storyboard groups. The importer also adds Start and End nodes and connects them to the appropriate actions. Any issues encountered during import, such as unrecognized action types or payload fields, are collected as warnings in the import result.
Methods¶
static StoryboardImportResult Import(
SceneGraphData graphData,
string domainJson,
bool replaceExisting = true
)
Imports storyboard JSON into the given scene graph data using the provided domain.json content. The method parses the storyboard, creates action assets for each node, connects them according to the edges, and organizes them into groups based on the storyboard’s grouping. It also adds Start and End nodes and connects them to the appropriate actions. The result of the import includes counts of imported actions, created nodes and connections, as well as any notes or warnings about the import process.
Parameters:
graphData |
The scene graph data into which the storyboard will be imported. |
domainJson |
The JSON content of the domain file. |
replaceExisting |
If true, the current graph is replaced. If false, imported actions are appended to the existing graph. |
ArgumentNullException |
Thrown if the graphData is null. |
InvalidOperationException |
Thrown if the scene graph is not saved as an asset. |
Returns:
The result of the import, including counts of imported actions, created nodes and connections, and any notes or warnings.