소스 검색

refresh box to match node color type

Jed974 4 년 전
부모
커밋
5c14b31e43
2개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 0
      hide/view/shadereditor/ShaderEditor.hx
  2. 3 1
      hrt/shgraph/nodes/Combine.hx

+ 1 - 0
hide/view/shadereditor/ShaderEditor.hx

@@ -974,6 +974,7 @@ class ShaderEditor extends hide.view.Graph {
 				currentLink.removeClass("draft");
 				currentLink = null;
 				launchCompileShader();
+				refreshBox(endLinkBox);
 				return true;
 			} else {
 				error("This edge creates a cycle.");

+ 3 - 1
hrt/shgraph/nodes/Combine.hx

@@ -41,13 +41,15 @@ class Combine extends ShaderNode {
 	}
 
 	override public function computeOutputs() {
-		numberOutputs = 1;
+		numberOutputs = 0;
 		if (a != null && !a.isEmpty()) {
 			numberOutputs = 4;
 		} else if (b != null && !b.isEmpty()) {
 			numberOutputs = 3;
 		} else if (g != null && !g.isEmpty()) {
 			numberOutputs = 2;
+		} else if (r != null && !r.isEmpty()) {
+			numberOutputs = 1;
 		}
 		if (numberOutputs == 1) {
 			addOutput("output", TFloat);