瀏覽代碼

Compile fixes

luboslenco 1 年之前
父節點
當前提交
075b4409c4

+ 6 - 6
armorforge/Sources/arm/ui/TabObjects.hx

@@ -26,7 +26,7 @@ class TabObjects {
 			ui.endSticky();
 			ui.endSticky();
 
 
 			if (ui.panel(Zui.handle("tabobjects_0", {selected: true}), "Outliner")) {
 			if (ui.panel(Zui.handle("tabobjects_0", {selected: true}), "Outliner")) {
-				ui.indent();
+				// ui.indent();
 				ui._y -= ui.ELEMENT_OFFSET();
 				ui._y -= ui.ELEMENT_OFFSET();
 
 
 				var listX = ui._x;
 				var listX = ui._x;
@@ -112,9 +112,9 @@ class TabObjects {
 					if (b) {
 					if (b) {
 						var currentY = ui._y;
 						var currentY = ui._y;
 						for (child in currentObject.children) {
 						for (child in currentObject.children) {
-							ui.indent();
+							// ui.indent();
 							drawList(listHandle, child);
 							drawList(listHandle, child);
-							ui.unindent();
+							// ui.unindent();
 						}
 						}
 
 
 						// Draw line that shows parent relations
 						// Draw line that shows parent relations
@@ -127,11 +127,11 @@ class TabObjects {
 					drawList(Zui.handle("tabobjects_1"), c);
 					drawList(Zui.handle("tabobjects_1"), c);
 				}
 				}
 
 
-				ui.unindent();
+				// ui.unindent();
 			}
 			}
 
 
 			if (ui.panel(Zui.handle("tabobjects_2", {selected: true}), 'Properties')) {
 			if (ui.panel(Zui.handle("tabobjects_2", {selected: true}), 'Properties')) {
-				ui.indent();
+				// ui.indent();
 
 
 				if (Context.raw.selectedObject != null) {
 				if (Context.raw.selectedObject != null) {
 					var h = Zui.handle("tabobjects_3");
 					var h = Zui.handle("tabobjects_3");
@@ -253,7 +253,7 @@ class TabObjects {
 					}
 					}
 				}
 				}
 
 
-				ui.unindent();
+				// ui.unindent();
 			}
 			}
 		}
 		}
 	}
 	}

+ 2 - 2
armorlab/Sources/arm/logic/ImageTextureNode.hx

@@ -1,6 +1,6 @@
 package arm.logic;
 package arm.logic;
 
 
-import zui.Nodes;
+import zui.Zui.Nodes;
 import arm.logic.LogicNode;
 import arm.logic.LogicNode;
 import arm.logic.LogicParser.f32;
 import arm.logic.LogicParser.f32;
 import arm.Translator._tr;
 import arm.Translator._tr;
@@ -27,7 +27,7 @@ class ImageTextureNode extends LogicNode {
 		return image;
 		return image;
 	}
 	}
 
 
-	public static var def: TNode = {
+	public static var def: zui.Zui.TNode = {
 		id: 0,
 		id: 0,
 		name: _tr("Image Texture"),
 		name: _tr("Image Texture"),
 		type: "ImageTextureNode",
 		type: "ImageTextureNode",

+ 4 - 4
armorlab/Sources/arm/logic/InpaintNode.hx

@@ -1,6 +1,6 @@
 package arm.logic;
 package arm.logic;
 
 
-import zui.Nodes;
+import zui.Zui.Nodes;
 import arm.logic.LogicNode;
 import arm.logic.LogicNode;
 import arm.logic.LogicParser.f32;
 import arm.logic.LogicParser.f32;
 import arm.Translator._tr;
 import arm.Translator._tr;
@@ -46,11 +46,11 @@ class InpaintNode extends LogicNode {
 		}
 		}
 	}
 	}
 
 
-	public static function buttons(ui: zui.Zui, nodes: zui.Nodes, node: zui.Nodes.TNode) {
+	public static function buttons(ui: zui.Zui, nodes: zui.Zui.Nodes, node: zui.Zui.TNode) {
 		auto = node.buttons[0].default_value;
 		auto = node.buttons[0].default_value;
 		if (!auto) {
 		if (!auto) {
 			strength = ui.slider(zui.Zui.handle("inpaintnode_0", {value: strength}), tr("strength"), 0, 1, true);
 			strength = ui.slider(zui.Zui.handle("inpaintnode_0", {value: strength}), tr("strength"), 0, 1, true);
-			prompt = zui.Ext.textArea(ui, zui.Zui.handle("inpaintnode_1"), true, tr("prompt"), true);
+			prompt = ui.textArea(zui.Zui.handle("inpaintnode_1"), true, tr("prompt"), true);
 			node.buttons[1].height = 1 + prompt.split("\n").length;
 			node.buttons[1].height = 1 + prompt.split("\n").length;
 		}
 		}
 		else node.buttons[1].height = 0;
 		else node.buttons[1].height = 0;
@@ -181,7 +181,7 @@ class InpaintNode extends LogicNode {
 		});
 		});
 	}
 	}
 
 
-	public static var def: TNode = {
+	public static var def: zui.Zui.TNode = {
 		id: 0,
 		id: 0,
 		name: _tr("Inpaint"),
 		name: _tr("Inpaint"),
 		type: "InpaintNode",
 		type: "InpaintNode",

+ 3 - 3
armorlab/Sources/arm/logic/NodesBrush.hx

@@ -1,13 +1,13 @@
 package arm.logic;
 package arm.logic;
 
 
-import zui.Nodes;
+import zui.Zui.Nodes;
 import arm.Translator._tr;
 import arm.Translator._tr;
 
 
 class NodesBrush {
 class NodesBrush {
 
 
 	public static var categories = [_tr("Input"), _tr("Model")];
 	public static var categories = [_tr("Input"), _tr("Model")];
 
 
-	public static var list: Array<Array<TNode>> = [
+	public static var list: Array<Array<zui.Zui.TNode>> = [
 		[ // Input
 		[ // Input
 			ImageTextureNode.def,
 			ImageTextureNode.def,
 			RGBNode.def,
 			RGBNode.def,
@@ -22,7 +22,7 @@ class NodesBrush {
 		]
 		]
 	];
 	];
 
 
-	public static function createNode(nodeType: String): TNode {
+	public static function createNode(nodeType: String): zui.Zui.TNode {
 		for (c in list) {
 		for (c in list) {
 			for (n in c) {
 			for (n in c) {
 				if (n.type == nodeType) {
 				if (n.type == nodeType) {

+ 2 - 2
armorlab/Sources/arm/logic/PhotoToPBRNode.hx

@@ -1,6 +1,6 @@
 package arm.logic;
 package arm.logic;
 
 
-import zui.Nodes;
+import zui.Zui.Nodes;
 import arm.logic.LogicNode;
 import arm.logic.LogicNode;
 import arm.logic.LogicParser.f32;
 import arm.logic.LogicParser.f32;
 import arm.Translator._tr;
 import arm.Translator._tr;
@@ -174,7 +174,7 @@ class PhotoToPBRNode extends LogicNode {
 	}
 	}
 	#end
 	#end
 
 
-	public static var def: TNode = {
+	public static var def: zui.Zui.TNode = {
 		id: 0,
 		id: 0,
 		name: _tr("Photo to PBR"),
 		name: _tr("Photo to PBR"),
 		type: "PhotoToPBRNode",
 		type: "PhotoToPBRNode",

+ 2 - 2
armorlab/Sources/arm/logic/RGBNode.hx

@@ -1,6 +1,6 @@
 package arm.logic;
 package arm.logic;
 
 
-import zui.Nodes;
+import zui.Zui.Nodes;
 import iron.math.Vec4;
 import iron.math.Vec4;
 import arm.logic.LogicNode;
 import arm.logic.LogicNode;
 import arm.logic.LogicParser.f32;
 import arm.logic.LogicParser.f32;
@@ -38,7 +38,7 @@ class RGBNode extends LogicNode {
 		return image;
 		return image;
 	}
 	}
 
 
-	public static var def: TNode = {
+	public static var def: zui.Zui.TNode = {
 		id: 0,
 		id: 0,
 		name: _tr("RGB"),
 		name: _tr("RGB"),
 		type: "RGBNode",
 		type: "RGBNode",

+ 4 - 4
armorlab/Sources/arm/logic/TextToPhotoNode.hx

@@ -1,6 +1,6 @@
 package arm.logic;
 package arm.logic;
 
 
-import zui.Nodes;
+import zui.Zui.Nodes;
 import arm.logic.LogicNode;
 import arm.logic.LogicNode;
 import arm.logic.LogicParser.f32;
 import arm.logic.LogicParser.f32;
 import arm.Translator._tr;
 import arm.Translator._tr;
@@ -30,9 +30,9 @@ class TextToPhotoNode extends LogicNode {
 		return image;
 		return image;
 	}
 	}
 
 
-	public static function buttons(ui: zui.Zui, nodes: zui.Nodes, node: zui.Nodes.TNode) {
+	public static function buttons(ui: zui.Zui, nodes: zui.Zui.Nodes, node: zui.Zui.TNode) {
 		tiling = node.buttons[0].default_value;
 		tiling = node.buttons[0].default_value;
-		prompt = zui.Ext.textArea(ui, zui.Zui.handle("texttophotonode_0"), true, tr("prompt"), true);
+		prompt = ui.textArea(zui.Zui.handle("texttophotonode_0"), true, tr("prompt"), true);
 		node.buttons[1].height = prompt.split("\n").length;
 		node.buttons[1].height = prompt.split("\n").length;
 	}
 	}
 
 
@@ -248,7 +248,7 @@ class TextToPhotoNode extends LogicNode {
 		});
 		});
 	}
 	}
 
 
-	public static var def: TNode = {
+	public static var def: zui.Zui.TNode = {
 		id: 0,
 		id: 0,
 		name: _tr("Text to Photo"),
 		name: _tr("Text to Photo"),
 		type: "TextToPhotoNode",
 		type: "TextToPhotoNode",

+ 4 - 4
armorlab/Sources/arm/logic/TilingNode.hx

@@ -1,6 +1,6 @@
 package arm.logic;
 package arm.logic;
 
 
-import zui.Nodes;
+import zui.Zui.Nodes;
 import arm.logic.LogicNode;
 import arm.logic.LogicNode;
 import arm.logic.LogicParser.f32;
 import arm.logic.LogicParser.f32;
 import arm.Translator._tr;
 import arm.Translator._tr;
@@ -26,11 +26,11 @@ class TilingNode extends LogicNode {
 		}
 		}
 	}
 	}
 
 
-	public static function buttons(ui: zui.Zui, nodes: zui.Nodes, node: zui.Nodes.TNode) {
+	public static function buttons(ui: zui.Zui, nodes: zui.Zui.Nodes, node: zui.Zui.TNode) {
 		auto = node.buttons[0].default_value;
 		auto = node.buttons[0].default_value;
 		if (!auto) {
 		if (!auto) {
 			strength = ui.slider(zui.Zui.handle("tilingnode_0", {value: strength}), tr("strength"), 0, 1, true);
 			strength = ui.slider(zui.Zui.handle("tilingnode_0", {value: strength}), tr("strength"), 0, 1, true);
-			prompt = zui.Ext.textArea(ui, zui.Zui.handle("tilingnode_1"), true, tr("prompt"), true);
+			prompt = ui.textArea(zui.Zui.handle("tilingnode_1"), true, tr("prompt"), true);
 			node.buttons[1].height = 1 + prompt.split("\n").length;
 			node.buttons[1].height = 1 + prompt.split("\n").length;
 		}
 		}
 		else node.buttons[1].height = 0;
 		else node.buttons[1].height = 0;
@@ -93,7 +93,7 @@ class TilingNode extends LogicNode {
 		InpaintNode.sdInpaint(tile, mask, done);
 		InpaintNode.sdInpaint(tile, mask, done);
 	}
 	}
 
 
-	public static var def: TNode = {
+	public static var def: zui.Zui.TNode = {
 		id: 0,
 		id: 0,
 		name: _tr("Tiling"),
 		name: _tr("Tiling"),
 		type: "TilingNode",
 		type: "TilingNode",

+ 2 - 2
armorlab/Sources/arm/logic/UpscaleNode.hx

@@ -1,6 +1,6 @@
 package arm.logic;
 package arm.logic;
 
 
-import zui.Nodes;
+import zui.Zui.Nodes;
 import arm.logic.LogicNode;
 import arm.logic.LogicNode;
 import arm.logic.LogicParser.f32;
 import arm.logic.LogicParser.f32;
 import arm.Translator._tr;
 import arm.Translator._tr;
@@ -126,7 +126,7 @@ class UpscaleNode extends LogicNode {
 		return result;
 		return result;
 	}
 	}
 
 
-	public static var def: TNode = {
+	public static var def: zui.Zui.TNode = {
 		id: 0,
 		id: 0,
 		name: _tr("Upscale"),
 		name: _tr("Upscale"),
 		type: "UpscaleNode",
 		type: "UpscaleNode",

+ 4 - 4
armorlab/Sources/arm/logic/VarianceNode.hx

@@ -1,6 +1,6 @@
 package arm.logic;
 package arm.logic;
 
 
-import zui.Nodes;
+import zui.Zui.Nodes;
 import arm.logic.LogicNode;
 import arm.logic.LogicNode;
 import arm.logic.LogicParser.f32;
 import arm.logic.LogicParser.f32;
 import arm.Translator._tr;
 import arm.Translator._tr;
@@ -27,8 +27,8 @@ class VarianceNode extends LogicNode {
 		}
 		}
 	}
 	}
 
 
-	public static function buttons(ui: zui.Zui, nodes: zui.Nodes, node: zui.Nodes.TNode) {
-		prompt = zui.Ext.textArea(ui, zui.Zui.handle("variancenode_0"), true, tr("prompt"), true);
+	public static function buttons(ui: zui.Zui, nodes: zui.Zui.Nodes, node: zui.Zui.TNode) {
+		prompt = ui.textArea(zui.Zui.handle("variancenode_0"), true, tr("prompt"), true);
 		node.buttons[0].height = prompt.split("\n").length;
 		node.buttons[0].height = prompt.split("\n").length;
 	}
 	}
 
 
@@ -84,7 +84,7 @@ class VarianceNode extends LogicNode {
 		return image;
 		return image;
 	}
 	}
 
 
-	public static var def: TNode = {
+	public static var def: zui.Zui.TNode = {
 		id: 0,
 		id: 0,
 		name: _tr("Variance"),
 		name: _tr("Variance"),
 		type: "VarianceNode",
 		type: "VarianceNode",

+ 10 - 4
armorlab/Sources/arm/render/RenderPathPaint.hx

@@ -175,7 +175,9 @@ class RenderPathPaint {
 			return;
 			return;
 		}
 		}
 
 
-		var inpaint = UINodes.inst.getNodes().nodesSelected.length > 0 && UINodes.inst.getNodes().nodesSelected[0].type == "InpaintNode";
+		var nodes = UINodes.inst.getNodes();
+		var canvas = UINodes.inst.getCanvas(true);
+		var inpaint = nodes.nodesSelectedId.length > 0 && nodes.getNode(canvas.nodes, nodes.nodesSelectedId[0]).type == "InpaintNode";
 
 
 		if (!App.uiEnabled || App.isDragging || !inpaint) {
 		if (!App.uiEnabled || App.isDragging || !inpaint) {
 			return;
 			return;
@@ -265,8 +267,10 @@ class RenderPathPaint {
 
 
 	public static function bindLayers() {
 	public static function bindLayers() {
 		var image: kha.Image = null;
 		var image: kha.Image = null;
-		if (UINodes.inst.getNodes().nodesSelected.length > 0) {
-			var node = UINodes.inst.getNodes().nodesSelected[0];
+		var nodes = UINodes.inst.getNodes();
+		var canvas = UINodes.inst.getCanvas(true);
+		if (nodes.nodesSelectedId.length > 0) {
+			var node = nodes.getNode(canvas.nodes, nodes.nodesSelectedId[0]);
 			var brushNode = arm.logic.LogicParser.getLogicNode(node);
 			var brushNode = arm.logic.LogicParser.getLogicNode(node);
 			if (brushNode != null) {
 			if (brushNode != null) {
 				image = brushNode.getCachedImage();
 				image = brushNode.getCachedImage();
@@ -296,7 +300,9 @@ class RenderPathPaint {
 			path.bindTarget("texpaint_nor_empty", "texpaint_nor");
 			path.bindTarget("texpaint_nor_empty", "texpaint_nor");
 			path.bindTarget("texpaint_pack_empty", "texpaint_pack");
 			path.bindTarget("texpaint_pack_empty", "texpaint_pack");
 
 
-			var node = UINodes.inst.getNodes().nodesSelected[0];
+			var nodes = UINodes.inst.getNodes();
+			var canvas = UINodes.inst.getCanvas(true);
+			var node = nodes.getNode(canvas.nodes, nodes.nodesSelectedId[0]);
 			var inpaint = node.type == "InpaintNode";
 			var inpaint = node.type == "InpaintNode";
 			if (inpaint) {
 			if (inpaint) {
 				var brushNode = arm.logic.LogicParser.getLogicNode(node);
 				var brushNode = arm.logic.LogicParser.getLogicNode(node);

+ 1 - 1
armorlab/Sources/arm/shader/MakeMaterial.hx

@@ -1,6 +1,6 @@
 package arm.shader;
 package arm.shader;
 
 
-import zui.Nodes;
+import zui.Zui.Nodes;
 import iron.data.SceneFormat;
 import iron.data.SceneFormat;
 import iron.data.ShaderData;
 import iron.data.ShaderData;
 import iron.data.MaterialData;
 import iron.data.MaterialData;

+ 1 - 1
armorlab/Sources/arm/shader/MakePaint.hx

@@ -1,7 +1,7 @@
 package arm.shader;
 package arm.shader;
 
 
 import iron.data.SceneFormat;
 import iron.data.SceneFormat;
-import zui.Nodes;
+import zui.Zui.Nodes;
 import arm.shader.MaterialParser;
 import arm.shader.MaterialParser;
 import arm.shader.NodeShaderContext;
 import arm.shader.NodeShaderContext;
 import arm.shader.NodeShaderData;
 import arm.shader.NodeShaderData;

+ 2 - 1
armorsculpt/Sources/arm/shader/MakeMaterial.hx

@@ -1,6 +1,7 @@
 package arm.shader;
 package arm.shader;
 
 
-import zui.Nodes;
+import zui.Zui;
+import zui.Zui.Nodes;
 import iron.data.SceneFormat;
 import iron.data.SceneFormat;
 import iron.data.ShaderData;
 import iron.data.ShaderData;
 import iron.data.MaterialData;
 import iron.data.MaterialData;

+ 1 - 1
armorsculpt/Sources/arm/shader/MakeSculpt.hx

@@ -1,7 +1,7 @@
 package arm.shader;
 package arm.shader;
 
 
 import iron.data.SceneFormat;
 import iron.data.SceneFormat;
-import zui.Nodes;
+import zui.Zui.Nodes;
 import arm.ui.UINodes;
 import arm.ui.UINodes;
 import arm.shader.MaterialParser;
 import arm.shader.MaterialParser;
 import arm.shader.NodeShaderContext;
 import arm.shader.NodeShaderContext;

+ 3 - 3
armorsculpt/Sources/arm/ui/TabLayers.hx

@@ -1,7 +1,7 @@
 package arm.ui;
 package arm.ui;
 
 
 import zui.Zui;
 import zui.Zui;
-import zui.Nodes;
+import zui.Zui.Nodes;
 import iron.system.Time;
 import iron.system.Time;
 import iron.system.Input;
 import iron.system.Input;
 import iron.object.MeshObject;
 import iron.object.MeshObject;
@@ -252,10 +252,10 @@ class TabLayers {
 		if (layerNameEdit == l.id) {
 		if (layerNameEdit == l.id) {
 			layerNameHandle.text = l.name;
 			layerNameHandle.text = l.name;
 			l.name = ui.textInput(layerNameHandle);
 			l.name = ui.textInput(layerNameHandle);
-			if (ui.textSelectedHandle != layerNameHandle) layerNameEdit = -1;
+			if (ui.textSelectedHandle_ptr != layerNameHandle.ptr) layerNameEdit = -1;
 		}
 		}
 		else {
 		else {
-			if (ui.enabled && ui.inputEnabled && ui.comboSelectedHandle == null &&
+			if (ui.enabled && ui.inputEnabled && ui.comboSelectedHandle_ptr == null &&
 				ui.inputX > ui._windowX + ui._x && ui.inputX < ui._windowX + ui._windowW &&
 				ui.inputX > ui._windowX + ui._x && ui.inputX < ui._windowX + ui._windowW &&
 				ui.inputY > ui._windowY + ui._y - center && ui.inputY < ui._windowY + ui._y - center + (step * ui.SCALE()) * 2) {
 				ui.inputY > ui._windowY + ui._y - center && ui.inputY < ui._windowY + ui._y - center + (step * ui.SCALE()) * 2) {
 				if (ui.inputStarted) {
 				if (ui.inputStarted) {

+ 4 - 2
base/Sources/arm/App.hx

@@ -2146,8 +2146,10 @@ class App {
 		var texpaint_nor = arm.logic.BrushOutputNode.inst.texpaint_nor;
 		var texpaint_nor = arm.logic.BrushOutputNode.inst.texpaint_nor;
 		var texpaint_pack = arm.logic.BrushOutputNode.inst.texpaint_pack;
 		var texpaint_pack = arm.logic.BrushOutputNode.inst.texpaint_pack;
 
 
-		if (UINodes.inst.getNodes().nodesSelected.length > 0) {
-			var node = UINodes.inst.getNodes().nodesSelected[0];
+		var nodes = UINodes.inst.getNodes();
+		var canvas = UINodes.inst.getCanvas(true);
+		if (nodes.nodesSelectedId.length > 0) {
+			var node = nodes.getNode(canvas.nodes, nodes.nodesSelectedId[0]);
 			var brushNode = arm.logic.LogicParser.getLogicNode(node);
 			var brushNode = arm.logic.LogicParser.getLogicNode(node);
 			if (brushNode != null && brushNode.getCachedImage() != null) {
 			if (brushNode != null && brushNode.getCachedImage() != null) {
 				texpaint = brushNode.getCachedImage();
 				texpaint = brushNode.getCachedImage();

+ 3 - 1
base/Sources/arm/Context.hx

@@ -367,7 +367,9 @@ class Context {
 			raw.lastPaintVecY = raw.paintVec.y;
 			raw.lastPaintVecY = raw.paintVec.y;
 		}
 		}
 
 
-		var inpaint = UINodes.inst.getNodes().nodesSelected.length > 0 && UINodes.inst.getNodes().nodesSelected[0].type == "InpaintNode";
+		var nodes = UINodes.inst.getNodes();
+		var canvas = UINodes.inst.getCanvas(true);
+		var inpaint = nodes.nodesSelectedId.length > 0 && nodes.getNode(canvas.nodes, nodes.nodesSelectedId[0]).type == "InpaintNode";
 
 
 		// Paint bounds
 		// Paint bounds
 		if (inpaint &&
 		if (inpaint &&

+ 2 - 1
base/Sources/arm/logic/LogicParser.hx

@@ -111,7 +111,8 @@ class LogicParser {
 		// Expose button values in node class
 		// Expose button values in node class
 		for (b in node.buttons) {
 		for (b in node.buttons) {
 			if (b.type == "ENUM") {
 			if (b.type == "ENUM") {
-				var arrayData = Std.isOfType(b.data, Array);
+				// var arrayData = Std.isOfType(b.data, Array);
+				var arrayData = b.data.length > 1;
 				var texts = arrayData ? b.data : Nodes.enumTextsHaxe(node.type);
 				var texts = arrayData ? b.data : Nodes.enumTextsHaxe(node.type);
 				Reflect.setProperty(v, b.name, texts[b.default_value]);
 				Reflect.setProperty(v, b.name, texts[b.default_value]);
 			}
 			}

+ 1 - 1
base/Sources/arm/ui/UIBase.hx

@@ -28,7 +28,7 @@ import arm.data.MaterialSlot;
 #end
 #end
 #if is_lab
 #if is_lab
 import kha.Blob;
 import kha.Blob;
-import zui.Nodes;
+import zui.Zui.Nodes;
 #end
 #end
 
 
 @:access(zui.Zui)
 @:access(zui.Zui)

+ 3 - 1
base/Sources/arm/ui/UIHeader.hx

@@ -505,7 +505,9 @@ class UIHeader {
 				 Context.raw.tool == ToolBlur   ||
 				 Context.raw.tool == ToolBlur   ||
 				 Context.raw.tool == ToolSmudge) {
 				 Context.raw.tool == ToolSmudge) {
 
 
-			var inpaint = UINodes.inst.getNodes().nodesSelected.length > 0 && UINodes.inst.getNodes().nodesSelected[0].type == "InpaintNode";
+			var nodes = UINodes.inst.getNodes();
+			var canvas = UINodes.inst.getCanvas(true);
+			var inpaint = nodes.nodesSelectedId.length > 0 && nodes.getNode(canvas.nodes, nodes.nodesSelectedId[0]).type == "InpaintNode";
 			if (inpaint) {
 			if (inpaint) {
 				Context.raw.brushRadius = ui.slider(Context.raw.brushRadiusHandle, tr("Radius"), 0.01, 2.0, true);
 				Context.raw.brushRadius = ui.slider(Context.raw.brushRadiusHandle, tr("Radius"), 0.01, 2.0, true);
 				if (ui.isHovered) ui.tooltip(tr("Hold {brush_radius} and move mouse to the left or press {brush_radius_decrease} to decrease the radius\nHold {brush_radius} and move mouse to the right or press {brush_radius_increase} to increase the radius", ["brush_radius" => Config.keymap.brush_radius, "brush_radius_decrease" => Config.keymap.brush_radius_decrease, "brush_radius_increase" => Config.keymap.brush_radius_increase]));
 				if (ui.isHovered) ui.tooltip(tr("Hold {brush_radius} and move mouse to the left or press {brush_radius_decrease} to decrease the radius\nHold {brush_radius} and move mouse to the right or press {brush_radius_increase} to increase the radius", ["brush_radius" => Config.keymap.brush_radius, "brush_radius_decrease" => Config.keymap.brush_radius_decrease, "brush_radius_increase" => Config.keymap.brush_radius_increase]));

+ 4 - 4
base/Sources/arm/ui/UIView2D.hx

@@ -152,8 +152,8 @@ class UIView2D {
 				#else
 				#else
 
 
 				var nodes = UINodes.inst.getNodes();
 				var nodes = UINodes.inst.getNodes();
-				if (nodes.nodesSelected.length > 0) {
-					var sel = nodes.nodesSelected[0];
+				if (nodes.nodesSelectedId.length > 0) {
+					var sel = nodes.getNode(UINodes.inst.getCanvas(true).nodes, nodes.nodesSelectedId[0]);
 					var brushNode = arm.logic.LogicParser.getLogicNode(sel);
 					var brushNode = arm.logic.LogicParser.getLogicNode(sel);
 					if (brushNode != null) {
 					if (brushNode != null) {
 						tex = brushNode.getCachedImage();
 						tex = brushNode.getCachedImage();
@@ -323,8 +323,8 @@ class UIView2D {
 				#else
 				#else
 
 
 				var nodes = UINodes.inst.getNodes();
 				var nodes = UINodes.inst.getNodes();
-				if (nodes.nodesSelected.length > 0) {
-					ui.text(nodes.nodesSelected[0].name);
+				if (nodes.nodesSelectedId.length > 0) {
+					ui.text(nodes.getNode(UINodes.inst.getCanvas(true).nodes, nodes.nodesSelectedId[0]).name);
 				}
 				}
 
 
 				#end
 				#end