载入中...
搜索中...
未找到
MaterialEditorModule.cpp
浏览该文件的文档.
27class AutomationMaterialAssetResolver final : public material_editing::IMaterialRuntimeAssetResolver {
46 ecs::EntityHandle handle{ecs::current(), std::type_index(typeid(graphics::Renderable3D)), id, generation};
50editor::EditorValue runtimeMaterialSnapshot(const graphics::Renderable3D::MeshRenderer& renderer) {
55 (*properties)["shading.tint"] = editor::EditorValue::Array{double(renderer.r), double(renderer.g),
70 std::vector<std::string_view> types() const override { return {"material", "material-renderable3d"}; }
87 auto* renderable = findRenderable(static_cast<std::uint32_t>(*id), static_cast<std::uint32_t>(*generation));
93 if (renderer->material || renderer->texture || renderer->normalTexture || renderer->heightTexture ||
99 auto sink = std::make_shared<material_editing::Renderable3DMaterialRuntimeSink>(renderable, &assets);
100 auto publishing = std::make_unique<material_editing::MaterialPublishingTarget>(target.value(), sink.get());
126void MaterialEditorModule::expose(ssq::Table& table) { table.addClass(name, MaterialEditorModule::create, false); }
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
Deterministic owning value tree shared by authoring hosts.
Definition EditingValue.h:19
Multi-provider extension point for domain-specific automation target creation.
Definition EditorAutomationTargetFactory.h:22
UI-neutral, serializable material authoring target.
Definition MaterialTarget.h:32
EditorValue snapshotValue() const override
Capture deterministic content suitable for DocumentService persistence.
Definition MaterialTarget.cpp:158
editor::Result< editor::AutomationOwnedTarget > create(const editor::TargetId &target, std::string_view type, const editor::EditorValue::Object &request) override
Create a domain target from an automation request. @ownership Success transfers the target and any su...
Definition MaterialEditorModule.cpp:72
std::vector< std::string_view > types() const override
Stable target type names this factory accepts.
Definition MaterialEditorModule.cpp:70
Composition adapter that contributes material editing commands and automation targets.
Definition MaterialEditorModule.h:12
editing::Result< void > registerEditingCommands(editing::IEditingCommandRegistry ®istry)
Register Material-owned property commands with a generic editing host.
Definition MaterialEditingCommands.cpp:30
Definition Container.h:602
Target plus optional borrowed-dependency owner returned by an automation factory.
Definition EditorAutomationTargetFactory.h:15
std::unique_ptr< IEditableTarget > target
Definition EditorAutomationTargetFactory.h:18
bool receiveLight
Definition RenderSystem3D.h:255
float parallaxScale
Definition RenderSystem3D.h:249
bool receiveShadow
Definition RenderSystem3D.h:257