feat: global material override on OutputType for x-ray/clay render modes

- Add `material_override` nullable column on OutputType (DB migration)
- When set, ALL product parts get rendered with this single material
- Override applies after alias resolution in render_order_line task
- Admin UI: dropdown in OutputType table to select a library material
- Display: amber badge showing active override material name

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-14 13:16:00 +01:00
parent b6bac080bb
commit 7c606953ec
6 changed files with 87 additions and 2 deletions
@@ -0,0 +1,30 @@
"""add material_override to output_types
Revision ID: cfcc7ad1e7d5
Revises: 4c15abf3cf40
Create Date: 2026-03-14 12:12:03.706587
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = 'cfcc7ad1e7d5'
down_revision: Union[str, None] = '4c15abf3cf40'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('output_types', sa.Column('material_override', sa.String(length=200), nullable=True))
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('output_types', 'material_override')
# ### end Alembic commands ###