浏览代码

Update the block list depending on the current mode

Popov72 5 年之前
父节点
当前提交
fe460bcfdc
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      nodeEditor/src/components/nodeList/nodeListComponent.tsx

+ 7 - 0
nodeEditor/src/components/nodeList/nodeListComponent.tsx

@@ -183,10 +183,17 @@ export class NodeListComponent extends React.Component<INodeListComponentProps,
         switch (this.props.globalState.mode) {
             case NodeMaterialModes.Material:
                 delete allBlocks["PostProcess"];
+                delete allBlocks["Particle"];
                 break;
             case NodeMaterialModes.PostProcess:
                 delete allBlocks["Animation"];
                 delete allBlocks["Mesh"];
+                delete allBlocks["Particle"];
+                break;
+            case NodeMaterialModes.Particle:
+                delete allBlocks["Animation"];
+                delete allBlocks["Mesh"];
+                delete allBlocks["PostProcess"];
                 break;
         }