Increase the default 3D manipulator gizmo opacity for better visibility
- Brighten gizmos when highlighted to make the difference between a
non-highlighted and a highlighted gizmo more visible.
- Tweak the manipulator gizmo size property hint.
(cherry picked from commit 8522ac7711
)
This commit is contained in:
parent
bf942447a3
commit
2753cc5264
@ -5204,7 +5204,7 @@ void SpatialEditor::_init_indicators() {
|
|||||||
gizmo_color[i] = mat;
|
gizmo_color[i] = mat;
|
||||||
|
|
||||||
Ref<SpatialMaterial> mat_hl = mat->duplicate();
|
Ref<SpatialMaterial> mat_hl = mat->duplicate();
|
||||||
mat_hl->set_albedo(Color(col.r, col.g, col.b, 1.0));
|
mat_hl->set_albedo(Color(col.r * 1.3, col.g * 1.3, col.b * 1.3, 1.0));
|
||||||
gizmo_color_hl[i] = mat_hl;
|
gizmo_color_hl[i] = mat_hl;
|
||||||
|
|
||||||
Vector3 ivec;
|
Vector3 ivec;
|
||||||
@ -5302,7 +5302,7 @@ void SpatialEditor::_init_indicators() {
|
|||||||
surftool->commit(move_plane_gizmo[i]);
|
surftool->commit(move_plane_gizmo[i]);
|
||||||
|
|
||||||
Ref<SpatialMaterial> plane_mat_hl = plane_mat->duplicate();
|
Ref<SpatialMaterial> plane_mat_hl = plane_mat->duplicate();
|
||||||
plane_mat_hl->set_albedo(Color(col.r, col.g, col.b, 1.0));
|
plane_mat_hl->set_albedo(Color(col.r * 1.3, col.g * 1.3, col.b * 1.3, 1.0));
|
||||||
plane_gizmo_color_hl[i] = plane_mat_hl; // needed, so we can draw planes from both sides
|
plane_gizmo_color_hl[i] = plane_mat_hl; // needed, so we can draw planes from both sides
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5382,7 +5382,7 @@ void SpatialEditor::_init_indicators() {
|
|||||||
rotate_gizmo[i]->surface_set_material(0, rotate_mat);
|
rotate_gizmo[i]->surface_set_material(0, rotate_mat);
|
||||||
|
|
||||||
Ref<ShaderMaterial> rotate_mat_hl = rotate_mat->duplicate();
|
Ref<ShaderMaterial> rotate_mat_hl = rotate_mat->duplicate();
|
||||||
rotate_mat_hl->set_shader_param("albedo", Color(col.r, col.g, col.b, 1.0));
|
rotate_mat_hl->set_shader_param("albedo", Color(col.r * 1.3, col.g * 1.3, col.b * 1.3, 1.0));
|
||||||
rotate_gizmo_color_hl[i] = rotate_mat_hl;
|
rotate_gizmo_color_hl[i] = rotate_mat_hl;
|
||||||
|
|
||||||
if (i == 2) { // Rotation white outline
|
if (i == 2) { // Rotation white outline
|
||||||
@ -5511,7 +5511,7 @@ void SpatialEditor::_init_indicators() {
|
|||||||
surftool->commit(scale_plane_gizmo[i]);
|
surftool->commit(scale_plane_gizmo[i]);
|
||||||
|
|
||||||
Ref<SpatialMaterial> plane_mat_hl = plane_mat->duplicate();
|
Ref<SpatialMaterial> plane_mat_hl = plane_mat->duplicate();
|
||||||
plane_mat_hl->set_albedo(Color(col.r, col.g, col.b, 1.0));
|
plane_mat_hl->set_albedo(Color(col.r * 1.3, col.g * 1.3, col.b * 1.3, 1.0));
|
||||||
plane_gizmo_color_hl[i] = plane_mat_hl; // needed, so we can draw planes from both sides
|
plane_gizmo_color_hl[i] = plane_mat_hl; // needed, so we can draw planes from both sides
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6520,8 +6520,8 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
|
|||||||
add_to_group("_spatial_editor_group");
|
add_to_group("_spatial_editor_group");
|
||||||
|
|
||||||
EDITOR_DEF("editors/3d/manipulator_gizmo_size", 80);
|
EDITOR_DEF("editors/3d/manipulator_gizmo_size", 80);
|
||||||
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "editors/3d/manipulator_gizmo_size", PROPERTY_HINT_RANGE, "16,1024,1"));
|
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "editors/3d/manipulator_gizmo_size", PROPERTY_HINT_RANGE, "16,160,1"));
|
||||||
EDITOR_DEF("editors/3d/manipulator_gizmo_opacity", 0.4);
|
EDITOR_DEF("editors/3d/manipulator_gizmo_opacity", 0.9);
|
||||||
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::REAL, "editors/3d/manipulator_gizmo_opacity", PROPERTY_HINT_RANGE, "0,1,0.01"));
|
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::REAL, "editors/3d/manipulator_gizmo_opacity", PROPERTY_HINT_RANGE, "0,1,0.01"));
|
||||||
EDITOR_DEF("editors/3d/navigation/show_viewport_rotation_gizmo", true);
|
EDITOR_DEF("editors/3d/navigation/show_viewport_rotation_gizmo", true);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user