PluginData
Custom data on this node associated with the current plugin
PluginData interface
Custom data on this node associated with the current plugin
Signature:
interface PluginDataRemarks
This lets you store custom data on any node that is specific to your plugin.
This data is saved within Creator's animation file, but will not be retained when exported to an animation.
The total amount of data (i.e. all key-value pairs) you can save per node is limited to 5 kB.
This data is specific to your plugin ID. It will be inaccessible if your plugin ID changes.
Other plugins cannot access this data. However, you should avoid storing sensitive data here. This data is stored in Creator's saved animation file. It will not prevent users from accessing it if they inspect and attempt to decode the file.
Example
// setting a string value
node.data.set("storedColors", "#FF0000");
// setting a non-string value
const colors = ["#FF0000", "#00FF00", "#0000FF"];
node.data.set("storedColors", JSON.stringify(colors));
// getting the stringified value back
const storedColors = JSON.parse(node.data.get("storedColors"));Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| ReadonlyArray<string> | List of all keys stored for the current plugin | |
number | The total amount of data (in bytes) currently used by this plugin on this node |
Methods
Method | Description |
|---|---|
Clears all data associated with the current plugin | |
Deletes the value for a specific key | |
Gets the value for a specific key | |
Sets the value for a specific key |