Skip to content

Commit

Permalink
Relaxed contraints when loading a save #6012
Browse files Browse the repository at this point in the history
  • Loading branch information
deltakosh committed Aug 20, 2019
1 parent afa7050 commit d006ce8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/preview release/babylon.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Materials/Node/Blocks/Fragment/alphaTestBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class AlphaTestBlock extends NodeMaterialBlock {

return this;
}

protected _dumpPropertiesCode() {
var codeString = `${this._codeVariableName}.alphaCutOff = ${this.alphaCutOff};\r\n`;

Expand Down
2 changes: 1 addition & 1 deletion src/Materials/Node/Blocks/transformBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class TransformBlock extends NodeMaterialBlock {
codeString += `${this._codeVariableName}.complementW = ${this.complementW};\r\n`;

return codeString;
}
}
}

_TypeStore.RegisteredTypes["BABYLON.TransformBlock"] = TransformBlock;
2 changes: 1 addition & 1 deletion src/Materials/Node/nodeMaterial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ export class NodeMaterial extends PushMaterial {
continue;
}

outputPoint.connectTo(inputPoint);
outputPoint.connectTo(inputPoint, true);
this._restoreConnections(target, source, map);
continue;
}
Expand Down
5 changes: 3 additions & 2 deletions src/Materials/Node/nodeMaterialBlockConnectionPoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,11 @@ export class NodeMaterialConnectionPoint {
/**
* Connect this point to another connection point
* @param connectionPoint defines the other connection point
* @param ignoreConstraints defines if the system will ignore connection type constraints (default is false)
* @returns the current connection point
*/
public connectTo(connectionPoint: NodeMaterialConnectionPoint): NodeMaterialConnectionPoint {
if (!this.canConnectTo(connectionPoint)) {
public connectTo(connectionPoint: NodeMaterialConnectionPoint, ignoreConstraints = false): NodeMaterialConnectionPoint {
if (!ignoreConstraints && !this.canConnectTo(connectionPoint)) {
throw "Cannot connect two different connection types.";
}

Expand Down

0 comments on commit d006ce8

Please sign in to comment.