From 388e71f5e0ed4970924a240720f0361554d3dd34 Mon Sep 17 00:00:00 2001 From: luboslenco Date: Wed, 3 Sep 2025 19:41:40 +0200 Subject: [PATCH] Bake in lit mode --- paint/sources/context.ts | 10 ++++++++++ paint/sources/ui_menubar.ts | 5 ----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/paint/sources/context.ts b/paint/sources/context.ts index cf8e624d..804626a7 100644 --- a/paint/sources/context.ts +++ b/paint/sources/context.ts @@ -711,6 +711,16 @@ function context_set_viewport_mode(mode: viewport_mode_t) { ui_header_worktab.position = 0; make_material_parse_mesh_material(); ui_header_worktab.position = _workspace; + + // Rotate mode is not supported for path tracing yet + if (context_raw.viewport_mode == viewport_mode_t.PATH_TRACE && context_raw.camera_controls == camera_controls_t.ROTATE) { + context_raw.camera_controls = camera_controls_t.ORBIT; + viewport_reset(); + } + // Bake in lit mode for now + if (context_raw.viewport_mode == viewport_mode_t.PATH_TRACE && context_raw.tool == tool_type_t.BAKE) { + context_raw.viewport_mode = viewport_mode_t.LIT; + } } function context_load_envmap() { diff --git a/paint/sources/ui_menubar.ts b/paint/sources/ui_menubar.ts index d9293a8e..7151bbe6 100644 --- a/paint/sources/ui_menubar.ts +++ b/paint/sources/ui_menubar.ts @@ -392,11 +392,6 @@ function ui_menubar_draw_category_items() { if (mode_handle.changed) { context_set_viewport_mode(mode_handle.position); - // Rotate mode is not supported for path tracing yet - if (mode_handle.position == viewport_mode_t.PATH_TRACE && context_raw.camera_controls == camera_controls_t.ROTATE) { - context_raw.camera_controls = camera_controls_t.ORBIT; - viewport_reset(); - } ui_menu_keep_open = true; } }