元編程參考文件

媒體資源擴充

9 個節點

本頁內容 9

取得素材

函數

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

簽名
取得素材 -> 文字陣列
    _library: IDivookaAssetLibrary
    萬用字元: 文字
string[] GetAssets(
    IDivookaAssetLibrary _library,
    string wildcard)

參數

名稱型別預設值說明
_libraryIDivookaAssetLibrary—
萬用字元文字—

返回

結果文字陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
媒體資源擴充
所屬包
平臺

取得目錄中的素材

函數

Get all assets directly inside the given directory.

簽名
取得目錄中的素材 -> 文字陣列
    _library: IDivookaAssetLibrary
    目錄路徑: 文字
    遞迴: 真否
string[] GetAssetsInDirectory(
    IDivookaAssetLibrary _library,
    string directoryPath,
    bool recursive = false)

參數

名稱型別預設值說明
_libraryIDivookaAssetLibrary—
目錄路徑文字—
遞迴真否False

返回

結果文字陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
媒體資源擴充
所屬包
平臺

按副檔名取得素材

函數

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

簽名
按副檔名取得素材 -> 文字陣列
    _library: IDivookaAssetLibrary
    副檔名: 文字
string[] GetAssetsWithExtension(
    IDivookaAssetLibrary _library,
    string extension)

參數

名稱型別預設值說明
_libraryIDivookaAssetLibrary—
副檔名文字—

返回

結果文字陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
媒體資源擴充
所屬包
平臺

按多個副檔名取得素材

函數

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

簽名
按多個副檔名取得素材 -> 文字陣列
    _library: IDivookaAssetLibrary
    副檔名: 文字陣列
string[] GetAssetsWithExtensions(
    IDivookaAssetLibrary _library,
    params string[] extensions)

參數

名稱型別預設值說明
_libraryIDivookaAssetLibrary—
副檔名文字陣列—

返回

結果文字陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
媒體資源擴充
所屬包
平臺

取得庫中的音訊

函數

Get audio from library by path.

簽名
取得庫中的音訊 -> StandardAudioSegment
    _library: IDivookaAssetLibrary
    路徑: 文字
StandardAudioSegment GetLibraryAudio(
    IDivookaAssetLibrary _library,
    string path)

參數

名稱型別預設值說明
_libraryIDivookaAssetLibrary—
路徑文字—

返回

結果StandardAudioSegment
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
媒體資源擴充
所屬包
平臺

取得庫中的 16 位灰度影像

函數

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.

簽名
取得庫中的 16 位灰度影像 -> Grayscale16BitImage
    _library: IDivookaAssetLibrary
    路徑: 文字
Grayscale16BitImage GetLibraryGrayscale16Image(
    IDivookaAssetLibrary _library,
    string path)

參數

名稱型別預設值說明
_libraryIDivookaAssetLibrary—
路徑文字—

返回

結果Grayscale16BitImage
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
媒體資源擴充
所屬包
平臺

取得庫中的影像

函數

Get image from library by path.

簽名
取得庫中的影像 -> Pixel Image
    _library: IDivookaAssetLibrary
    路徑: 文字
PixelImage GetLibraryImage(
    IDivookaAssetLibrary _library,
    string path)

參數

名稱型別預設值說明
_libraryIDivookaAssetLibrary—
路徑文字—

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
媒體資源擴充
所屬包
平臺

取得庫中的表格

函數

Get table from library by path.

簽名
取得庫中的表格 -> Table
    _library: IDivookaAssetLibrary
    路徑: 文字
Table GetLibraryTable(
    IDivookaAssetLibrary _library,
    string path)

參數

名稱型別預設值說明
_libraryIDivookaAssetLibrary—
路徑文字—

返回

結果Table

備註

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.

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
媒體資源擴充
所屬包
平臺

儲存素材

函數

此節點沒有文件說明。

簽名
儲存素材
    _library: EmbeddedAssetManager
    影像: Pixel Image
    路徑: 文字
    覆蓋: 真否
void SaveAsset(
    EmbeddedAssetManager _library,
    PixelImage image,
    string path,
    bool overwrite)

參數

名稱型別預設值說明
_libraryEmbeddedAssetManager—
影像Pixel Image—
路徑文字—
覆蓋真否—

備註

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.

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
媒體資源擴充
所屬包
平臺