diff --git a/Assets/common/icons.png b/Assets/common/icons.png index 0c48b1de..1fb496e9 100644 Binary files a/Assets/common/icons.png and b/Assets/common/icons.png differ diff --git a/Assets/common/icons2x.png b/Assets/common/icons2x.png index d68da38f..2b822dc9 100644 Binary files a/Assets/common/icons2x.png and b/Assets/common/icons2x.png differ diff --git a/Sources/arm/Enums.hx b/Sources/arm/Enums.hx index 00b2a17d..d2c5d5ee 100644 --- a/Sources/arm/Enums.hx +++ b/Sources/arm/Enums.hx @@ -9,18 +9,18 @@ package arm; var ToolClone = 5; var ToolBlur = 6; var ToolParticle = 7; - var ToolBake = 8; - var ToolColorId = 9; - var ToolPicker = 10; - var ToolGizmo = 11; + var ToolColorId = 8; + var ToolPicker = 9; + var ToolGizmo = 10; + var ToolBake = 11; } @:enum abstract SpaceType(Int) from Int to Int { var SpacePaint = 0; // var SpaceSculpt = 0; var SpaceMaterial = 1; - // var SpaceBake = 0; - var SpaceRender = 2; + var SpaceBake = 2; + var SpaceRender = 3; } @:enum abstract BakeType(Int) from Int to Int { diff --git a/Sources/arm/io/ImportMesh.hx b/Sources/arm/io/ImportMesh.hx index ed89ebd2..b348126d 100644 --- a/Sources/arm/io/ImportMesh.hx +++ b/Sources/arm/io/ImportMesh.hx @@ -67,7 +67,7 @@ class ImportMesh { } Project.meshAssets = [path]; - if (UIHeader.inst.worktab.position == SpacePaint) { + if (UIHeader.inst.worktab.position != SpaceRender) { ViewportUtil.scaleToBounds(); } diff --git a/Sources/arm/render/RenderPathPaint.hx b/Sources/arm/render/RenderPathPaint.hx index 5e1105d8..413decdc 100644 --- a/Sources/arm/render/RenderPathPaint.hx +++ b/Sources/arm/render/RenderPathPaint.hx @@ -97,7 +97,8 @@ class RenderPathPaint { public static function commandsPaint() { var tid = Context.layer.id; - if (Context.pdirty > 0 && UIHeader.inst.worktab.position == SpacePaint) { + var paintSpace = UIHeader.inst.worktab.position == SpacePaint || UIHeader.inst.worktab.position == SpaceBake; + if (Context.pdirty > 0 && paintSpace) { if (Context.tool == ToolParticle) { path.setTarget("texparticle"); path.clearTarget(0x00000000); diff --git a/Sources/arm/ui/UIMenubar.hx b/Sources/arm/ui/UIMenubar.hx index c3fc957c..62b10469 100644 --- a/Sources/arm/ui/UIMenubar.hx +++ b/Sources/arm/ui/UIMenubar.hx @@ -60,6 +60,7 @@ class UIMenubar { if (ui.window(workspaceHandle, panelx, 0, System.windowWidth() - UISidebar.inst.windowW - menubarw, Std.int(UIHeader.defaultHeaderH * ui.SCALE()))) { ui.tab(UIHeader.inst.worktab, tr("Paint")); ui.tab(UIHeader.inst.worktab, tr("Material")); + ui.tab(UIHeader.inst.worktab, tr("Bake")); ui.tab(UIHeader.inst.worktab, tr("Render")); if (UIHeader.inst.worktab.changed) { Context.ddirty = 2; @@ -72,6 +73,9 @@ class UIMenubar { if (UIHeader.inst.worktab.position == SpacePaint) { Context.selectTool(ToolBrush); } + else if (UIHeader.inst.worktab.position == SpaceBake) { + Context.selectTool(ToolBake); + } else { Context.selectTool(ToolGizmo); } diff --git a/Sources/arm/ui/UISidebar.hx b/Sources/arm/ui/UISidebar.hx index 3073742c..e5502c89 100644 --- a/Sources/arm/ui/UISidebar.hx +++ b/Sources/arm/ui/UISidebar.hx @@ -315,7 +315,6 @@ class UISidebar { if (Operator.shortcut(Config.keymap.tool_brush)) Context.selectTool(ToolBrush); else if (Operator.shortcut(Config.keymap.tool_eraser)) Context.selectTool(ToolEraser); else if (Operator.shortcut(Config.keymap.tool_fill)) Context.selectTool(ToolFill); - else if (Operator.shortcut(Config.keymap.tool_bake)) Context.selectTool(ToolBake); else if (Operator.shortcut(Config.keymap.tool_colorid)) Context.selectTool(ToolColorId); else if (Operator.shortcut(Config.keymap.tool_decal)) Context.selectTool(ToolDecal); else if (Operator.shortcut(Config.keymap.tool_text)) Context.selectTool(ToolText); diff --git a/Sources/arm/ui/UIToolbar.hx b/Sources/arm/ui/UIToolbar.hx index e7e67d25..e97b278f 100644 --- a/Sources/arm/ui/UIToolbar.hx +++ b/Sources/arm/ui/UIToolbar.hx @@ -22,7 +22,6 @@ class UIToolbar { tr("Clone"), tr("Blur"), tr("Particle"), - tr("Bake"), tr("ColorID"), tr("Picker") ]; @@ -52,7 +51,6 @@ class UIToolbar { "(" + Config.keymap.tool_clone + ") - " + tr("Hold") + " (" + Config.keymap.set_clone_source + ") " + tr("to set source"), "(" + Config.keymap.tool_blur + ")", "(" + Config.keymap.tool_particle + ")", - "(" + Config.keymap.tool_bake + ")", "(" + Config.keymap.tool_colorid + ")", "(" + Config.keymap.tool_picker + ")" ]; @@ -69,22 +67,30 @@ class UIToolbar { else if (UIHeader.inst.worktab.position == SpaceMaterial) { ui._x += 2; if (Context.tool == ToolGizmo) ui.rect(-1, -1, 50 + 2, 50 + 2, ui.t.HIGHLIGHT_COL, 2); - if (ui.image(img, -1, null, imgw * 11, 0, imgw, imgw) == State.Started) Context.selectTool(ToolGizmo); + if (ui.image(img, -1, null, imgw * 10, 0, imgw, imgw) == State.Started) Context.selectTool(ToolGizmo); if (ui.isHovered) ui.tooltip(tr("Gizmo") + " (G)"); ui._x -= 2; ui._y += 2; ui._x += 2; if (Context.tool == ToolPicker) ui.rect(-1, -1, 50 + 2, 50 + 2, ui.t.HIGHLIGHT_COL, 2); - if (ui.image(img, -1, null, imgw * 10, 0, imgw, imgw) == State.Started) Context.selectTool(ToolPicker); + if (ui.image(img, -1, null, imgw * 9, 0, imgw, imgw) == State.Started) Context.selectTool(ToolPicker); if (ui.isHovered) ui.tooltip(tr("Picker") + " (V)"); ui._x -= 2; ui._y += 2; } + else if (UIHeader.inst.worktab.position == SpaceBake) { + ui._x += 2; + if (Context.tool == ToolBake) ui.rect(-1, -1, 50 + 2, 50 + 2, ui.t.HIGHLIGHT_COL, 2); + if (ui.image(img, -1, null, imgw * 11, 0, imgw, imgw) == State.Started) Context.selectTool(ToolBake); + if (ui.isHovered) ui.tooltip(tr("Bake") + " (K)"); + ui._x -= 2; + ui._y += 2; + } else if (UIHeader.inst.worktab.position == SpaceRender) { ui._x += 2; if (Context.tool == ToolGizmo) ui.rect(-1, -1, 50 + 2, 50 + 2, ui.t.HIGHLIGHT_COL, 2); - if (ui.image(img, -1, null, imgw * 11, 0, imgw, imgw) == State.Started) Context.selectTool(ToolGizmo); + if (ui.image(img, -1, null, imgw * 10, 0, imgw, imgw) == State.Started) Context.selectTool(ToolGizmo); if (ui.isHovered) ui.tooltip(tr("Gizmo") + " (G)"); ui._x -= 2; ui._y += 2;