From d4caeab1853c3a7f01ffa47f11bf728f9ce9ba43 Mon Sep 17 00:00:00 2001 From: GlassySundew Date: Mon, 3 Nov 2025 18:15:47 +0400 Subject: [PATCH 1/3] support for definition of multiple classes in plugin `props.json` --- hide/comp/SceneEditor.hx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/hide/comp/SceneEditor.hx b/hide/comp/SceneEditor.hx index 0e0324d71..fa007c455 100644 --- a/hide/comp/SceneEditor.hx +++ b/hide/comp/SceneEditor.hx @@ -5736,11 +5736,16 @@ class SceneEditor { for( g in (view.config.get("sceneeditor.newgroups") : Array) ) { var parts = g.split("|"); - var cl : Dynamic = Type.resolveClass(parts[1]); - if( cl == null ) continue; + final classes : Array = []; + for (partIdx in 1...parts.length) { + var cl : Dynamic = Type.resolveClass(parts[partIdx]); + if( cl == null ) continue; + classes.push(cl); + } + if( classes.length == 0 ) continue; groups.push({ label : parts[0], - cl : cl, + classes : classes, group : [], }); } @@ -5760,11 +5765,12 @@ class SceneEditor { else { var found = false; for( g in groups ) - if( hrt.prefab.Prefab.isOfType(hrt.prefab.Prefab.getPrefabInfoByName(ptype).prefabClass,g.cl) ) { - g.group.push(m); - found = true; - break; - } + for(cls in g.classes) + if( hrt.prefab.Prefab.isOfType(hrt.prefab.Prefab.getPrefabInfoByName(ptype).prefabClass, cls) ) { + g.group.push(m); + found = true; + break; + } if( !found ) gother.push(m); } } From d1e3c73eefd519a1037e66d06465bd1b2263c03f Mon Sep 17 00:00:00 2001 From: GlassySundew Date: Mon, 3 Nov 2025 18:20:57 +0400 Subject: [PATCH 2/3] unneeded calculations fix --- hide/comp/SceneEditor.hx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hide/comp/SceneEditor.hx b/hide/comp/SceneEditor.hx index fa007c455..5db06171e 100644 --- a/hide/comp/SceneEditor.hx +++ b/hide/comp/SceneEditor.hx @@ -5764,13 +5764,16 @@ class SceneEditor { newItems.push(m); else { var found = false; - for( g in groups ) + for( g in groups ) { for(cls in g.classes) if( hrt.prefab.Prefab.isOfType(hrt.prefab.Prefab.getPrefabInfoByName(ptype).prefabClass, cls) ) { g.group.push(m); found = true; break; } + + if (found) break; + } if( !found ) gother.push(m); } } From ed0f955c2263a655ac38a8e2ac656d820b0ef1ae Mon Sep 17 00:00:00 2001 From: GlassySundew Date: Mon, 3 Nov 2025 18:24:07 +0400 Subject: [PATCH 3/3] class type declaration --- hide/comp/SceneEditor.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hide/comp/SceneEditor.hx b/hide/comp/SceneEditor.hx index 5db06171e..f083f24ad 100644 --- a/hide/comp/SceneEditor.hx +++ b/hide/comp/SceneEditor.hx @@ -5738,7 +5738,7 @@ class SceneEditor { var parts = g.split("|"); final classes : Array = []; for (partIdx in 1...parts.length) { - var cl : Dynamic = Type.resolveClass(parts[partIdx]); + var cl : Class = Type.resolveClass(parts[partIdx]); if( cl == null ) continue; classes.push(cl); }