Parent epic: #631
Depends on: Slice A (#632).
Goal
Expose the shading-mode data model to the user. Add the per-face mode picker, the "Paint as Flat / Paint as Smooth" stroke override, and the visual indicator that distinguishes flat from smooth faces while editing.
Scope
VertexPaintController singleton (src/VertexPaintController.{h,cpp}) — new home for the authoring API:
setStrokeShadingMode(FaceShadingMode | Inherit) — the stroke-level override.
setFaceShadingModes(faceIndices, mode) — bulk operation.
getMeshShadingSummary(mesh) — for UI display ("12 flat faces, 234 smooth faces").
- Per-face mode picker in the inspector:
- With a face (or set of faces) selected, a new "Shading" panel offers four buttons: Smooth / Flat / Textured / Textured Smooth.
- Disabled (greyed) modes when the face has no material with a texture (Textured / Textured Smooth need a base map; the picker offers them anyway with a tooltip explaining the prereq).
- Multi-select aware: setting a mode applies to all selected faces in one undo step.
- Stroke-level override in the brush toolbar:
- Three buttons: "Paint as Flat" / "Paint as Smooth" / "Inherit face mode" (default).
- "Inherit face mode" means: a stroke that touches a flat face writes its single colour; a stroke that touches a smooth face writes per-corner colours. The user gets predictable results when painting on a mixed mesh.
- "Paint as Flat" forces every touched face into Flat mode and sets its colour to the brush colour. Useful for blocking-in flat-shaded sections fast.
- "Paint as Smooth" forces touched faces into Smooth mode and writes per-corner colours. Useful for converting an imported flat-shaded mesh into a smoother look.
- Visual indicator:
- In Edit Mode with face-selection active, flat faces display with a small dot-grid overlay at the face centre so the user can tell at a glance which faces are flat-shaded.
- Toggle: "View → Show face shading mode" (default ON in Edit Mode).
- Undo:
- Status bar / inspector summary: shows the per-mesh shading summary ("Smooth: 234 / Flat: 12 / Textured: 0") so users can verify their work.
Acceptance Criteria
Effort
~6 days.
Parent epic: #631
Depends on: Slice A (#632).
Goal
Expose the shading-mode data model to the user. Add the per-face mode picker, the "Paint as Flat / Paint as Smooth" stroke override, and the visual indicator that distinguishes flat from smooth faces while editing.
Scope
VertexPaintControllersingleton (src/VertexPaintController.{h,cpp}) — new home for the authoring API:setStrokeShadingMode(FaceShadingMode | Inherit)— the stroke-level override.setFaceShadingModes(faceIndices, mode)— bulk operation.getMeshShadingSummary(mesh)— for UI display ("12 flat faces, 234 smooth faces").SetFaceShadingModesCommand(the bulk version of VertexPaint: Slice A — Per-face shading mode (Flat / Smooth) with vertex-split #632's command) for the picker.Acceptance Criteria
paint.vertex.shading_modeandpaint.vertex.stroke_overrideper action.Effort
~6 days.