Explorar o código

fix shader compile error

Prevent an error on shader compile when linking a param in an input of a subgraph.
Jed %!s(int64=4) %!d(string=hai) anos
pai
achega
71b1e45137
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      hrt/shgraph/ShaderGraph.hx

+ 2 - 1
hrt/shgraph/ShaderGraph.hx

@@ -217,7 +217,8 @@ class ShaderGraph {
 			}
 			allVariables.push(shaderParam.variable);
 			allParameters.push(shaderParam.variable);
-			allParamDefaultValue.push(getParameter(shaderParam.parameterId).defaultValue);
+			if (parametersAvailable.exists(shaderParam.parameterId))
+				allParamDefaultValue.push(getParameter(shaderParam.parameterId).defaultValue);
 		}
 		if (isSubGraph) {
 			var subGraph = Std.downcast(node, hrt.shgraph.nodes.SubGraph);