Divooka Reference

Media Assets Extensions

9 nodes

On this page 9

Get Assets

Function

Query assets using a normalized glob pattern.
Supported wildcards:
* = any chars except '/'
? = any single char except '/'
** = any chars including '/'

Signature
GetAssets -> Text Array
    _library: IDivookaAssetLibrary
    wildcard: Text
string[] GetAssets(
    IDivookaAssetLibrary _library,
    string wildcard)

Parameters

nametypedefaultdescription
_libraryIDivookaAssetLibrary—
wildcardText—

Returns

resultText Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Media Assets Extensions
Package
Platform

Get Assets In Directory

Function

Get all assets directly inside the given directory.

Signature
GetAssetsInDirectory -> Text Array
    _library: IDivookaAssetLibrary
    directoryPath: Text
    recursive: Truth
string[] GetAssetsInDirectory(
    IDivookaAssetLibrary _library,
    string directoryPath,
    bool recursive = false)

Parameters

nametypedefaultdescription
_libraryIDivookaAssetLibrary—
directoryPathText—
recursiveTruthFalse

Returns

resultText Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Media Assets Extensions
Package
Platform

Get Assets With Extension

Function

Get all assets having the given extension.
Accepts "png" or ".png".
Comparison is ordinal-ignore-case.

Signature
GetAssetsWithExtension -> Text Array
    _library: IDivookaAssetLibrary
    extension: Text
string[] GetAssetsWithExtension(
    IDivookaAssetLibrary _library,
    string extension)

Parameters

nametypedefaultdescription
_libraryIDivookaAssetLibrary—
extensionText—

Returns

resultText Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Media Assets Extensions
Package
Platform

Get Assets With Extensions

Function

Get all assets having any of the given extensions.
Accepts values like "png", ".png", "jpg", ".jpg".

Signature
GetAssetsWithExtensions -> Text Array
    _library: IDivookaAssetLibrary
    extensions: Text Array
string[] GetAssetsWithExtensions(
    IDivookaAssetLibrary _library,
    params string[] extensions)

Parameters

nametypedefaultdescription
_libraryIDivookaAssetLibrary—
extensionsText Array—

Returns

resultText Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Media Assets Extensions
Package
Platform

Get Library Audio

Function

Get audio from library by path.

Signature
GetLibraryAudio -> StandardAudioSegment
    _library: IDivookaAssetLibrary
    path: Text
StandardAudioSegment GetLibraryAudio(
    IDivookaAssetLibrary _library,
    string path)

Parameters

nametypedefaultdescription
_libraryIDivookaAssetLibrary—
pathText—

Returns

resultStandardAudioSegment
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Media Assets Extensions
Package
Platform

Get Library 16-bit Grayscale Image

Function

Get a 16-bit greyscale image from library by path - a heightmap, a mask, a sensor's reading - at every level the file holds, where Get Library Image reads 256.

Signature
GetLibraryGrayscale16Image -> Grayscale16BitImage
    _library: IDivookaAssetLibrary
    path: Text
Grayscale16BitImage GetLibraryGrayscale16Image(
    IDivookaAssetLibrary _library,
    string path)

Parameters

nametypedefaultdescription
_libraryIDivookaAssetLibrary—
pathText—

Returns

resultGrayscale16BitImage
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Media Assets Extensions
Package
Platform

Get Library Image

Function

Get image from library by path.

Signature
GetLibraryImage -> Pixel Image
    _library: IDivookaAssetLibrary
    path: Text
PixelImage GetLibraryImage(
    IDivookaAssetLibrary _library,
    string path)

Parameters

nametypedefaultdescription
_libraryIDivookaAssetLibrary—
pathText—

Returns

resultPixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Media Assets Extensions
Package
Platform

Get Library Table

Function

Get table from library by path.

Signature
GetLibraryTable -> Table
    _library: IDivookaAssetLibrary
    path: Text
Table GetLibraryTable(
    IDivookaAssetLibrary _library,
    string path)

Parameters

nametypedefaultdescription
_libraryIDivookaAssetLibrary—
pathText—

Returns

resultTable

Remarks

The asset is CSV text, read as UTF-8 and parsed as CsvFormat.Parse parses it - the delimiter told from the text, each column read as the kind its cells are - into a table named after the file, which is exactly what a `.csv` in a document's library is. That is the same shape the two readers either side of it have - ask the library, decode the bytes - and it is why the throwing stub this replaced was so easy to miss: it was registered in the palette like the others and looked like them. Standalone defect 8.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Media Assets Extensions
Package
Platform

Save Asset

Function

This node carries no documentation.

Signature
SaveAsset
    _library: EmbeddedAssetManager
    image: Pixel Image
    path: Text
    overwrite: Truth
void SaveAsset(
    EmbeddedAssetManager _library,
    PixelImage image,
    string path,
    bool overwrite)

Parameters

nametypedefaultdescription
_libraryEmbeddedAssetManager—
imagePixel Image—
pathText—
overwriteTruth—

Remarks

Deliberately on the concrete InMemoryAssets.EmbeddedAssetManager: writing into the document's library
is not covered by the injected read-only contract, so a graph that wants it has to be handed the
manager explicitly.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Media Assets Extensions
Package
Platform