+10 Red Bones 的父级改为读'编辑器当前选择'(用户是在层级面板里选的,不走我们列表行)

This commit is contained in:
tianmo committed 2026-10-16 17:55:10 +08:00
1 parent e57d31dfe6
commit dd520655f0
1 file changed
+8 -1
+8 -1
View File
@@ -627,7 +627,14 @@ public final class ObjectPanel {
SceneActions.onEditorThread(state.loader, new Runnable() {
@Override
public void run() {
Object parent = state.target;
// 父级取"编辑器里的当前选择"(用户是在层级面板里选的,不是点我们列表行)
Object parent = null;
try {
parent = SceneObjects.selected(state.loader);
} catch (Throwable error) {
System.err.println("[panel] 读当前选择失败: " + error);
}
if (parent == null) parent = state.target;
if (parent == null) {
setStatus(state, "+10 Red Bones: select a parent bone first.");
return;