Add mesh icons to project format
This commit is contained in:
@@ -15,6 +15,7 @@ typedef TProjectFormat = {
|
||||
@:optional public var layer_datas: Array<TLayerData>;
|
||||
@:optional public var mesh_datas: Array<TMeshData>;
|
||||
@:optional public var mesh_assets: Array<String>;
|
||||
@:optional public var mesh_icons: Array<haxe.io.Bytes>;
|
||||
@:optional public var atlas_objects: Array<Int>;
|
||||
@:optional public var atlas_names: Array<String>;
|
||||
@:optional public var swatches: Array<TSwatchColor>;
|
||||
|
||||
@@ -230,6 +230,10 @@ class UIFiles {
|
||||
var bytesIcon = raw.material_icons[0];
|
||||
icon = kha.Image.fromBytes(Lz4.decode(bytesIcon, 256 * 256 * 4), 256, 256);
|
||||
}
|
||||
if (raw.mesh_icons != null) {
|
||||
var bytesIcon = raw.mesh_icons[0];
|
||||
icon = kha.Image.fromBytes(Lz4.decode(bytesIcon, 256 * 256 * 4), 256, 256);
|
||||
}
|
||||
iconMap.set(key, icon);
|
||||
}
|
||||
if (icon != null) {
|
||||
|
||||
Reference in New Issue
Block a user