summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorManik Sharma <maniksharma2607@gmai.com>2023-05-04 09:04:49 +0530
committerRĂ©mi Verschelde <rverschelde@gmail.com>2023-05-12 12:31:21 +0200
commit31a37495f3f383ceef03751c2cecdc7886e0828a (patch)
tree2a76afa8331a0c1c1760c1edcdfe706b08d9b5a3 /editor/plugins
parent3be6a1b38e3839fa5c42336c3fb15e8917f635e2 (diff)
Make sun energy adjustable as a float in the 3D editor's preview sun
(cherry picked from commit 5e1cb39101a20b58d3ea7ec8e2f2124c1b04e0fa)
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index e110e52454..897234544e 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -8545,9 +8545,11 @@ void fragment() {
sun_color->get_popup()->connect("about_to_popup", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker).bind(sun_color->get_picker()));
sun_energy = memnew(EditorSpinSlider);
+ sun_energy->set_max(64.0);
+ sun_energy->set_min(0);
+ sun_energy->set_step(0.05);
sun_vb->add_margin_child(TTR("Sun Energy"), sun_energy);
sun_energy->connect("value_changed", callable_mp(this, &Node3DEditor::_preview_settings_changed).unbind(1));
- sun_energy->set_max(64.0);
sun_max_distance = memnew(EditorSpinSlider);
sun_vb->add_margin_child(TTR("Shadow Max Distance"), sun_max_distance);