소스 검색

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;
         }