Skip to content

Commit 4dcef2e

Browse files
committed
hide light probes from app states.
1 parent 9553314 commit 4dcef2e

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/main/java/com/ss/editor/ui/control/model/node/spatial/SpatialTreeNode.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import com.jme3.scene.Spatial;
1515
import com.jme3.scene.control.Control;
1616
import com.ss.editor.control.transform.EditorTransformSupport;
17+
import com.ss.editor.extension.scene.InvisibleObject;
1718
import com.ss.editor.model.undo.editor.ChangeConsumer;
1819
import com.ss.editor.ui.Icons;
1920
import com.ss.editor.ui.control.model.node.control.ControlTreeNode;
@@ -31,15 +32,15 @@
3132
import com.ss.editor.ui.control.model.tree.action.operation.RenameNodeOperation;
3233
import com.ss.editor.ui.control.tree.NodeTree;
3334
import com.ss.editor.ui.control.tree.node.TreeNode;
35+
import com.ss.rlib.util.StringUtils;
36+
import com.ss.rlib.util.array.Array;
37+
import com.ss.rlib.util.array.ArrayFactory;
3438
import javafx.collections.ObservableList;
3539
import javafx.scene.control.Menu;
3640
import javafx.scene.control.MenuItem;
3741
import javafx.scene.image.ImageView;
3842
import org.jetbrains.annotations.NotNull;
3943
import org.jetbrains.annotations.Nullable;
40-
import com.ss.rlib.util.StringUtils;
41-
import com.ss.rlib.util.array.Array;
42-
import com.ss.rlib.util.array.ArrayFactory;
4344

4445
/**
4546
* The implementation of the {@link TreeNode} to represent a {@link Spatial} in an editor.
@@ -175,7 +176,11 @@ public Array<TreeNode<?>> getChildren(@NotNull final NodeTree<?> nodeTree) {
175176
final Spatial element = getElement();
176177

177178
final LightList lightList = element.getLocalLightList();
178-
lightList.forEach(light -> result.add(FACTORY_REGISTRY.createFor(light)));
179+
lightList.forEach(light -> {
180+
if (!(light instanceof InvisibleObject)) {
181+
result.add(FACTORY_REGISTRY.createFor(light));
182+
}
183+
});
179184

180185
final int numControls = element.getNumControls();
181186

0 commit comments

Comments
 (0)