|
|
@@ -1806,6 +1806,10 @@ class UtilityCompare(MantisNode):
|
|
|
operation=self.evaluate_input("Comparison")
|
|
|
a = self.evaluate_input("A")
|
|
|
b = self.evaluate_input("B")
|
|
|
+ if a is None:
|
|
|
+ raise GraphError(f"Invalid first input for {self}")
|
|
|
+ if b is None:
|
|
|
+ raise GraphError(f"Invalid second input for {self}")
|
|
|
if isinstance(a, str) and isinstance(b, str) and \
|
|
|
operation not in ['EQUAL', 'NOT_EQUAL']:
|
|
|
raise GraphError("Strings do not have numerical value to"
|
|
|
@@ -1849,7 +1853,7 @@ class UtilityChoose(MantisNode):
|
|
|
|
|
|
def bPrepare(self, bContext = None,):
|
|
|
if self.outputs['Result'].links: # otherwise this doesn't matter as it is not connected.
|
|
|
- prGreen(f"Executing Choose Node {self}")
|
|
|
+ # prGreen(f"Executing Choose Node {self}")
|
|
|
condition = self.evaluate_input("Condition")
|
|
|
if self.evaluate_input('A') is not None and self.evaluate_input('B') is not None:
|
|
|
self.parameters['Result'] = self.evaluate_input('B') if condition else self.evaluate_input('A')
|