瀏覽代碼

refine checks to determine whether or not the port is exposed on frame

Kyle Belfort 5 年之前
父節點
當前提交
7545b1c507
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      nodeEditor/src/diagram/nodePort.ts
  2. 1 1
      src/Materials/Node/nodeMaterialBlockConnectionPoint.ts

+ 1 - 1
nodeEditor/src/diagram/nodePort.ts

@@ -51,7 +51,7 @@ export class NodePort {
     }
 
     public get exposedOnFrame() {
-        return this._exposedOnFrame;
+        return this._exposedOnFrame || this.connectionPoint.isConnected;
     }
 
     public set exposedOnFrame(value: boolean) {

+ 1 - 1
src/Materials/Node/nodeMaterialBlockConnectionPoint.ts

@@ -178,7 +178,7 @@ export class NodeMaterialConnectionPoint {
      * Gets a boolean indicating that the current point is connected
      */
     public get isConnected(): boolean {
-        return this.connectedPoint !== null || this.isConnectedInFragmentShader || this.isConnectedInVertexShader || this.isConnectedToInputBlock;
+        return this.connectedPoint !== null || this.isConnectedInFragmentShader || this.isConnectedInVertexShader || this.isConnectedToInputBlock || this._endpoints.length > 0;
     }
 
     /**