媒体资源扩展
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)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| _library | IDivookaAssetLibrary | — | |
| 通配符 | 文本 | — |
返回
| 结果 | 文本数组 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 媒体资源扩展
- 所属包
- 平台
获取目录中的素材
函数Get all assets directly inside the given directory.
获取目录中的素材 -> 文本数组
_library: IDivookaAssetLibrary
目录路径: 文本
递归: 真否string[] GetAssetsInDirectory(
IDivookaAssetLibrary _library,
string directoryPath,
bool recursive = false)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| _library | IDivookaAssetLibrary | — | |
| 目录路径 | 文本 | — | |
| 递归 | 真否 | 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)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| _library | IDivookaAssetLibrary | — | |
| 扩展名 | 文本 | — |
返回
| 结果 | 文本数组 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 媒体资源扩展
- 所属包
- 平台
按多个扩展名获取素材
函数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)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| _library | IDivookaAssetLibrary | — | |
| 扩展名 | 文本数组 | — |
返回
| 结果 | 文本数组 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 媒体资源扩展
- 所属包
- 平台
获取库中的音频
函数Get audio from library by path.
获取库中的音频 -> StandardAudioSegment
_library: IDivookaAssetLibrary
路径: 文本StandardAudioSegment GetLibraryAudio(
IDivookaAssetLibrary _library,
string path)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| _library | IDivookaAssetLibrary | — | |
| 路径 | 文本 | — |
返回
| 结果 | 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)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| _library | IDivookaAssetLibrary | — | |
| 路径 | 文本 | — |
返回
| 结果 | Grayscale16BitImage |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 媒体资源扩展
- 所属包
- 平台
获取库中的图像
函数Get image from library by path.
获取库中的图像 -> Pixel Image
_library: IDivookaAssetLibrary
路径: 文本PixelImage GetLibraryImage(
IDivookaAssetLibrary _library,
string path)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| _library | IDivookaAssetLibrary | — | |
| 路径 | 文本 | — |
返回
| 结果 | Pixel Image |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 媒体资源扩展
- 所属包
- 平台
获取库中的表格
函数Get table from library by path.
获取库中的表格 -> Table
_library: IDivookaAssetLibrary
路径: 文本Table GetLibraryTable(
IDivookaAssetLibrary _library,
string path)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| _library | IDivookaAssetLibrary | — | |
| 路径 | 文本 | — |
返回
| 结果 | 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)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| _library | EmbeddedAssetManager | — | |
| 图像 | 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.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 媒体资源扩展
- 所属包
- 平台