redraw node for adding widgets after __init__ from
@@ -167,6 +167,8 @@ class BaseNode(NodeObject):
widget.value_changed.connect(lambda k, v: self.set_property(k, v))
widget._node = self
self.view.add_widget(widget)
+ #: redraw node to address calls outside the "__init__" func.
+ self.view.draw_node()
def add_combo_menu(self, name, label='', items=None, tab=None):
"""
@@ -194,6 +196,8 @@ class BaseNode(NodeObject):
widget = NodeComboBox(self.view, name, label, items)
widget.value_changed.connect(lambda k, v: self.set_property(k, v))
self.view.add_widget(widget)
+ #: redraw node to address calls outside the "__init__" func.
+ self.view.draw_node()
def add_text_input(self, name, label='', text='', tab=None):
"""
@@ -220,6 +224,8 @@ class BaseNode(NodeObject):
widget = NodeLineEdit(self.view, name, label, text)
widget.value_changed.connect(lambda k, v: self.set_property(k, v))
self.view.add_widget(widget)
+ #: redraw node to address calls outside the "__init__" func.
+ self.view.draw_node()
def add_checkbox(self, name, label='', text='', state=False, tab=None):
"""
@@ -247,6 +253,8 @@ class BaseNode(NodeObject):
widget = NodeCheckBox(self.view, name, label, text, state)
widget.value_changed.connect(lambda k, v: self.set_property(k, v))
self.view.add_widget(widget)
+ #: redraw node to address calls outside the "__init__" func.
+ self.view.draw_node()
def add_input(self, name='input', multi_input=False, display_name=True,
color=None, locked=False, painter_func=None):
