From afd34bb7a3673b047a38f323f5c8f5d7552313fb Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 4 Nov 2018 13:18:13 +0100 Subject: [PATCH] Sort by name --- Sources/arm/App.hx | 2 +- Sources/arm/NodeCreator.hx | 556 ++++++++++++++++++------------------- Sources/arm/UINodes.hx | 2 +- Sources/arm/UITrait.hx | 83 +++--- 4 files changed, 331 insertions(+), 312 deletions(-) diff --git a/Sources/arm/App.hx b/Sources/arm/App.hx index c6d0b8f5..abd9949f 100644 --- a/Sources/arm/App.hx +++ b/Sources/arm/App.hx @@ -144,7 +144,7 @@ class App extends iron.Trait { UITrait.inst.ddirty = 2; var lay = UITrait.inst.C.ui_layout; - appx = lay == 0 ? 0 : UITrait.inst.windowW; + appx = (lay == 0 || !UITrait.inst.show) ? 0 : UITrait.inst.windowW; if (lay == 1 && (UINodes.inst.show || UIView2D.inst.show)) appx += iron.App.w(); if (UINodes.inst.grid != null) { diff --git a/Sources/arm/NodeCreator.hx b/Sources/arm/NodeCreator.hx index b23e625a..92b2bbdb 100644 --- a/Sources/arm/NodeCreator.hx +++ b/Sources/arm/NodeCreator.hx @@ -81,72 +81,6 @@ class NodeCreator { var canvas = UINodes.inst.canvas; if (cat == 0) { // Input - if (ui.button("RGB")) { - var node_id = nodes.getNodeId(canvas.nodes); - var n:TNode = { - id: node_id, - name: "RGB", - type: "RGB", - x: getNodeX(), - y: getNodeY(), - color: 0xffb34f5a, - inputs: [], - outputs: [ - { - id: nodes.getSocketId(canvas.nodes), - node_id: node_id, - name: "Color", - type: "RGBA", - color: 0xffc7c729, - default_value: [0.5, 0.5, 0.5, 1.0] - } - ], - buttons: [ - { - name: "default_value", - type: "RGBA", - output: 0 - } - ] - }; - canvas.nodes.push(n); - nodes.nodeDrag = n; - nodes.nodeSelected = n; - } - if (ui.button("Value")) { - var node_id = nodes.getNodeId(canvas.nodes); - var n:TNode = { - id: node_id, - name: "Value", - type: "VALUE", - x: getNodeX(), - y: getNodeY(), - color: 0xffb34f5a, - inputs: [], - outputs: [ - { - id: nodes.getSocketId(canvas.nodes), - node_id: node_id, - name: "Value", - type: "VALUE", - color: 0xffa1a1a1, - default_value: 0.5 - } - ], - buttons: [ - { - name: "default_value", - type: "VALUE", - output: 0, - min: 0.0, - max: 10.0 - } - ] - }; - canvas.nodes.push(n); - nodes.nodeDrag = n; - nodes.nodeSelected = n; - } if (ui.button("Attribute")) { var node_id = nodes.getNodeId(canvas.nodes); var n:TNode = { @@ -464,6 +398,38 @@ class NodeCreator { nodes.nodeDrag = n; nodes.nodeSelected = n; } + if (ui.button("RGB")) { + var node_id = nodes.getNodeId(canvas.nodes); + var n:TNode = { + id: node_id, + name: "RGB", + type: "RGB", + x: getNodeX(), + y: getNodeY(), + color: 0xffb34f5a, + inputs: [], + outputs: [ + { + id: nodes.getSocketId(canvas.nodes), + node_id: node_id, + name: "Color", + type: "RGBA", + color: 0xffc7c729, + default_value: [0.5, 0.5, 0.5, 1.0] + } + ], + buttons: [ + { + name: "default_value", + type: "RGBA", + output: 0 + } + ] + }; + canvas.nodes.push(n); + nodes.nodeDrag = n; + nodes.nodeSelected = n; + } if (ui.button("Tangent")) { var node_id = nodes.getNodeId(canvas.nodes); var n:TNode = { @@ -590,6 +556,40 @@ class NodeCreator { nodes.nodeDrag = n; nodes.nodeSelected = n; } + if (ui.button("Value")) { + var node_id = nodes.getNodeId(canvas.nodes); + var n:TNode = { + id: node_id, + name: "Value", + type: "VALUE", + x: getNodeX(), + y: getNodeY(), + color: 0xffb34f5a, + inputs: [], + outputs: [ + { + id: nodes.getSocketId(canvas.nodes), + node_id: node_id, + name: "Value", + type: "VALUE", + color: 0xffa1a1a1, + default_value: 0.5 + } + ], + buttons: [ + { + name: "default_value", + type: "VALUE", + output: 0, + min: 0.0, + max: 10.0 + } + ] + }; + canvas.nodes.push(n); + nodes.nodeDrag = n; + nodes.nodeSelected = n; + } } if (cat == 1) { // Output if (ui.button("Material Output")) { @@ -685,11 +685,6 @@ class NodeCreator { } } if (cat == 2) { // Texture - if (ui.button("Image")) { - var n = createImageTexture(); - nodes.nodeDrag = n; - nodes.nodeSelected = n; - } if (ui.button("Brick")) { var node_id = nodes.getNodeId(canvas.nodes); var n:TNode = { @@ -888,6 +883,11 @@ class NodeCreator { nodes.nodeDrag = n; nodes.nodeSelected = n; } + if (ui.button("Image")) { + var n = createImageTexture(); + nodes.nodeDrag = n; + nodes.nodeSelected = n; + } if (ui.button("Magic")) { var node_id = nodes.getNodeId(canvas.nodes); var n:TNode = { @@ -994,59 +994,6 @@ class NodeCreator { nodes.nodeDrag = n; nodes.nodeSelected = n; } - if (ui.button("Wave")) { - var node_id = nodes.getNodeId(canvas.nodes); - var n:TNode = { - id: node_id, - name: "Wave Texture", - type: "TEX_WAVE", - x: getNodeX(), - y: getNodeY(), - color: 0xff4982a0, - inputs: [ - { - id: nodes.getSocketId(canvas.nodes), - node_id: node_id, - name: "Vector", - type: "VECTOR", - color: 0xff6363c7, - default_value: [0.0, 0.0, 0.0] - }, - { - id: nodes.getSocketId(canvas.nodes), - node_id: node_id, - name: "Scale", - type: "VALUE", - color: 0xffa1a1a1, - default_value: 5.0, - min: 0.0, - max: 10.0 - } - ], - outputs: [ - { - id: nodes.getSocketId(canvas.nodes), - node_id: node_id, - name: "Color", - type: "RGBA", - color: 0xffc7c729, - default_value: [0.8, 0.8, 0.8, 1.0] - }, - { - id: nodes.getSocketId(canvas.nodes), - node_id: node_id, - name: "Fac", - type: "VALUE", - color: 0xffa1a1a1, - default_value: 1.0 - } - ], - buttons: [] - }; - canvas.nodes.push(n); - nodes.nodeDrag = n; - nodes.nodeSelected = n; - } if (ui.button("Noise")) { var node_id = nodes.getNodeId(canvas.nodes); var n:TNode = { @@ -1161,6 +1108,59 @@ class NodeCreator { nodes.nodeDrag = n; nodes.nodeSelected = n; } + if (ui.button("Wave")) { + var node_id = nodes.getNodeId(canvas.nodes); + var n:TNode = { + id: node_id, + name: "Wave Texture", + type: "TEX_WAVE", + x: getNodeX(), + y: getNodeY(), + color: 0xff4982a0, + inputs: [ + { + id: nodes.getSocketId(canvas.nodes), + node_id: node_id, + name: "Vector", + type: "VECTOR", + color: 0xff6363c7, + default_value: [0.0, 0.0, 0.0] + }, + { + id: nodes.getSocketId(canvas.nodes), + node_id: node_id, + name: "Scale", + type: "VALUE", + color: 0xffa1a1a1, + default_value: 5.0, + min: 0.0, + max: 10.0 + } + ], + outputs: [ + { + id: nodes.getSocketId(canvas.nodes), + node_id: node_id, + name: "Color", + type: "RGBA", + color: 0xffc7c729, + default_value: [0.8, 0.8, 0.8, 1.0] + }, + { + id: nodes.getSocketId(canvas.nodes), + node_id: node_id, + name: "Fac", + type: "VALUE", + color: 0xffa1a1a1, + default_value: 1.0 + } + ], + buttons: [] + }; + canvas.nodes.push(n); + nodes.nodeDrag = n; + nodes.nodeSelected = n; + } } if (cat == 3) { // Color if (ui.button("BrightContrast")) { @@ -1652,12 +1652,12 @@ class NodeCreator { // VECT_TRANSFORM } if (cat == 5) { // Converter - if (ui.button("Combine RGB")) { + if (ui.button("Color Ramp")) { var node_id = nodes.getNodeId(canvas.nodes); var n:TNode = { id: node_id, - name: "Combine RGB", - type: "COMBRGB", + name: "Color Ramp", + type: "VALTORGB", x: getNodeX(), y: getNodeY(), color: 0xff62676d, @@ -1665,26 +1665,10 @@ class NodeCreator { { id: nodes.getSocketId(canvas.nodes), node_id: node_id, - name: "R", + name: "Fac", type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 - }, - { - id: nodes.getSocketId(canvas.nodes), - node_id: node_id, - name: "G", - type: "VALUE", - color: 0xffa1a1a1, - default_value: 0.0 - }, - { - id: nodes.getSocketId(canvas.nodes), - node_id: node_id, - name: "B", - type: "VALUE", - color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.5 } ], outputs: [ @@ -1694,10 +1678,26 @@ class NodeCreator { name: "Color", type: "RGBA", color: 0xffc7c729, - default_value: [0.8, 0.8, 0.8, 1.0] + default_value: [0.0, 0.0, 0.0, 1.0] + }, + { + id: nodes.getSocketId(canvas.nodes), + node_id: node_id, + name: "Alpha", + type: "VALUE", + color: 0xffa1a1a1, + default_value: 0.0 } ], - buttons: [] + buttons: [ + { + name: "Ramp", + type: "RAMP", + default_value: [[1.0, 1.0, 1.0, 1.0, 0.0]], + data: 0, + output: 0 + } + ] }; canvas.nodes.push(n); nodes.nodeDrag = n; @@ -1754,6 +1754,57 @@ class NodeCreator { nodes.nodeDrag = n; nodes.nodeSelected = n; } + if (ui.button("Combine RGB")) { + var node_id = nodes.getNodeId(canvas.nodes); + var n:TNode = { + id: node_id, + name: "Combine RGB", + type: "COMBRGB", + x: getNodeX(), + y: getNodeY(), + color: 0xff62676d, + inputs: [ + { + id: nodes.getSocketId(canvas.nodes), + node_id: node_id, + name: "R", + type: "VALUE", + color: 0xffa1a1a1, + default_value: 0.0 + }, + { + id: nodes.getSocketId(canvas.nodes), + node_id: node_id, + name: "G", + type: "VALUE", + color: 0xffa1a1a1, + default_value: 0.0 + }, + { + id: nodes.getSocketId(canvas.nodes), + node_id: node_id, + name: "B", + type: "VALUE", + color: 0xffa1a1a1, + default_value: 0.0 + } + ], + outputs: [ + { + id: nodes.getSocketId(canvas.nodes), + node_id: node_id, + name: "Color", + type: "RGBA", + color: 0xffc7c729, + default_value: [0.8, 0.8, 0.8, 1.0] + } + ], + buttons: [] + }; + canvas.nodes.push(n); + nodes.nodeDrag = n; + nodes.nodeSelected = n; + } if (ui.button("Combine XYZ")) { var node_id = nodes.getNodeId(canvas.nodes); var n:TNode = { @@ -1805,116 +1856,6 @@ class NodeCreator { nodes.nodeDrag = n; nodes.nodeSelected = n; } - if (ui.button("Color Ramp")) { - var node_id = nodes.getNodeId(canvas.nodes); - var n:TNode = { - id: node_id, - name: "Color Ramp", - type: "VALTORGB", - x: getNodeX(), - y: getNodeY(), - color: 0xff62676d, - inputs: [ - { - id: nodes.getSocketId(canvas.nodes), - node_id: node_id, - name: "Fac", - type: "VALUE", - color: 0xffa1a1a1, - default_value: 0.5 - } - ], - outputs: [ - { - id: nodes.getSocketId(canvas.nodes), - node_id: node_id, - name: "Color", - type: "RGBA", - color: 0xffc7c729, - default_value: [0.0, 0.0, 0.0, 1.0] - }, - { - id: nodes.getSocketId(canvas.nodes), - node_id: node_id, - name: "Alpha", - type: "VALUE", - color: 0xffa1a1a1, - default_value: 0.0 - } - ], - buttons: [ - { - name: "Ramp", - type: "RAMP", - default_value: [[1.0, 1.0, 1.0, 1.0, 0.0]], - data: 0, - output: 0 - } - ] - }; - canvas.nodes.push(n); - nodes.nodeDrag = n; - nodes.nodeSelected = n; - } - if (ui.button("Vector Math")) { - var node_id = nodes.getNodeId(canvas.nodes); - var n:TNode = { - id: node_id, - name: "Vector Math", - type: "VECT_MATH", - x: getNodeX(), - y: getNodeY(), - color: 0xff62676d, - inputs: [ - { - id: nodes.getSocketId(canvas.nodes), - node_id: node_id, - name: "Vector", - type: "VECTOR", - color: 0xff6363c7, - default_value: [0.0, 0.0, 0.0] - }, - { - id: nodes.getSocketId(canvas.nodes), - node_id: node_id, - name: "Vector", - type: "VECTOR", - color: 0xff6363c7, - default_value: [0.0, 0.0, 0.0] - } - ], - outputs: [ - { - id: nodes.getSocketId(canvas.nodes), - node_id: node_id, - name: "Vector", - type: "VECTOR", - color: 0xff6363c7, - default_value: [0.0, 0.0, 0.0] - }, - { - id: nodes.getSocketId(canvas.nodes), - node_id: node_id, - name: "Value", - type: "VALUE", - color: 0xffa1a1a1, - default_value: 0.0 - } - ], - buttons: [ - { - name: "operation", - type: "ENUM", - data: ["Add", "Subtract", "Average", "Dot Product", "Cross Product", "Normalize"], - default_value: 0, - output: 0 - } - ] - }; - canvas.nodes.push(n); - nodes.nodeDrag = n; - nodes.nodeSelected = n; - } if (ui.button("Math")) { var node_id = nodes.getNodeId(canvas.nodes); var n:TNode = { @@ -2007,6 +1948,57 @@ class NodeCreator { nodes.nodeDrag = n; nodes.nodeSelected = n; } + if (ui.button("Separate HSV")) { + var node_id = nodes.getNodeId(canvas.nodes); + var n:TNode = { + id: node_id, + name: "Separate HSV", + type: "SEPHSV", + x: getNodeX(), + y: getNodeY(), + color: 0xff62676d, + inputs: [ + { + id: nodes.getSocketId(canvas.nodes), + node_id: node_id, + name: "Color", + type: "RGBA", + color: 0xffc7c729, + default_value: [0.5, 0.5, 0.5, 1.0] + } + ], + outputs: [ + { + id: nodes.getSocketId(canvas.nodes), + node_id: node_id, + name: "H", + type: "VALUE", + color: 0xffa1a1a1, + default_value: 0.0 + }, + { + id: nodes.getSocketId(canvas.nodes), + node_id: node_id, + name: "S", + type: "VALUE", + color: 0xffa1a1a1, + default_value: 0.0 + }, + { + id: nodes.getSocketId(canvas.nodes), + node_id: node_id, + name: "V", + type: "VALUE", + color: 0xffa1a1a1, + default_value: 0.0 + } + ], + buttons: [] + }; + canvas.nodes.push(n); + nodes.nodeDrag = n; + nodes.nodeSelected = n; + } if (ui.button("Separate RGB")) { var node_id = nodes.getNodeId(canvas.nodes); var n:TNode = { @@ -2109,12 +2101,12 @@ class NodeCreator { nodes.nodeDrag = n; nodes.nodeSelected = n; } - if (ui.button("Separate HSV")) { + if (ui.button("Vector Math")) { var node_id = nodes.getNodeId(canvas.nodes); var n:TNode = { id: node_id, - name: "Separate HSV", - type: "SEPHSV", + name: "Vector Math", + type: "VECT_MATH", x: getNodeX(), y: getNodeY(), color: 0xff62676d, @@ -2122,39 +2114,47 @@ class NodeCreator { { id: nodes.getSocketId(canvas.nodes), node_id: node_id, - name: "Color", - type: "RGBA", - color: 0xffc7c729, - default_value: [0.5, 0.5, 0.5, 1.0] + name: "Vector", + type: "VECTOR", + color: 0xff6363c7, + default_value: [0.0, 0.0, 0.0] + }, + { + id: nodes.getSocketId(canvas.nodes), + node_id: node_id, + name: "Vector", + type: "VECTOR", + color: 0xff6363c7, + default_value: [0.0, 0.0, 0.0] } ], outputs: [ { id: nodes.getSocketId(canvas.nodes), node_id: node_id, - name: "H", - type: "VALUE", - color: 0xffa1a1a1, - default_value: 0.0 + name: "Vector", + type: "VECTOR", + color: 0xff6363c7, + default_value: [0.0, 0.0, 0.0] }, { id: nodes.getSocketId(canvas.nodes), node_id: node_id, - name: "S", - type: "VALUE", - color: 0xffa1a1a1, - default_value: 0.0 - }, - { - id: nodes.getSocketId(canvas.nodes), - node_id: node_id, - name: "V", + name: "Value", type: "VALUE", color: 0xffa1a1a1, default_value: 0.0 } ], - buttons: [] + buttons: [ + { + name: "operation", + type: "ENUM", + data: ["Add", "Subtract", "Average", "Dot Product", "Cross Product", "Normalize"], + default_value: 0, + output: 0 + } + ] }; canvas.nodes.push(n); nodes.nodeDrag = n; diff --git a/Sources/arm/UINodes.hx b/Sources/arm/UINodes.hx index 1dd4bd68..12d07c9e 100644 --- a/Sources/arm/UINodes.hx +++ b/Sources/arm/UINodes.hx @@ -422,7 +422,7 @@ class UINodes extends iron.Trait { } function make_paint(data:CyclesShaderData, matcon:TMaterialContext):CyclesShaderContext { - var layered = UITrait.inst.selectedLayer.id > 0; + var layered = UITrait.inst.selectedLayer != UITrait.inst.layers[0]; var eraser = UITrait.inst.brushType == 1; var context_id = 'paint'; var con_paint:CyclesShaderContext = data.add_context({ diff --git a/Sources/arm/UITrait.hx b/Sources/arm/UITrait.hx index fa9056f6..2c0d1345 100644 --- a/Sources/arm/UITrait.hx +++ b/Sources/arm/UITrait.hx @@ -180,6 +180,11 @@ class UITrait extends iron.Trait { var originalBias = 0.0; var camHandle = new Zui.Handle({position: 0}); var fovHandle:Zui.Handle = null; + var hssgi:Zui.Handle = null; + var hssr:Zui.Handle = null; + var hbloom:Zui.Handle = null; + var hshadowmap:Zui.Handle = null; + var hsupersample:Zui.Handle = null; #if arm_editor public var htab = Id.handle({position: 1}); @@ -526,7 +531,7 @@ class UITrait extends iron.Trait { function done() { - notifyOnInit(function() { + // notifyOnInit(function() { // iron.Scene.active.notifyOnInit(function() { //// // var pui = iron.Scene.active.getChild("PlaneUI"); //// @@ -563,7 +568,7 @@ class UITrait extends iron.Trait { }); } } - }); + // }); } function update() { @@ -599,7 +604,7 @@ class UITrait extends iron.Trait { if (!arm.App.uimodal.isTyping) { if (kb.started("escape")) arm.App.showFiles = false; - if (kb.started("enter")) { + if (arm.App.showFiles && kb.started("enter")) { arm.App.showFiles = false; arm.App.filesDone(arm.App.path); UITrait.inst.ddirty = 2; @@ -1331,7 +1336,10 @@ void main() { } else { var psize = Std.int(cursorImg.width * (brushRadius * brushNodesRadius)); - g.drawScaledImage(cursorImg, mx - psize / 2, my - psize / 2, psize, psize); + + // if (mouse.x > 0 && mx < iron.App.w()) { + g.drawScaledImage(cursorImg, mx - psize / 2, my - psize / 2, psize, psize); + // } if (mirrorX) { var cx = iron.App.x() + iron.App.w() / 2; @@ -2121,7 +2129,7 @@ void main() { } ui.separator(); - if (ui.panel(Id.handle({selected: true}), "Project Quality", 1)) { + if (ui.panel(Id.handle({selected: false}), "Project Quality", 1)) { ui.combo(resHandle, ["1K", "2K", "4K", "8K", "16K", "20K"], "Res", true); if (resHandle.changed) { iron.App.notifyOnRender(resizeLayers); @@ -2492,18 +2500,22 @@ void main() { iron.Scene.active.sceneParent.getTrait(armory.trait.internal.DebugConsole).visible = ui.check(Id.handle({selected: false}), "Debug Console"); #end - var hssgi = Id.handle({selected: C.rp_ssgi}); - var hssr = Id.handle({selected: C.rp_ssr}); - var hbloom = Id.handle({selected: C.rp_bloom}); - var hshadowmap = Id.handle({position: getShadowQuality(C.rp_shadowmap)}); - var hsupersample = Id.handle({position: getSuperSampleQuality(C.rp_supersample)}); + hssgi = Id.handle({selected: C.rp_ssgi}); + hssr = Id.handle({selected: C.rp_ssr}); + hbloom = Id.handle({selected: C.rp_bloom}); + hshadowmap = Id.handle({position: getShadowQuality(C.rp_shadowmap)}); + hsupersample = Id.handle({position: getSuperSampleQuality(C.rp_supersample)}); ui.separator(); if (ui.panel(Id.handle({selected: true}), "Viewport", 1)) { ui.row([1/2, 1/2]); ui.combo(hshadowmap, ["Ultra", "High", "Medium", "Low", "Off"], "Shadows", true); + if (hshadowmap.changed) applyConfig(); ui.combo(hsupersample, ["0.5x", "1.0x", "1.5x", "2.0x"], "Super Sample", true); + if (hsupersample.changed) applyConfig(); ui.row([1/2, 1/2]); - C.window_vsync = ui.check(Id.handle({selected: C.window_vsync}), "VSync"); + var vsyncHandle = Id.handle({selected: C.window_vsync}); + C.window_vsync = ui.check(vsyncHandle, "VSync"); + if (vsyncHandle.changed) applyConfig(); var cullHandle = Id.handle({selected: culling}); culling = ui.check(cullHandle, "Culling"); if (cullHandle.changed) { @@ -2530,30 +2542,12 @@ void main() { } iron.Scene.active.world.envmap = drawWorld ? savedEnvmap : emptyEnvmap; ui.check(hssgi, "SSAO"); + if (hssgi.changed) applyConfig(); ui.row([1/2, 1/2]); ui.check(hssr, "SSR"); + if (hssr.changed) applyConfig(); ui.check(hbloom, "Bloom"); - } - - if (ui.button("Apply")) { - C.rp_ssgi = hssgi.selected; - C.rp_ssr = hssr.selected; - C.rp_bloom = hbloom.selected; - var wasOff = C.rp_shadowmap == 1; - C.rp_shadowmap = getShadowMapSize(hshadowmap.position); - var light = iron.Scene.active.lights[0]; - if (C.rp_shadowmap == 1) { - light.data.raw.strength = 0; - } - else if (wasOff) { - light.data.raw.strength = 6.5; - } - C.rp_supersample = getSuperSampleSize(hsupersample.position); - ui.g.end(); - armory.data.Config.save(); - armory.renderpath.RenderPathCreator.applyConfig(); - ui.g.begin(false); - ddirty = 2; + if (hbloom.changed) applyConfig(); } ui.separator(); @@ -3024,6 +3018,10 @@ void main() { arm.App.foldersOnly = false; arm.App.showFilename = false; arm.App.filesDone = function(path:String) { + if (!StringTools.endsWith(path, ".arm")) { + showMessage(".arm file expected"); + return; + } importProject(path); }; } @@ -3351,4 +3349,25 @@ void main() { g.vertexBufferMap.get("pos").unlock(); } } + + function applyConfig() { + C.rp_ssgi = hssgi.selected; + C.rp_ssr = hssr.selected; + C.rp_bloom = hbloom.selected; + var wasOff = C.rp_shadowmap == 1; + C.rp_shadowmap = getShadowMapSize(hshadowmap.position); + var light = iron.Scene.active.lights[0]; + if (C.rp_shadowmap == 1) { + light.data.raw.strength = 0; + } + else if (wasOff) { + light.data.raw.strength = 6.5; + } + C.rp_supersample = getSuperSampleSize(hsupersample.position); + ui.g.end(); + armory.data.Config.save(); + armory.renderpath.RenderPathCreator.applyConfig(); + ui.g.begin(false); + ddirty = 2; + } }