Merge pull request #1317 from MathemanFlo/ImproveTextureTab

Improve texture tab
This commit is contained in:
Lubos Lenco
2022-03-07 13:26:28 +01:00
committed by GitHub
2 changed files with 8 additions and 3 deletions
+2 -2
View File
@@ -907,8 +907,8 @@ class Layers {
public static function createImageMask(asset: TAsset) {
var l = Context.layer;
if (l.isMask() || l.isGroup()) {
return;
if (l.isMask()) {
l = l.parent;
}
History.newLayer();
+6 -1
View File
@@ -132,6 +132,11 @@ class TabTextures {
Layers.createImageMask(asset);
});
}
if (ui.button(tr("Set as envmap"), Left)) {
App.notifyOnNextFrame(function() {
arm.io.ImportEnvmap.run(asset.file, img);
});
}
if (ui.button(tr("Delete"), Left)) {
deleteTexture(asset);
}
@@ -141,7 +146,7 @@ class TabTextures {
if (!isPacked && ui.button(tr("Open in Browser"), Left)) {
TabBrowser.showDirectory(asset.file.substr(0, asset.file.lastIndexOf(Path.sep)));
}
}, isPacked ? 5 : 7);
}, isPacked ? 6 : 8);
}
if (Config.raw.show_asset_names) {