|
|
|
@ -1,15 +1,17 @@
|
|
|
|
|
import { Intent } from "@blueprintjs/core";
|
|
|
|
|
import { action, autorun, observable, toJS } from "mobx";
|
|
|
|
|
import { end } from "xaop";
|
|
|
|
|
import { ConverMaterialData } from "../../Add-on/ExportData";
|
|
|
|
|
import { app } from "../../ApplicationServices/Application";
|
|
|
|
|
import { Singleton } from "../../Common/Singleton";
|
|
|
|
|
import { UpdateDraw } from "../../Common/Status";
|
|
|
|
|
import { IGoodProps, PhysicalMaterialRecord } from "../../DatabaseServices/PhysicalMaterialRecord";
|
|
|
|
|
import { TextureTableRecord } from "../../DatabaseServices/Texture";
|
|
|
|
|
import { MaterialEditor } from "../../Editor/MaterialEditor";
|
|
|
|
|
import { IncrementData } from "../../Reactor/SyncDataReactor";
|
|
|
|
|
import { IDirectoryProps } from "../Components/SourceManage/CommonPanel";
|
|
|
|
|
import { AppToaster } from "../Components/Toaster";
|
|
|
|
|
import { TextureStore } from "./TextureStore";
|
|
|
|
|
import { UpdateDraw } from "../../Common/Status";
|
|
|
|
|
|
|
|
|
|
let oldFullStatus = false;
|
|
|
|
|
|
|
|
|
@ -133,6 +135,13 @@ export class MaterialStore extends Singleton
|
|
|
|
|
this.Material.map = this.textureMaping.textureId;
|
|
|
|
|
this.Material.bumpMap = this.bumpMaping.textureId;
|
|
|
|
|
this.Material.roughnessMap = this.roughnessMaping.textureId;
|
|
|
|
|
|
|
|
|
|
//同步到效果图
|
|
|
|
|
if (app.SyncDataReactor.Enable)
|
|
|
|
|
{
|
|
|
|
|
let d: IncrementData = { Add: { Entitys: [], Materials: [] }, Change: { Entitys: [], Materials: [ConverMaterialData(this.Material)] }, Delete: { Entitys: [], Materials: [] } };
|
|
|
|
|
app.WebSocket.Send(JSON.stringify(d));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
UpdateMaterial = async () =>
|
|
|
|
|
{
|
|
|
|
|