I can see from the calculator example how a nodes widget (e.g. the QLineEdit widget in NumberSourceDataModel) can output data 'downstream' in the nodegraph via the data_updated signal and subsequent call to the out_data() method. However, this process does not involve rerunning the nodes compute() method when a widget is updated and forces all node input variables to be additional nodes in the tree.
If I want to have a nodes widget play a part in the computation of the result (e.g. a 'math' node with 2 inputs connections and a QCombo box for selecting the math operation) what is a suitable approach? Move the computation of the result to the out_data() method and have an empty compute() method?
I can see from the calculator example how a nodes widget (e.g. the QLineEdit widget in NumberSourceDataModel) can output data 'downstream' in the nodegraph via the data_updated signal and subsequent call to the out_data() method. However, this process does not involve rerunning the nodes compute() method when a widget is updated and forces all node input variables to be additional nodes in the tree.
If I want to have a nodes widget play a part in the computation of the result (e.g. a 'math' node with 2 inputs connections and a QCombo box for selecting the math operation) what is a suitable approach? Move the computation of the result to the out_data() method and have an empty compute() method?