From 97e952fc15090bb80fc993b51d0ea7cb0e701d42 Mon Sep 17 00:00:00 2001 From: Onek8 Date: Thu, 14 Aug 2025 18:57:13 +0000 Subject: [PATCH 1/8] Update leenkx/Sources/leenkx/logicnode/DrawStringNode.hx --- leenkx/Sources/leenkx/logicnode/DrawStringNode.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/leenkx/Sources/leenkx/logicnode/DrawStringNode.hx b/leenkx/Sources/leenkx/logicnode/DrawStringNode.hx index 8b00ad8..157b0ea 100644 --- a/leenkx/Sources/leenkx/logicnode/DrawStringNode.hx +++ b/leenkx/Sources/leenkx/logicnode/DrawStringNode.hx @@ -62,7 +62,7 @@ class DrawStringNode extends LogicNode { override function get(from: Int): Dynamic { - return from == 1 ? RenderToTexture.g.font.height(RenderToTexture.g.fontSize) : RenderToTexture.g.font.width(RenderToTexture.g.fontSize, string); - + return from == 1 ? RenderToTexture.g.font.width(RenderToTexture.g.fontSize, string) : RenderToTexture.g.font.height(RenderToTexture.g.fontSize); + } } From 5b87010f76cd928f0fb808dfae54ad0b809a3bf5 Mon Sep 17 00:00:00 2001 From: Onek8 Date: Thu, 14 Aug 2025 18:58:52 +0000 Subject: [PATCH 2/8] Update leenkx/Sources/leenkx/trait/internal/DebugConsole.hx --- leenkx/Sources/leenkx/trait/internal/DebugConsole.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leenkx/Sources/leenkx/trait/internal/DebugConsole.hx b/leenkx/Sources/leenkx/trait/internal/DebugConsole.hx index cb66d1d..1ab63ca 100644 --- a/leenkx/Sources/leenkx/trait/internal/DebugConsole.hx +++ b/leenkx/Sources/leenkx/trait/internal/DebugConsole.hx @@ -281,7 +281,7 @@ class DebugConsole extends Trait { function drawObjectNameInList(object: iron.object.Object, selected: Bool) { var _y = ui._y; - if (object.parent.name == 'Root') + if (object.parent.name == 'Root' && object.raw == null) ui.text(object.uid+'_'+object.name+' ('+iron.Scene.active.raw.world_ref+')'); else ui.text(object.uid+'_'+object.name); From 7ae6750620bb1b0182c85e03d9dbd381bd6ae3bc Mon Sep 17 00:00:00 2001 From: Onek8 Date: Thu, 14 Aug 2025 19:00:58 +0000 Subject: [PATCH 3/8] Update leenkx/blender/lnx/logicnode/camera/LN_set_camera_start_end.py --- leenkx/blender/lnx/logicnode/camera/LN_set_camera_start_end.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leenkx/blender/lnx/logicnode/camera/LN_set_camera_start_end.py b/leenkx/blender/lnx/logicnode/camera/LN_set_camera_start_end.py index d41541f..1685716 100644 --- a/leenkx/blender/lnx/logicnode/camera/LN_set_camera_start_end.py +++ b/leenkx/blender/lnx/logicnode/camera/LN_set_camera_start_end.py @@ -10,7 +10,7 @@ class SetCameraStartEndNode(LnxLogicTreeNode): def remove_extra_inputs(self, context): while len(self.inputs) > 2: - self.inputs.remove(self.inputs[-1]) + self.inputs.remove(self.inputs[-1]) if self.property0 == 'Start': self.add_input('LnxFloatSocket', 'Start') if self.property0 == 'End': From fb47bf256422c9ba8c43e25b255e9886c91bd768 Mon Sep 17 00:00:00 2001 From: Onek8 Date: Thu, 14 Aug 2025 19:01:59 +0000 Subject: [PATCH 4/8] Update leenkx/blender/lnx/logicnode/draw/LN_draw_Text_Area_string.py --- leenkx/blender/lnx/logicnode/draw/LN_draw_Text_Area_string.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leenkx/blender/lnx/logicnode/draw/LN_draw_Text_Area_string.py b/leenkx/blender/lnx/logicnode/draw/LN_draw_Text_Area_string.py index faf767f..d79afa2 100644 --- a/leenkx/blender/lnx/logicnode/draw/LN_draw_Text_Area_string.py +++ b/leenkx/blender/lnx/logicnode/draw/LN_draw_Text_Area_string.py @@ -71,7 +71,7 @@ class DrawTextAreaStringNode(LnxLogicTreeNode): layout.prop(self, 'property2') def get_replacement_node(self, node_tree: bpy.types.NodeTree): - if self.lnx_version not in (0, 2): + if self.lnx_version not in (0, 1, 2): raise LookupError() return NodeReplacement.Identity(self) \ No newline at end of file From c31b2a18ad6e03018d7f59eed4c2bab3d5ce1f3e Mon Sep 17 00:00:00 2001 From: Onek8 Date: Thu, 14 Aug 2025 19:03:28 +0000 Subject: [PATCH 5/8] Update leenkx/blender/lnx/logicnode/draw/LN_draw_string.py --- leenkx/blender/lnx/logicnode/draw/LN_draw_string.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/leenkx/blender/lnx/logicnode/draw/LN_draw_string.py b/leenkx/blender/lnx/logicnode/draw/LN_draw_string.py index 5317335..2873760 100644 --- a/leenkx/blender/lnx/logicnode/draw/LN_draw_string.py +++ b/leenkx/blender/lnx/logicnode/draw/LN_draw_string.py @@ -17,15 +17,15 @@ class DrawStringNode(LnxLogicTreeNode): at the anchor point. @output Out: Activated after the string has been drawn. - @output Height: String Height. @output Width: String Width. + @output Height: String Height. @see [`kha.graphics2.Graphics.drawString()`](http://kha.tech/api/kha/graphics2/Graphics.html#drawString). """ bl_idname = 'LNDrawStringNode' bl_label = 'Draw String' lnx_section = 'draw' - lnx_version = 2 + lnx_version = 3 def lnx_init(self, context): self.add_input('LnxNodeSocketAction', 'Draw') @@ -38,11 +38,11 @@ class DrawStringNode(LnxLogicTreeNode): self.add_input('LnxFloatSocket', 'Angle') self.add_output('LnxNodeSocketAction', 'Out') - self.add_output('LnxFloatSocket', 'Height') self.add_output('LnxFloatSocket', 'Width') + self.add_output('LnxFloatSocket', 'Height') def get_replacement_node(self, node_tree: bpy.types.NodeTree): - if self.lnx_version not in (0, 1): + if self.lnx_version not in (0, 1, 2): raise LookupError() return NodeReplacement.Identity(self) From 7cca955fc55e83d1c528a2b105f3815af4783adc Mon Sep 17 00:00:00 2001 From: Onek8 Date: Thu, 14 Aug 2025 20:26:33 +0000 Subject: [PATCH 6/8] Update leenkx/Sources/iron/App.hx --- leenkx/Sources/iron/App.hx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/leenkx/Sources/iron/App.hx b/leenkx/Sources/iron/App.hx index 1141187..eb43845 100644 --- a/leenkx/Sources/iron/App.hx +++ b/leenkx/Sources/iron/App.hx @@ -54,6 +54,23 @@ class App { if (Scene.active == null || !Scene.active.ready) return; iron.system.Time.update(); + + + if (lastw == -1) { + lastw = App.w(); + lasth = App.h(); + } + if (lastw != App.w() || lasth != App.h()) { + if (onResize != null) onResize(); + else { + if (Scene.active != null && Scene.active.camera != null) { + Scene.active.camera.buildProjection(); + } + } + } + lastw = App.w(); + lasth = App.h(); + if (pauseUpdates) return; #if lnx_debug From ef99b800e094231ee5feea962b8e5f90e47a9505 Mon Sep 17 00:00:00 2001 From: Onek8 Date: Thu, 14 Aug 2025 20:27:20 +0000 Subject: [PATCH 7/8] Update leenkx/Sources/iron/App.hx --- leenkx/Sources/iron/App.hx | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/leenkx/Sources/iron/App.hx b/leenkx/Sources/iron/App.hx index eb43845..3d6bd78 100644 --- a/leenkx/Sources/iron/App.hx +++ b/leenkx/Sources/iron/App.hx @@ -55,7 +55,6 @@ class App { iron.system.Time.update(); - if (lastw == -1) { lastw = App.w(); lasth = App.h(); @@ -115,22 +114,6 @@ class App { for (cb in endFrameCallbacks) cb(); updateTime = kha.Scheduler.realTime() - startTime; #end - - // Rebuild projection on window resize - if (lastw == -1) { - lastw = App.w(); - lasth = App.h(); - } - if (lastw != App.w() || lasth != App.h()) { - if (onResize != null) onResize(); - else { - if (Scene.active != null && Scene.active.camera != null) { - Scene.active.camera.buildProjection(); - } - } - } - lastw = App.w(); - lasth = App.h(); } static function render(frames: Array) { From bfb85b0a3b84c1ad6277359f9e7c4378cb34a210 Mon Sep 17 00:00:00 2001 From: Onek8 Date: Thu, 14 Aug 2025 20:29:28 +0000 Subject: [PATCH 8/8] Update leenkx/Sources/iron/Scene.hx --- leenkx/Sources/iron/Scene.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leenkx/Sources/iron/Scene.hx b/leenkx/Sources/iron/Scene.hx index 67e9cb9..c0f1869 100644 --- a/leenkx/Sources/iron/Scene.hx +++ b/leenkx/Sources/iron/Scene.hx @@ -887,7 +887,7 @@ class Scene { var ptype: String = t.props[i * 3 + 1]; var pval: Dynamic = t.props[i * 3 + 2]; - if (StringTools.endsWith(ptype, "Object") && pval != "") { + if (StringTools.endsWith(ptype, "Object") && pval != "" && pval != null) { Reflect.setProperty(traitInst, pname, Scene.active.getChild(pval)); } else if (ptype == "TSceneFormat" && pval != "") { Data.getSceneRaw(pval, function (r: TSceneFormat) {