载入中...
搜索中...
未找到
EditorMaterialStudio.cpp
浏览该文件的文档.
32 return eve::editing::failed<void>(EditorStatus::Conflict, RuleId("editor.material.studio-interaction-active"),
37 return eve::editing::failed<void>(EditorStatus::NotFound, RuleId("editor.material.studio-property"),
48 return eve::editing::failed<void>(EditorStatus::Rejected, RuleId("editor.material.studio-no-interaction"),
71 auto operation = target_.authoringTarget().makeSet(selectionFor(target_.authoringTarget()), *activeProperty_,
83 return eve::editing::failed<TransactionReceipt>(begun.code(), RuleId("editor.material.studio-begin"),
88 return eve::editing::failed<TransactionReceipt>(appended.code(), RuleId("editor.material.studio-append"),
94 return eve::editing::failed<TransactionReceipt>(previewed.code(), RuleId("editor.material.studio-preflight"),
115 return eve::editing::failed<void>(EditorStatus::Rejected, RuleId("editor.material.studio-time-regressed"),
133 return eve::editing::failed<void>(EditorStatus::Rejected, RuleId("editor.material.studio-preview-rate"),
151SelectionSnapshot MaterialStudioController::selectionFor(const MaterialDocumentTarget& material) const {
174 return eve::editing::failed<void>(result.code(), RuleId("editor.material.studio-preview-result"),
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
Dotted property path (layout.size) compared and persisted as text.
Definition EditingIds.h:78
Deterministic owning value tree shared by authoring hosts.
Definition EditingValue.h:19
Transaction boundary consumed by editor property and other UI models.
Definition EditorTransactionService.h:17
virtual Result< void > discard()=0
Discard pending work after reverting any provisional preview.
virtual Result< TransactionReceipt > commit()=0
Publish the pending transaction and retain it for undo.
virtual Result< void > append(DomainOperation operation)=0
Append a serializable operation to the pending transaction.
virtual bool active() const noexcept=0
Whether a transaction is currently pending.
virtual Result< EditorDryRunReport > preview()=0
Validate the pending transaction without publishing target state.
virtual Result< TransactionId > begin(TransactionSpec specification)=0
Begin an explicit transaction without mutating its target.
Host boundary that owns creation and teardown of an isolated preview scene.
Definition EditorMaterialPreview.h:40
Revision-safe material preview request and publication service.
Definition EditorMaterialPreview.h:49
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
Result< void > beginInteraction(PropertyPath path)
Start one coalesced property gesture from the current live document revision.
Definition EditorMaterialStudio.cpp:30
Result< TransactionReceipt > commitInteraction()
Atomically publish the final draft value as one undoable transaction.
Definition EditorMaterialStudio.cpp:66
MaterialStudioController(DocumentId document, MaterialPublishingTarget &target, IEditorTransactionBackend &transactions, MaterialPreviewService &previews, IMaterialPreviewRenderer &renderer)
Material studio controller.
Definition EditorMaterialStudio.cpp:15
Result< void > setPreviewSettings(MaterialPreviewSettings settings)
Replace preview geometry, camera, resolution, and environment settings.
Definition EditorMaterialStudio.cpp:24
Result< void > tick(std::uint64_t monotonicMilliseconds)
Render a dirty preview when the injected monotonic time reaches the rate limit.
Definition EditorMaterialStudio.cpp:112
MaterialStudioState state() const
Return an owning snapshot suitable for any developer or in-game UI host.
Definition EditorMaterialStudio.cpp:139
Result< void > setPreviewRate(double framesPerSecond)
Set the maximum preview rate; valid range is 1 to 240 Hz.
Definition EditorMaterialStudio.cpp:131
Result< void > updateInteraction(EditorValue value)
Update the owned draft and mark its isolated preview dirty.
Definition EditorMaterialStudio.cpp:46
Result< void > refreshPreview()
Force an isolated preview of the current draft or live document.
Definition EditorMaterialStudio.cpp:127
Result< void > cancelInteraction()
Abandon the draft without changing the live material.
Definition EditorMaterialStudio.cpp:104
UI-neutral, serializable material authoring target.
Definition MaterialTarget.h:32
PropertySchema schema(const SelectionSnapshot &selection) const override
Schema.
Definition MaterialTarget.cpp:99
std::vector< EditorDiagnostic > validate() const
Validate cross-field authoring rules without mutating the target.
Definition MaterialTarget.cpp:192
Result< DomainOperation > makeSet(const SelectionSnapshot &selection, const PropertyPath &path, const EditorValue &value, PropertySetMode mode) const override
Make set.
Definition MaterialTarget.cpp:109
Candidate-first material operation target with live commit/undo publication.
Definition MaterialTarget.h:96
MaterialDocumentTarget & authoringTarget()
Mutable authoring document used by property inspectors.
Definition MaterialTarget.h:124
Result< void > noOp(std::vector< Diagnostic > diagnostics={})
Construct a successful void result for an operation that made no change.
Definition EditingResult.h:58
Definition ActionPreviewController.cpp:6
material_editing::MaterialDocumentTarget MaterialDocumentTarget
Definition EditorMaterialTarget.h:9
Definition Container.h:602
PropertyDescriptorLookup find(const PropertyPath &path) const
Finds find.
Definition EditingProperty.cpp:9
std::vector< SelectionItem > items
Definition EditingSelection.h:22
std::optional< SelectionItem > primary
Definition EditingSelection.h:23
Camera, mesh and environment settings for an isolated material preview.
Definition EditorMaterialPreview.h:12
Observable state for a host-rendered real-time material studio.
Definition EditorMaterialStudio.h:17
bool interactionActive
Definition EditorMaterialStudio.h:18
Revision documentRevision
Definition EditorMaterialStudio.h:21
Revision previewRevision
Definition EditorMaterialStudio.h:22
std::string previewArtifact
Definition EditorMaterialStudio.h:23
PropertyPath activeProperty
Definition EditorMaterialStudio.h:20
std::vector< EditorDiagnostic > diagnostics
Definition EditorMaterialStudio.h:24