Asset
- class PulseAsset(file_path: str | None = None, is_read_only=False)
Bases:
objectBase class for an object that can be serialized to data or a file.
- can_load() bool
Return true if the asset has a valid existing file path
- clear_modified()
Clear the modified status of the file.
- deserialize(data: dict)
Deserialize the asset from a dict object.
- deserialize_yaml(yaml_str: str)
Deserialize the object from a yaml string.
- get_file_name() str | None
Return the base name of the file path.
- get_name() str
Return the name of this asset.
- load() bool
Load the asset from a file.
- Returns:
True if the load was successful
- modify()
Mark the blueprint file as modified.
- post_load()
Called after the asset has been deserialized from data.
- pre_save()
Called just before serializing the asset to data.
- save() bool
Save the asset to disk.
- Returns:
True if the save was successful.
- save_as(file_path: str) bool
Save the Blueprint with a new file path.
- serialize() UnsortableOrderedDict
Serialize the asset to a dict object.
- serialize_yaml() str
Serialize the asset to a yaml string.