载入中...
搜索中...
未找到
EditorMaterialPreview.cpp
浏览该文件的文档.
23 if (settings.width < 16 || settings.height < 16 || settings.width > 4096 || settings.height > 4096)
38 return eve::editing::failed<TaskId>(EditorStatus::Rejected, RuleId("editor.material.preview-document"),
56 rendered.diagnostics.insert(rendered.diagnostics.begin(), diagnostics.begin(), diagnostics.end());
76Result<void> MaterialPreviewService::publish(const DocumentId& document, Revision currentRevision,
80 return eve::editing::failed<void>(EditorStatus::NotFound, RuleId("editor.material.preview-task-not-found"),
83 return eve::editing::failed<void>(EditorStatus::Rejected, RuleId("editor.material.preview-document-mismatch"),
86 return eve::editing::failed<void>(EditorStatus::Conflict, RuleId("editor.material.preview-stale"),
A structured explanation of a failed, degraded, or noteworthy result.
Definition Diagnostic.h:94
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
UUID-backed identifier adapter for legacy textual boundaries.
Definition Identity.h:314
const std::string & value() const noexcept
Returns the exact legacy or canonical compatibility spelling.
Definition Identity.h:362
bool empty() const noexcept
True when no compatibility spelling has been assigned.
Definition Identity.h:374
Host boundary that owns creation and teardown of an isolated preview scene.
Definition EditorMaterialPreview.h:40
virtual MaterialPreviewRenderResult render(const MaterialPreviewRenderRequest &request)=0
Render one immutable request without reading or mutating the live game scene.
std::string publishedArtifact(const DocumentId &document) const
Return the most recently published artifact for a document.
Definition EditorMaterialPreview.cpp:98
Result< MaterialPreviewRenderResult > result(const TaskId &task) const
Return one immutable render result.
Definition EditorMaterialPreview.cpp:67
Result< TaskId > render(const DocumentId &document, const MaterialDocumentTarget &material, MaterialPreviewSettings settings, IMaterialPreviewRenderer &renderer)
Validate and render a material snapshot in a unique isolated scene.
Definition EditorMaterialPreview.cpp:33
Result< void > publish(const DocumentId &document, Revision currentRevision, const TaskId &task)
Publish only a successful result matching the current document revision.
Definition EditorMaterialPreview.cpp:76
UI-neutral, serializable material authoring target.
Definition MaterialTarget.h:32
Diagnostic ruleDiagnostic(eve::DiagnosticCode code, RuleId rule, DiagnosticSeverity severity, std::string message)
Build a common diagnostic carrying an open editing rule identity.
Definition EditingResult.h:25
Definition ActionPreviewController.cpp:6
@ PreconditionViolation
@ Failed
Immutable request passed to a renderer-owned isolated preview scene.
Definition EditorMaterialPreview.h:24
StableId sceneId
Definition EditorMaterialPreview.h:25
Renderer output referenced by a stable artifact rather than GPU pointers.
Definition EditorMaterialPreview.h:33
EditorStatus status
Definition EditorMaterialPreview.h:34
std::string artifact
Definition EditorMaterialPreview.h:35
std::vector< EditorDiagnostic > diagnostics
Definition EditorMaterialPreview.h:36
Camera, mesh and environment settings for an isolated material preview.
Definition EditorMaterialPreview.h:12