@deepblend/dsh-blender-bundle 0.23.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.js CHANGED
@@ -252,9 +252,17 @@ window.__ModuleLoader__.load({
252
252
  "assets.reset": "放弃素材草稿",
253
253
  "assets.saved": "素材已应用到 {revision}。",
254
254
  "assets.model": "放入场景(保留原材质)",
255
+ 'assets.hideExisting': '导入时隐藏现有对象(可选)',
256
+ 'assets.hideNone': '不隐藏任何对象',
257
+ 'assets.hideHelp': '新模型可能与现有对象重叠。只隐藏你明确选择的对象;原版本保留,可用于移开默认立方体。',
258
+ 'assets.makeSubject': '将新模型设为创作主体',
259
+ 'assets.hideSubjectError': '要隐藏当前明确指定的主体,请先勾选将新模型设为创作主体。',
255
260
  "assets.image": "绑定图片材质",
256
261
  "assets.environment": "用作环境照明",
257
- "assets.dimensions": "素材尺寸(米)",
262
+ "assets.dimensions": "首帧导入包围尺寸(场景米)",
263
+ "assets.unitsObj": "OBJ 不记录物理单位。请与实物尺寸核对;缩放倍数 = 实际尺寸 ÷ 上面的对应尺寸。",
264
+ "assets.unitsGltf": "glTF 约定以米为单位;请核对模型与实物尺寸。缩放倍数 = 实际尺寸 ÷ 上面的对应尺寸。",
265
+ "assets.scaledDimensions": "缩放后首帧包围尺寸(米,未计本次旋转)",
258
266
  "assets.toneMapped": "这是环境照明效果示例,经过色调映射;应用使用原始 HDR / EXR 数据。",
259
267
  "assets.modelHelp": "位置为素材原点,缩放相对原素材。保留原材质、层级与源对象,不改相机。",
260
268
  "assets.entityId": "新对象标识",
@@ -326,6 +334,21 @@ window.__ModuleLoader__.load({
326
334
  'brief.review': "评审已保存版本",
327
335
  'brief.autofix': "按参考自动修正",
328
336
  'brief.reviewCost': "点击后会渲染 640 × 480 / 16 采样预览并调用视觉模型;自动修正可能创建或回退版本。",
337
+ 'reviewView.title': '评审画面',
338
+ 'reviewView.selected': '指定保存机位',
339
+ 'reviewView.standard': '标准检查视图组',
340
+ 'reviewView.help': '按保存的项目画幅生成最大边不超过 640 像素、最多 16 采样的检查图,并调用模型。请核对机位和帧;这不是对正式图片或完整影片的验收。',
341
+ 'reviewView.standardHelp': '标准视图组按角色选择机位,不会自动匹配交付图片。',
342
+ 'reviewView.fromImages': '使用最近最多 4 张已完成图片的机位',
343
+ 'reviewView.add': '增加机位',
344
+ 'reviewView.remove': '移除机位',
345
+ 'reviewView.invalid': '请选择当前版本中 1–4 组不同的机位和帧,帧须位于工程范围内;来源未就绪时请刷新。',
346
+ 'reviewView.stale': '机位选择来自旧版本,请重置为当前保存版本后再评审。',
347
+ 'reviewView.reset': '重置为当前版本',
348
+ 'reviewView.noAutofix': '指定机位评审仅提供反馈。自动修正使用标准检查视图组。',
349
+ 'reviewView.scope': '实际检查画面 · {revision}',
350
+ 'reviewView.scopeItem': '{camera} · 第 {frame} 帧 · {resolution} · {samples} 采样',
351
+ 'reviewView.mismatch': '评审返回的画面来源与本次选择不一致,请刷新后重新核对。',
329
352
  'brief.iterations': "最多修正轮数",
330
353
  'brief.reviewing': "正在渲染并评审…",
331
354
  'brief.fixing': "正在进行有限轮次修正…",
@@ -349,6 +372,7 @@ window.__ModuleLoader__.load({
349
372
  'fit.reset': '重新读取当前版本',
350
373
  'fit.cancel': '取消保存',
351
374
  'fit.saved': '已保存完整取景:{revision} · 第 {frame} 帧 · {count} 个部件。请查看预览。',
375
+ 'fit.savedOtherPreview': '已保存完整取景:{revision}。当前显示的不是该版本预览,请核对图片来源;如果未更新,请点击刷新。',
352
376
  'fit.unconfirmed': '保存结果尚未确认。重试会沿用同一请求和机位;刷新页面后仍可继续。',
353
377
  'fit.stale': '当前版本已变化。重新读取当前版本后再保存。',
354
378
  'fit.failed': '未能保存完整取景。查看详情后调整部件、相机或留白,再试一次。',
@@ -399,6 +423,23 @@ window.__ModuleLoader__.load({
399
423
  "photo.restoreFailed": "恢复失败,已保留摄影记录:{message}",
400
424
  "photo.reuseUnavailable": "无法读取完整摄影设置,请重新选择来源。",
401
425
  "photo.reuseTitle": "复用已保存作品的摄影设置",
426
+ "photo.reuseMode": "复用方式",
427
+ "photo.reuseAbsolute": "原坐标",
428
+ "photo.reuseBounds": "按产品边界适配",
429
+ "photo.boundsHelp": "根据两边所选静态部件的实际边界缩放摄影位置。非太阳灯尺寸乘比例、功率乘比例平方;目标传感器、画幅与光圈保留,对焦距离重新计算。套用后查看预览,必要时另存完整取景;不保证相同曝光或构图。",
430
+ "photo.boundsAll": "选择非环境可见部件",
431
+ "photo.boundsClear": "清空选择",
432
+ "photo.boundsUnavailable": "当前 Host 不支持边界适配,未改动草稿。可更新插件,或明确改用原坐标。",
433
+ "photo.boundsPick": "两边都应选完整产品,排除环境与支承。未选部件不参与比例计算;动态、隐藏或无法可靠测量的几何会拒绝。",
434
+ "photo.boundsSource": "来源产品部件({count})",
435
+ "photo.boundsDestination": "目标产品部件({count})",
436
+ "photo.boundsFrame": "来源检查帧",
437
+ "photo.boundsPlanning": "正在读取两个保存工程的实际边界…",
438
+ "photo.boundsCancel": "取消适配",
439
+ "photo.boundsApplied": "已按 {scale} 倍套用到草稿:来源 {sourceCount} 件,目标 {destinationCount} 件,来源第 {frame} 帧。相机只取该帧,不复制动画。",
440
+ "photo.boundsInvalid": "请选择有效检查帧,以及来源和目标的完整产品部件。",
441
+ "photo.boundsMismatch": "适配结果与本次保存来源不一致,未改动摄影草稿。",
442
+ "photo.boundsChanged": "适配期间选择或草稿已变化,已保留当前输入;请重新适配。",
402
443
  "photo.reuseHelp": "原坐标以米复用,不自动缩放或取景。替换本作品全部灯光和所选相机的可编辑设置;模型、材质、世界、动画、其他相机与交付设置保留。套用后检查构图,再明确保存。",
403
444
  "photo.reuseProject": "来源作品",
404
445
  "photo.reuseRevision": "来源保存版本",
@@ -651,6 +692,7 @@ window.__ModuleLoader__.load({
651
692
  'projects.recovered': '已打开之前创建的 {id},未重复创建或渲染',
652
693
  'projects.replyMissing': '未能收到创建结果。输入已保留;重试上次创建会检查同一次请求。',
653
694
  'projects.environmentFailed': 'Blender 环境尚未就绪。输入已保留;请先检查安装和路径,修复后再重试。',
695
+ 'projects.environmentAllowlist': 'Blender 路径未获许可。输入已保留;请在 DSH 配置中指定 Blender 的绝对路径,或授权该程序所在目录,然后重试。',
654
696
  'projects.creationFailed': '未能确认创建结果。输入已保留;可重试上次创建,或刷新列表检查已保存的项目。',
655
697
  'projects.retryCreation': '重试上次创建',
656
698
  'projects.originalTitle': '上次创建:{title}',
@@ -716,6 +758,83 @@ window.__ModuleLoader__.load({
716
758
  'preview.identical': '结构完全相同',
717
759
  'jobs.empty': '还没有渲染任务。',
718
760
  'jobs.deliveryVerified': '交付已校验',
761
+ 'jobs.downloadVideo': '下载 MP4 · 版本 {revision}',
762
+ 'jobs.downloadFrame': '下载 PNG · 版本 {revision} · 第 {frame} 帧',
763
+ 'jobs.camera': '渲染相机',
764
+ 'jobs.cameraDefault': '场景默认相机',
765
+ 'jobs.cameraMissing': '所选相机在当前版本中不存在,请重新选择。',
766
+ 'motion.title': '制作相机推进',
767
+ 'readiness.imageTitle': '模型图片输入检查',
768
+ 'readiness.imageHelp': '主动发送一张随机测试图到当前视觉评审模型,可能产生模型费用;不会修改作品。切换模型或服务后请重新检查。',
769
+ 'readiness.imageRun': '检查模型是否能看图',
770
+ 'readiness.imageRunning': '正在检查…',
771
+ 'readiness.imagePass': '本次测试图识别正确。该检查不评价作品质量,也不能保证所有图片都能识别。',
772
+ 'readiness.imageAuth': '模型鉴权失败。请在 DSH 中检查当前服务的凭据,再重新检查。',
773
+ 'readiness.imageCredentials': '当前模型服务尚未配置可用凭据。请在当前工作台使用的 DSH 配置中完成服务凭据设置,再重新检查。',
774
+ 'readiness.imageUnsupported': '当前评审模型未声明支持图片输入。请在 DSH 中检查视觉评审模型配置。',
775
+ 'readiness.imageModel': '当前服务的模型目录中找不到所选模型。请核对当前工作台使用的 DSH 配置,并选择目录中的模型标识;模型显示名可能与标识不同。保存后重新检查。',
776
+ 'readiness.imageRoute': '评审模型或服务不可用。请检查当前 DSH 配置和服务状态。',
777
+ 'readiness.imageRate': '模型服务暂时限流,请稍后重试。',
778
+ 'readiness.imageTimeout': '本次检查超时或被取消,无法确认模型能否看图。',
779
+ 'readiness.imageBusy': '上一次检查仍未结束;请稍后重试,若持续不结束,请重启 DSH。',
780
+ 'readiness.imageInconclusive': '本次无法确认模型是否识别了测试图,请检查模型服务后重试。',
781
+ 'readiness.imageLocal': '请在本机工作台检查;旧版 Host 需要重启或更新。',
782
+ 'storage.low': '项目磁盘本次测得可用 {space},低于 2 GiB;多帧渲染可能中断。请先释放空间并刷新。',
783
+ 'storage.observed': '项目磁盘本次测得可用 {space}。渲染可能需要更多空间。',
784
+ 'storage.unknown': '暂时无法测量项目磁盘空间。请在渲染前检查项目所在磁盘。',
785
+ 'storage.limit': '这是最近一次刷新时的估计,不是空间预留;系统保留、配额、临时目录和其他任务可能影响实际可写空间。',
786
+ 'aspect.title': '为 16:9 交付准备画幅',
787
+ 'aspect.help': '切换会创建新版本,并调整预览与正式配置的画幅;已保存相机和模型保持,但构图可能改变。请重新完整取景并检查画面。',
788
+ 'aspect.change': '{profile}:{before} → {after}',
789
+ 'aspect.apply': '保存 16:9 画幅',
790
+ 'aspect.done': '预览和正式配置已是 16:9。仍需检查实际取景和影片。',
791
+ 'aspect.unavailable': '当前配置无法安全计算 16:9 尺寸,或宿主需要更新;请检查项目配置。',
792
+ 'aspect.pending': '请先保存或放弃其他草稿,并保存或重置运动草稿。',
793
+ 'aspect.saved': '已保存新的画幅版本;请重新取景并检查。',
794
+ 'aspect.outputMismatch': '所选交付是 16:9,但工程预览或正式画幅不是 16:9,画面可能裁切。请先准备 16:9 画幅并重新取景,或明确检查裁切结果。',
795
+ 'aspect.outputUnknown': '无法确认工程预览和正式画幅;请先检查 16:9 交付的实际构图。',
796
+ 'motion.help': '先从已完整取景的静态相机生成低质量运动预览,确认后保存新相机和运动;原作品与原相机保留。',
797
+ 'motion.camera': '起始相机',
798
+ 'motion.cameraAnimated': '这个相机已有动画,请选择静态相机;也可以先用「完整取景」生成新机位。',
799
+ 'motion.cameraTargeted': '这个相机跟踪场景中的对象,请先用「完整取景」生成静态机位。',
800
+ 'motion.cameraAnimatedOption': '{camera}(已有动画)',
801
+ 'motion.cameraTargetedOption': '{camera}(跟踪对象)',
802
+ 'motion.subject': '检查哪些产品部件',
803
+ 'motion.wholeLamp': '选择完整台灯',
804
+ 'motion.tagged': '选择标记为产品的可见部件',
805
+ 'motion.taggedHint': '请核对是否包括整件可见产品;标签不保证完整,隐藏部件不参与入镜检查。',
806
+ 'motion.hidden': '(已隐藏,不参与入镜检查)',
807
+ 'motion.tooMany': '标记为产品的可见部件超过 128 个,无法一次检查全部部件;请调整场景或自行检查未选部分。',
808
+ 'motion.duration': '时长(秒)',
809
+ 'motion.amount': '推进幅度(%)',
810
+ 'motion.direction': '方向',
811
+ 'motion.forward': '向前推进',
812
+ 'motion.backward': '向后拉远',
813
+ 'motion.extend': '如有需要,允许延长项目时间范围;已有动画需要重新检查',
814
+ 'motion.preview': '生成运动预览',
815
+ 'motion.generating': '正在生成预览…',
816
+ 'motion.cancel': '取消预览',
817
+ 'motion.save': '确认并保存运动',
818
+ 'motion.retry': '重试并找回保存结果',
819
+ 'motion.abandon': '停止找回并重新选择',
820
+ 'motion.abandonHelp': '如果无法找回,可以停止找回并重新选择。先检查版本记录:之前的保存仍可能完成。',
821
+ 'motion.saving': '正在保存…',
822
+ 'motion.discard': '放弃候选',
823
+ 'motion.reset': '重新选择',
824
+ 'motion.stale': '作品版本已改变,请重新选择并生成预览。',
825
+ 'motion.invalid': '请选择静态相机和至少一个完整部件,并检查时长与幅度。',
826
+ 'motion.outOfFrame': '所选部件在运动中超出画面。可减少推进幅度、选择向后拉远,或先调整静态取景后重试;没有保存新版本。',
827
+ 'motion.unverifiable': '无法逐帧核验所选部件。请检查是否含隐藏部件、实例或模拟几何,并选择受支持的可见网格;没有保存新版本。',
828
+ 'motion.limit': '预览为低采样画面;请看完整视频并检查遮挡、位移贴图、闪烁和最终画幅。',
829
+ 'motion.fullCheck': '已逐帧核对预览中所选部件的求值网格。',
830
+ 'motion.savedCheck': '确认保存时,将对重新编译的工程再逐帧检查,未通过则保留原版本。',
831
+ 'motion.savedOutOfFrame': '保存前的逐帧检查发现所选部件出画,未保存新版本。可停止找回并重新选择,调整取景或幅度后再次预览。',
832
+ 'motion.savedUnverifiable': '保存前无法逐帧核验所选部件,未保存新版本。可停止找回并重新选择,检查可见网格和取景后再次预览。',
833
+ 'motion.local': '运动预览需要本机工作台和支持此功能的 Host。',
834
+ 'motion.storage': '无法安全保存恢复信息;请启用浏览器存储后重试。',
835
+ 'motion.uncertain': '未能确认保存结果;请使用同一候选重试,系统会查找已保存的版本。',
836
+ 'motion.saved': '运动已保存到 {revision};请在渲染相机中选择 {camera}。',
837
+ 'motion.failed': '未完成:{message}',
719
838
  'jobs.provenanceUnknown': '帧来源未知',
720
839
  'jobs.provenanceUnchecked': '{count} 帧未在本次状态读取中复核;交付时的记录见交付清单',
721
840
  'jobs.provenanceMixed': '混合配置:{details}',
@@ -727,9 +846,23 @@ window.__ModuleLoader__.load({
727
846
  'jobs.cancel': '取消',
728
847
  'jobs.resume': '继续渲染',
729
848
  'jobs.startDelivery': '启动交付渲染',
849
+ 'jobs.noDeclaredMotion': '当前场景没有声明动画轨道。增加帧数不会自动产生运动;导入素材可能自带动画,请先预览并确认。',
730
850
  'jobs.frameStart': '起始帧',
731
851
  'jobs.frameEnd': '结束帧',
732
852
  'jobs.profile': '渲染配置',
853
+ 'jobs.stillPreset': '交付尺寸',
854
+ 'jobs.stillProfileSize': '使用渲染配置尺寸',
855
+ 'jobs.still2560': '正式静帧 2560×1440(单帧)',
856
+ 'jobs.stillRange': '图片交付或 2560×1440 静帧规格需要起始帧与结束帧相同;引擎与采样沿用所选渲染配置,采样受预算限制。',
857
+ 'jobs.stillUnsupported': '当前 Host 不支持此静帧规格,请更新后重试。',
858
+ 'jobs.video1080': '视频 1920×1080',
859
+ 'jobs.videoPresetHelp': '视频使用项目帧率 {fps} fps;1–144 帧在 24 fps 时为 6 秒。采样、引擎受所选配置及预算控制。',
860
+ 'jobs.videoPresetInvalid': '1080p 视频尺寸只用于视频交付;请切换交付类型或选择其他尺寸。',
861
+ 'jobs.videoPresetUnsupported': '当前 Host 不支持此视频规格,请更新后重试。',
862
+ 'jobs.deliveryKind': '交付类型',
863
+ 'jobs.deliveryVideo': '视频 MP4',
864
+ 'jobs.deliveryStill': '图片 PNG(单帧,无需视频编码)',
865
+ 'jobs.stillKindUnsupported': '当前 Host 不支持独立图片交付,请更新后重试。',
733
866
  'jobs.start': '启动',
734
867
  'qa.passed': '技术校验通过',
735
868
  'qa.none': '无技术校验记录',
@@ -775,10 +908,13 @@ window.__ModuleLoader__.load({
775
908
  "snapshot.title": "保存可编辑副本",
776
909
  "snapshot.scope": "包含 Blender 工程、源文件与相关外部素材。",
777
910
  "snapshot.details": "副本范围",
778
- "snapshot.detailText": "仅包含选定的已保存版本。仅用于观察的外部参考图不另行附带;工程内嵌内容未另行检查。可附带同版本的已完成影片。未保存的编辑不会进入副本。",
911
+ "snapshot.detailText": "仅包含选定的已保存版本。仅用于观察的外部参考图不另行附带;工程内嵌内容未另行检查。可附带同版本的已完成影片和图片。未保存的编辑不会进入副本。",
779
912
  "snapshot.revision": "已保存版本",
780
913
  "snapshot.video": "附带影片",
781
914
  "snapshot.noVideo": "不附带影片",
915
+ "snapshot.images": "附带已完成图片(最多 16 张)",
916
+ "snapshot.noImages": "该版本没有可附带的图片任务。",
917
+ "snapshot.missingImage": "{jobId} 不再可用;取消勾选或刷新后重试。",
782
918
  "snapshot.prepare": "准备下载",
783
919
  "snapshot.preparing": "正在准备副本…",
784
920
  "snapshot.checking": "正在检查已有副本…",
@@ -1014,9 +1150,17 @@ window.__ModuleLoader__.load({
1014
1150
  "assets.reset": "Discard asset draft",
1015
1151
  "assets.saved": "Asset applied in {revision}.",
1016
1152
  "assets.model": "Place in scene (preserve materials)",
1153
+ 'assets.hideExisting': 'Hide an existing object when importing (optional)',
1154
+ 'assets.hideNone': 'Keep every object visible',
1155
+ 'assets.hideHelp': 'The new model may overlap existing objects. Only the object you choose is hidden; the original revision is kept. This can move the default cube out of view.',
1156
+ 'assets.makeSubject': 'Make the new model the creative subject',
1157
+ 'assets.hideSubjectError': 'To hide the explicitly selected subject, first choose the new model as the creative subject.',
1017
1158
  "assets.image": "Bind image material",
1018
1159
  "assets.environment": "Use for environment lighting",
1019
- "assets.dimensions": "Asset dimensions (metres)",
1160
+ "assets.dimensions": "Imported first-frame bounds (scene metres)",
1161
+ "assets.unitsObj": "OBJ does not record physical units. Compare with the real object; scale = real size ÷ the corresponding size above.",
1162
+ "assets.unitsGltf": "glTF uses metres by convention. Check the model against the real object; scale = real size ÷ the corresponding size above.",
1163
+ "assets.scaledDimensions": "Scaled first-frame bounds (metres, before this rotation)",
1020
1164
  "assets.toneMapped": "This tone-mapped preview shows environment lighting; applying uses original HDR / EXR data.",
1021
1165
  "assets.modelHelp": "Position refers to the source origin and scale is relative to the source. Preserve its materials, hierarchy and objects; keep the camera.",
1022
1166
  "assets.entityId": "New object ID",
@@ -1088,6 +1232,21 @@ window.__ModuleLoader__.load({
1088
1232
  'brief.review': "Review saved revision",
1089
1233
  'brief.autofix': "Correct using references",
1090
1234
  'brief.reviewCost': "Clicking renders 640 × 480 previews at 16 samples and calls the vision model. Corrections may create or restore revisions.",
1235
+ 'reviewView.title': 'Review images',
1236
+ 'reviewView.selected': 'Selected saved cameras',
1237
+ 'reviewView.standard': 'Standard view group',
1238
+ 'reviewView.help': 'Render inspection images using the saved project aspect, at most 640 pixels on the long edge and 16 samples, then call the model. Check the cameras and frames. This does not accept the final images or full movie.',
1239
+ 'reviewView.standardHelp': 'Standard views choose cameras by role and do not automatically match delivered images.',
1240
+ 'reviewView.fromImages': 'Use cameras from up to 4 recent completed images',
1241
+ 'reviewView.add': 'Add camera',
1242
+ 'reviewView.remove': 'Remove camera',
1243
+ 'reviewView.invalid': 'Choose 1–4 distinct saved camera/frame pairs within the project range. Refresh if the saved source is unavailable.',
1244
+ 'reviewView.stale': 'This selection belongs to an older revision. Reset it to the current saved revision before reviewing.',
1245
+ 'reviewView.reset': 'Reset to current revision',
1246
+ 'reviewView.noAutofix': 'Selected-camera review returns feedback only. Automatic correction uses standard views.',
1247
+ 'reviewView.scope': 'Actual inspected images · {revision}',
1248
+ 'reviewView.scopeItem': '{camera} · frame {frame} · {resolution} · {samples} samples',
1249
+ 'reviewView.mismatch': 'The returned review image sources do not match this selection. Refresh and check again.',
1091
1250
  'brief.iterations': "Maximum correction rounds",
1092
1251
  'brief.reviewing': "Rendering and reviewing…",
1093
1252
  'brief.fixing': "Running bounded corrections…",
@@ -1111,6 +1270,7 @@ window.__ModuleLoader__.load({
1111
1270
  'fit.reset': 'Read current revision again',
1112
1271
  'fit.cancel': 'Cancel save',
1113
1272
  'fit.saved': 'Complete view saved: {revision} · frame {frame} · {count} parts. Review the preview.',
1273
+ 'fit.savedOtherPreview': 'Complete view saved: {revision}. Its preview is not currently displayed. Check the image source; refresh if it has not updated.',
1114
1274
  'fit.unconfirmed': 'The save is unconfirmed. Retry reuses this request and camera, including after a page refresh.',
1115
1275
  'fit.stale': 'The current revision changed. Read it again before saving.',
1116
1276
  'fit.failed': 'The complete view could not be saved. Check the details, adjust the parts, camera or margin, and retry.',
@@ -1161,6 +1321,23 @@ window.__ModuleLoader__.load({
1161
1321
  "photo.restoreFailed": "Restore failed; the photography record is retained: {message}",
1162
1322
  "photo.reuseUnavailable": "Complete photography settings are unavailable. Select the source again.",
1163
1323
  "photo.reuseTitle": "Reuse photography from saved work",
1324
+ "photo.reuseMode": "Reuse coordinates",
1325
+ "photo.reuseAbsolute": "Original coordinates",
1326
+ "photo.reuseBounds": "Adapt to product bounds",
1327
+ "photo.boundsHelp": "Scale the setup from the measured bounds of both selected static products. Non-sun light size scales by the ratio and power by its square. Keep the destination sensor, aspect and aperture; recalculate focus distance. Preview and reframe as needed; exposure and composition can differ.",
1328
+ "photo.boundsAll": "Select visible non-environment parts",
1329
+ "photo.boundsClear": "Clear selection",
1330
+ "photo.boundsUnavailable": "This Host does not support boundary adaptation. The draft was kept. Update the plugin or explicitly choose original coordinates.",
1331
+ "photo.boundsPick": "Select the complete product on both sides, excluding the environment and supports. Unselected parts do not affect the ratio. Dynamic, hidden or unmeasurable geometry is refused.",
1332
+ "photo.boundsSource": "Source product parts ({count})",
1333
+ "photo.boundsDestination": "Destination product parts ({count})",
1334
+ "photo.boundsFrame": "Source inspection frame",
1335
+ "photo.boundsPlanning": "Reading native bounds from both saved works…",
1336
+ "photo.boundsCancel": "Cancel adaptation",
1337
+ "photo.boundsApplied": "Applied ratio {scale} to the draft: {sourceCount} source parts, {destinationCount} destination parts, source frame {frame}. The camera is sampled at this frame; its animation is not copied.",
1338
+ "photo.boundsInvalid": "Select a valid inspection frame and complete source and destination product parts.",
1339
+ "photo.boundsMismatch": "The adaptation does not match these saved inputs. The photography draft was kept.",
1340
+ "photo.boundsChanged": "The selection or draft changed while inspecting. Current inputs were kept; adapt again.",
1164
1341
  "photo.reuseHelp": "Reuse absolute coordinates in metres, without automatic scaling or framing. Replace all lights and the selected camera’s editable settings. Keep models, materials, world, animation, other cameras and delivery settings. Check the framing before explicitly saving.",
1165
1342
  "photo.reuseProject": "Source work",
1166
1343
  "photo.reuseRevision": "Saved source version",
@@ -1413,6 +1590,7 @@ window.__ModuleLoader__.load({
1413
1590
  'projects.recovered': 'Opened the previously created {id}; no duplicate creation or render',
1414
1591
  'projects.replyMissing': 'The creation result could not be received. Your inputs are kept; retry the previous creation to check the same request.',
1415
1592
  'projects.environmentFailed': 'Blender is not ready. Your inputs are kept; check its installation and path, then retry.',
1593
+ 'projects.environmentAllowlist': 'The Blender path is not permitted. Your inputs are kept; set an absolute Blender path in DSH or allow its directory, then retry.',
1416
1594
  'projects.creationFailed': 'The creation result could not be confirmed. Your inputs are kept; retry the previous creation, or refresh the list to check saved projects.',
1417
1595
  'projects.retryCreation': 'Retry previous creation',
1418
1596
  'projects.originalTitle': 'Previous creation: {title}',
@@ -1478,6 +1656,83 @@ window.__ModuleLoader__.load({
1478
1656
  'preview.identical': 'structurally identical',
1479
1657
  'jobs.empty': 'No render jobs yet.',
1480
1658
  'jobs.deliveryVerified': 'delivery verified',
1659
+ 'jobs.downloadVideo': 'Download MP4 · revision {revision}',
1660
+ 'jobs.downloadFrame': 'Download PNG · revision {revision} · frame {frame}',
1661
+ 'jobs.camera': 'Render camera',
1662
+ 'jobs.cameraDefault': 'Scene default camera',
1663
+ 'jobs.cameraMissing': 'The selected camera is not in this revision. Choose a camera again.',
1664
+ 'motion.title': 'Create a camera push',
1665
+ 'readiness.imageTitle': 'Model image-input check',
1666
+ 'readiness.imageHelp': 'Send one random test image to the configured review model. This may incur model charges and does not change your work. Check again after changing the model or service.',
1667
+ 'readiness.imageRun': 'Check model image input',
1668
+ 'readiness.imageRunning': 'Checking…',
1669
+ 'readiness.imagePass': 'The test image was identified correctly. This does not review artwork or guarantee recognition of every image.',
1670
+ 'readiness.imageAuth': 'Model authentication failed. Check the current service credentials in DSH, then retry.',
1671
+ 'readiness.imageCredentials': 'No usable credentials are configured for the current model service. Set up its credentials in this workbench’s DSH configuration, then check again.',
1672
+ 'readiness.imageUnsupported': 'The configured review model does not declare image input. Check its DSH configuration.',
1673
+ 'readiness.imageModel': 'The selected model is absent from the current service catalog. Check this workbench’s DSH configuration and choose the model’s catalog identifier; its display name may differ. Save, then check again.',
1674
+ 'readiness.imageRoute': 'The configured review model or service is unavailable. Check DSH configuration and service status.',
1675
+ 'readiness.imageRate': 'The model service is rate limited. Try again later.',
1676
+ 'readiness.imageTimeout': 'The check timed out or was cancelled; image input is not verified.',
1677
+ 'readiness.imageBusy': 'The previous check has not finished. Try again later; restart DSH if it remains stuck.',
1678
+ 'readiness.imageInconclusive': 'This check could not confirm the test image was recognized. Check the model service and try again.',
1679
+ 'readiness.imageLocal': 'Run the check in the local workbench; older Hosts need a restart or update.',
1680
+ 'storage.low': 'The project disk reported {space} available, below 2 GiB; a multi-frame render may stop. Free space and refresh.',
1681
+ 'storage.observed': 'The project disk reported {space} available. Rendering may need more.',
1682
+ 'storage.unknown': 'Project disk space could not be measured. Check the project disk before rendering.',
1683
+ 'storage.limit': 'This is a snapshot from the last refresh, not reserved space; system reserves, quotas, temporary directories and other work can affect what is actually writable.',
1684
+ 'aspect.title': 'Prepare a 16:9 delivery frame',
1685
+ 'aspect.help': 'Saving creates a new version and adjusts preview and final frame shapes. Cameras and models stay intact, but composition can change. Refit and inspect the images.',
1686
+ 'aspect.change': '{profile}: {before} → {after}',
1687
+ 'aspect.apply': 'Save 16:9 frame',
1688
+ 'aspect.done': 'Preview and final profiles are already 16:9. Inspect the framing and video.',
1689
+ 'aspect.unavailable': 'A safe 16:9 size cannot be calculated, or the Host needs an update; check the project configuration.',
1690
+ 'aspect.pending': 'Save or discard other drafts and save or reset the motion draft first.',
1691
+ 'aspect.saved': 'Saved a new frame version; refit and inspect the result.',
1692
+ 'aspect.outputMismatch': 'The selected delivery is 16:9, but the project preview or final frame is not; the image may be cropped. Prepare a 16:9 frame and refit, or explicitly check the crop.',
1693
+ 'aspect.outputUnknown': 'The project preview and final frame shapes could not be verified. Check the actual 16:9 composition first.',
1694
+ 'motion.help': 'Preview a low-quality move from a static, fully framed camera; save a new camera and motion after review. The original work and camera are kept.',
1695
+ 'motion.camera': 'Starting camera',
1696
+ 'motion.cameraAnimated': 'This camera already has animation. Choose a static camera, or create one with Complete view first.',
1697
+ 'motion.cameraTargeted': 'This camera tracks an object. Create a static camera with Complete view first.',
1698
+ 'motion.cameraAnimatedOption': '{camera} (animated)',
1699
+ 'motion.cameraTargetedOption': '{camera} (tracks an object)',
1700
+ 'motion.subject': 'Product parts to check',
1701
+ 'motion.wholeLamp': 'Select complete lamp',
1702
+ 'motion.tagged': 'Select visible parts marked as product',
1703
+ 'motion.taggedHint': 'Check the visible product is complete; tags do not guarantee completeness and hidden parts are not inspected.',
1704
+ 'motion.hidden': ' (hidden, not checked for framing)',
1705
+ 'motion.tooMany': 'More than 128 visible parts are marked as product, so one check cannot cover them all. Adjust the scene or inspect the unselected parts yourself.',
1706
+ 'motion.duration': 'Duration (seconds)',
1707
+ 'motion.amount': 'Move amount (%)',
1708
+ 'motion.direction': 'Direction',
1709
+ 'motion.forward': 'Push forward',
1710
+ 'motion.backward': 'Pull back',
1711
+ 'motion.extend': 'Allow extending the project timeline if needed; review existing animation',
1712
+ 'motion.preview': 'Generate motion preview',
1713
+ 'motion.generating': 'Generating preview…',
1714
+ 'motion.cancel': 'Cancel preview',
1715
+ 'motion.save': 'Accept and save motion',
1716
+ 'motion.retry': 'Retry and recover saved result',
1717
+ 'motion.abandon': 'Stop recovery and choose again',
1718
+ 'motion.abandonHelp': 'If recovery is unavailable, you can stop trying and choose again. Check revision history first: the earlier save may still complete.',
1719
+ 'motion.saving': 'Saving…',
1720
+ 'motion.discard': 'Discard candidate',
1721
+ 'motion.reset': 'Choose again',
1722
+ 'motion.stale': 'The saved work changed. Choose again and generate a new preview.',
1723
+ 'motion.invalid': 'Choose a static camera and at least one complete part; check duration and amount.',
1724
+ 'motion.outOfFrame': 'Selected parts leave the frame. Reduce the move, pull back, or adjust the static view and retry; no revision was saved.',
1725
+ 'motion.unverifiable': 'The selected parts could not be checked in every frame. Check for hidden parts, instances or simulated geometry and select supported visible meshes; no revision was saved.',
1726
+ 'motion.limit': 'This is a low-sample preview. Watch the full video and inspect occlusion, displacement, flicker and delivery framing.',
1727
+ 'motion.fullCheck': 'Selected evaluated meshes were checked throughout the preview.',
1728
+ 'motion.savedCheck': 'Saving checks every frame of the recompiled project; the original revision is kept if it fails.',
1729
+ 'motion.savedOutOfFrame': 'The pre-save check found selected geometry outside the frame; no revision was saved. Stop recovery, adjust the framing or amount, and preview again.',
1730
+ 'motion.savedUnverifiable': 'The pre-save frame check could not verify the selection; no revision was saved. Stop recovery, check the visible meshes and framing, and preview again.',
1731
+ 'motion.local': 'Motion preview requires a local workbench and a compatible Host.',
1732
+ 'motion.storage': 'Recovery information could not be stored safely. Enable browser storage and retry.',
1733
+ 'motion.uncertain': 'Save could not be confirmed. Retry the same candidate to recover any saved version.',
1734
+ 'motion.saved': 'Motion saved to {revision}; choose {camera} as the render camera.',
1735
+ 'motion.failed': 'Not completed: {message}',
1481
1736
  'jobs.provenanceUnknown': 'Frame provenance unknown',
1482
1737
  'jobs.provenanceUnchecked': '{count} frames not rechecked in this status read; see the delivery manifest for publication-time evidence',
1483
1738
  'jobs.provenanceMixed': 'Mixed configurations: {details}',
@@ -1489,9 +1744,23 @@ window.__ModuleLoader__.load({
1489
1744
  'jobs.cancel': 'Cancel',
1490
1745
  'jobs.resume': 'Resume render',
1491
1746
  'jobs.startDelivery': 'Start a delivery render',
1747
+ 'jobs.noDeclaredMotion': 'This scene has no declared animation tracks. More frames do not create motion automatically; imported assets may contain animation, so preview and check first.',
1492
1748
  'jobs.frameStart': 'from frame',
1493
1749
  'jobs.frameEnd': 'to frame',
1494
1750
  'jobs.profile': 'Render profile',
1751
+ 'jobs.stillPreset': 'Delivery size',
1752
+ 'jobs.stillProfileSize': 'Use render profile size',
1753
+ 'jobs.still2560': 'Delivery still 2560×1440 (one frame)',
1754
+ 'jobs.stillRange': 'Image delivery or the 2560×1440 still preset requires the same start and end frame; engine and samples come from the selected profile, subject to the sample budget.',
1755
+ 'jobs.stillUnsupported': 'This Host does not support the still preset. Update it and retry.',
1756
+ 'jobs.video1080': 'Video 1920×1080',
1757
+ 'jobs.videoPresetHelp': 'Video uses the project frame rate of {fps} fps; frames 1–144 last 6 seconds at 24 fps. Engine and samples depend on the selected profile and budget.',
1758
+ 'jobs.videoPresetInvalid': 'The 1080p video size requires video delivery. Change the delivery type or size.',
1759
+ 'jobs.videoPresetUnsupported': 'This Host does not support the video size preset. Update it and retry.',
1760
+ 'jobs.deliveryKind': 'Delivery type',
1761
+ 'jobs.deliveryVideo': 'Video MP4',
1762
+ 'jobs.deliveryStill': 'Image PNG (single frame; no video encoding)',
1763
+ 'jobs.stillKindUnsupported': 'This Host does not support image delivery. Update it and retry.',
1495
1764
  'jobs.start': 'Start',
1496
1765
  'qa.passed': 'technical checks passed',
1497
1766
  'qa.none': 'no technical check recorded',
@@ -1537,10 +1806,13 @@ window.__ModuleLoader__.load({
1537
1806
  "snapshot.title": "Save an editable copy",
1538
1807
  "snapshot.scope": "Includes the Blender project, source files and relevant external assets.",
1539
1808
  "snapshot.details": "What the copy includes",
1540
- "snapshot.detailText": "Includes only the selected saved version. External images used only as visual references are omitted; embedded content is not separately inspected. You can include a completed video from the same version. Unsaved edits are not included.",
1809
+ "snapshot.detailText": "Includes only the selected saved version. External images used only as visual references are omitted; embedded content is not separately inspected. You can include completed videos and stills from the same version. Unsaved edits are not included.",
1541
1810
  "snapshot.revision": "Saved version",
1542
1811
  "snapshot.video": "Include a video",
1543
1812
  "snapshot.noVideo": "No video",
1813
+ "snapshot.images": "Include completed images (up to 16)",
1814
+ "snapshot.noImages": "No completed image jobs for this revision.",
1815
+ "snapshot.missingImage": "{jobId} is no longer available; deselect it or refresh and retry.",
1544
1816
  "snapshot.prepare": "Prepare download",
1545
1817
  "snapshot.preparing": "Preparing the copy…",
1546
1818
  "snapshot.checking": "Checking the existing copy…",
@@ -1750,6 +2022,7 @@ window.__ModuleLoader__.load({
1750
2022
  // the header, so the BROWSER makes the request and writes the file. `contract/diagnostics.test.mjs`
1751
2023
  // holds these four paths to the route table the Host actually matches.
1752
2024
  diagnostics: '/deepblend/diagnostics',
2025
+ imageInputProbe: '/deepblend/readiness/image-input',
1753
2026
  }
1754
2027
 
1755
2028
  /** Route for one project's own surfaces. */
@@ -1887,9 +2160,12 @@ window.__ModuleLoader__.load({
1887
2160
  return { entries, available: true }
1888
2161
  } catch { return { entries: [], available: false } }
1889
2162
  }
2163
+ const creationEnvironmentError = code => ['BLENDER_NOT_FOUND', 'RUNTIME_UNAVAILABLE', 'BLENDER_RUNTIME_UNAVAILABLE',
2164
+ 'BLENDER_EXECUTABLE_NOT_EXECUTABLE', 'BLENDER_EXECUTABLE_OUTSIDE_ALLOWLIST'].includes(code)
1890
2165
  function creationErrorMessage(code) {
1891
2166
  if (code === 'UI_FETCH_FAILED' || /^HTTP_/.test(code)) return t('projects.replyMissing')
1892
- if (code === 'BLENDER_NOT_FOUND' || code === 'RUNTIME_UNAVAILABLE') return t('projects.environmentFailed')
2167
+ if (code === 'BLENDER_EXECUTABLE_OUTSIDE_ALLOWLIST') return t('projects.environmentAllowlist')
2168
+ if (creationEnvironmentError(code)) return t('projects.environmentFailed')
1893
2169
  if (code === 'CREATION_REQUEST_CONFLICT') return t('projects.creationConflict')
1894
2170
  if (code === 'UI_HOST_API_STALE') return t('projects.hostNeedsRestart')
1895
2171
  return t('projects.creationFailed')
@@ -2719,6 +2995,7 @@ window.__ModuleLoader__.load({
2719
2995
  }
2720
2996
  if (kind === 'camera') {
2721
2997
  if (!number(editorNumberDefault(item.lens, 50), 0, false)) bad(`${item.id}.lens`)
2998
+ if (!editorEqual(item.focusDistance, original?.focusDistance) && !number(item.focusDistance, 0, false)) bad(`${item.id}.focusDistance`)
2722
2999
  if (item.targetEntityId !== undefined && !draft.entities.some(entity => entity.id === item.targetEntityId)) bad(`${item.id}.targetEntityId`)
2723
3000
  if (item.targetPoint !== undefined && !vector(item.targetPoint)) bad(`${item.id}.targetPoint`)
2724
3001
  if (item.targetEntityId !== undefined && item.targetPoint !== undefined) bad(`${item.id}.target`)
@@ -2743,7 +3020,7 @@ window.__ModuleLoader__.load({
2743
3020
  if (errors.length) throw new Error(t('photo.invalid', { fields: errors.join(', ') }))
2744
3021
  const operations = []
2745
3022
  const replaceLights = draft.reusedLights && !photographySameLights(draft.lights, draft.original.lights)
2746
- for (const [kind, items, fields] of [['camera', draft.cameras, ['lens', 'targetEntityId', 'targetPoint']], ['light', draft.lights, ['energy', 'color', 'size']]]) {
3023
+ for (const [kind, items, fields] of [['camera', draft.cameras, ['lens', 'targetEntityId', 'targetPoint', 'focusDistance']], ['light', draft.lights, ['energy', 'color', 'size']]]) {
2747
3024
  if (kind === 'light' && replaceLights) {
2748
3025
  for (const light of draft.original.lights) operations.push({ op: 'light.remove', lightId: light.id })
2749
3026
  for (const light of items) operations.push({ op: 'light.add', light: editorClone(light) })
@@ -2761,7 +3038,8 @@ window.__ModuleLoader__.load({
2761
3038
  if (Object.keys(changes).length) operations.push({ op: `${kind}.update`, [`${kind}Id`]: item.id, ...changes })
2762
3039
  }
2763
3040
  }
2764
- const note = draft.reuseSource ? t('photo.reuseNote', draft.reuseSource) : null
3041
+ const note = draft.reuseSource ? t('photo.reuseNote', draft.reuseSource)
3042
+ + (draft.reuseSource.normalization ? `\n${JSON.stringify(draft.reuseSource.normalization)}` : '') : null
2765
3043
  return { projectId: draft.projectId, baseRevision: draft.baseRevision, actor: 'ui', saveCheckpoint: true, renderPreview: false, operations, ...(note ? { note } : {}) }
2766
3044
  }
2767
3045
  function photographyDirty(draft) {
@@ -2791,11 +3069,63 @@ window.__ModuleLoader__.load({
2791
3069
  if (next.lights.some(item => !item)) throw new Error(t('photo.reuseUnavailable'))
2792
3070
  next.lightId = next.lights.some(item => item.id === next.lightId) ? next.lightId : next.lights[0]?.id || ''
2793
3071
  next.reusedLights = true
3072
+ delete next.boundaryReuse
2794
3073
  next.reuseSource = { project: source.project.id, revision: source.revision, digest: source.digest, camera: cameraId, target: targetEntityId || '—' }
2795
3074
  const errors = photographyErrors(next)
2796
3075
  if (errors.length) throw new Error(t('photo.invalid', { fields: errors.join(', ') }))
2797
3076
  return next
2798
3077
  }
3078
+ const photographyProductEntities = scene => (scene?.nodes?.entities || []).filter(e => ['generator', 'asset-instance'].includes(e.kind) && e.visible !== false)
3079
+ function photographyProductDefaults(scene, complete) {
3080
+ const choices = photographyProductEntities(scene), ids = choices.map(e => e.id)
3081
+ if (complete?.length && complete.length <= 128 && complete.every(id => ids.includes(id))) return [...complete].sort()
3082
+ const tagged = choices.filter(e => e.tags?.some(tag => ['hero-product', 'subject', 'subject-part'].includes(tag))).map(e => e.id)
3083
+ if (tagged.length && tagged.length <= 128) return tagged.sort()
3084
+ return choices.length === 1 ? [choices[0].id] : []
3085
+ }
3086
+ function photographyBoundaryRequest(state, selection, draft) {
3087
+ const source = selection?.source, scene = state.selected?.scene
3088
+ const valid = (values, nodes) => Array.isArray(values) && values.length >= 1 && values.length <= 128
3089
+ && new Set(values).size === values.length && values.every(id => photographyProductEntities(nodes).some(e => e.id === id))
3090
+ if (!state.photographyBoundaryReuseSupported || !draft || selection?.mode !== 'bounds'
3091
+ || !/^[a-f0-9]{64}$/.test(state.storeIdentity || '') || selection.storeIdentity !== state.storeIdentity || !/^[a-f0-9]{64}$/.test(scene?.digest || '')
3092
+ || !/^[a-f0-9]{64}$/.test(source?.digest || '') || source.project?.id !== selection.sourceProjectId
3093
+ || source.revision !== selection.revision || draft.baseRevision !== scene.revision
3094
+ || !source.nodes.cameras.some(c => c.id === selection.cameraId) || !draft.cameras.some(c => c.id === draft.cameraId)
3095
+ || !valid(selection.sourceEntityIds, source) || !valid(selection.destinationEntityIds, scene)
3096
+ || !Number.isSafeInteger(selection.sourceFrame) || selection.sourceFrame < source.project.frameStart || selection.sourceFrame > source.project.frameEnd
3097
+ || !Number.isSafeInteger(draft.frame) || draft.frame < draft.frameStart || draft.frame > draft.frameEnd) return null
3098
+ return { projectId: draft.projectId, baseRevision: draft.baseRevision, expectedDigest: scene.digest, expectedStoreIdentity: state.storeIdentity,
3099
+ cameraId: draft.cameraId, frame: draft.frame, entityIds: [...selection.destinationEntityIds].sort(),
3100
+ source: { projectId: source.project.id, revision: source.revision, digest: source.digest, cameraId: selection.cameraId,
3101
+ frame: selection.sourceFrame, entityIds: [...selection.sourceEntityIds].sort() } }
3102
+ }
3103
+ function applyBoundaryPhotography(draft, source, plan, request) {
3104
+ if (!plan || plan.schemaVersion !== 'deepblend.photography-reuse/v1' || creationSignature(plan.request) !== creationSignature(request)
3105
+ || plan.camera?.id !== draft.cameraId || !Number.isFinite(plan.scale) || plan.scale < .001 || plan.scale > 1000
3106
+ || plan.provenance?.mode !== 'product-bounds-v1' || plan.provenance.sourceDigest !== request.source.digest
3107
+ || plan.provenance.destinationDigest !== request.expectedDigest || plan.provenance.scale !== plan.scale
3108
+ || plan.provenance.sourceProject !== request.source.projectId || plan.provenance.sourceRevision !== request.source.revision
3109
+ || plan.provenance.sourceCamera !== request.source.cameraId || plan.provenance.sourceFrame !== request.source.frame
3110
+ || plan.provenance.destinationFrame !== request.frame || plan.provenance.storeIdentity !== request.expectedStoreIdentity || !Array.isArray(plan.lights)
3111
+ || creationSignature(plan.lights.map(l => l.id).sort()) !== creationSignature(source.nodes.lights.map(l => l.id).sort())) throw new Error(t('photo.boundsMismatch'))
3112
+ const next = editorClone(draft), camera = next.cameras.find(c => c.id === next.cameraId)
3113
+ camera.lens = plan.camera.lens
3114
+ camera.transform ||= {}
3115
+ camera.transform.location = editorClone(plan.camera.transform?.location)
3116
+ camera.transform.rotationEuler = editorClone(plan.camera.transform?.rotationEuler)
3117
+ if (camera.fStop !== undefined) camera.focusDistance = plan.camera.focusDistance
3118
+ delete camera.targetEntityId; delete camera.targetPoint
3119
+ next.lights = editorClone(plan.lights); next.reusedLights = true
3120
+ next.lightId = next.lights.some(l => l.id === next.lightId) ? next.lightId : next.lights[0]?.id || ''
3121
+ next.reuseSource = { project: request.source.projectId, revision: request.source.revision, digest: request.source.digest,
3122
+ camera: request.source.cameraId, target: '—', normalization: editorClone(plan.provenance) }
3123
+ next.boundaryReuse = { scale: plan.scale, sourceFrame: request.source.frame, sourceCameraStatic: plan.sourceStaticCamera,
3124
+ sourceCount: request.source.entityIds.length, destinationCount: request.entityIds.length }
3125
+ const errors = photographyErrors(next)
3126
+ if (errors.length) throw new Error(t('photo.invalid', { fields: errors.join(', ') }))
3127
+ return next
3128
+ }
2799
3129
  function inspectionReceiptValid(receipt, request, digest) {
2800
3130
  const artifacts = receipt?.artifacts, view = request.views[0]
2801
3131
  return Boolean(receipt?.revision === request.revision && receipt?.sourceRevision === request.revision && receipt?.mode === request.mode
@@ -2869,7 +3199,7 @@ window.__ModuleLoader__.load({
2869
3199
  const id = `ui-asset-${Date.now().toString(36)}-${++editorSequence}`
2870
3200
  const draft = { projectId, baseRevision: scene.revision, scene: editorClone(scene), entry: editorClone(entry),
2871
3201
  inspection: editorClone(inspection), kind: assetKind(entry.asset), newEntityId: id, newMaterialId: `${id}-material`,
2872
- location: [0, 0, 0], rotationEuler: [0, 0, 0], scale: 1,
3202
+ location: [0, 0, 0], rotationEuler: [0, 0, 0], scale: 1, hideEntityId: '', makeSubject: false,
2873
3203
  entityId: entityId || scene.nodes.entities.find(item => item.kind !== 'empty')?.id || '',
2874
3204
  target: 'entity', partId: '', slotIndex: '', scope: 'local', newMaterial: false,
2875
3205
  channel: 'baseColor', binding: {}, replaceTexture: false,
@@ -2900,6 +3230,14 @@ window.__ModuleLoader__.load({
2900
3230
  if (!Number.isFinite(draft.scale) || draft.scale <= 0) fail('scale')
2901
3231
  operations.push({ op: 'entity.add', entity: { id: draft.newEntityId, type: 'asset-instance', assetId: asset.id,
2902
3232
  transform: { location: [...draft.location], rotationEuler: [...draft.rotationEuler], scale: [draft.scale, draft.scale, draft.scale] } } })
3233
+ if (typeof draft.hideEntityId !== 'string' || typeof draft.makeSubject !== 'boolean') fail('model options')
3234
+ if (draft.hideEntityId) {
3235
+ const hidden = draft.scene.nodes.entities.find(entity => entity.id === draft.hideEntityId)
3236
+ if (!hidden || hidden.visible === false || hidden.locked || hidden.kind === 'empty') fail('existing object')
3237
+ if (draft.scene.project.reviewSubjectId === hidden.id && !draft.makeSubject) throw new Error(t('assets.hideSubjectError'))
3238
+ operations.push({ op: 'entity.visibility.set', entityId: hidden.id, visible: false })
3239
+ }
3240
+ if (draft.makeSubject) operations.push({ op: 'project.reviewSubject.set', entityId: draft.newEntityId })
2903
3241
  } else if (draft.kind === 'environment') {
2904
3242
  if (!Number.isFinite(draft.strength) || draft.strength < 0 || draft.strength > 1000 || !Number.isFinite(draft.rotation)) fail('environment')
2905
3243
  operations.push({ op: 'world.set', world: { ...editorClone(draft.world), strength: draft.strength,
@@ -2963,6 +3301,39 @@ window.__ModuleLoader__.load({
2963
3301
  && Number.isInteger(form.samples) && form.samples >= 1 && form.samples <= 512)
2964
3302
  }
2965
3303
 
3304
+ const reviewSelectionKey = state => JSON.stringify([state.projectsRoot, state.storeIdentity, state.activeProjectId])
3305
+ function reviewSelectionFor(state) {
3306
+ const scene = state.selected?.scene
3307
+ if (!scene) return null
3308
+ return state.reviewSelections?.[reviewSelectionKey(state)] || { baseRevision: scene.revision,
3309
+ mode: state.selectedReviewViewsSupported ? 'selected' : 'standard', views: [{ id: 'review-1',
3310
+ cameraId: scene.project.activeCamera || scene.nodes.cameras?.[0]?.id || '', frame: scene.project.frameStart ?? 1 }] }
3311
+ }
3312
+ function reviewSelectionValid(state, selection = reviewSelectionFor(state)) {
3313
+ const scene = state.selected?.scene
3314
+ if (!scene || scene.project?.id !== state.activeProjectId || !selection || !state.selectedReviewViewsSupported || selection.baseRevision !== scene.revision
3315
+ || !/^[a-f0-9]{64}$/.test(state.storeIdentity || '') || !/^[a-f0-9]{64}$/.test(scene.digest || '')
3316
+ || !Array.isArray(selection.views) || selection.views.length < 1 || selection.views.length > 4) return false
3317
+ const pairs = new Set()
3318
+ return selection.views.every(view => {
3319
+ const pair = JSON.stringify([view.cameraId, view.frame])
3320
+ if (!scene.nodes.cameras.some(camera => camera.id === view.cameraId) || !Number.isSafeInteger(view.frame)
3321
+ || view.frame < scene.project.frameStart || view.frame > scene.project.frameEnd || pairs.has(pair)) return false
3322
+ pairs.add(pair); return true
3323
+ })
3324
+ }
3325
+ function completedReviewViews(state) {
3326
+ const scene = state.selected?.scene
3327
+ if (!scene) return []
3328
+ const pairs = new Map()
3329
+ for (const job of snapshotImages(state, scene.revision).slice().sort((a, b) => String(a.jobId).localeCompare(String(b.jobId)))) {
3330
+ const cameraId = job.cameraId, frame = job.delivery.image.frame
3331
+ if (!scene.nodes.cameras.some(camera => camera.id === cameraId) || frame < scene.project.frameStart || frame > scene.project.frameEnd) continue
3332
+ const pair = JSON.stringify([cameraId, frame]); pairs.delete(pair); pairs.set(pair, { cameraId, frame })
3333
+ }
3334
+ return [...pairs.values()].slice(-4).map((view, i) => ({ id: `review-${i + 1}`, ...view }))
3335
+ }
3336
+
2966
3337
  const REFERENCE_PURPOSES = ['geometry', 'materials', 'lighting', 'goalFit']
2967
3338
  const REFERENCE_MAX_BYTES = 8 * 1024 * 1024
2968
3339
  function createBriefDraft(scene, projectId) {
@@ -3002,6 +3373,51 @@ window.__ModuleLoader__.load({
3002
3373
  frame: Math.min(scene.project.frameEnd ?? 24, Math.max(scene.project.frameStart ?? 1, 24)), marginPercent: 3,
3003
3374
  completeEntityIds: complete ? [...complete].sort() : null, touched: false, attempt: null, storageError: false }
3004
3375
  }
3376
+ const motionKey = state => JSON.stringify([state.projectsRoot, state.storeIdentity, state.activeProjectId])
3377
+ function wideFramePlan(scene) {
3378
+ if (!scene?.renderProfiles || !scene?.project) return null
3379
+ const profiles = []
3380
+ for (const name of ['preview', 'final']) {
3381
+ const resolution = scene.renderProfiles[name]?.resolution
3382
+ if (!Array.isArray(resolution) || resolution.length !== 2 || !resolution.every(value => Number.isSafeInteger(value) && value >= 16 && value <= 16384)) return null
3383
+ const [width, height] = resolution
3384
+ const wide = width * 9 === height * 16
3385
+ const newWidth = wide ? width : Math.floor(Math.min(width, Math.sqrt(width * height * 16 / 9)) / 16) * 16
3386
+ if (newWidth < 32 || newWidth > 16384) return null
3387
+ const after = wide ? [...resolution] : [newWidth, newWidth * 9 / 16]
3388
+ if (after[1] < 16 || after[0] * after[1] > width * height) return null
3389
+ profiles.push({ name, before: [...resolution], after })
3390
+ }
3391
+ return { profiles, changed: scene.project.aspectRatio !== '16:9' || profiles.some(item => !editorEqual(item.before, item.after)) }
3392
+ }
3393
+ const motionDraftFor = state => state.motionDrafts?.[motionKey(state)] || null
3394
+ function createMotionDraft(scene, projectId, projectsRoot, storeIdentity, source) {
3395
+ const fit = createCameraFitDraft(scene, projectId, projectsRoot, source)
3396
+ const tagged = fit.entities.filter(entity => entity.visible !== false && entity.tags?.includes('hero-product')).map(entity => entity.id).sort()
3397
+ const animated = new Set((scene.nodes.animationTracks || []).filter(track => track.targetKind === 'camera').map(track => track.targetId))
3398
+ const cameraRestrictions = Object.fromEntries((scene.nodes.cameras || []).flatMap(camera => animated.has(camera.id) ? [[camera.id, 'animated']]
3399
+ : camera.targetEntityId ? [[camera.id, 'targeted']] : []))
3400
+ return { projectId, projectsRoot, storeIdentity, baseRevision: scene.revision, entities: fit.entities,
3401
+ cameras: fit.cameras, cameraRestrictions, completeEntityIds: fit.completeEntityIds, taggedEntityIds: tagged.length <= 128 ? tagged : [], taggedOverflow: tagged.length > 128, entityIds: fit.entityIds, cameraId: fit.cameraId,
3402
+ seconds: '6', amount: '8', direction: 'forward', allowRangeExtension: false, result: null, storageError: false, touched: false }
3403
+ }
3404
+ function validMotionDraft(draft) {
3405
+ return Boolean(draft && draft.cameras.includes(draft.cameraId) && !draft.cameraRestrictions?.[draft.cameraId] && draft.entityIds.length > 0 && draft.entityIds.length <= 128
3406
+ && new Set(draft.entityIds).size === draft.entityIds.length && draft.entityIds.every(id => draft.entities.some(entity => entity.id === id && entity.visible !== false))
3407
+ && Number.isFinite(Number(draft.seconds)) && Number(draft.seconds) >= 1 && Number(draft.seconds) <= 10
3408
+ && Number.isFinite(Number(draft.amount)) && Number(draft.amount) >= 1 && Number(draft.amount) <= 20
3409
+ && ['forward', 'backward'].includes(draft.direction))
3410
+ }
3411
+ const motionStorageKey = (root, identity, id) => `deepblend.motion-preview/v1:${JSON.stringify([root, identity, id])}`
3412
+ function validMotionReceipt(receipt, draft) {
3413
+ return Boolean(receipt && /^[a-f0-9-]{36}$/.test(receipt.id || '') && /^[a-f0-9]{64}$/.test(receipt.intentSha256 || '')
3414
+ && receipt.projectId === draft.projectId && receipt.baseRevision === draft.baseRevision
3415
+ && /^[a-zA-Z][a-zA-Z0-9._-]{0,127}$/.test(receipt.cameraId || '') && receipt.sourceCameraId === draft.cameraId
3416
+ && Number.isSafeInteger(receipt.expiresAt) && Number.isSafeInteger(receipt.frameStart) && Number.isSafeInteger(receipt.frameEnd)
3417
+ && Number.isSafeInteger(receipt.fps) && receipt.video && /^[a-f0-9]{64}$/.test(receipt.video.sha256 || '')
3418
+ && Number.isSafeInteger(receipt.video.bytes) && receipt.video.bytes > 0 && receipt.video.bytes <= 32 * 1024 * 1024
3419
+ && Number.isSafeInteger(receipt.video.frames) && receipt.video.frames === receipt.frameEnd - receipt.frameStart + 1)
3420
+ }
3005
3421
  const cameraFitInvalid = draft => !draft || !draft.cameras.includes(draft.cameraId)
3006
3422
  || draft.entityIds.length < 1 || draft.entityIds.length > 64 || new Set(draft.entityIds).size !== draft.entityIds.length
3007
3423
  || draft.entityIds.some(id => !draft.entities.some(entity => entity.id === id))
@@ -3189,12 +3605,13 @@ window.__ModuleLoader__.load({
3189
3605
  }
3190
3606
 
3191
3607
  /** POST a JSON body and return the parsed payload. Errors come back as data. */
3192
- async function postJson(fetchImpl, path, body) {
3608
+ async function postJson(fetchImpl, path, body, signal) {
3193
3609
  try {
3194
3610
  const response = await fetchImpl(path, {
3195
3611
  method: 'POST',
3196
3612
  headers: { 'content-type': 'application/json', accept: 'application/json' },
3197
3613
  body: JSON.stringify(body || {}),
3614
+ ...(signal ? { signal } : {}),
3198
3615
  })
3199
3616
  const payload = await response.json()
3200
3617
  if (payload && payload.ok) return { ok: true, payload }
@@ -3247,9 +3664,13 @@ window.__ModuleLoader__.load({
3247
3664
  const snapshotEntry = state => state.editableSnapshots?.[snapshotContextKey(state)] || null
3248
3665
  const snapshotVideos = (state, revision) => (state.jobs || []).filter(job => job.status === 'completed'
3249
3666
  && job.revisionId === revision && typeof job.delivery?.videoPath === 'string' && job.delivery.videoPath.length > 0)
3667
+ const snapshotImages = (state, revision) => (state.jobs || []).filter(job => job.status === 'completed' && job.revisionId === revision
3668
+ && job.delivery?.kind === 'still' && job.delivery.verified === true && Number.isSafeInteger(job.delivery.image?.frame)
3669
+ && /^[a-f0-9]{64}$/.test(job.delivery.image?.sha256 || '') && /^[a-zA-Z0-9][a-zA-Z0-9_-]{0,95}$/.test(job.jobId || ''))
3250
3670
  const snapshotSupported = state => state.editableSnapshotProtocol === 1 && /^[a-f0-9]{64}$/.test(state.storeIdentity || '')
3251
3671
  && state.editableSnapshotAvailability?.available === true
3252
3672
  const snapshotSameSelection = entry => entry?.handle && entry.revision === entry.handle.revision && entry.videoJobId === entry.handle.videoJobId
3673
+ && JSON.stringify(entry.imageJobIds || []) === JSON.stringify(entry.handle.imageJobIds || [])
3253
3674
  const snapshotBytes = value => value >= 1048576 ? `${(value / 1048576).toFixed(1)} MiB` : value >= 1024 ? `${(value / 1024).toFixed(1)} KiB` : `${value} B`
3254
3675
  const snapshotExportId = async requestId => `snapshot-${(await imageByteHash(Uint8Array.from(requestId, char => char.charCodeAt(0)), undefined, true)).slice(0, 40)}`
3255
3676
  function validSnapshotHandle(handle) {
@@ -3257,10 +3678,14 @@ window.__ModuleLoader__.load({
3257
3678
  && /^snapshot-[a-f0-9]{40}$/.test(handle.exportId || '') && /^[a-f0-9]{64}$/.test(handle.storeIdentity || '')
3258
3679
  && typeof handle.projectId === 'string' && handle.projectId.length > 0 && handle.projectId.length <= 200
3259
3680
  && /^r[0-9]+$/.test(handle.revision || '') && (handle.videoJobId === null || typeof handle.videoJobId === 'string' && handle.videoJobId.length > 0 && handle.videoJobId.length <= 200)
3681
+ && (handle.imageJobIds === undefined || Array.isArray(handle.imageJobIds) && handle.imageJobIds.length > 0 && handle.imageJobIds.length <= 16
3682
+ && handle.imageJobIds.every(id => typeof id === 'string' && /^[a-zA-Z0-9][a-zA-Z0-9_-]{0,95}$/.test(id))
3683
+ && JSON.stringify([...new Set(handle.imageJobIds)].sort()) === JSON.stringify(handle.imageJobIds))
3260
3684
  }
3261
3685
  function validSnapshotReply(value, handle) {
3262
3686
  if (!value || !['preparing', 'ready', 'failed', 'cancelled'].includes(value.state)
3263
- || ['requestId', 'exportId', 'storeIdentity', 'projectId', 'revision', 'videoJobId'].some(key => value[key] !== handle[key])) return false
3687
+ || ['requestId', 'exportId', 'storeIdentity', 'projectId', 'revision', 'videoJobId'].some(key => value[key] !== handle[key])
3688
+ || JSON.stringify(value.imageJobIds || []) !== JSON.stringify(handle.imageJobIds || [])) return false
3264
3689
  if (value.state === 'ready') {
3265
3690
  const expected = projectRoute(handle.projectId, `/editable-snapshots/${handle.exportId}/download?storeIdentity=${handle.storeIdentity}`)
3266
3691
  if (value.downloadUrl !== expected || !Number.isSafeInteger(value.archive?.bytes) || value.archive.bytes <= 0
@@ -3279,8 +3704,16 @@ window.__ModuleLoader__.load({
3279
3704
  projects: [],
3280
3705
  projectsRoot: null,
3281
3706
  storeIdentity: null,
3707
+ projectStorage: null,
3282
3708
  editableSnapshotProtocol: null,
3283
3709
  editableSnapshotAvailability: null,
3710
+ snapshotImagesSupported: false,
3711
+ renderVideoDownloadSupported: false,
3712
+ renderFrameDownloadSupported: false,
3713
+ stillDeliveryPresetSupported: false,
3714
+ videoDeliveryPresetSupported: false,
3715
+ deliveryAspectPresetSupported: false,
3716
+ stillImageDeliverySupported: false,
3284
3717
  editableSnapshots: {},
3285
3718
  recipeCatalog: { recipes: [], errors: [] },
3286
3719
  selected: null,
@@ -3306,6 +3739,7 @@ window.__ModuleLoader__.load({
3306
3739
  creationWork: null,
3307
3740
  creationRequestProtocol: null,
3308
3741
  cameraTargetResetSupported: false,
3742
+ photographyBoundaryReuseSupported: false,
3309
3743
  creationDrafts: [],
3310
3744
  creationDraftStorageStatus: null,
3311
3745
  creationDraftMissingRecipe: null,
@@ -3324,6 +3758,8 @@ window.__ModuleLoader__.load({
3324
3758
  briefWork: {},
3325
3759
  visualRuns: {},
3326
3760
  visualIterations: {},
3761
+ reviewSelections: {},
3762
+ selectedReviewViewsSupported: false,
3327
3763
  photographyDrafts: {},
3328
3764
  photographyWork: {},
3329
3765
  photographyEdits: {},
@@ -3338,9 +3774,14 @@ window.__ModuleLoader__.load({
3338
3774
  cameraFitDrafts: {},
3339
3775
  cameraFitWork: {},
3340
3776
  cameraFitSupported: false,
3777
+ motionDrafts: {},
3778
+ motionWork: {},
3779
+ motionPreviewSupported: false,
3780
+ imageInputProbeSupported: false,
3781
+ imageInputProbe: { busy: false, result: null },
3341
3782
  patchDrafts: {},
3342
3783
  recipeChoices: [],
3343
- forms: { title: '', goal: '', recipe: null, recipeParameters: {}, patch: null, frameStart: '', frameEnd: '', profile: 'preview' },
3784
+ forms: { title: '', goal: '', recipe: null, recipeParameters: {}, patch: null, frameStart: '', frameEnd: '', profile: 'preview', renderCamera: '', stillPreset: '', deliveryKind: '' },
3344
3785
  busy: { create: false, patch: false, editor: false, assembly: false, placement: false, render: false, restore: false },
3345
3786
  notices: { projects: null, scene: null, preview: null, jobs: null, revisions: null },
3346
3787
  }
@@ -3412,6 +3853,10 @@ window.__ModuleLoader__.load({
3412
3853
  const placementControllers = new Map()
3413
3854
  const cameraFitControllers = new Map()
3414
3855
  const cameraFitStorage = settings.cameraFitStorage ?? preferenceStorage
3856
+ const motionControllers = new Map()
3857
+ let imageProbeController = null
3858
+ const motionStorage = settings.motionStorage ?? preferenceStorage
3859
+ const motionWork = (key, changes) => set({ motionWork: { ...data.motionWork, [key]: { ...data.motionWork[key], ...changes } } })
3415
3860
  const photographySourceControllers = new Map()
3416
3861
  let photographySourceSequence = 0
3417
3862
  const photographyWork = (projectId, changes) => set({ photographyWork: { ...data.photographyWork, [projectId]: { ...data.photographyWork[projectId], ...changes } } })
@@ -3574,10 +4019,22 @@ window.__ModuleLoader__.load({
3574
4019
  recipeCatalog: payload.recipeCatalog ?? { recipes: [], errors: [] },
3575
4020
  projectsRoot: payload.projectsRoot ?? null,
3576
4021
  storeIdentity: payload.storeIdentity ?? null,
4022
+ projectStorage: payload.projectStorage ?? null,
3577
4023
  editableSnapshotProtocol: payload.editableSnapshotProtocol ?? null,
3578
4024
  editableSnapshotAvailability: payload.editableSnapshotAvailability ?? null,
4025
+ snapshotImagesSupported: payload.snapshotImagesSupported === true,
4026
+ renderVideoDownloadSupported: payload.renderVideoDownloadSupported === true,
4027
+ renderFrameDownloadSupported: payload.renderFrameDownloadSupported === true,
4028
+ stillDeliveryPresetSupported: payload.stillDeliveryPresetSupported === true,
4029
+ videoDeliveryPresetSupported: payload.videoDeliveryPresetSupported === true,
4030
+ deliveryAspectPresetSupported: payload.deliveryAspectPresetSupported === true,
4031
+ stillImageDeliverySupported: payload.stillImageDeliverySupported === true,
4032
+ motionPreviewSupported: payload.motionPreviewSupported === true,
4033
+ imageInputProbeSupported: payload.imageInputProbeSupported === true,
4034
+ selectedReviewViewsSupported: payload.selectedReviewViewsSupported === true,
3579
4035
  creationRequestProtocol: payload.creationRequestProtocol ?? null,
3580
4036
  cameraTargetResetSupported: payload.cameraTargetResetSupported === true,
4037
+ photographyBoundaryReuseSupported: payload.photographyBoundaryReuseSupported === true,
3581
4038
  assemblyPlacementSupported: payload.assemblyPlacementSupported === true,
3582
4039
  cameraFitSupported: payload.cameraFitSupported === true,
3583
4040
  selected: payload.selected ?? null,
@@ -3624,8 +4081,23 @@ window.__ModuleLoader__.load({
3624
4081
  }
3625
4082
  if (sequence !== loadSequence || projectId !== target()) return
3626
4083
  if (active !== data.activeProjectId) patch.forms = { ...data.forms, patch: data.patchDrafts[active] ?? null }
4084
+ if (active !== data.activeProjectId || patch.projectsRoot !== data.projectsRoot || patch.storeIdentity !== data.storeIdentity)
4085
+ patch.forms = { ...(patch.forms || data.forms), renderCamera: '' }
3627
4086
  if (patch.selected?.scene && active) {
3628
4087
  const source = patch.selected.recipeParameters
4088
+ const motionContext = JSON.stringify([patch.projectsRoot, patch.storeIdentity, active])
4089
+ if (!data.motionDrafts[motionContext] && patch.storeIdentity) {
4090
+ const draft = createMotionDraft(patch.selected.scene, active, patch.projectsRoot, patch.storeIdentity, source)
4091
+ try {
4092
+ const raw = motionStorage?.getItem(motionStorageKey(patch.projectsRoot, patch.storeIdentity, active))
4093
+ if (raw && raw.length <= 8192) {
4094
+ const saved = JSON.parse(raw)
4095
+ const candidate = { ...draft, baseRevision: saved.baseRevision, cameraId: saved.sourceCameraId }
4096
+ if (validMotionReceipt(saved, candidate) && (saved.expiresAt > Date.now() || saved.saveAttempted === true)) Object.assign(draft, candidate, { result: saved })
4097
+ }
4098
+ } catch { draft.storageError = true }
4099
+ patch.motionDrafts = { ...data.motionDrafts, [motionContext]: draft }
4100
+ }
3629
4101
  const fitKey = JSON.stringify([patch.projectsRoot, active]), fitted = data.cameraFitDrafts[fitKey]
3630
4102
  if ((!fitted || !cameraFitDirty(fitted)) && !cameraFitControllers.has(fitKey)) {
3631
4103
  const next = createCameraFitDraft(patch.selected.scene, active, patch.projectsRoot, source)
@@ -3666,7 +4138,7 @@ window.__ModuleLoader__.load({
3666
4138
  if (creationDraftRoot !== null) {
3667
4139
  creationAttempt = null; restoredCreationSource = null; creationDraftId = newCreationKey()
3668
4140
  patch.creationWork = null; patch.creationDraftMissingRecipe = null; patch.recipeChoices = []
3669
- patch.forms = { ...data.forms, title: '', goal: '', recipe: null, recipeParameters: {} }
4141
+ patch.forms = { ...(patch.forms || data.forms), title: '', goal: '', recipe: null, recipeParameters: {} }
3670
4142
  }
3671
4143
  creationDraftRoot = typeof patch.projectsRoot === 'string' && patch.projectsRoot ? patch.projectsRoot : null
3672
4144
  persistedCreationSignature = null
@@ -3732,7 +4204,7 @@ window.__ModuleLoader__.load({
3732
4204
  let handle = null, storageUnavailable = false
3733
4205
  try { handle = storedSnapshots().find(record => record.key === key)?.handle || null } catch { storageUnavailable = true }
3734
4206
  if (handle && (handle.storeIdentity !== data.storeIdentity || handle.projectId !== data.activeProjectId)) handle = null
3735
- entry = { revision: handle?.revision || data.currentRevision, videoJobId: handle?.videoJobId || null, handle, result: null, issue: null, busy: {}, attempt: 0, storageUnavailable }
4207
+ entry = { revision: handle?.revision || data.currentRevision, videoJobId: handle?.videoJobId || null, imageJobIds: handle?.imageJobIds || [], handle, result: null, issue: null, busy: {}, attempt: 0, storageUnavailable }
3736
4208
  }
3737
4209
  changeSnapshot(key, { ...entry, busy: {} })
3738
4210
  if (entry.handle && running && snapshotSupported(data)) void snapshotRequest('check')
@@ -3745,7 +4217,8 @@ window.__ModuleLoader__.load({
3745
4217
  }
3746
4218
  async function snapshotControl(handle, kind, signal) {
3747
4219
  const suffix = kind === 'prepare' ? '' : `/${handle.exportId}${kind === 'cancel' ? '/cancel' : ''}`
3748
- const body = kind === 'prepare' ? { requestId: handle.requestId, revision: handle.revision, ...(handle.videoJobId ? { videoJobId: handle.videoJobId } : {}), expectedStoreIdentity: handle.storeIdentity }
4220
+ const body = kind === 'prepare' ? { requestId: handle.requestId, revision: handle.revision, ...(handle.videoJobId ? { videoJobId: handle.videoJobId } : {}),
4221
+ ...(handle.imageJobIds?.length ? { imageJobIds: handle.imageJobIds } : {}), expectedStoreIdentity: handle.storeIdentity }
3749
4222
  : kind === 'cancel' ? { expectedStoreIdentity: handle.storeIdentity } : null
3750
4223
  const response = await fetchImpl(projectRoute(handle.projectId, `/editable-snapshots${suffix}`), {
3751
4224
  method: body ? 'POST' : 'GET', cache: 'no-store', headers: { accept: 'application/json', ...(body ? { 'content-type': 'application/json' } : {}) },
@@ -3774,10 +4247,11 @@ window.__ModuleLoader__.load({
3774
4247
  let handle = entry.handle
3775
4248
  if (kind === 'prepare' && !snapshotSameSelection(entry)) {
3776
4249
  if (!(data.selected?.revisions || []).some(item => item.revision === entry.revision)
3777
- || entry.videoJobId && !snapshotVideos(data, entry.revision).some(job => job.jobId === entry.videoJobId)) throw Object.assign(new Error('Saved source unavailable'), { code: 'UI_SNAPSHOT_MISMATCH' })
4250
+ || entry.videoJobId && !snapshotVideos(data, entry.revision).some(job => job.jobId === entry.videoJobId)
4251
+ || entry.imageJobIds?.length && (!data.snapshotImagesSupported || entry.imageJobIds.some(id => !snapshotImages(data, entry.revision).some(job => job.jobId === id)))) throw Object.assign(new Error('Saved source unavailable'), { code: 'UI_SNAPSHOT_MISMATCH' })
3778
4252
  const requestId = newCreationKey().replace(/^create-/, 'copy-')
3779
4253
  handle = { requestId, exportId: await snapshotExportId(requestId), projectId: data.activeProjectId,
3780
- revision: entry.revision, videoJobId: entry.videoJobId, storeIdentity: data.storeIdentity }
4254
+ revision: entry.revision, videoJobId: entry.videoJobId, ...(entry.imageJobIds?.length ? { imageJobIds: [...entry.imageJobIds] } : {}), storeIdentity: data.storeIdentity }
3781
4255
  if (!stillCurrent()) return
3782
4256
  changeSnapshot(key, { handle, result: null })
3783
4257
  rememberSnapshot(key, handle)
@@ -3813,7 +4287,16 @@ window.__ModuleLoader__.load({
3813
4287
  if (!entry || entry.result?.state === 'preparing' || Object.values(entry.busy || {}).some(Boolean)) return
3814
4288
  if (field === 'revision' && !(data.selected?.revisions || []).some(item => item.revision === value)) return
3815
4289
  if (field === 'videoJobId' && value && !snapshotVideos(data, entry.revision).some(job => job.jobId === value)) return
3816
- changeSnapshot(key, { [field]: value || null, ...(field === 'revision' ? { videoJobId: null } : {}) })
4290
+ changeSnapshot(key, { [field]: value || null, ...(field === 'revision' ? { videoJobId: null, imageJobIds: [] } : {}) })
4291
+ }
4292
+ function setSnapshotImage(id, selected) {
4293
+ const key = snapshotContextKey(data), entry = data.editableSnapshots[key]
4294
+ if (!entry || !data.snapshotImagesSupported || entry.result?.state === 'preparing' || Object.values(entry.busy || {}).some(Boolean)) return
4295
+ const ids = new Set(entry.imageJobIds || [])
4296
+ if (selected && !snapshotImages(data, entry.revision).some(job => job.jobId === id) || !selected && !ids.has(id)) return
4297
+ if (selected && ids.size >= 16 && !ids.has(id)) return
4298
+ if (selected) ids.add(id); else ids.delete(id)
4299
+ changeSnapshot(key, { imageJobIds: [...ids].sort() })
3817
4300
  }
3818
4301
 
3819
4302
  const creationBody = () => creationRequestBody(data.forms)
@@ -3909,10 +4392,11 @@ window.__ModuleLoader__.load({
3909
4392
  photographySourceControllers.get(projectId)?.abort()
3910
4393
  const controller = new AbortController(), sequence = ++photographySourceSequence
3911
4394
  photographySourceControllers.set(projectId, controller)
3912
- const root = data.projectsRoot, baseRevision = draft.baseRevision, sourceProjectId = selection.sourceProjectId
4395
+ const root = data.projectsRoot, baseRevision = draft.baseRevision, sourceProjectId = selection.sourceProjectId, storeIdentity = data.storeIdentity
4396
+ const destinationEntityIds = photographyProductDefaults(data.selected?.scene, data.selected?.recipeParameters?.placement?.available ? data.selected.recipeParameters.placement.memberEntityIds : null)
3913
4397
  const alive = () => running && !controller.signal.aborted && photographySourceControllers.get(projectId) === controller && data.projectsRoot === root
3914
4398
  const update = changes => set({ photographyReuse: { ...data.photographyReuse, [projectId]: { ...data.photographyReuse[projectId], ...changes } } })
3915
- update({ source: null, loading: true, error: null, applied: false, unchanged: false, replaceDraft: false, projectsRoot: root, baseRevision, sequence })
4399
+ update({ source: null, loading: true, error: null, applied: false, unchanged: false, replaceDraft: false, projectsRoot: root, storeIdentity, baseRevision, sequence })
3916
4400
  const deadline = setTimeout(() => controller.abort(), 30000)
3917
4401
  const read = (path, route) => readRoute((url, options) => fetchImpl(url, { ...options, signal: controller.signal }), path, route)
3918
4402
  try {
@@ -3931,7 +4415,7 @@ window.__ModuleLoader__.load({
3931
4415
  || scene?.revision !== revision || scene?.project?.id !== sourceProjectId || scene.digest !== payload.digest
3932
4416
  || !/^[a-f0-9]{64}$/.test(payload.digest || '') || (saved.digest && saved.digest !== payload.digest)
3933
4417
  || !Array.isArray(scene.nodes?.cameras) || !Array.isArray(scene.nodes?.lights)) throw new Error(result.error?.message || t('photo.reuseUnavailable'))
3934
- update({ source: editorClone(scene), cameraId: scene.nodes.cameras.find(item => item.id === scene.project.activeCamera)?.id || scene.nodes.cameras[0]?.id || '', targetEntityId: '', error: null })
4418
+ update({ source: editorClone(scene), cameraId: scene.nodes.cameras.find(item => item.id === scene.project.activeCamera)?.id || scene.nodes.cameras[0]?.id || '', targetEntityId: '', error: null, sourceFrame: scene.project.frameStart, sourceEntityIds: photographyProductDefaults(scene, payload.assemblyPlacement?.available ? payload.assemblyPlacement.memberEntityIds : null), destinationEntityIds })
3935
4419
  } catch (error) {
3936
4420
  if (alive()) update({ source: null, error: error.message || String(error) })
3937
4421
  } finally {
@@ -3943,6 +4427,114 @@ window.__ModuleLoader__.load({
3943
4427
  }
3944
4428
  }
3945
4429
  const actions = {
4430
+ saveWideFrame: async () => {
4431
+ const projectId = data.activeProjectId, scene = data.selected?.scene, plan = wideFramePlan(scene)
4432
+ const key = motionKey(data), motion = motionDraftFor(data), motionBusy = data.motionWork[key]?.busy
4433
+ if (!projectId || !scene || scene.project?.id !== projectId || scene.revision !== data.currentRevision
4434
+ || !data.deliveryAspectPresetSupported || !/^[a-f0-9]{64}$/.test(data.storeIdentity || '')
4435
+ || !plan?.changed || projectHasUnsavedDrafts(data) || motion?.result || motion?.touched || motionBusy || Object.values(data.busy).some(Boolean)) return
4436
+ const root = data.projectsRoot, identity = data.storeIdentity, revision = scene.revision
4437
+ const operations = plan.profiles.filter(item => !editorEqual(item.before, item.after)).map(item => ({ op: 'render.profile.set', profileName: item.name, profile: { resolution: item.after } }))
4438
+ if (scene.project.aspectRatio !== '16:9') operations.push({ op: 'project.aspectRatio.set', aspectRatio: '16:9' })
4439
+ const patch = { projectId, baseRevision: revision, actor: 'ui', saveCheckpoint: true, renderPreview: true, operations }
4440
+ setIn('busy', 'patch', true)
4441
+ const outcome = await postJson(fetchImpl, projectRoute(projectId, '/patch'), { patch, expectedStoreIdentity: identity })
4442
+ setIn('busy', 'patch', false)
4443
+ if (outcome.ok && motion && data.motionDrafts[key] === motion) {
4444
+ const drafts = { ...data.motionDrafts }; delete drafts[key]; set({ motionDrafts: drafts })
4445
+ }
4446
+ if (data.activeProjectId === projectId && data.projectsRoot === root && data.storeIdentity === identity)
4447
+ setIn('notices', 'jobs', outcome.ok ? { ok: true, message: t('aspect.saved') } : { ok: false, message: `${outcome.error.code}: ${outcome.error.message}` })
4448
+ reload()
4449
+ },
4450
+ probeImageInput: async () => {
4451
+ if (imageProbeController || !data.imageInputProbeSupported || data.editableSnapshotAvailability?.available !== true) return
4452
+ const controller = new AbortController(); imageProbeController = controller
4453
+ const deadline = setTimeout(() => controller.abort(), 50000)
4454
+ set({ imageInputProbe: { busy: true, result: null } })
4455
+ try {
4456
+ const outcome = await postJson(fetchImpl, ROUTES.imageInputProbe, {}, controller.signal)
4457
+ const result = outcome.payload?.imageInput
4458
+ const statuses = ['pass', 'unavailable', 'unverified']
4459
+ const reasons = [null, 'authentication', 'credentials_missing', 'image_unsupported', 'provider_unavailable', 'model_unavailable', 'services_missing', 'route_missing', 'rate_limit', 'timeout', 'cancelled', 'busy', 'incorrect_response', 'incomplete_response', 'unreadable_response', 'response_limit', 'provider_error']
4460
+ if (!outcome.ok || !result || !statuses.includes(result.status) || !reasons.includes(result.reason)
4461
+ || result.status === 'pass' && result.reason !== null || result.status !== 'pass' && result.reason === null) throw Error('Invalid readiness result')
4462
+ if (running && imageProbeController === controller) set({ imageInputProbe: { busy: false, result: { status: result.status, reason: result.reason } } })
4463
+ } catch {
4464
+ if (running && imageProbeController === controller) set({ imageInputProbe: { busy: false, result: { status: 'unverified', reason: controller.signal.aborted ? 'timeout' : 'provider_error' } } })
4465
+ } finally { clearTimeout(deadline); if (imageProbeController === controller) imageProbeController = null }
4466
+ },
4467
+ setMotionValue: (field, value) => {
4468
+ const key = motionKey(data), draft = motionDraftFor(data), work = data.motionWork[key]
4469
+ if (!draft || draft.result || work?.busy || data.busy.patch || !['cameraId', 'entityIds', 'seconds', 'amount', 'direction', 'allowRangeExtension'].includes(field)) return
4470
+ if (field === 'cameraId' && (!draft.cameras.includes(value) || draft.cameraRestrictions?.[value])) return
4471
+ if (field === 'entityIds' && (!Array.isArray(value) || value.length > 128 || new Set(value).size !== value.length || value.some(id => !draft.entities.some(entity => entity.id === id && entity.visible !== false)))) return
4472
+ set({ motionDrafts: { ...data.motionDrafts, [key]: { ...draft, touched: true, [field]: field === 'entityIds' ? [...value].sort() : value } } })
4473
+ },
4474
+ cancelMotion: () => motionControllers.get(motionKey(data))?.abort(),
4475
+ previewMotion: async () => {
4476
+ const key = motionKey(data), draft = motionDraftFor(data), scene = data.selected?.scene
4477
+ if (!draft || draft.result || motionControllers.has(key) || !data.motionPreviewSupported || !data.editableSnapshotAvailability?.available
4478
+ || !validMotionDraft(draft) || draft.baseRevision !== data.currentRevision || draft.baseRevision !== scene?.revision || Object.values(data.busy).some(Boolean)) return
4479
+ const controller = new AbortController(); motionControllers.set(key, controller); motionWork(key, { busy: 'preview', error: null, message: null })
4480
+ const body = { baseRevision: draft.baseRevision, projectsRoot: draft.projectsRoot, sourceCameraId: draft.cameraId,
4481
+ seconds: Number(draft.seconds), fraction: Number(draft.amount) / 100, direction: draft.direction,
4482
+ entityIds: [...draft.entityIds].sort(), allowRangeExtension: draft.allowRangeExtension === true }
4483
+ try {
4484
+ const response = await fetchImpl(projectRoute(draft.projectId, '/motion-previews'), { method: 'POST', headers: { 'content-type': 'application/json', accept: 'application/json' }, body: JSON.stringify(body), signal: controller.signal })
4485
+ const payload = await response.json()
4486
+ if (!response.ok || !payload.ok) {
4487
+ if (payload.error?.code === 'MOTION_OUT_OF_FRAME') throw Object.assign(Error('MOTION_OUT_OF_FRAME'), { userMessage: t('motion.outOfFrame') })
4488
+ if (payload.error?.code === 'MOTION_FRAME_UNVERIFIABLE') throw Object.assign(Error('MOTION_FRAME_UNVERIFIABLE'), { userMessage: t('motion.unverifiable') })
4489
+ throw Error(`${payload.error?.code || 'MOTION_FAILED'}: ${payload.error?.message || response.status}`)
4490
+ }
4491
+ if (controller.signal.aborted || !validMotionReceipt(payload.preview, draft)) throw Error('MOTION_RECEIPT_MISMATCH')
4492
+ const receipt = { ...editorClone(payload.preview), saveAttempted: false }
4493
+ let storageError = false
4494
+ try { motionStorage.setItem(motionStorageKey(draft.projectsRoot, draft.storeIdentity, draft.projectId), JSON.stringify(receipt))
4495
+ if (motionStorage.getItem(motionStorageKey(draft.projectsRoot, draft.storeIdentity, draft.projectId)) !== JSON.stringify(receipt)) throw Error('storage mismatch')
4496
+ } catch { storageError = true }
4497
+ set({ motionDrafts: { ...data.motionDrafts, [key]: { ...draft, result: receipt, storageError } } })
4498
+ motionWork(key, { busy: null, error: storageError ? t('motion.storage') : null })
4499
+ } catch (error) { motionWork(key, { busy: null, error: controller.signal.aborted ? t('inspection.cancelled') : error.userMessage || t('motion.failed', { message: error.message || String(error) }) }) }
4500
+ finally { motionControllers.delete(key) }
4501
+ },
4502
+ discardMotion: async () => {
4503
+ const key = motionKey(data), draft = motionDraftFor(data), work = data.motionWork[key]
4504
+ if (!draft || work?.busy) return
4505
+ // An uncertain save may still be running; forget only the local handle.
4506
+ // Never ask the Host to remove a candidate while its commit is uncertain.
4507
+ if (draft.result && !draft.result.saveAttempted) {
4508
+ const outcome = await postJson(fetchImpl, projectRoute(draft.projectId, `/motion-previews/${draft.result.id}/discard`), {})
4509
+ if (!outcome.ok) { motionWork(key, { error: t('motion.failed', { message: outcome.error.message }) }); return }
4510
+ }
4511
+ try { motionStorage?.removeItem(motionStorageKey(draft.projectsRoot, draft.storeIdentity, draft.projectId)) } catch { motionWork(key, { error: t('motion.storage') }); return }
4512
+ const drafts = { ...data.motionDrafts }; delete drafts[key]; set({ motionDrafts: drafts, motionWork: { ...data.motionWork, [key]: {} } }); reload()
4513
+ },
4514
+ saveMotion: async () => {
4515
+ const key = motionKey(data), draft = motionDraftFor(data), result = draft?.result, work = data.motionWork[key]
4516
+ if (!draft || !result || work?.busy || draft.storageError || !validMotionReceipt(result, draft)
4517
+ || !result.saveAttempted && (draft.baseRevision !== data.currentRevision || result.expiresAt <= Date.now())) return
4518
+ const attempted = { ...result, saveAttempted: true }, storageKey = motionStorageKey(draft.projectsRoot, draft.storeIdentity, draft.projectId)
4519
+ try { motionStorage.setItem(storageKey, JSON.stringify(attempted)); if (motionStorage.getItem(storageKey) !== JSON.stringify(attempted)) throw Error('storage mismatch') }
4520
+ catch { motionWork(key, { error: t('motion.storage') }); return }
4521
+ set({ motionDrafts: { ...data.motionDrafts, [key]: { ...draft, result: attempted } } }); motionWork(key, { busy: 'save', error: null })
4522
+ const controller = new AbortController()
4523
+ const deadline = setTimeout(() => controller.abort(), 120000)
4524
+ let outcome
4525
+ try {
4526
+ outcome = await postJson(fetchImpl, projectRoute(draft.projectId, `/motion-previews/${result.id}/save`), { projectsRoot: draft.projectsRoot, intentSha256: result.intentSha256 }, controller.signal)
4527
+ } finally { clearTimeout(deadline) }
4528
+ const saved = outcome.payload?.saved
4529
+ if (outcome.ok && saved?.projectId === draft.projectId && saved?.sourceRevision === draft.baseRevision
4530
+ && saved?.cameraId === result.cameraId && /^r[0-9]{4,}$/.test(saved?.revision || '')) {
4531
+ try { motionStorage.removeItem(storageKey) } catch {}
4532
+ const drafts = { ...data.motionDrafts }; delete drafts[key]
4533
+ set({ motionDrafts: drafts, motionWork: { ...data.motionWork, [key]: { busy: null, message: t('motion.saved', { revision: saved.revision, camera: saved.cameraId }) } },
4534
+ ...(motionKey(data) === key ? { forms: { ...data.forms, renderCamera: saved.cameraId } } : {}) }); reload()
4535
+ } else motionWork(key, { busy: null, error: outcome.error?.code === 'MOTION_OUT_OF_FRAME' ? t('motion.savedOutOfFrame')
4536
+ : outcome.error?.code === 'MOTION_FRAME_UNVERIFIABLE' ? t('motion.savedUnverifiable') : t('motion.uncertain') })
4537
+ },
3946
4538
  setCameraFitValue: (field, value) => {
3947
4539
  const draft = cameraFitDraftFor(data), key = assemblyKey(data)
3948
4540
  if (!draft || draft.attempt || cameraFitControllers.has(key) || !['cameraId', 'frame', 'marginPercent', 'entityIds'].includes(field)) return
@@ -3959,7 +4551,7 @@ window.__ModuleLoader__.load({
3959
4551
  },
3960
4552
  cancelCameraFit: () => cameraFitControllers.get(assemblyKey(data))?.abort(),
3961
4553
  saveCameraFit: async () => {
3962
- const draft = cameraFitDraftFor(data), key = assemblyKey(data)
4554
+ const draft = cameraFitDraftFor(data), key = assemblyKey(data), identity = data.storeIdentity, sourceMotionKey = motionKey(data), sourceMotion = motionDraftFor(data)
3963
4555
  if (!draft || !data.cameraFitSupported || cameraFitControllers.has(key) || draft.storageError || Object.values(data.busy).some(Boolean)) return
3964
4556
  if (!draft.attempt && (cameraFitInvalid(draft) || draft.baseRevision !== data.currentRevision || draft.baseRevision !== data.selected?.scene?.revision
3965
4557
  || projectHasUnsavedDrafts({ ...data, cameraFitDrafts: {} }))) return
@@ -3997,10 +4589,20 @@ window.__ModuleLoader__.load({
3997
4589
  const drafts = { ...data.cameraFitDrafts }; delete drafts[key]
3998
4590
  set({ cameraFitDrafts: drafts, cameraFitWork: { ...data.cameraFitWork, [key]: { result } } })
3999
4591
  if (sameProject) {
4592
+ // Preserve a creator's edited motion intent. Only an untouched draft
4593
+ // bound to this exact source may follow the newly fitted camera.
4594
+ if (identity && data.storeIdentity === identity && data.motionDrafts[sourceMotionKey] === sourceMotion
4595
+ && sourceMotion && sourceMotion.baseRevision === body.baseRevision && !sourceMotion.touched && !sourceMotion.result
4596
+ && !data.motionWork[sourceMotionKey]?.busy && !motionControllers.has(sourceMotionKey)) {
4597
+ const entityIds = body.entityIds.every(id => sourceMotion.entities.some(entity => entity.id === id && entity.visible !== false))
4598
+ ? [...body.entityIds] : sourceMotion.entityIds
4599
+ set({ motionDrafts: { ...data.motionDrafts, [sourceMotionKey]: { ...sourceMotion, baseRevision: result.revision,
4600
+ cameras: [...new Set([...sourceMotion.cameras, body.fittedCameraId])], cameraId: body.fittedCameraId, entityIds } } })
4601
+ }
4000
4602
  const photography = data.photographyDrafts[draft.projectId]
4001
4603
  if (photography && photography.projectsRoot === draft.projectsRoot && !photographyDirty(photography)) set({ photographyDrafts: {
4002
4604
  ...data.photographyDrafts, [draft.projectId]: { ...photography, cameraId: body.fittedCameraId, frame: body.frame } } })
4003
- const notice = { ok: true, kind: 'camera-fit', projectId: draft.projectId, projectsRoot: draft.projectsRoot,
4605
+ const notice = { ok: true, kind: 'camera-fit', projectId: draft.projectId, projectsRoot: draft.projectsRoot, revision: result.revision,
4004
4606
  message: t('fit.saved', { count: body.entityIds.length, revision: result.revision, frame: body.frame }) }
4005
4607
  set({ view: 'preview', compareMode: 'result', notices: { ...data.notices, scene: notice, preview: notice } })
4006
4608
  }
@@ -4071,6 +4673,7 @@ window.__ModuleLoader__.load({
4071
4673
  },
4072
4674
  setSnapshotRevision: value => setSnapshotSelection('revision', value),
4073
4675
  setSnapshotVideo: value => setSnapshotSelection('videoJobId', value),
4676
+ setSnapshotImage,
4074
4677
  prepareEditableSnapshot: () => snapshotRequest('prepare'),
4075
4678
  checkEditableSnapshot: () => snapshotRequest('check'),
4076
4679
  cancelEditableSnapshot: () => snapshotRequest('cancel'),
@@ -4139,9 +4742,11 @@ window.__ModuleLoader__.load({
4139
4742
  beginNewWork: () => set({ view: 'projects', projectTask: 'new' }),
4140
4743
  selectProject: (projectId) => {
4141
4744
  if (projectId === data.activeProjectId) { reload(); return }
4745
+ motionControllers.get(motionKey(data))?.abort()
4142
4746
  const operation = bundleOperations.get(data.activeProjectId)
4143
4747
  if (operation && projectId !== data.activeProjectId) void cancelBundle(operation).catch(() => {})
4144
- set({ projectId, selected: null, activeProjectId: null, editorEntityId: null, editorComparison: null, diff: null, diffError: null, compareLeft: null, compareRight: null })
4748
+ set({ projectId, selected: null, activeProjectId: null, editorEntityId: null, editorComparison: null, diff: null, diffError: null, compareLeft: null, compareRight: null,
4749
+ forms: { ...data.forms, renderCamera: '' } })
4145
4750
  reload()
4146
4751
  },
4147
4752
  reload,
@@ -4351,7 +4956,7 @@ window.__ModuleLoader__.load({
4351
4956
  updateAsset: (field, value) => {
4352
4957
  const projectId = data.activeProjectId, current = data.assetDrafts[projectId]
4353
4958
  if (!current || data.assetWork[projectId]?.busy) return
4354
- const allowed = ['newEntityId', 'location', 'rotationEuler', 'scale', 'entityId', 'target', 'partId', 'slotIndex', 'scope', 'newMaterial', 'channel', 'binding', 'replaceTexture', 'strength', 'rotation']
4959
+ const allowed = ['newEntityId', 'location', 'rotationEuler', 'scale', 'hideEntityId', 'makeSubject', 'entityId', 'target', 'partId', 'slotIndex', 'scope', 'newMaterial', 'channel', 'binding', 'replaceTexture', 'strength', 'rotation']
4355
4960
  if (!allowed.includes(field)) return
4356
4961
  const draft = editorClone(current); draft[field] = editorClone(value)
4357
4962
  if (['entityId', 'target'].includes(field)) { draft.partId = ''; draft.slotIndex = '' }
@@ -4505,15 +5110,58 @@ window.__ModuleLoader__.load({
4505
5110
  setVisualIterations: value => {
4506
5111
  if (Number.isInteger(value) && value >= 1 && value <= 3) set({ visualIterations: { ...data.visualIterations, [data.activeProjectId]: value } })
4507
5112
  },
5113
+ setReviewMode: mode => {
5114
+ const choice = reviewSelectionFor(data)
5115
+ if (!choice || data.visualRuns[data.activeProjectId]?.busy || !['selected', 'standard'].includes(mode)
5116
+ || mode === 'selected' && !data.selectedReviewViewsSupported) return
5117
+ set({ reviewSelections: { ...data.reviewSelections, [reviewSelectionKey(data)]: { ...editorClone(choice), mode } } })
5118
+ },
5119
+ resetReviewSelection: () => {
5120
+ if (data.visualRuns[data.activeProjectId]?.busy) return
5121
+ const choices = { ...data.reviewSelections }; delete choices[reviewSelectionKey(data)]; set({ reviewSelections: choices })
5122
+ },
5123
+ updateReviewView: (index, field, value) => {
5124
+ const choice = reviewSelectionFor(data)
5125
+ if (!choice || choice.baseRevision !== data.selected?.scene?.revision || data.visualRuns[data.activeProjectId]?.busy
5126
+ || !['cameraId', 'frame'].includes(field) || !choice.views[index]) return
5127
+ const next = editorClone(choice); next.views[index][field] = value
5128
+ set({ reviewSelections: { ...data.reviewSelections, [reviewSelectionKey(data)]: next } })
5129
+ },
5130
+ addReviewView: () => {
5131
+ const choice = reviewSelectionFor(data), scene = data.selected?.scene
5132
+ if (!choice || choice.baseRevision !== scene?.revision || choice.views.length >= 4 || data.visualRuns[data.activeProjectId]?.busy) return
5133
+ const next = editorClone(choice), camera = scene.nodes.cameras.find(camera => !choice.views.some(view => view.cameraId === camera.id)) || scene.nodes.cameras[0]
5134
+ next.views.push({ id: `review-${next.views.length + 1}`, cameraId: camera?.id || '', frame: scene.project.frameStart })
5135
+ next.views = next.views.map((view, i) => ({ ...view, id: `review-${i + 1}` }))
5136
+ set({ reviewSelections: { ...data.reviewSelections, [reviewSelectionKey(data)]: next } })
5137
+ },
5138
+ removeReviewView: index => {
5139
+ const choice = reviewSelectionFor(data)
5140
+ if (!choice || choice.views.length <= 1 || !choice.views[index] || data.visualRuns[data.activeProjectId]?.busy) return
5141
+ const next = editorClone(choice); next.views.splice(index, 1); next.views = next.views.map((view, i) => ({ ...view, id: `review-${i + 1}` }))
5142
+ set({ reviewSelections: { ...data.reviewSelections, [reviewSelectionKey(data)]: next } })
5143
+ },
5144
+ useCompletedReviewViews: () => {
5145
+ const scene = data.selected?.scene, views = completedReviewViews(data)
5146
+ if (!scene || !views.length || !data.selectedReviewViewsSupported || data.visualRuns[data.activeProjectId]?.busy) return
5147
+ set({ reviewSelections: { ...data.reviewSelections, [reviewSelectionKey(data)]: { mode: 'selected', baseRevision: scene.revision, views } } })
5148
+ },
4508
5149
  runVisual: async mode => {
4509
5150
  const projectId = data.activeProjectId, revision = data.selected?.scene?.revision
4510
5151
  if (!projectId || !revision || !data.briefDrafts[projectId] || !['review', 'autofix'].includes(mode) || data.visualRuns[projectId]?.busy
4511
5152
  || data.briefWork[projectId]?.saving || data.briefWork[projectId]?.uploading || projectHasUnsavedDrafts(data)
4512
5153
  || data.busy.editor || data.busy.patch || data.busy.restore) return
5154
+ const choice = reviewSelectionFor(data), selected = choice?.mode === 'selected'
5155
+ if (selected && (mode !== 'review' || !reviewSelectionValid(data, choice))) return
5156
+ const views = selected ? editorClone(choice.views) : null, expectedDigest = data.selected.scene.digest
4513
5157
  set({ visualRuns: { ...data.visualRuns, [projectId]: { busy: true, mode, revision } } })
4514
5158
  const outcome = await postJson(fetchImpl, projectRoute(projectId, `/${mode}`), { revision,
5159
+ ...(selected ? { views, expectedStoreIdentity: data.storeIdentity, expectedDigest } : {}),
4515
5160
  ...(mode === 'autofix' ? { maxIterations: data.visualIterations[projectId] || 1 } : {}) })
4516
- const reviewerError = outcome.payload?.review?.reviewerError || outcome.payload?.review?.referenceInputError?.message
5161
+ const scope = outcome.payload?.review?.inputScope
5162
+ const sourceMismatch = selected && outcome.ok && (scope?.mode !== 'selected-views' || scope.sourceRevision !== revision || scope.sourceDigest !== expectedDigest
5163
+ || JSON.stringify(scope.views?.map(({ id, cameraId, frame }) => ({ id, cameraId, frame }))) !== JSON.stringify(views))
5164
+ const reviewerError = sourceMismatch ? t('reviewView.mismatch') : outcome.payload?.review?.reviewerError || outcome.payload?.review?.referenceInputError?.message
4517
5165
  const result = outcome.ok ? outcome.payload : null
4518
5166
  set({ visualRuns: { ...data.visualRuns, [projectId]: { busy: false, mode, revision, result,
4519
5167
  error: !outcome.ok ? `${outcome.error.code}: ${outcome.error.message}` : reviewerError || null } } })
@@ -4536,36 +5184,69 @@ window.__ModuleLoader__.load({
4536
5184
  setPhotographySource: (field, value) => {
4537
5185
  const projectId = data.activeProjectId, selection = data.photographyReuse[projectId] || {}
4538
5186
  if (!data.cameraTargetResetSupported || !photographyDraftFor(data) || photographyBusy(data.photographyWork[projectId])) return
5187
+ let changes, load = false, revision
4539
5188
  if (field === 'project') {
4540
5189
  if (value && !data.projects.some(item => item.projectId === value && !item.creationPending)) return
4541
- photographySourceControllers.get(projectId)?.abort(); photographySourceControllers.delete(projectId)
4542
- set({ photographyReuse: { ...data.photographyReuse, [projectId]: { sourceProjectId: value, source: null, revisions: [], revision: '', cameraId: '', targetEntityId: '', replaceDraft: false } } })
4543
- if (value) return loadPhotographySource()
4544
- } else if (field === 'revision') {
4545
- if (!selection.revisions?.some(item => item.revision === value)) return
4546
- return loadPhotographySource(value)
4547
- } else if (field === 'camera' && selection.source?.nodes.cameras.some(item => item.id === value)) {
4548
- set({ photographyReuse: { ...data.photographyReuse, [projectId]: { ...selection, cameraId: value, targetEntityId: '', applied: false, unchanged: false } } })
4549
- } else if (field === 'target' && (!value || photographyDraftFor(data).entities.some(item => item.id === value))) {
4550
- set({ photographyReuse: { ...data.photographyReuse, [projectId]: { ...selection, targetEntityId: value, applied: false, unchanged: false } } })
4551
- } else if (field === 'replace' && typeof value === 'boolean') {
4552
- set({ photographyReuse: { ...data.photographyReuse, [projectId]: { ...selection, replaceDraft: value } } })
5190
+ changes = { sourceProjectId: value, source: null, revisions: [], revision: '', cameraId: '', targetEntityId: '', replaceDraft: false }; load = Boolean(value)
5191
+ } else if (field === 'revision' && selection.revisions?.some(item => item.revision === value)) {
5192
+ changes = {}; load = true; revision = value
5193
+ } else if (field === 'camera' && selection.source?.nodes.cameras.some(item => item.id === value)) changes = { cameraId: value, targetEntityId: '', applied: false, unchanged: false }
5194
+ else if (field === 'target' && (!value || photographyDraftFor(data).entities.some(item => item.id === value))) changes = { targetEntityId: value, applied: false, unchanged: false }
5195
+ else if (field === 'replace' && typeof value === 'boolean') changes = { replaceDraft: value }
5196
+ else if (field === 'mode' && ['absolute', 'bounds'].includes(value) && (value !== 'bounds' || data.photographyBoundaryReuseSupported)) changes = { mode: value, applied: false, unchanged: false }
5197
+ else if (field === 'sourceFrame') changes = { sourceFrame: value, applied: false, unchanged: false }
5198
+ else if (['sourceEntityIds', 'destinationEntityIds'].includes(field) && Array.isArray(value) && value.length <= 128 && new Set(value).size === value.length) {
5199
+ const scene = field === 'sourceEntityIds' ? selection.source : data.selected?.scene
5200
+ if (value.every(id => photographyProductEntities(scene).some(e => e.id === id))) changes = { [field]: [...value].sort(), applied: false, unchanged: false }
4553
5201
  }
5202
+ if (!changes) return
5203
+ photographySourceControllers.get(projectId)?.abort(); photographySourceControllers.delete(projectId)
5204
+ set({ photographyReuse: { ...data.photographyReuse, [projectId]: { ...selection, planning: false, loading: false, error: null, ...changes } } })
5205
+ if (load) return loadPhotographySource(revision)
4554
5206
  },
4555
5207
  reloadPhotographySource: () => loadPhotographySource(data.photographyReuse[data.activeProjectId]?.revision),
4556
- reusePhotography: () => {
5208
+ cancelPhotographyReuse: () => {
5209
+ const projectId = data.activeProjectId
5210
+ photographySourceControllers.get(projectId)?.abort(); photographySourceControllers.delete(projectId)
5211
+ set({ photographyReuse: { ...data.photographyReuse, [projectId]: { ...data.photographyReuse[projectId], planning: false } } })
5212
+ },
5213
+ reusePhotography: async () => {
4557
5214
  const projectId = data.activeProjectId, selection = data.photographyReuse[projectId], draft = photographyDraftFor(data)
4558
- if (!data.cameraTargetResetSupported || !draft || !selection?.source || selection.loading || photographyBusy(data.photographyWork[projectId])
5215
+ if (!data.cameraTargetResetSupported || !draft || !selection?.source || selection.loading || selection.planning || photographyBusy(data.photographyWork[projectId])
4559
5216
  || selection.projectsRoot !== data.projectsRoot || draft.projectsRoot !== data.projectsRoot
4560
5217
  || selection.baseRevision !== draft.baseRevision || draft.baseRevision !== data.selected?.scene?.revision
4561
5218
  || (photographyDirty(draft) && !selection.replaceDraft)) return
5219
+ let controller
4562
5220
  try {
4563
- const next = reusePhotography(draft, selection.source, selection.cameraId, selection.targetEntityId)
5221
+ let next
5222
+ if (selection.mode === 'bounds') {
5223
+ const request = photographyBoundaryRequest(data, selection, draft)
5224
+ if (!request) throw new Error(t('photo.boundsInvalid'))
5225
+ const signature = creationSignature(draft), root = data.projectsRoot
5226
+ controller = new AbortController(); photographySourceControllers.set(projectId, controller)
5227
+ set({ photographyReuse: { ...data.photographyReuse, [projectId]: { ...selection, planning: true, error: null } } })
5228
+ const outcome = await postJson(fetchImpl, projectRoute(projectId, '/photography-reuse'), request, controller.signal)
5229
+ if (!running || controller.signal.aborted || photographySourceControllers.get(projectId) !== controller) return
5230
+ const current = data.photographyReuse[projectId], currentDraft = photographyDraftFor(data)
5231
+ if (data.activeProjectId !== projectId || data.projectsRoot !== root
5232
+ || creationSignature(currentDraft) !== signature
5233
+ || creationSignature(photographyBoundaryRequest(data, current, currentDraft)) !== creationSignature(request)) {
5234
+ if (data.activeProjectId === projectId && data.projectsRoot === root) throw new Error(t('photo.boundsChanged'))
5235
+ return
5236
+ }
5237
+ if (!outcome.ok) throw new Error(`${outcome.error.code}: ${outcome.error.message}`)
5238
+ next = applyBoundaryPhotography(draft, selection.source, outcome.payload.plan, request)
5239
+ } else next = reusePhotography(draft, selection.source, selection.cameraId, selection.targetEntityId)
4564
5240
  set({ photographyDrafts: { ...data.photographyDrafts, [projectId]: next }, photographyReuse: {
4565
- ...data.photographyReuse, [projectId]: { ...selection, replaceDraft: false, error: null, applied: photographyDirty(next), unchanged: !photographyDirty(next) },
5241
+ ...data.photographyReuse, [projectId]: { ...data.photographyReuse[projectId], replaceDraft: false, error: null, planning: false, applied: photographyDirty(next), unchanged: !photographyDirty(next) },
4566
5242
  } })
4567
5243
  } catch (error) {
4568
- set({ photographyReuse: { ...data.photographyReuse, [projectId]: { ...selection, applied: false, error: error.message || String(error) } } })
5244
+ if (!controller || !controller.signal.aborted) set({ photographyReuse: { ...data.photographyReuse, [projectId]: { ...data.photographyReuse[projectId], applied: false, planning: false, error: error.message || String(error) } } })
5245
+ } finally {
5246
+ if (controller && photographySourceControllers.get(projectId) === controller) {
5247
+ photographySourceControllers.delete(projectId)
5248
+ if (running) set({ photographyReuse: { ...data.photographyReuse, [projectId]: { ...data.photographyReuse[projectId], planning: false } } })
5249
+ }
4569
5250
  }
4570
5251
  },
4571
5252
  updatePhotography: (kind, path, value) => {
@@ -5018,6 +5699,31 @@ window.__ModuleLoader__.load({
5018
5699
  startRender: async (resumeJobId) => {
5019
5700
  const projectId = data.activeProjectId, scene = data.selected?.scene
5020
5701
  if (!projectId || !scene?.revision || data.busy.render) return
5702
+ const cameraId = data.forms.renderCamera || ''
5703
+ if (resumeJobId === undefined && cameraId && !scene.nodes?.cameras?.some(camera => camera.id === cameraId)) {
5704
+ setIn('notices', 'jobs', { ok: false, message: t('jobs.cameraMissing') }); return
5705
+ }
5706
+ const selectedSize = data.forms.stillPreset || ''
5707
+ const videoPreset = selectedSize === 'video-1920x1080' ? selectedSize : ''
5708
+ const stillPreset = videoPreset ? '' : selectedSize
5709
+ if (resumeJobId === undefined && stillPreset && !data.stillDeliveryPresetSupported) {
5710
+ setIn('notices', 'jobs', { ok: false, message: t('jobs.stillUnsupported') }); return
5711
+ }
5712
+ const deliveryKind = data.forms.deliveryKind || ''
5713
+ if (resumeJobId === undefined && deliveryKind && !data.stillImageDeliverySupported) {
5714
+ setIn('notices', 'jobs', { ok: false, message: t('jobs.stillKindUnsupported') }); return
5715
+ }
5716
+ if (resumeJobId === undefined && videoPreset && !data.videoDeliveryPresetSupported) {
5717
+ setIn('notices', 'jobs', { ok: false, message: t('jobs.videoPresetUnsupported') }); return
5718
+ }
5719
+ if (resumeJobId === undefined && videoPreset && deliveryKind) {
5720
+ setIn('notices', 'jobs', { ok: false, message: t('jobs.videoPresetInvalid') }); return
5721
+ }
5722
+ const start = data.forms.frameStart === '' ? scene.project.frameStart : Number(data.forms.frameStart)
5723
+ const end = data.forms.frameEnd === '' ? scene.project.frameEnd : Number(data.forms.frameEnd)
5724
+ if (resumeJobId === undefined && (stillPreset || deliveryKind) && (!Number.isSafeInteger(start) || start !== end)) {
5725
+ setIn('notices', 'jobs', { ok: false, message: t('jobs.stillRange') }); return
5726
+ }
5021
5727
  // Snapshot before notifying subscribers: a project switch or a concurrent
5022
5728
  // save must not change the scene or settings this click asked to render.
5023
5729
  const request = resumeJobId === undefined ? {
@@ -5025,6 +5731,10 @@ window.__ModuleLoader__.load({
5025
5731
  frameStart: data.forms.frameStart === '' ? undefined : Number(data.forms.frameStart),
5026
5732
  frameEnd: data.forms.frameEnd === '' ? undefined : Number(data.forms.frameEnd),
5027
5733
  profile: data.forms.profile,
5734
+ ...(stillPreset ? { stillPreset } : {}),
5735
+ ...(videoPreset ? { videoPreset } : {}),
5736
+ ...(deliveryKind ? { deliveryKind } : {}),
5737
+ ...(cameraId ? { cameraId } : {}),
5028
5738
  } : { resumeJobId }
5029
5739
  setIn('busy', 'render', true)
5030
5740
  const outcome = await postJson(fetchImpl, projectRoute(projectId, '/render'), request)
@@ -5091,8 +5801,15 @@ window.__ModuleLoader__.load({
5091
5801
  fileChoicesStopped = true
5092
5802
  data = { ...data, fileChoiceGeneration: data.fileChoiceGeneration + 1 }
5093
5803
  running = false
5804
+ imageProbeController?.abort(); imageProbeController = null
5805
+ data = { ...data, imageInputProbe: { busy: false, result: null } }
5806
+ snapshot = { ...snapshot, imageInputProbe: data.imageInputProbe }
5094
5807
  if (timer !== null) { clearInterval(timer); timer = null }
5808
+ for (const controller of photographySourceControllers.values()) controller.abort()
5809
+ photographySourceControllers.clear()
5095
5810
  for (const controller of photographyControllers.values()) controller.abort()
5811
+ for (const controller of motionControllers.values()) controller.abort()
5812
+ motionControllers.clear()
5096
5813
  photographyControllers.clear()
5097
5814
  for (const controller of placementControllers.values()) controller.abort()
5098
5815
  placementControllers.clear()
@@ -5187,6 +5904,7 @@ window.__ModuleLoader__.load({
5187
5904
  )
5188
5905
  return el('div', { 'data-view': 'projects' },
5189
5906
  ErrorBox({ error: state.error }),
5907
+ ProjectStorageNotice(state),
5190
5908
  el('section', { className: 'db-card db-project-create', 'aria-label': t('projects.create') },
5191
5909
  el('h2', { className: 'db-start-title' }, t('lighttable.beginTitle')),
5192
5910
  el('p', { className: 'db-start-intro' }, t('lighttable.beginHint')),
@@ -5203,7 +5921,7 @@ window.__ModuleLoader__.load({
5203
5921
  el('div', { className: 'db-inline' },
5204
5922
  Button({ action: 'retry-creation', disabled: state.busy.create, onClick: actions.retryCreation, children: t('projects.retryCreation') }),
5205
5923
  Button({ action: 'refresh-creation-projects', onClick: actions.reload, children: t('projects.refreshList') }),
5206
- ['BLENDER_NOT_FOUND', 'RUNTIME_UNAVAILABLE'].includes(state.creationWork.code)
5924
+ creationEnvironmentError(state.creationWork.code)
5207
5925
  ? el('a', { href: 'https://github.com/pearjelly/deep-blend/blob/main/deepblend/docs/environment-check.md', target: '_blank', rel: 'noreferrer' }, t('projects.environmentGuide')) : null),
5208
5926
  state.notices.projects?.technicalDetails ? el('details', { 'data-creation-diagnostics': true },
5209
5927
  el('summary', null, t('projects.creationDetails')), el('pre', { className: 'db-pre' }, state.notices.projects.technicalDetails)) : null,
@@ -5327,14 +6045,38 @@ window.__ModuleLoader__.load({
5327
6045
  const projectId = state.activeProjectId, run = state.visualRuns[projectId], work = state.briefWork[projectId]
5328
6046
  const dirty = projectHasUnsavedDrafts(state), disabled = !projectId || !state.briefDrafts[projectId] || run?.busy || work?.saving || work?.uploading || dirty
5329
6047
  || state.busy.editor || state.busy.patch || state.busy.restore
6048
+ const choice = reviewSelectionFor(state), scene = state.selected?.scene, selected = choice?.mode === 'selected'
6049
+ const stale = choice && choice.baseRevision !== scene?.revision, invalid = selected && !reviewSelectionValid(state, choice)
5330
6050
  return el('div', { className: 'db-card', 'data-visual-actions': true, 'data-review-busy': String(Boolean(run?.busy)) },
5331
- el('p', { className: 'db-muted' }, t('brief.reviewCost')),
6051
+ choice ? el('label', { className: 'db-row' }, t('reviewView.title'), el('select', { className: 'db-input', 'data-field': 'review-view-mode', value: choice.mode,
6052
+ disabled, onChange: event => actions.setReviewMode(event.target.value) },
6053
+ el('option', { value: 'selected', disabled: !state.selectedReviewViewsSupported }, t('reviewView.selected')),
6054
+ el('option', { value: 'standard' }, t('reviewView.standard')))) : null,
6055
+ selected ? el('div', { 'data-review-selection': choice.baseRevision },
6056
+ el('p', { className: 'db-muted' }, t('reviewView.help')),
6057
+ Button({ action: 'review-use-images', disabled: disabled || !completedReviewViews(state).length, onClick: actions.useCompletedReviewViews, children: t('reviewView.fromImages') }),
6058
+ choice.views.map((view, index) => el('div', { key: view.id, className: 'db-inline', style: { marginTop: '8px', flexWrap: 'wrap' } },
6059
+ el('label', { style: { minWidth: 0, flex: '1 1 220px', maxWidth: '100%' } }, t('inspection.camera'), el('select', { className: 'db-input', style: { width: '100%', maxWidth: '100%' }, 'data-field': `review-camera-${index}`, value: view.cameraId, disabled: disabled || stale,
6060
+ onChange: event => actions.updateReviewView(index, 'cameraId', event.target.value) },
6061
+ !scene.nodes.cameras.some(camera => camera.id === view.cameraId) ? el('option', { value: view.cameraId, disabled: true }, t('inspection.cameraUnavailable', { camera: view.cameraId })) : null,
6062
+ scene.nodes.cameras.map(camera => el('option', { key: camera.id, value: camera.id }, camera.id)))),
6063
+ el('label', null, t('inspection.frame'), el('input', { type: 'number', className: 'db-input', style: { width: '100px' }, 'data-field': `review-frame-${index}`,
6064
+ min: scene.project.frameStart, max: scene.project.frameEnd, step: 1, value: view.frame, disabled: disabled || stale,
6065
+ onChange: event => actions.updateReviewView(index, 'frame', event.target.value === '' ? '' : Number(event.target.value)) })),
6066
+ Button({ action: `review-remove-${index}`, disabled: disabled || choice.views.length <= 1 || stale, onClick: () => actions.removeReviewView(index), children: t('reviewView.remove') }))),
6067
+ el('div', { className: 'db-inline', style: { marginTop: '8px' } },
6068
+ Button({ action: 'review-add-view', disabled: disabled || choice.views.length >= 4 || stale, onClick: actions.addReviewView, children: t('reviewView.add') }),
6069
+ Button({ action: 'review-reset-views', disabled: Boolean(run?.busy), onClick: actions.resetReviewSelection, children: t('reviewView.reset') })),
6070
+ stale ? el('p', { className: 'db-error', role: 'status' }, t('reviewView.stale'))
6071
+ : invalid ? el('p', { className: 'db-error', role: 'status' }, t('reviewView.invalid')) : null,
6072
+ el('p', { className: 'db-muted' }, t('reviewView.noAutofix'))) : el('div', null,
6073
+ el('p', { className: 'db-muted' }, t('brief.reviewCost')), el('p', { className: 'db-muted' }, t('reviewView.standardHelp'))),
5332
6074
  dirty ? el('p', { className: 'db-muted' }, t('brief.pending')) : null,
5333
6075
  el('div', { className: 'db-inline' },
5334
- Button({ action: 'project-review', disabled, onClick: () => actions.runVisual('review'), children: t('brief.review') }),
6076
+ Button({ action: 'project-review', disabled: disabled || invalid, onClick: () => actions.runVisual('review'), children: t('brief.review') }),
5335
6077
  el('label', null, t('brief.iterations'), el('select', { className: 'db-input', 'data-field': 'review-iterations', value: state.visualIterations[projectId] || 1,
5336
- disabled, onChange: event => actions.setVisualIterations(Number(event.target.value)) }, [1, 2, 3].map(value => el('option', { key: value, value }, String(value))))),
5337
- Button({ action: 'project-autofix', disabled, onClick: () => actions.runVisual('autofix'), children: t('brief.autofix') })),
6078
+ disabled: disabled || selected, onChange: event => actions.setVisualIterations(Number(event.target.value)) }, [1, 2, 3].map(value => el('option', { key: value, value }, String(value))))),
6079
+ Button({ action: 'project-autofix', disabled: disabled || selected, onClick: () => actions.runVisual('autofix'), children: t('brief.autofix') })),
5338
6080
  run?.busy ? el('p', { role: 'status' }, run.mode === 'review' ? t('brief.reviewing') : t('brief.fixing')) : null,
5339
6081
  run?.error ? el('p', { className: 'db-error', role: 'alert', 'data-review-error': true }, run.error) : null,
5340
6082
  run?.result && !run.error ? el('p', { 'data-review-result': run.mode, className: 'db-muted' }, run.mode === 'review'
@@ -5398,8 +6140,11 @@ window.__ModuleLoader__.load({
5398
6140
  /** A result line, in the two shapes the panel already used. */
5399
6141
  function placementPreviewNotice(state) {
5400
6142
  const notice = state.notices?.preview
5401
- return ['assembly-placement', 'camera-fit'].includes(notice?.kind) && notice.projectId === state.activeProjectId
5402
- && notice.projectsRoot === state.projectsRoot ? notice : null
6143
+ if (!['assembly-placement', 'camera-fit'].includes(notice?.kind) || notice.projectId !== state.activeProjectId
6144
+ || notice.projectsRoot !== state.projectsRoot) return null
6145
+ if (notice.kind === 'camera-fit' && notice.revision && lighttableResult(state).artifact?.sourceRevision !== notice.revision)
6146
+ return { ...notice, message: t('fit.savedOtherPreview', { revision: notice.revision }) }
6147
+ return notice
5403
6148
  }
5404
6149
 
5405
6150
  function Notice(result, style) {
@@ -5743,6 +6488,9 @@ window.__ModuleLoader__.load({
5743
6488
  const projectId = state.activeProjectId, library = state.assetLibraries?.[projectId], work = state.assetWork?.[projectId] || {}
5744
6489
  const draft = state.assetDrafts?.[projectId], busy = Boolean(work.busy), limits = library?.limits, bundle = state.assetBundleSelections?.[projectId]
5745
6490
  const conflict = Boolean(draft && draft.baseRevision !== state.selected?.scene?.revision)
6491
+ const sizeText = (dimensions, scale = 1) => Array.isArray(dimensions) && dimensions.length === 3 && Number.isFinite(scale) && scale > 0
6492
+ && dimensions.every(value => Number.isFinite(value) && value >= 0 && Number.isFinite(value * scale))
6493
+ ? dimensions.map(value => Number((value * scale).toPrecision(6))).join(' × ') : null
5746
6494
  const update = (field, value) => actions.updateAsset(field, value)
5747
6495
  const text = (label, field, value, change, extra = {}) => el('label', { className: 'db-row' }, label,
5748
6496
  el('input', { className: 'db-input', 'aria-label': label, 'data-field': field, value, disabled: busy, onChange: event => change(event.target.value), ...extra }))
@@ -5810,7 +6558,8 @@ window.__ModuleLoader__.load({
5810
6558
  result ? el('div', null, el('img', { 'data-asset-preview': entry.asset.id, alt: entry.originalName || entry.asset.id,
5811
6559
  ...dimensions, src: artifactUrl(`/deepblend/artifacts/${encodeURIComponent(projectId)}/`, result.preview), style: { width: '100%', height: 'auto', maxHeight: '240px', objectFit: 'contain' } }),
5812
6560
  result.inspection.kind === 'environment' && result.preview.toneMapped ? el('p', { className: 'db-muted' }, t('assets.toneMapped')) : null,
5813
- result.inspection.dimensions ? el('p', null, `${t('assets.dimensions')}: ${result.inspection.dimensions.map(value => Number.isFinite(value) ? Number(value.toFixed(4)) : '—').join(' × ')}`) : null,
6561
+ sizeText(result.inspection.dimensions) !== null ? el('p', { 'data-asset-dimensions': true }, `${t('assets.dimensions')}: ${sizeText(result.inspection.dimensions)}`) : null,
6562
+ result.inspection.kind === 'model' ? el('p', { className: 'db-muted', 'data-asset-units': entry.asset.type }, entry.asset.type === 'obj' ? t('assets.unitsObj') : t('assets.unitsGltf')) : null,
5814
6563
  result.inspection.image ? el('p', null, `${result.inspection.image.width} × ${result.inspection.image.height}`) : null,
5815
6564
  result.inspection.warnings?.length ? el('h5', null, t('assets.inspectionWarnings')) : null,
5816
6565
  (result.inspection.warnings || []).map((warning, index) => el('p', { className: 'db-muted', key: index }, typeof warning === 'string' ? warning : warning.message || warning.code || '')),
@@ -5828,7 +6577,12 @@ window.__ModuleLoader__.load({
5828
6577
  el('p', { className: 'db-muted' }, t('assets.modelHelp')),
5829
6578
  text(t('assets.entityId'), 'asset-entity-id', draft.newEntityId, value => update('newEntityId', value)),
5830
6579
  vector(t('editor.position'), 'location', draft.location, 1000), vector(t('editor.rotation'), 'rotationEuler', draft.rotationEuler, 180 / Math.PI),
5831
- number(t('assets.scale'), 'asset-scale', draft.scale ?? '', value => update('scale', value), { min: 0.000001 })) : null,
6580
+ number(t('assets.scale'), 'asset-scale', draft.scale ?? '', value => update('scale', value), { min: 0.000001 }),
6581
+ sizeText(draft.inspection?.dimensions, draft.scale) !== null ? el('p', { 'data-asset-scaled-dimensions': true }, `${t('assets.scaledDimensions')}: ${sizeText(draft.inspection.dimensions, draft.scale)}`) : null,
6582
+ el('p', { className: 'db-muted' }, t('assets.hideHelp')),
6583
+ choose(t('assets.hideExisting'), 'asset-hide-existing', draft.hideEntityId, [['', t('assets.hideNone')],
6584
+ ...draft.scene.nodes.entities.filter(entity => entity.visible !== false && !entity.locked && entity.kind !== 'empty').map(entity => [entity.id, entity.id])], value => update('hideEntityId', value)),
6585
+ check(t('assets.makeSubject'), 'asset-make-subject', draft.makeSubject, value => update('makeSubject', value))) : null,
5832
6586
  draft.kind === 'environment' ? el('div', null,
5833
6587
  el('p', { className: 'db-muted' }, t('assets.environmentHelp')),
5834
6588
  number(t('assets.strength'), 'asset-world-strength', draft.strength ?? '', value => update('strength', value), { min: 0, max: 1000 }),
@@ -5904,7 +6658,7 @@ window.__ModuleLoader__.load({
5904
6658
  const draft = photographyDraftFor(state), projectId = state.activeProjectId, work = state.photographyWork?.[projectId] || {}, edit = state.photographyEdits?.[projectId]
5905
6659
  const busy = photographyBusy(work)
5906
6660
  const conflict = draft && draft.baseRevision !== state.selected?.scene?.revision
5907
- const disabled = busy || conflict, errors = draft ? photographyErrors(draft) : []
6661
+ const disabled = busy || conflict || state.photographyReuse?.[projectId]?.planning, errors = draft ? photographyErrors(draft) : []
5908
6662
  const camera = draft?.cameras.find(item => item.id === draft.cameraId), light = draft?.lights.find(item => item.id === draft.lightId)
5909
6663
  const update = (kind, path) => value => actions.updatePhotography(kind, path, value)
5910
6664
  const numeric = (label, field, value, change, options = {}) => el('label', { className: 'db-row' }, label, el('input', {
@@ -5923,6 +6677,20 @@ window.__ModuleLoader__.load({
5923
6677
  const aimLocked = camera && photographyAimLocked(draft, camera)
5924
6678
  const reuse = state.photographyReuse?.[projectId] || {}, sourceCamera = reuse.source?.nodes.cameras.find(item => item.id === reuse.cameraId)?.definition
5925
6679
  const reuseStale = reuse.source && (reuse.projectsRoot !== state.projectsRoot || reuse.baseRevision !== draft?.baseRevision || draft?.projectsRoot !== state.projectsRoot)
6680
+ const boundaryMode = reuse.mode === 'bounds', boundaryRequest = boundaryMode ? photographyBoundaryRequest(state, reuse, draft) : null
6681
+ const productMembers = (title, scene, field) => {
6682
+ const selected = reuse[field] || [], choices = photographyProductEntities(scene)
6683
+ const all = choices.filter(e => !e.tags?.includes('environment')).map(e => e.id)
6684
+ return Disclosure({ state, actions }, `photo-boundary:${field}`, title, { 'data-photography-members': field, style: { minWidth: 0 } },
6685
+ el('div', { className: 'db-inline' },
6686
+ Button({ action: `photo-members-all:${field}`, disabled: disabled || all.length > 128, onClick: () => actions.setPhotographySource(field, all), children: t('photo.boundsAll') }),
6687
+ Button({ action: `photo-members-clear:${field}`, disabled, onClick: () => actions.setPhotographySource(field, []), children: t('photo.boundsClear') })),
6688
+ el('div', { style: { maxHeight: '220px', overflowY: 'auto', minWidth: 0 } }, choices.map(e => el('label', { key: e.id, style: { display: 'flex', gap: '8px', margin: '6px 0', minWidth: 0 } },
6689
+ el('input', { type: 'checkbox', 'data-field': `photo-${field}:${e.id}`, checked: selected.includes(e.id), disabled: disabled || selected.length >= 128 && !selected.includes(e.id), style: { flex: 'none' },
6690
+ onChange: event => actions.setPhotographySource(field, event.target.checked ? [...selected, e.id] : selected.filter(id => id !== e.id)) }),
6691
+ el('span', { style: { overflowWrap: 'anywhere', minWidth: 0 } }, e.label || e.id)))))
6692
+ }
6693
+
5926
6694
  return el('section', { className: 'db-card', 'data-photography-editor': projectId },
5927
6695
  CameraFitEditor({ state, actions }),
5928
6696
  el('h4', null, t('photo.title')), el('p', { className: 'db-muted' }, t('photo.help')),
@@ -5930,23 +6698,34 @@ window.__ModuleLoader__.load({
5930
6698
  el('p', { className: 'db-muted', 'data-photography-base': draft.baseRevision }, t('photo.base', { revision: draft.baseRevision })),
5931
6699
  conflict ? el('p', { className: 'db-error', 'data-photography-conflict': true }, t('photo.conflict', { before: draft.baseRevision, current: state.selected?.scene?.revision })) : null,
5932
6700
  state.cameraTargetResetSupported ? el('div', { 'data-photography-reuse': true },
5933
- el('h4', null, t('photo.reuseTitle')), el('p', { className: 'db-muted' }, t('photo.reuseHelp')),
6701
+ el('h4', null, t('photo.reuseTitle')), el('p', { className: 'db-muted' }, boundaryMode ? t('photo.boundsHelp') : t('photo.reuseHelp')),
6702
+ state.photographyBoundaryReuseSupported ? choose(t('photo.reuseMode'), 'source-mode', reuse.mode || 'absolute', [['absolute', t('photo.reuseAbsolute')], ['bounds', t('photo.reuseBounds')]], value => actions.setPhotographySource('mode', value))
6703
+ : boundaryMode ? el('div', null, el('p', { className: 'db-error' }, t('photo.boundsUnavailable')), Button({ action: 'photo-use-absolute', onClick: () => actions.setPhotographySource('mode', 'absolute'), children: t('photo.reuseAbsolute') })) : null,
5934
6704
  choose(t('photo.reuseProject'), 'source-project', reuse.sourceProjectId || '', [['', '—'], ...state.projects.filter(item => !item.creationPending).map(item => [item.projectId, item.title || item.projectId])], value => actions.setPhotographySource('project', value)),
5935
6705
  choose(t('photo.reuseRevision'), 'source-revision', reuse.revision || '', [['', '—'], ...(reuse.revisions || []).map(item => [item.revision, item.revision])], value => actions.setPhotographySource('revision', value), reuse.loading || !reuse.revisions?.length),
5936
6706
  reuse.loading ? el('p', { role: 'status' }, t('photo.reuseReading')) : null,
5937
6707
  reuse.source ? el('div', { 'data-photography-source': `${reuse.sourceProjectId}:${reuse.revision}` },
5938
6708
  el('p', { className: 'db-muted' }, t('photo.reuseSource', { project: reuse.sourceProjectId, revision: reuse.revision, digest: shortDigest(reuse.source.digest), count: reuse.source.nodes.lights.length })),
5939
6709
  choose(t('photo.reuseCamera'), 'source-camera', reuse.cameraId, reuse.source.nodes.cameras.map(item => [item.id, item.id]), value => actions.setPhotographySource('camera', value)),
5940
- photographyAim(sourceCamera) === 'entity' ? choose(t('photo.reuseTarget'), 'source-target', reuse.targetEntityId || '', [['', '—'], ...draft.entities.map(item => [item.id, item.id])], value => actions.setPhotographySource('target', value)) : null,
6710
+ !boundaryMode && photographyAim(sourceCamera) === 'entity' ? choose(t('photo.reuseTarget'), 'source-target', reuse.targetEntityId || '', [['', '—'], ...draft.entities.map(item => [item.id, item.id])], value => actions.setPhotographySource('target', value)) : null,
6711
+ boundaryMode ? el('div', null,
6712
+ numeric(t('photo.boundsFrame'), 'source-frame', reuse.sourceFrame, value => actions.setPhotographySource('sourceFrame', value), { min: reuse.source.project.frameStart, max: reuse.source.project.frameEnd, step: 1 }),
6713
+ el('p', { className: 'db-muted' }, t('photo.boundsPick')),
6714
+ productMembers(t('photo.boundsSource', { count: (reuse.sourceEntityIds || []).length }), reuse.source, 'sourceEntityIds'),
6715
+ productMembers(t('photo.boundsDestination', { count: (reuse.destinationEntityIds || []).length }), state.selected?.scene, 'destinationEntityIds'),
6716
+ !boundaryRequest ? el('p', { className: 'db-muted' }, t('photo.boundsInvalid')) : null) : null,
5941
6717
  photographyDirty(draft) ? el('label', { className: 'db-row' }, el('input', { type: 'checkbox', 'data-field': 'photo-source-replace', checked: Boolean(reuse.replaceDraft), disabled: disabled || reuse.loading,
5942
6718
  onChange: event => actions.setPhotographySource('replace', Boolean(event.target.checked)) }), t('photo.reuseReplace')) : null,
5943
6719
  reuseStale ? el('p', { className: 'db-error' }, t('photo.reuseStale')) : null,
5944
- reuse.applied ? el('p', { role: 'status', 'data-photography-reused': true }, t('photo.reuseApplied')) : null,
6720
+ reuse.applied ? el('p', { role: 'status', 'data-photography-reused': true }, draft.boundaryReuse
6721
+ ? t('photo.boundsApplied', { scale: Number(draft.boundaryReuse.scale.toPrecision(5)), sourceCount: draft.boundaryReuse.sourceCount, destinationCount: draft.boundaryReuse.destinationCount, frame: draft.boundaryReuse.sourceFrame }) : t('photo.reuseApplied')) : null,
6722
+
5945
6723
  reuse.unchanged ? el('p', { role: 'status', 'data-photography-reuse-unchanged': true }, t('photo.reuseSame')) : null) : null,
6724
+ reuse.planning ? el('div', { role: 'status' }, t('photo.boundsPlanning'), Button({ action: 'photo-cancel-adaptation', onClick: actions.cancelPhotographyReuse, children: t('photo.boundsCancel') })) : null,
5946
6725
  reuse.error ? el('p', { className: 'db-error', role: 'status', 'data-photography-source-error': true }, reuse.error) : null,
5947
6726
  el('div', { className: 'db-inline' },
5948
6727
  Button({ action: 'photo-source-reload', disabled: disabled || !reuse.sourceProjectId || reuse.loading, onClick: actions.reloadPhotographySource, children: t('photo.reuseReload') }),
5949
- Button({ action: 'photo-reuse', disabled: disabled || reuse.loading || !reuse.source || reuseStale || (photographyDirty(draft) && !reuse.replaceDraft) || (photographyAim(sourceCamera) === 'entity' && !reuse.targetEntityId), onClick: actions.reusePhotography, children: t('photo.reuseApply') }))) : el('p', { className: 'db-muted' }, t('photo.reuseUpgrade')),
6728
+ Button({ action: 'photo-reuse', disabled: disabled || reuse.loading || !reuse.source || reuseStale || (photographyDirty(draft) && !reuse.replaceDraft) || (boundaryMode ? !boundaryRequest : photographyAim(sourceCamera) === 'entity' && !reuse.targetEntityId), onClick: actions.reusePhotography, children: t('photo.reuseApply') }))) : el('p', { className: 'db-muted' }, t('photo.reuseUpgrade')),
5950
6729
  el('div', { className: 'db-grid' },
5951
6730
  el('div', null,
5952
6731
  choose(t('photo.camera'), 'camera', draft.cameraId, draft.cameras.map(item => [item.id, item.id]), id => actions.selectPhotography('camera', id)),
@@ -6517,15 +7296,115 @@ window.__ModuleLoader__.load({
6517
7296
  )
6518
7297
  }
6519
7298
 
7299
+ function MotionEditor(ctx) {
7300
+ const { state, actions } = ctx, draft = motionDraftFor(state), work = state.motionWork?.[motionKey(state)] || {}
7301
+ if (!draft) return null
7302
+ const available = state.motionPreviewSupported && state.editableSnapshotAvailability?.available === true
7303
+ const busy = Boolean(work.busy), frozen = busy || Boolean(draft.result) || state.busy.patch, stale = draft.baseRevision !== state.currentRevision
7304
+ const invalid = !validMotionDraft(draft), result = draft.result
7305
+ const fullFrameChecked = result?.frameAudit?.schemaVersion === 'deepblend.motion-frame-audit-summary/v1' && result.frameAudit.scope === 'evaluated-mesh-vertices'
7306
+ && result.frameAudit.frameStart === result.frameStart && result.frameAudit.frameEnd === result.frameEnd
7307
+ && result.frameAudit.frameCount === result.video?.frames && result.frameAudit.cameraId === result.cameraId
7308
+ && Array.isArray(result.frameAudit.entityIds) && editorEqual(result.frameAudit.entityIds, [...draft.entityIds].sort())
7309
+ && /^[a-f0-9]{64}$/.test(result.frameAudit.checkpointSha256 || '')
7310
+ const value = (field, label, min, max, step) => el('label', { className: 'db-row' }, label, el('input', {
7311
+ className: 'db-input', type: 'number', 'data-field': `motion-${field}`, value: draft[field], min, max, step, disabled: frozen,
7312
+ onChange: event => actions.setMotionValue(field, event.target.value), style: { width: '100px' } }))
7313
+ return el('section', { className: 'db-card', 'data-motion-editor': true },
7314
+ el('h4', null, t('motion.title')), el('p', { className: 'db-muted' }, t('motion.help')),
7315
+ !available ? el('p', { role: 'status', className: 'db-muted' }, t('motion.local')) : null,
7316
+ el('label', { className: 'db-row' }, t('motion.camera'), el('select', { className: 'db-input', 'data-field': 'motion-camera', value: draft.cameraId, disabled: frozen,
7317
+ onChange: event => actions.setMotionValue('cameraId', event.target.value) }, draft.cameras.map(id => el('option', { key: id, value: id, disabled: Boolean(draft.cameraRestrictions?.[id]) },
7318
+ draft.cameraRestrictions?.[id] === 'animated' ? t('motion.cameraAnimatedOption', { camera: id })
7319
+ : draft.cameraRestrictions?.[id] === 'targeted' ? t('motion.cameraTargetedOption', { camera: id }) : id)))),
7320
+ draft.cameraRestrictions?.[draft.cameraId] ? el('p', { className: 'db-muted', role: 'status', 'data-motion-camera-restriction': draft.cameraRestrictions[draft.cameraId] },
7321
+ draft.cameraRestrictions[draft.cameraId] === 'animated' ? t('motion.cameraAnimated') : t('motion.cameraTargeted')) : null,
7322
+ draft.taggedOverflow ? el('p', { className: 'db-error', role: 'status' }, t('motion.tooMany')) : null,
7323
+ Disclosure(ctx, 'motion-parts', t('motion.subject'), {},
7324
+ draft.completeEntityIds?.length ? Button({ action: 'motion-whole-lamp', disabled: frozen, onClick: () => actions.setMotionValue('entityIds', draft.completeEntityIds), children: t('motion.wholeLamp') }) : null,
7325
+ draft.taggedEntityIds?.length ? Button({ action: 'motion-tagged', disabled: frozen, onClick: () => actions.setMotionValue('entityIds', draft.taggedEntityIds), children: t('motion.tagged') }) : null,
7326
+ draft.taggedEntityIds?.length ? el('p', { className: 'db-muted' }, t('motion.taggedHint')) : null,
7327
+ el('div', { style: { maxHeight: '200px', overflowY: 'auto' } }, draft.entities.map(entity => el('label', { className: 'db-row', key: entity.id },
7328
+ el('input', { type: 'checkbox', 'data-field': 'motion-part', 'data-entity-id': entity.id, checked: draft.entityIds.includes(entity.id),
7329
+ disabled: frozen || entity.visible === false || !draft.entityIds.includes(entity.id) && draft.entityIds.length >= 128,
7330
+ onChange: event => actions.setMotionValue('entityIds', event.target.checked ? [...draft.entityIds, entity.id] : draft.entityIds.filter(id => id !== entity.id)) }), entity.id, entity.visible === false ? t('motion.hidden') : '')))),
7331
+ value('seconds', t('motion.duration'), 1, 10, 1), value('amount', t('motion.amount'), 1, 20, 1),
7332
+ el('label', { className: 'db-row' }, t('motion.direction'), el('select', { className: 'db-input', 'data-field': 'motion-direction', value: draft.direction, disabled: frozen,
7333
+ onChange: event => actions.setMotionValue('direction', event.target.value) },
7334
+ el('option', { value: 'forward' }, t('motion.forward')), el('option', { value: 'backward' }, t('motion.backward')))),
7335
+ el('label', { className: 'db-row' }, el('input', { type: 'checkbox', 'data-field': 'motion-extend', checked: draft.allowRangeExtension, disabled: frozen,
7336
+ onChange: event => actions.setMotionValue('allowRangeExtension', event.target.checked) }), t('motion.extend')),
7337
+ result?.saveAttempted && !work.error && !busy ? el('p', { role: 'status', className: 'db-muted' }, t('motion.uncertain'))
7338
+ : stale && !result?.saveAttempted ? el('p', { className: 'db-error', role: 'status' }, t('motion.stale'))
7339
+ : invalid && !result ? el('p', { className: 'db-muted' }, t('motion.invalid')) : null,
7340
+ el('p', { className: 'db-muted' }, t('motion.limit')),
7341
+ fullFrameChecked ? el('p', { className: 'db-muted', 'data-motion-full-frame-check': true }, t('motion.fullCheck')) : null,
7342
+ fullFrameChecked && result.frameAudit.savedAuditSupported === true ? el('p', { className: 'db-muted', 'data-motion-saved-frame-check': true }, t('motion.savedCheck')) : null,
7343
+ result?.saveAttempted && !busy ? el('p', { className: 'db-muted' }, t('motion.abandonHelp')) : null,
7344
+ result ? el('video', { controls: true, preload: 'metadata', 'data-motion-video': result.id, style: { display: 'block', width: '100%', maxWidth: '480px' },
7345
+ src: projectRoute(draft.projectId, `/motion-previews/${result.id}/video`) }) : null,
7346
+ el('div', { className: 'db-inline', style: { flexWrap: 'wrap' } },
7347
+ !result ? Button({ action: 'motion-preview', tone: 'primary', disabled: !available || busy || stale || invalid || Object.values(state.busy).some(Boolean), onClick: actions.previewMotion, children: work.busy === 'preview' ? t('motion.generating') : t('motion.preview') }) : null,
7348
+ work.busy === 'preview' ? Button({ action: 'motion-cancel', onClick: actions.cancelMotion, children: t('motion.cancel') }) : null,
7349
+ result ? Button({ action: 'motion-save', tone: 'primary', disabled: !available || busy || draft.storageError || stale && !result.saveAttempted || result.expiresAt <= Date.now() && !result.saveAttempted,
7350
+ onClick: actions.saveMotion, children: work.busy === 'save' ? t('motion.saving') : result.saveAttempted ? t('motion.retry') : t('motion.save') }) : null,
7351
+ !busy ? Button({ action: 'motion-discard', onClick: actions.discardMotion, children: result?.saveAttempted ? t('motion.abandon') : result ? t('motion.discard') : t('motion.reset') }) : null),
7352
+ work.error ? el('p', { className: 'db-error', role: 'alert', 'data-motion-error': true }, work.error) : null,
7353
+ work.message ? el('p', { role: 'status', 'data-motion-message': true }, work.message) : null)
7354
+ }
7355
+
7356
+ function renderSingleFrameLink(state, job) {
7357
+ if (!state.renderFrameDownloadSupported || state.editableSnapshotAvailability?.available !== true
7358
+ || !/^[a-f0-9]{64}$/.test(state.storeIdentity || '') || job.status !== 'completed' || job.delivery?.verified !== true
7359
+ || !/^r[0-9]{4,}$/.test(job.revisionId || '') || !/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,95}$/.test(job.jobId || '')
7360
+ || !Number.isSafeInteger(job.frameStart) || job.frameStart < 1 || job.frameStart > 999999 || job.frameStart !== job.frameEnd) return null
7361
+ // A published still receipt already pins its frame and digest. Polling may
7362
+ // skip provenance for a busy project; do not hide a valid still in that case.
7363
+ const frames = job.delivery?.kind === 'still' ? [job.delivery.image].filter(frame => frame?.frame === job.frameStart)
7364
+ : Array.isArray(job.provenance?.frames) ? job.provenance.frames.filter(frame => frame?.frame === job.frameStart) : []
7365
+ if (frames.length !== 1 || !/^[a-f0-9]{64}$/.test(frames[0].sha256 || '')) return null
7366
+ const sha256 = frames[0].sha256
7367
+ return el('a', { className: 'db-btn', 'data-action': `download-frame:${job.jobId}`,
7368
+ href: projectRoute(state.activeProjectId, `/jobs/${encodeURIComponent(job.jobId)}/frames/${job.frameStart}?revision=${encodeURIComponent(job.revisionId)}&sha256=${sha256}&storeIdentity=${state.storeIdentity}`),
7369
+ download: true }, t('jobs.downloadFrame', { revision: job.revisionId, frame: job.frameStart }))
7370
+ }
7371
+
7372
+ function WideFramePreparation({ state, actions }) {
7373
+ const plan = wideFramePlan(state.selected?.scene), motion = motionDraftFor(state)
7374
+ const available = state.deliveryAspectPresetSupported && /^[a-f0-9]{64}$/.test(state.storeIdentity || '') && plan
7375
+ const pending = available && (projectHasUnsavedDrafts(state) || Boolean(motion?.result || motion?.touched || state.motionWork[motionKey(state)]?.busy))
7376
+ return el('section', { className: 'db-card', 'data-wide-frame': available ? plan.changed ? 'change' : 'ready' : 'unavailable' },
7377
+ el('h4', null, t('aspect.title')),
7378
+ !available ? el('p', { className: 'db-muted' }, t('aspect.unavailable'))
7379
+ : !plan.changed ? el('p', { className: 'db-muted' }, t('aspect.done'))
7380
+ : el('div', null, el('p', { className: 'db-muted' }, t('aspect.help')),
7381
+ plan.profiles.map(item => el('p', { key: item.name, 'data-wide-profile': item.name }, t('aspect.change', { profile: item.name, before: item.before.join('×'), after: item.after.join('×') }))),
7382
+ pending ? el('p', { className: 'db-muted' }, t('aspect.pending')) : null,
7383
+ Button({ action: 'save-wide-frame', tone: 'primary', disabled: pending || Object.values(state.busy).some(Boolean), onClick: actions.saveWideFrame, children: t('aspect.apply') })))
7384
+ }
7385
+
6520
7386
  /** 任务: live progress, cancel, resume, and the approval threshold. */
6521
7387
  function JobsView(ctx) {
6522
7388
  const state = ctx.state
6523
7389
  const actions = ctx.actions
6524
7390
  if (state.activeProjectId === null) return el('div', { 'data-view': 'jobs', className: 'db-muted' }, t('common.noProject'))
6525
7391
  const jobs = state.jobs || []
7392
+ const scene = state.selected?.scene
7393
+ const frame = (value, fallback) => value === '' || value === undefined || value === null ? fallback : Number(value)
7394
+ const start = frame(state.forms.frameStart, scene?.project?.frameStart)
7395
+ const end = frame(state.forms.frameEnd, scene?.project?.frameEnd)
7396
+ const noDeclaredMotion = Array.isArray(scene?.nodes?.animationTracks) && scene.nodes.animationTracks.length === 0
7397
+ && Number.isSafeInteger(start) && Number.isSafeInteger(end) && end > start
7398
+ const wideOutput = ['still-2560x1440', 'video-1920x1080'].includes(state.forms.stillPreset)
7399
+ const profileSizes = ['preview', 'final'].map(name => scene?.renderProfiles?.[name]?.resolution)
7400
+ const sizeKnown = profileSizes.every(size => Array.isArray(size) && size.length === 2 && size.every(n => Number.isSafeInteger(n) && n > 0))
7401
+ const aspectWarning = !wideOutput ? null : !sizeKnown ? 'unknown' : profileSizes.some(([width, height]) => width * 9 !== height * 16) ? 'mismatch' : null
6526
7402
 
6527
7403
  return el('div', { 'data-view': 'jobs' },
6528
7404
  ErrorBox({ error: state.error }),
7405
+ ProjectStorageNotice(state),
7406
+ WideFramePreparation(ctx),
7407
+ MotionEditor(ctx),
6529
7408
  el('div', { className: 'db-card' },
6530
7409
  el('h4', null, t('tab.jobs')),
6531
7410
  jobs.length === 0
@@ -6535,6 +7414,7 @@ window.__ModuleLoader__.load({
6535
7414
  el('span', { className: 'db-mono' }, job.jobId),
6536
7415
  Badge({ tone: statusTone(job.status), children: job.status }),
6537
7416
  el('span', { className: 'db-muted' }, job.type),
7417
+ job.cameraId ? el('span', { className: 'db-muted', 'data-job-camera': job.cameraId }, `${t('jobs.camera')}: ${job.cameraId}`) : null,
6538
7418
  el('span', { className: 'db-muted db-mono' }, t('jobs.frameRange', { start: job.frameStart, end: job.frameEnd })),
6539
7419
  job.approval && job.approval.required ? Badge({ tone: 'warn', name: 'approval', children: t('jobs.approval', { frames: job.approval.frames, threshold: job.approval.threshold }) }) : null,
6540
7420
  job.deliverable ? Badge({ tone: 'ok', children: t('jobs.deliveryVerified') }) : null,
@@ -6545,13 +7425,29 @@ window.__ModuleLoader__.load({
6545
7425
  el('div', { className: 'db-muted', 'data-job-detail': job.jobId }, `${job.detail} · ${job.progress.percent}% · 缺失 ${job.progress.missing} · 损坏 ${job.progress.corrupt}`),
6546
7426
  el('div', { className: 'db-muted', 'data-job-provenance': job.jobId }, jobProvenanceText(job)),
6547
7427
  job.errorCode ? el('div', { className: 'db-error', style: { marginTop: '4px' } }, `${job.errorCode}: ${job.message || ''}`) : null,
6548
- job.delivery ? el('div', { className: 'db-muted db-mono' }, `video ${job.delivery.videoPath || ''}`) : null,
7428
+ renderSingleFrameLink(state, job),
7429
+ state.renderVideoDownloadSupported && state.editableSnapshotAvailability?.available === true
7430
+ && /^[a-f0-9]{64}$/.test(state.storeIdentity || '') && job.status === 'completed' && job.delivery?.verified === true
7431
+ && /^r[0-9]{4,}$/.test(job.revisionId || '') && /^[a-zA-Z0-9][a-zA-Z0-9_-]{0,95}$/.test(job.jobId || '')
7432
+ && /^[a-f0-9]{64}$/.test(job.delivery.sha256 || '')
7433
+ ? el('a', { className: 'db-btn', 'data-action': `download-video:${job.jobId}`,
7434
+ href: projectRoute(state.activeProjectId, `/jobs/${encodeURIComponent(job.jobId)}/video?revision=${encodeURIComponent(job.revisionId)}&sha256=${job.delivery.sha256}&storeIdentity=${state.storeIdentity}`),
7435
+ download: true }, t('jobs.downloadVideo', { revision: job.revisionId }))
7436
+ : job.delivery ? el('div', { className: 'db-muted db-mono' }, `video ${job.delivery.videoPath || ''}`) : null,
6549
7437
  ))),
6550
7438
  ),
6551
7439
 
6552
7440
  el('div', { className: 'db-card' },
6553
7441
  el('h4', null, t('jobs.startDelivery')),
7442
+ noDeclaredMotion ? el('p', { className: 'db-muted', role: 'status', 'data-motion-warning': 'no-declared-tracks' }, t('jobs.noDeclaredMotion')) : null,
6554
7443
  el('div', { className: 'db-inline' },
7444
+ el('label', { className: 'db-muted' }, t('jobs.camera')),
7445
+ el('select', { className: 'db-input', 'data-field': 'render-camera', 'aria-label': t('jobs.camera'), style: { width: 'auto' }, value: state.forms.renderCamera || '',
7446
+ onChange: event => actions.setForm('renderCamera', event.target.value) },
7447
+ el('option', { value: '' }, t('jobs.cameraDefault')),
7448
+ state.forms.renderCamera && !scene?.nodes?.cameras?.some(camera => camera.id === state.forms.renderCamera)
7449
+ ? el('option', { value: state.forms.renderCamera }, state.forms.renderCamera) : null,
7450
+ (scene?.nodes?.cameras || []).map(camera => el('option', { key: camera.id, value: camera.id }, camera.id))),
6555
7451
  el('label', { className: 'db-muted' }, t('jobs.frameStart')),
6556
7452
  el('input', { className: 'db-input', 'data-field': 'frame-start', 'aria-label': t('jobs.frameStart'), style: { width: '90px' }, value: state.forms.frameStart, onChange: event => actions.setForm('frameStart', event.target.value) }),
6557
7453
  el('label', { className: 'db-muted' }, t('jobs.frameEnd')),
@@ -6563,8 +7459,19 @@ window.__ModuleLoader__.load({
6563
7459
  },
6564
7460
  el('option', { value: 'preview' }, 'preview'),
6565
7461
  el('option', { value: 'final' }, 'final')),
7462
+ state.stillImageDeliverySupported ? el('label', { className: 'db-muted' }, t('jobs.deliveryKind')) : null,
7463
+ state.stillImageDeliverySupported ? el('select', { className: 'db-input', 'data-field': 'render-delivery-kind', 'aria-label': t('jobs.deliveryKind'), style: { width: 'auto' }, value: state.forms.deliveryKind || '', onChange: event => actions.setForm('deliveryKind', event.target.value) },
7464
+ el('option', { value: '' }, t('jobs.deliveryVideo')), el('option', { value: 'still' }, t('jobs.deliveryStill'))) : null,
7465
+ state.stillDeliveryPresetSupported || state.videoDeliveryPresetSupported ? el('label', { className: 'db-muted' }, t('jobs.stillPreset')) : null,
7466
+ state.stillDeliveryPresetSupported || state.videoDeliveryPresetSupported ? el('select', { className: 'db-input', 'data-field': 'render-still-preset', 'aria-label': t('jobs.stillPreset'), style: { width: 'auto' }, value: state.forms.stillPreset || '', onChange: event => actions.setForm('stillPreset', event.target.value) },
7467
+ el('option', { value: '' }, t('jobs.stillProfileSize')),
7468
+ state.stillDeliveryPresetSupported ? el('option', { value: 'still-2560x1440' }, t('jobs.still2560')) : null,
7469
+ state.videoDeliveryPresetSupported ? el('option', { value: 'video-1920x1080' }, t('jobs.video1080')) : null) : null,
6566
7470
  Button({ tone: 'primary', action: 'start-render', disabled: state.busy.render, onClick: () => actions.startRender(undefined), children: state.busy.render ? t('scene.submitting') : t('jobs.start') }),
6567
7471
  ),
7472
+ state.forms.stillPreset === 'video-1920x1080' ? el('p', { className: 'db-muted', role: 'status' }, t('jobs.videoPresetHelp', { fps: scene?.project?.fps ?? '—' }))
7473
+ : state.forms.stillPreset || state.forms.deliveryKind ? el('p', { className: 'db-muted', role: 'status' }, t('jobs.stillRange')) : null,
7474
+ aspectWarning ? el('p', { className: 'db-error', role: 'status', 'data-render-aspect-warning': aspectWarning }, aspectWarning === 'mismatch' ? t('aspect.outputMismatch') : t('aspect.outputUnknown')) : null,
6568
7475
  Notice(state.notices.jobs, { marginTop: '8px' }),
6569
7476
  ),
6570
7477
  )
@@ -6643,6 +7550,11 @@ window.__ModuleLoader__.load({
6643
7550
 
6644
7551
  el('div', { className: 'db-card' },
6645
7552
  el('h4', null, t('visual.title')),
7553
+ qa.visual.inputScope?.views?.length ? el('div', { 'data-review-input-scope': qa.visual.inputScope.mode },
7554
+ el('strong', null, t('reviewView.scope', { revision: qa.visual.inputScope.sourceRevision })),
7555
+ qa.visual.inputScope.views.map(view => el('p', { key: view.id, className: 'db-muted', style: { overflowWrap: 'anywhere' },
7556
+ 'data-reviewed-camera': view.cameraId, 'data-reviewed-frame': view.frame }, t('reviewView.scopeItem', {
7557
+ camera: view.cameraId, frame: view.frame, resolution: (view.resolution || []).join('×'), samples: view.samples ?? '—' })))) : null,
6646
7558
  qa.visual.available
6647
7559
  ? el('div', null,
6648
7560
  KeyValues({ entries: [
@@ -6671,7 +7583,8 @@ window.__ModuleLoader__.load({
6671
7583
  function EditableSnapshotView({ state, actions }) {
6672
7584
  const entry = snapshotEntry(state), result = entry?.result, busy = entry?.busy || {}
6673
7585
  const enabled = snapshotSupported(state), working = Object.values(busy).some(Boolean), preparing = result?.state === 'preparing'
6674
- const same = snapshotSameSelection(entry), videos = snapshotVideos(state, entry?.revision)
7586
+ const same = snapshotSameSelection(entry), videos = snapshotVideos(state, entry?.revision), images = snapshotImages(state, entry?.revision)
7587
+ const missingImages = (entry?.imageJobIds || []).filter(id => !images.some(job => job.jobId === id))
6675
7588
  const revisions = state.selected?.revisions || []
6676
7589
  const phases = { writing: t('snapshot.copying'), verifying: t('snapshot.verifying'), publishing: t('snapshot.publishing') }
6677
7590
  const done = result?.phase === 'verifying' ? result.verifiedBytes : result?.writtenBytes
@@ -6689,9 +7602,19 @@ window.__ModuleLoader__.load({
6689
7602
  entry?.videoJobId && !videos.some(job => job.jobId === entry.videoJobId) ? el('option', { value: entry.videoJobId }, entry.videoJobId) : null,
6690
7603
  videos.map(job => el('option', { key: job.jobId, value: job.jobId }, job.jobId))))),
6691
7604
  revisions.length === 0 ? el('p', { className: 'db-muted' }, t('snapshot.noRevision')) : null,
7605
+ state.snapshotImagesSupported ? el('fieldset', { className: 'db-field', style: { marginTop: '12px' }, 'data-snapshot-images': true, disabled: !enabled || working || preparing },
7606
+ el('legend', null, t('snapshot.images')),
7607
+ images.map(job => el('label', { className: 'db-inline', key: job.jobId },
7608
+ el('input', { type: 'checkbox', 'data-field': 'snapshot-image', 'data-job-id': job.jobId, checked: (entry?.imageJobIds || []).includes(job.jobId),
7609
+ disabled: !(entry?.imageJobIds || []).includes(job.jobId) && (entry?.imageJobIds || []).length >= 16,
7610
+ onChange: event => actions.setSnapshotImage(job.jobId, event.target.checked) }),
7611
+ el('span', null, `${job.jobId} · ${job.cameraId || '—'} · ${job.delivery.image.frame} · ${job.delivery.image.width}×${job.delivery.image.height}`))),
7612
+ missingImages.map(id => el('label', { className: 'db-inline db-error', key: id }, el('input', { type: 'checkbox', 'data-field': 'snapshot-image', 'data-job-id': id, checked: true,
7613
+ onChange: event => actions.setSnapshotImage(id, event.target.checked) }), el('span', null, t('snapshot.missingImage', { jobId: id })))),
7614
+ !images.length && !missingImages.length ? el('p', { className: 'db-muted' }, t('snapshot.noImages')) : null) : null,
6692
7615
  el('div', { 'aria-live': 'polite', role: 'status', style: { marginTop: '12px' } },
6693
7616
  busy.cancel ? el('p', null, t('snapshot.cancelling')) : busy.check && !result ? el('p', null, t('snapshot.checking')) : busy.prepare || preparing ? el('p', null, phases[result?.phase] || t('snapshot.preparing')) : null,
6694
- result?.state === 'ready' ? el('p', null, t('snapshot.ready', { revision: result.revision, bytes: snapshotBytes(result.archive.bytes) })) : null,
7617
+ same && result?.state === 'ready' ? el('p', null, t('snapshot.ready', { revision: result.revision, bytes: snapshotBytes(result.archive.bytes) })) : null,
6695
7618
  ['failed', 'cancelled'].includes(result?.state) ? el('p', { className: 'db-muted' }, result.error?.code === 'SNAPSHOT_INTERRUPTED' ? t('snapshot.interrupted') : result.state === 'failed' ? t('snapshot.failed') : t('snapshot.cancelled')) : null,
6696
7619
  result?.state === 'failed' && result.error?.message ? el('p', { className: 'db-error' }, result.error.message) : null,
6697
7620
  (preparing || busy.prepare) && entry?.handle ? el('p', { className: 'db-muted' }, t('snapshot.saved', entry.handle)) : null,
@@ -6701,7 +7624,7 @@ window.__ModuleLoader__.load({
6701
7624
  entry?.handle && !same ? el('p', { className: 'db-muted' }, t('snapshot.newSelection')) : null,
6702
7625
  entry?.storageUnavailable && entry.handle ? el('p', { className: 'db-muted' }, t('snapshot.storage')) : null,
6703
7626
  el('div', { className: 'db-inline', style: { marginTop: '12px' } },
6704
- enabled && result?.state === 'ready' && !entry.issue ? el('a', { className: 'db-btn', 'data-tone': 'primary', href: result.downloadUrl, download: true, 'data-action': 'snapshot-download' }, t('snapshot.download')) : null,
7627
+ enabled && same && result?.state === 'ready' && !entry.issue ? el('a', { className: 'db-btn', 'data-tone': 'primary', href: result.downloadUrl, download: true, 'data-action': 'snapshot-download' }, t('snapshot.download')) : null,
6705
7628
  preparing ? Button({ action: 'snapshot-cancel', disabled: !enabled || busy.cancel || busy.prepare, onClick: actions.cancelEditableSnapshot, children: t('snapshot.cancel') }) : null,
6706
7629
  entry?.issue || entry?.handle && !result ? Button({ action: 'snapshot-check', disabled: !enabled || working, onClick: actions.checkEditableSnapshot, children: t('snapshot.check') }) : null,
6707
7630
  (!preparing || entry?.issue) && !(same && result?.state === 'ready' && !entry.issue) ? Button({ action: 'snapshot-prepare', tone: 'primary', disabled: !enabled || !entry?.revision || working,
@@ -6818,6 +7741,37 @@ window.__ModuleLoader__.load({
6818
7741
  })))
6819
7742
  }
6820
7743
 
7744
+ function ProjectStorageNotice(state) {
7745
+ const storage = state.projectStorage
7746
+ const status = ['low', 'observed'].includes(storage?.status) && Number.isSafeInteger(storage.availableBytes) && storage.availableBytes >= 0
7747
+ ? storage.status : 'unknown'
7748
+ const space = status === 'unknown' ? null : assetBytes(storage.availableBytes)
7749
+ return el('section', { className: status === 'low' ? 'db-error' : 'db-muted', 'data-project-storage': status, role: 'status' },
7750
+ el('p', null, status === 'low' ? t('storage.low', { space }) : status === 'observed' ? t('storage.observed', { space }) : t('storage.unknown')), el('p', null, t('storage.limit')))
7751
+ }
7752
+
7753
+ function ImageInputReadiness({ state, actions }) {
7754
+ const probe = state.imageInputProbe || { busy: false, result: null }
7755
+ const available = state.imageInputProbeSupported && state.editableSnapshotAvailability?.available === true
7756
+ const result = available ? probe.result : null
7757
+ const message = result?.status === 'pass' ? t('readiness.imagePass')
7758
+ : result?.reason === 'authentication' ? t('readiness.imageAuth')
7759
+ : result?.reason === 'credentials_missing' ? t('readiness.imageCredentials')
7760
+ : result?.reason === 'image_unsupported' ? t('readiness.imageUnsupported')
7761
+ : result?.reason === 'model_unavailable' ? t('readiness.imageModel')
7762
+ : ['provider_unavailable', 'services_missing', 'route_missing'].includes(result?.reason) ? t('readiness.imageRoute')
7763
+ : result?.reason === 'rate_limit' ? t('readiness.imageRate')
7764
+ : ['timeout', 'cancelled'].includes(result?.reason) ? t('readiness.imageTimeout')
7765
+ : result?.reason === 'busy' ? t('readiness.imageBusy') : t('readiness.imageInconclusive')
7766
+ return el('section', { 'data-image-readiness': true },
7767
+ el('h4', null, t('readiness.imageTitle')),
7768
+ el('p', { className: 'db-muted' }, t('readiness.imageHelp')),
7769
+ !available ? el('p', { className: 'db-muted' }, t('readiness.imageLocal')) : null,
7770
+ Button({ action: 'probe-image-input', disabled: !available || probe.busy, onClick: actions.probeImageInput,
7771
+ children: probe.busy ? t('readiness.imageRunning') : t('readiness.imageRun') }),
7772
+ result ? el('p', { role: 'status', 'data-image-readiness-result': result.status, className: result.status === 'pass' ? 'db-muted' : 'db-error' }, message) : null)
7773
+ }
7774
+
6821
7775
  function LighttableWorkspace(ctx) {
6822
7776
  const { state, actions } = ctx, result = lighttableResult(state)
6823
7777
  const comparison = state.view === 'preview' && state.compareMode !== 'result'
@@ -6886,7 +7840,8 @@ window.__ModuleLoader__.load({
6886
7840
  el('label', { className: 'db-field' }, t('workbench.appearance'),
6887
7841
  el('select', { className: 'db-input db-theme', 'data-field': 'workbench-appearance', value: state.appearance || 'system', onChange: event => actions.setAppearance(event.target.value) },
6888
7842
  [['system', t('workbench.system')], ['light', t('workbench.light')], ['dark', t('workbench.dark')]].map(([theme, label]) => el('option', { value: theme }, label)))),
6889
- el('a', { className: 'db-btn', href: ROUTES.diagnostics, download: 'deepblend-diagnostics.json', 'data-action': 'export-diagnostics', title: t('diagnostics.exportHint') }, t('diagnostics.export')))))),
7843
+ el('a', { className: 'db-btn', href: ROUTES.diagnostics, download: 'deepblend-diagnostics.json', 'data-action': 'export-diagnostics', title: t('diagnostics.exportHint') }, t('diagnostics.export')),
7844
+ ImageInputReadiness(ctx))))),
6890
7845
  el('nav', { className: 'db-nav', 'aria-label': t('workbench.navigation') },
6891
7846
  el('div', { className: 'db-journey' }, primary.map(entry => nav(entry.id, entry.id === 'projects' && active && (state.view !== 'projects' || state.projectTask !== 'new') ? t('lighttable.brief') : entry.label))),
6892
7847
  el('div', { className: 'db-secondary-nav' }, secondary.map(entry => nav(entry.id, entry.label)))),
@@ -7486,7 +8441,7 @@ window.__ModuleLoader__.load({
7486
8441
  inspection: { form: inspectionForm, valid: inspectionFormValid },
7487
8442
  assetLibrary: { selection: assetBundleSelection, createDraft: createAssetDraft, buildPatch: buildAssetPatch, error: assetDraftError, key: assetKey },
7488
8443
  referenceBrief: { createDraft: createBriefDraft, buildPatch: buildBriefPatch, dirty: briefDirty, valid: briefValid },
7489
- photographyEditor: { createDraft: createPhotographyDraft, buildPatch: buildPhotographyPatch, errors: photographyErrors, dirty: photographyDirty, draftFor: photographyDraftFor, reuse: reusePhotography },
8444
+ photographyEditor: { boundaryRequest: photographyBoundaryRequest, applyBoundary: applyBoundaryPhotography, createDraft: createPhotographyDraft, buildPatch: buildPhotographyPatch, errors: photographyErrors, dirty: photographyDirty, draftFor: photographyDraftFor, reuse: reusePhotography },
7490
8445
  sceneEditor: { createDraft: createEditorDraft, buildPatch: buildEditorPatch, errors: editorErrors, dirty: editorDirty, previewPair: editorPreviewPair, draftFor: editorDraftFor },
7491
8446
  renderView,
7492
8447
  mountStandalone,