|
|
@ -16,7 +16,7 @@ import { Curve } from '../../DatabaseServices/Entity/Curve';
|
|
|
|
import { PhysicalMaterialRecord } from '../../DatabaseServices/PhysicalMaterialRecord';
|
|
|
|
import { PhysicalMaterialRecord } from '../../DatabaseServices/PhysicalMaterialRecord';
|
|
|
|
import { Text } from '../../DatabaseServices/Text/Text';
|
|
|
|
import { Text } from '../../DatabaseServices/Text/Text';
|
|
|
|
import { TextureTableRecord } from '../../DatabaseServices/Texture';
|
|
|
|
import { TextureTableRecord } from '../../DatabaseServices/Texture';
|
|
|
|
import { CommandWrap } from '../../Editor/CommandMachine';
|
|
|
|
import { commandMachine, CommandWrap } from '../../Editor/CommandMachine';
|
|
|
|
import { VisualSpaceBox } from '../../Editor/VisualSpaceBox';
|
|
|
|
import { VisualSpaceBox } from '../../Editor/VisualSpaceBox';
|
|
|
|
import { MaterialRendererSingle } from '../Editor/Asset/MaterialRenderer';
|
|
|
|
import { MaterialRendererSingle } from '../Editor/Asset/MaterialRenderer';
|
|
|
|
import { appUi } from '../Layout/ApplicationLayout';
|
|
|
|
import { appUi } from '../Layout/ApplicationLayout';
|
|
|
@ -110,8 +110,19 @@ export class Asset extends React.Component<{ material: PhysicalMaterialRecord; }
|
|
|
|
this.Destroy();
|
|
|
|
this.Destroy();
|
|
|
|
this.assetEl.removeEventListener("dragstart", this.handleStart);
|
|
|
|
this.assetEl.removeEventListener("dragstart", this.handleStart);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
handleDoubleClick = () =>
|
|
|
|
handleDoubleClick = async () =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
await app.Editor.ModalManage.EndExecingCmd();
|
|
|
|
|
|
|
|
if (!commandMachine.CommandStart("编辑材质"))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
AppToaster.show({
|
|
|
|
|
|
|
|
message: "命令正在执行中,无法开始编辑材质!",
|
|
|
|
|
|
|
|
timeout: 5000,
|
|
|
|
|
|
|
|
intent: Intent.WARNING,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.UpdateRenderPreview();
|
|
|
|
this.UpdateRenderPreview();
|
|
|
|
appUi.showMaterialEditor({ material: this.props.material });
|
|
|
|
appUi.showMaterialEditor({ material: this.props.material });
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -203,7 +214,7 @@ export class Asset extends React.Component<{ material: PhysicalMaterialRecord; }
|
|
|
|
e.stopPropagation();
|
|
|
|
e.stopPropagation();
|
|
|
|
const menu = React.createElement(
|
|
|
|
const menu = React.createElement(
|
|
|
|
Menu,
|
|
|
|
Menu,
|
|
|
|
{}, // empty props
|
|
|
|
{ }, // empty props
|
|
|
|
React.createElement(MenuItem, { onClick: this.handleApply, text: "应用到当前选择实体" }),
|
|
|
|
React.createElement(MenuItem, { onClick: this.handleApply, text: "应用到当前选择实体" }),
|
|
|
|
React.createElement(MenuItem, { onClick: this.handleCollection, text: "收藏" }),
|
|
|
|
React.createElement(MenuItem, { onClick: this.handleCollection, text: "收藏" }),
|
|
|
|
React.createElement(MenuItem, { onClick: this.handleDelete, text: "删除" }),
|
|
|
|
React.createElement(MenuItem, { onClick: this.handleDelete, text: "删除" }),
|
|
|
|