Drag layer to reorder

This commit is contained in:
luboslenco
2020-01-26 23:11:13 +01:00
parent 76f1228421
commit 64f1163855
2 changed files with 19 additions and 0 deletions
+7
View File
@@ -16,6 +16,7 @@ import arm.ui.UIView2D;
import arm.ui.UIMenu;
import arm.ui.UIBox;
import arm.ui.UIFiles;
import arm.ui.TabLayers;
import arm.io.ImportAsset;
import arm.sys.Path;
import arm.util.RenderUtil;
@@ -24,6 +25,7 @@ import arm.data.MaterialSlot;
import arm.data.LayerSlot;
import arm.data.ConstData;
import arm.plugin.Camera;
import arm.node.MaterialParser;
import arm.Config;
import arm.Tool;
import arm.Project;
@@ -376,6 +378,11 @@ class App {
}
UINodes.inst.acceptLayerDrag(index);
}
else if (inLayers && isDragging) {
Project.layers.remove(dragLayer);
Project.layers.insert(TabLayers.dragDestination, dragLayer);
MaterialParser.parseMeshMaterial();
}
dragLayer = null;
}
else if (dragFile != null) {