Skip to content

Commit

Permalink
switch modifier to ctrl
Browse files Browse the repository at this point in the history
  • Loading branch information
Xtarsia committed Nov 2, 2024
1 parent bca6799 commit e003a67
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/terrain_3d_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,21 +371,21 @@ void Terrain3DEditor::_operate_map(const Vector3 &p_global_position, const real_
}
// If overlay and base texture are the same, reduce blend value
if (base_id == asset_id) {
blend = modifier_alt ? CLAMP(blend + brush_value, 0.f, 1.f) : CLAMP(blend - brush_value, 0.f, 1.f);
if (blend < 0.5f && brush_alpha > 0.5f && !modifier_alt) {
blend = modifier_ctrl ? CLAMP(blend + brush_value, 0.f, 1.f) : CLAMP(blend - brush_value, 0.f, 1.f);
if (blend < 0.5f && brush_alpha > 0.5f && !modifier_ctrl) {
autoshader = false;
}
} else {
// Else overlay and base are separate, increase blend value
blend = modifier_alt ? CLAMP(blend - brush_value, 0.f, 1.f) : CLAMP(blend + brush_value, 0.f, 1.f);
blend = modifier_ctrl ? CLAMP(blend - brush_value, 0.f, 1.f) : CLAMP(blend + brush_value, 0.f, 1.f);
// Overlay already visibile, limit ID changes to high brush alpha
if (blend > 0.5f && brush_alpha > 0.5f && !modifier_alt) {
if (blend > 0.5f && brush_alpha > 0.5f && !modifier_ctrl) {
overlay_id = asset_id;
// Only remove auto shader when blend is past threshold.
autoshader = false;
}
// Overlay not visible at brush edge, write new ID ready for potential next pass
if (blend <= 0.5f && brush_alpha <= 0.5f && !modifier_alt) {
if (blend <= 0.5f && brush_alpha <= 0.5f && !modifier_ctrl) {
overlay_id = asset_id;
}
}
Expand Down

0 comments on commit e003a67

Please sign in to comment.