From aa453c3822a2ec6c2881a49f53c160dde7668192 Mon Sep 17 00:00:00 2001 From: rickard Date: Tue, 4 Apr 2023 21:16:31 +0200 Subject: [PATCH] Work around for #176 "Scene graph is not properly updated for rendering" when adding LightProbe to a Geometry. --- .../core/sceneexplorer/nodes/actions/NewLightPopup.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/NewLightPopup.java b/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/NewLightPopup.java index cdd27a84a..be61055d8 100644 --- a/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/NewLightPopup.java +++ b/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/NewLightPopup.java @@ -48,6 +48,7 @@ import com.jme3.light.SpotLight; import com.jme3.math.ColorRGBA; import com.jme3.math.Vector3f; +import com.jme3.scene.Node; import com.jme3.scene.Spatial; import java.awt.event.ActionEvent; import java.util.concurrent.Callable; @@ -88,7 +89,11 @@ public JMenuItem getPopupPresenter() { result.add(new JMenuItem(new AddDirectionalAction())); result.add(new JMenuItem(new AddPointAction())); result.add(new JMenuItem(new AddSpotAction())); - result.add(new JMenuItem(new AddProbeAction())); + // FIXME: This is a work around due to issue #176: Scene graph is not properly updated for rendering + // Something happens in LightProbeFactory + if(node instanceof Node) { + result.add(new JMenuItem(new AddProbeAction())); + } return result; }