Merge pull request 't3du [ Repe ] + Moisesjpelaez Fixes' (#87) from Onek8/LNXSDK:main into main

Reviewed-on: LeenkxTeam/LNXSDK#87
This commit is contained in:
2025-06-27 22:28:35 +00:00
4 changed files with 51 additions and 7 deletions

View File

@ -0,0 +1,21 @@
package leenkx.logicnode;
import iron.object.LightObject;
class SetLightShadowNode extends LogicNode {
public function new(tree: LogicTree) {
super(tree);
}
override function run(from: Int) {
var light: LightObject = inputs[1].get();
var shadow: Bool = inputs[2].get();
if (light == null) return;
light.data.raw.cast_shadow = shadow;
runOutput(0);
}
}

View File

@ -280,7 +280,11 @@ class DebugConsole extends Trait {
function drawObjectNameInList(object: iron.object.Object, selected: Bool) { function drawObjectNameInList(object: iron.object.Object, selected: Bool) {
var _y = ui._y; var _y = ui._y;
ui.text(object.uid+'_'+object.name);
if (object.parent.name == 'Root')
ui.text(object.uid+'_'+object.name+' ('+iron.Scene.active.raw.world_ref+')');
else
ui.text(object.uid+'_'+object.name);
if (object == iron.Scene.active.camera) { if (object == iron.Scene.active.camera) {
var tagWidth = 100; var tagWidth = 100;

View File

@ -543,11 +543,13 @@ class LeenkxExporter:
if psys.settings.instance_object is None or psys.settings.render_type != 'OBJECT' or not psys.settings.instance_object.lnx_export: if psys.settings.instance_object is None or psys.settings.render_type != 'OBJECT' or not psys.settings.instance_object.lnx_export:
return return
for mod in bpy.data.objects[out_object['name']].modifiers: for obj in bpy.data.objects:
if mod.type == 'PARTICLE_SYSTEM': if obj.name == out_object['name']:
if mod.particle_system.name == psys.name: for mod in obj.modifiers:
if not mod.show_render: if mod.type == 'PARTICLE_SYSTEM':
return if mod.particle_system.name == psys.name:
if not mod.show_render:
return
self.particle_system_array[psys.settings] = {"structName": psys.settings.name} self.particle_system_array[psys.settings] = {"structName": psys.settings.name}
pref = { pref = {
@ -636,7 +638,10 @@ class LeenkxExporter:
continue continue
for slot in bobject.material_slots: for slot in bobject.material_slots:
if slot.material is None or slot.material.library is not None: if slot.material is None:
continue
if slot.material.library is not None:
slot.material.lnx_particle_flag = True
continue continue
if slot.material.name.endswith(variant_suffix): if slot.material.name.endswith(variant_suffix):
continue continue

View File

@ -0,0 +1,14 @@
from lnx.logicnode.lnx_nodes import *
class SetLightShadowNode(LnxLogicTreeNode):
"""Sets the shadow boolean of the given light."""
bl_idname = 'LNSetLightShadowNode'
bl_label = 'Set Light Shadow'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'Light')
self.add_input('LnxBoolSocket', 'Shadow')
self.add_output('LnxNodeSocketAction', 'Out')