summaryrefslogtreecommitdiff
path: root/editor/plugins/node_3d_editor_plugin.h
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2022-09-15 13:02:55 -0700
committerclayjohn <claynjohn@gmail.com>2022-09-15 20:45:19 -0700
commit969f20656a5784bfffea8eb204687ba349c285bd (patch)
tree2565d1c1015d2144e8a9c7e6ebfd11f1ca2bfdb5 /editor/plugins/node_3d_editor_plugin.h
parentc2babb65580d4dce3a0fc8834dd05fe177227b6e (diff)
Free preview sun and environement on editor close.
Previously, they would only be freed if they were in the editor node tree.
Diffstat (limited to 'editor/plugins/node_3d_editor_plugin.h')
-rw-r--r--editor/plugins/node_3d_editor_plugin.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h
index 580cb878ce..c76f534c22 100644
--- a/editor/plugins/node_3d_editor_plugin.h
+++ b/editor/plugins/node_3d_editor_plugin.h
@@ -763,7 +763,9 @@ private:
Button *sun_environ_settings = nullptr;
DirectionalLight3D *preview_sun = nullptr;
+ bool preview_sun_dangling = false;
WorldEnvironment *preview_environment = nullptr;
+ bool preview_env_dangling = false;
Ref<Environment> environment;
Ref<CameraAttributesPhysical> camera_attributes;
Ref<ProceduralSkyMaterial> sky_material;