元编程参考文档

媒体资源扩展

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.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
媒体资源扩展
所属包
平台