feat: per-position camera settings, material alias dialog, product delete, media browser links

- Per-render-position focal_length_mm/sensor_width_mm (DB → pipeline → Blender)
- FOV-based camera distance with min clamp fix for wide-angle lenses
- Unmapped materials blocking dialog on "Dispatch Renders" with batch alias creation
- Material check endpoint (GET /orders/{id}/check-materials)
- Batch alias endpoint (POST /materials/batch-aliases)
- Quick-map "No alias" badges on Materials page
- Full product hard-delete with storage cleanup (MinIO + disk files + orphaned CadFile)
- Delete button on ProductDetail page with confirmation
- Clickable product names in Media Browser (links to product page)
- Single-line render dispatch/retry (POST /orders/{id}/lines/{id}/dispatch-render)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-14 12:16:37 +01:00
parent 0020376702
commit b583b0d7a2
48 changed files with 1827 additions and 376 deletions
+15 -3
View File
@@ -373,6 +373,18 @@ def main():
except Exception:
pass
# Named argument: --focal-length <mm>
_focal_length = None
if "--focal-length" in argv:
_idx = argv.index("--focal-length")
_focal_length = float(argv[_idx + 1]) if _idx + 1 < len(argv) else None
# Named argument: --sensor-width <mm>
_sensor_width = None
if "--sensor-width" in argv:
_idx = argv.index("--sensor-width")
_sensor_width = float(argv[_idx + 1]) if _idx + 1 < len(argv) else None
os.makedirs(os.path.dirname(output_path), exist_ok=True)
try:
@@ -616,8 +628,8 @@ def main():
# ── Camera (isometric-style, matches blender_render.py) ──────────────
ELEVATION_DEG = 28.0
AZIMUTH_DEG = 40.0
LENS_MM = 50.0
SENSOR_WIDTH_MM = 36.0
LENS_MM = _focal_length if _focal_length is not None else 50.0
SENSOR_WIDTH_MM = _sensor_width if _sensor_width is not None else 36.0
FILL_FACTOR = 0.85
elevation_rad = math.radians(ELEVATION_DEG)
@@ -634,7 +646,7 @@ def main():
fov_used = min(fov_h, fov_v)
dist = (bsphere_radius / math.tan(fov_used)) / FILL_FACTOR
dist = max(dist, bsphere_radius * 1.5)
dist = max(dist, bsphere_radius * 1.05)
cam_location = bbox_center + cam_dir * dist
bpy.ops.object.camera_add(location=cam_location)