Skip to content

Commit

Permalink
Restrict baking to 3d view
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Jan 16, 2025
1 parent 7344cd4 commit 4380cfe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions base/sources/ui_view2d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -466,12 +466,14 @@ function ui_view2d_update() {
}

///if (is_paint || is_sculpt)
let decal: bool = context_is_decal();
let decal_mask: bool = context_is_decal_mask_paint();
let set_clone_source: bool = context_raw.tool == workspace_tool_t.CLONE && operator_shortcut(map_get(config_keymap, "set_clone_source") + "+" + map_get(config_keymap, "action_paint"), shortcut_type_t.DOWN);
let set_clone_source: bool = context_raw.tool == workspace_tool_t.CLONE &&
operator_shortcut(map_get(config_keymap, "set_clone_source") + "+" + map_get(config_keymap, "action_paint"), shortcut_type_t.DOWN);
let bake: bool = context_raw.tool == workspace_tool_t.BAKE;

if (ui_view2d_type == view_2d_type_t.LAYER &&
!ui_view2d_text_input_hover &&
!bake &&
(operator_shortcut(map_get(config_keymap, "action_paint"), shortcut_type_t.DOWN) ||
operator_shortcut(map_get(config_keymap, "brush_ruler") + "+" + map_get(config_keymap, "action_paint"), shortcut_type_t.DOWN) ||
decal_mask ||
Expand Down

0 comments on commit 4380cfe

Please sign in to comment.