未验证 提交 4c9de1ff 编写于 作者: M Michael Herzog 提交者: GitHub

Merge pull request #16955 from martinRenou/fix_nodematerial_copy

Nodes: Fix missing return statement in copy functions
......@@ -202,6 +202,8 @@ CameraNode.prototype.copy = function ( source ) {
}
return this;
};
CameraNode.prototype.toJSON = function ( meta ) {
......
......@@ -34,6 +34,8 @@ ColorsNode.prototype.copy = function ( source ) {
this.index = source.index;
return this;
};
ColorsNode.prototype.toJSON = function ( meta ) {
......
......@@ -40,6 +40,8 @@ LightNode.prototype.copy = function ( source ) {
this.scope = source.scope;
return this;
};
LightNode.prototype.toJSON = function ( meta ) {
......
......@@ -84,6 +84,8 @@ NormalNode.prototype.copy = function ( source ) {
this.scope = source.scope;
return this;
};
NormalNode.prototype.toJSON = function ( meta ) {
......
......@@ -114,6 +114,8 @@ PositionNode.prototype.copy = function ( source ) {
this.scope = source.scope;
return this;
};
PositionNode.prototype.toJSON = function ( meta ) {
......
......@@ -43,6 +43,8 @@ ResolutionNode.prototype.copy = function ( source ) {
this.renderer = source.renderer;
return this;
};
ResolutionNode.prototype.toJSON = function ( meta ) {
......
......@@ -43,6 +43,8 @@ ScreenUVNode.prototype.copy = function ( source ) {
this.resolution = source.resolution;
return this;
};
ScreenUVNode.prototype.toJSON = function ( meta ) {
......
......@@ -36,6 +36,8 @@ UVNode.prototype.copy = function ( source ) {
this.index = source.index;
return this;
};
UVNode.prototype.toJSON = function ( meta ) {
......
......@@ -29,6 +29,8 @@ BlinnExponentToRoughnessNode.prototype.copy = function ( source ) {
this.blinnExponent = source.blinnExponent;
return this;
};
BlinnExponentToRoughnessNode.prototype.toJSON = function ( meta ) {
......
......@@ -71,6 +71,8 @@ RoughnessToBlinnExponentNode.prototype.copy = function ( source ) {
this.texture = source.texture;
return this;
};
RoughnessToBlinnExponentNode.prototype.toJSON = function ( meta ) {
......
......@@ -47,6 +47,8 @@ AttributeNode.prototype.copy = function ( source ) {
this.type = source.type;
return this;
};
AttributeNode.prototype.toJSON = function ( meta ) {
......
......@@ -102,6 +102,8 @@ ConstNode.prototype.copy = function ( source ) {
this.parse( source.src, source.useDefine );
return this;
};
ConstNode.prototype.toJSON = function ( meta ) {
......
......@@ -70,6 +70,8 @@ FunctionCallNode.prototype.copy = function ( source ) {
this.value = source.value;
return this;
};
FunctionCallNode.prototype.toJSON = function ( meta ) {
......
......@@ -226,6 +226,8 @@ FunctionNode.prototype.copy = function ( source ) {
if ( source.type !== undefined ) this.type = source.type;
return this;
};
FunctionNode.prototype.toJSON = function ( meta ) {
......
......@@ -38,6 +38,8 @@ InputNode.prototype.copy = function ( source ) {
if ( source.readonly !== undefined ) this.readonly = source.readonly;
return this;
};
InputNode.prototype.createJSONNode = function ( meta ) {
......
......@@ -147,6 +147,8 @@ Node.prototype = {
if ( source.userData !== undefined ) this.userData = JSON.parse( JSON.stringify( source.userData ) );
return this;
},
createJSONNode: function ( meta ) {
......
......@@ -43,6 +43,8 @@ VarNode.prototype.copy = function ( source ) {
this.type = source.type;
this.value = source.value;
return this;
};
VarNode.prototype.toJSON = function ( meta ) {
......
......@@ -142,6 +142,8 @@ BlurNode.prototype.copy = function ( source ) {
this.blurX = source.blurX;
this.blurY = source.blurY;
return this;
};
BlurNode.prototype.toJSON = function ( meta ) {
......
......@@ -113,6 +113,8 @@ ColorAdjustmentNode.prototype.copy = function ( source ) {
this.adjustment = source.adjustment;
this.method = source.method;
return this;
};
ColorAdjustmentNode.prototype.toJSON = function ( meta ) {
......
......@@ -52,6 +52,8 @@ LuminanceNode.prototype.copy = function ( source ) {
this.rgb = source.rgb;
return this;
};
LuminanceNode.prototype.toJSON = function ( meta ) {
......
......@@ -28,6 +28,8 @@ BoolNode.prototype.copy = function ( source ) {
this.value = source.value;
return this;
};
BoolNode.prototype.toJSON = function ( meta ) {
......
......@@ -33,6 +33,8 @@ ColorNode.prototype.copy = function ( source ) {
this.value.copy( source );
return this;
};
ColorNode.prototype.toJSON = function ( meta ) {
......
......@@ -84,6 +84,8 @@ CubeTextureNode.prototype.copy = function ( source ) {
if ( source.bias ) this.bias = source.bias;
return this;
};
CubeTextureNode.prototype.toJSON = function ( meta ) {
......
......@@ -28,6 +28,8 @@ FloatNode.prototype.copy = function ( source ) {
this.value = source.value;
return this;
};
FloatNode.prototype.toJSON = function ( meta ) {
......
......@@ -28,6 +28,8 @@ IntNode.prototype.copy = function ( source ) {
this.value = source.value;
return this;
};
IntNode.prototype.toJSON = function ( meta ) {
......
......@@ -51,6 +51,8 @@ Matrix3Node.prototype.copy = function ( source ) {
this.value.fromArray( source.elements );
return this;
};
Matrix3Node.prototype.toJSON = function ( meta ) {
......
......@@ -50,6 +50,8 @@ Matrix4Node.prototype.copy = function ( source ) {
this.scope.value.fromArray( source.elements );
return this;
};
Matrix4Node.prototype.toJSON = function ( meta ) {
......
......@@ -135,6 +135,8 @@ RTTNode.prototype.copy = function ( source ) {
this.saveTo = source.saveTo;
return this;
};
RTTNode.prototype.toJSON = function ( meta ) {
......
......@@ -67,6 +67,8 @@ ReflectorNode.prototype.copy = function ( source ) {
this.scope.mirror = source.mirror;
return this;
};
ReflectorNode.prototype.toJSON = function ( meta ) {
......
......@@ -89,6 +89,8 @@ TextureNode.prototype.copy = function ( source ) {
if ( source.bias ) this.bias = source.bias;
if ( source.project !== undefined ) this.project = source.project;
return this;
};
TextureNode.prototype.toJSON = function ( meta ) {
......
......@@ -33,6 +33,8 @@ Vector2Node.prototype.copy = function ( source ) {
this.value.copy( source );
return this;
};
Vector2Node.prototype.toJSON = function ( meta ) {
......
......@@ -33,6 +33,8 @@ Vector3Node.prototype.copy = function ( source ) {
this.value.copy( source );
return this;
};
Vector3Node.prototype.toJSON = function ( meta ) {
......
......@@ -33,6 +33,8 @@ Vector4Node.prototype.copy = function ( source ) {
this.value.copy( source );
return this;
};
Vector4Node.prototype.toJSON = function ( meta ) {
......
......@@ -144,6 +144,8 @@ NodeMaterial.prototype.copy = function ( source ) {
}
return this;
};
NodeMaterial.prototype.toJSON = function ( meta ) {
......
......@@ -372,6 +372,8 @@ PhongNode.prototype.copy = function ( source ) {
if ( source.environment ) this.environment = source.environment;
if ( source.environmentAlpha ) this.environmentAlpha = source.environmentAlpha;
return this;
};
PhongNode.prototype.toJSON = function ( meta ) {
......
......@@ -41,6 +41,8 @@ RawNode.prototype.copy = function ( source ) {
this.value = source.value;
return this;
};
RawNode.prototype.toJSON = function ( meta ) {
......
......@@ -202,6 +202,8 @@ SpriteNode.prototype.copy = function ( source ) {
if ( source.alpha ) this.alpha = source.alpha;
return this;
};
SpriteNode.prototype.toJSON = function ( meta ) {
......
......@@ -459,6 +459,8 @@ StandardNode.prototype.copy = function ( source ) {
if ( source.environment ) this.environment = source.environment;
return this;
};
StandardNode.prototype.toJSON = function ( meta ) {
......
......@@ -99,6 +99,8 @@ CondNode.prototype.copy = function ( source ) {
this.ifNode = source.ifNode;
this.elseNode = source.elseNode;
return this;
};
CondNode.prototype.toJSON = function ( meta ) {
......
......@@ -243,6 +243,8 @@ MathNode.prototype.copy = function ( source ) {
this.c = source.c;
this.method = source.method;
return this;
};
MathNode.prototype.toJSON = function ( meta ) {
......
......@@ -63,6 +63,8 @@ OperatorNode.prototype.copy = function ( source ) {
this.b = source.b;
this.op = source.op;
return this;
};
OperatorNode.prototype.toJSON = function ( meta ) {
......
......@@ -144,6 +144,8 @@ BumpMapNode.prototype.copy = function ( source ) {
this.value = source.value;
this.scale = source.scale;
return this;
};
BumpMapNode.prototype.toJSON = function ( meta ) {
......
......@@ -95,6 +95,8 @@ NormalMapNode.prototype.copy = function ( source ) {
this.value = source.value;
this.scale = source.scale;
return this;
};
NormalMapNode.prototype.toJSON = function ( meta ) {
......
......@@ -52,6 +52,8 @@ NodePass.prototype.copy = function ( source ) {
this.input = source.input;
return this;
};
NodePass.prototype.toJSON = function ( meta ) {
......
......@@ -97,6 +97,8 @@ NodePostProcessing.prototype = {
this.output = source.output;
return this;
},
toJSON: function ( meta ) {
......
......@@ -54,6 +54,8 @@ CheckerNode.prototype.copy = function ( source ) {
this.uv = source.uv;
return this;
};
CheckerNode.prototype.toJSON = function ( meta ) {
......
......@@ -48,6 +48,8 @@ NoiseNode.prototype.copy = function ( source ) {
this.uv = source.uv;
return this;
};
NoiseNode.prototype.toJSON = function ( meta ) {
......
......@@ -62,6 +62,8 @@ BypassNode.prototype.copy = function ( source ) {
this.code = source.code;
this.value = source.value;
return this;
};
BypassNode.prototype.toJSON = function ( meta ) {
......
......@@ -295,6 +295,8 @@ ColorSpaceNode.prototype.copy = function ( source ) {
this.input = source.input;
this.method = source.method;
return this;
};
ColorSpaceNode.prototype.toJSON = function ( meta ) {
......
......@@ -78,6 +78,8 @@ JoinNode.prototype.copy = function ( source ) {
}
return this;
};
JoinNode.prototype.toJSON = function ( meta ) {
......
......@@ -80,6 +80,8 @@ SwitchNode.prototype.copy = function ( source ) {
this.node = source.node;
this.components = source.components;
return this;
};
SwitchNode.prototype.toJSON = function ( meta ) {
......
......@@ -75,6 +75,8 @@ TimerNode.prototype.copy = function ( source ) {
this.timeScale = source.timeScale;
return this;
};
TimerNode.prototype.toJSON = function ( meta ) {
......
......@@ -44,6 +44,8 @@ UVTransformNode.prototype.copy = function ( source ) {
this.uv = source.uv;
this.position = source.position;
return this;
};
UVTransformNode.prototype.toJSON = function ( meta ) {
......
......@@ -152,6 +152,8 @@ VelocityNode.prototype.copy = function ( source ) {
this.setParams( source.params );
return this;
};
VelocityNode.prototype.toJSON = function ( meta ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册