From 7179d42b276e5906420795a6a3a80dd5709c6912 Mon Sep 17 00:00:00 2001 From: Onek8 Date: Sat, 19 Jul 2025 20:07:08 +0000 Subject: [PATCH 1/5] Update leenkx/Sources/iron/system/Time.hx --- leenkx/Sources/iron/system/Time.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leenkx/Sources/iron/system/Time.hx b/leenkx/Sources/iron/system/Time.hx index 1ebc077..33684a5 100644 --- a/leenkx/Sources/iron/system/Time.hx +++ b/leenkx/Sources/iron/system/Time.hx @@ -14,7 +14,7 @@ class Time { return 1 / frequency; } - static var _fixedStep: Null; + static var _fixedStep: Null = 1/60; public static var fixedStep(get, never): Float; static function get_fixedStep(): Float { return _fixedStep; From 40b52be713f4bbf81203c6de211c0c42c6620dae Mon Sep 17 00:00:00 2001 From: LeenkxTeam Date: Mon, 21 Jul 2025 23:12:43 +0000 Subject: [PATCH 2/5] t3du - Add TSceneFormat as Trait property type --- leenkx/Sources/iron/Scene.hx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/leenkx/Sources/iron/Scene.hx b/leenkx/Sources/iron/Scene.hx index 3f8e174..67e9cb9 100644 --- a/leenkx/Sources/iron/Scene.hx +++ b/leenkx/Sources/iron/Scene.hx @@ -889,6 +889,10 @@ class Scene { if (StringTools.endsWith(ptype, "Object") && pval != "") { Reflect.setProperty(traitInst, pname, Scene.active.getChild(pval)); + } else if (ptype == "TSceneFormat" && pval != "") { + Data.getSceneRaw(pval, function (r: TSceneFormat) { + Reflect.setProperty(traitInst, pname, r); + }); } else { switch (ptype) { From f61d5833bb575ff371bba7d3eab5c29ceeb3d577 Mon Sep 17 00:00:00 2001 From: LeenkxTeam Date: Mon, 21 Jul 2025 23:15:59 +0000 Subject: [PATCH 3/5] Update leenkx/blender/lnx/exporter.py --- leenkx/blender/lnx/exporter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/leenkx/blender/lnx/exporter.py b/leenkx/blender/lnx/exporter.py index d7bf17c..0db817e 100644 --- a/leenkx/blender/lnx/exporter.py +++ b/leenkx/blender/lnx/exporter.py @@ -3057,6 +3057,8 @@ class LeenkxExporter: if trait_prop.type.endswith("Object"): value = lnx.utils.asset_name(trait_prop.value_object) + elif trait_prop.type == "TSceneFormat": + value = lnx.utils.asset_name(trait_prop.value_scene) else: value = trait_prop.get_value() From 9fb4916c3cd7717604ec3776df3f4741e1d50304 Mon Sep 17 00:00:00 2001 From: LeenkxTeam Date: Mon, 21 Jul 2025 23:24:30 +0000 Subject: [PATCH 4/5] t3du - Add TSceneFormat as Trait property type --- leenkx/blender/lnx/props_traits_props.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/leenkx/blender/lnx/props_traits_props.py b/leenkx/blender/lnx/props_traits_props.py index a5e146e..4a67507 100644 --- a/leenkx/blender/lnx/props_traits_props.py +++ b/leenkx/blender/lnx/props_traits_props.py @@ -15,7 +15,8 @@ PROP_TYPE_ICONS = { "CameraObject": "CAMERA_DATA", "LightObject": "LIGHT_DATA", "MeshObject": "MESH_DATA", - "SpeakerObject": "OUTLINER_DATA_SPEAKER" + "SpeakerObject": "OUTLINER_DATA_SPEAKER", + "TSceneFormat": "SCENE_DATA" } @@ -59,7 +60,8 @@ class LnxTraitPropListItem(bpy.types.PropertyGroup): ("CameraObject", "Camera Object", "Camera Object Type"), ("LightObject", "Light Object", "Light Object Type"), ("MeshObject", "Mesh Object", "Mesh Object Type"), - ("SpeakerObject", "Speaker Object", "Speaker Object Type")), + ("SpeakerObject", "Speaker Object", "Speaker Object Type"), + ("TSceneFormat", "Scene", "Scene Type")), name="Type", description="The type of this property", default="String", @@ -78,6 +80,7 @@ class LnxTraitPropListItem(bpy.types.PropertyGroup): name="Value", type=bpy.types.Object, poll=filter_objects, override={"LIBRARY_OVERRIDABLE"} ) + value_scene: PointerProperty(name="Value", type=bpy.types.Scene, override={"LIBRARY_OVERRIDABLE"}) def set_value(self, val): # Would require way too much effort, so it's out of scope here. @@ -126,6 +129,11 @@ class LnxTraitPropListItem(bpy.types.PropertyGroup): if self.value_object is not None: return self.value_object.name return "" + if self.type == "TSceneFormat": + if self.value_scene is not None: + return self.value_scene.name + return "" + return self.value_string @@ -144,6 +152,8 @@ class LNX_UL_PropList(bpy.types.UIList): if self.layout_type in {'DEFAULT', 'COMPACT'}: if item.type.endswith("Object"): sp.prop_search(item, "value_object", context.scene, "objects", text="", icon=custom_icon) + elif item.type.endswith("TSceneFormat"): + sp.prop_search(item, "value_scene", bpy.data, "scenes", text="", icon=custom_icon) else: use_emboss = item.type in ("Bool", "String") sp.prop(item, item_value_ref, text="", emboss=use_emboss) From 4af990796eef54ee6b9821fcae9b0f82eb5656c3 Mon Sep 17 00:00:00 2001 From: LeenkxTeam Date: Mon, 21 Jul 2025 23:27:34 +0000 Subject: [PATCH 5/5] t3du - Add TSceneFormat as Trait property type --- leenkx/blender/lnx/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/leenkx/blender/lnx/utils.py b/leenkx/blender/lnx/utils.py index 8ac35d2..2d9ca78 100644 --- a/leenkx/blender/lnx/utils.py +++ b/leenkx/blender/lnx/utils.py @@ -444,7 +444,7 @@ def fetch_script_props(filename: str): # Property type is annotated if p_type is not None: - if p_type.startswith("iron.object."): + if p_type.startswith("iron.object.") or p_type == "iron.data.SceneFormat.TSceneFormat": p_type = p_type[12:] elif p_type.startswith("iron.math."): p_type = p_type[10:] @@ -522,7 +522,7 @@ def get_type_default_value(prop_type: str): if prop_type == "Float": return 0.0 if prop_type == "String" or prop_type in ( - "Object", "CameraObject", "LightObject", "MeshObject", "SpeakerObject"): + "Object", "CameraObject", "LightObject", "MeshObject", "SpeakerObject", "TSceneFormat"): return "" if prop_type == "Bool": return False