Merge pull request #76722 from HotHead007/master

Make sun energy adjustable as a float in the 3D editor's preview sun
This commit is contained in:
Clay John 2023-05-04 13:29:31 -07:00 committed by GitHub
commit d023e51363
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -8578,9 +8578,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_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 = 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_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->connect("value_changed", callable_mp(this, &Node3DEditor::_preview_settings_changed).unbind(1));
sun_energy->set_max(64.0);
sun_max_distance = memnew(EditorSpinSlider); sun_max_distance = memnew(EditorSpinSlider);
sun_vb->add_margin_child(TTR("Shadow Max Distance"), sun_max_distance); sun_vb->add_margin_child(TTR("Shadow Max Distance"), sun_max_distance);