Skip to content

Commit

Permalink
Fix #581
Browse files Browse the repository at this point in the history
  • Loading branch information
pragma37 committed Sep 21, 2024
1 parent 788a094 commit 4c7959c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions BlenderMalt/MaltNodes/MaltNode.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,13 @@ def setup(current, new):
except:
current[name].ui_label = name
try:
default = dic['meta']['default']
if isinstance(default, str):
current[name].default_initialization = default
meta = dic['meta']
if 'default_initialization' in meta:
current[name].default_initialization = meta['default_initialization']
else:
default = meta['default']
if isinstance(default, str):
current[name].default_initialization = default
except:
pass
if is_new_socket:
Expand Down
2 changes: 1 addition & 1 deletion BlenderMalt/MaltNodes/Nodes/MaltIONode.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def malt_setup(self, copy=None):
if parameter['io'] in ['out','inout'] and self.is_output:
if parameter['io'] == 'inout':
if 'meta' not in parameter: parameter['meta'] = {}
parameter['meta']['default'] = parameter['name']
parameter['meta']['default_initialization'] = parameter['name']
inputs[parameter['name']] = parameter
if parameter['io'] in ['','in','inout'] and self.is_output == False:
outputs[parameter['name']] = parameter
Expand Down

0 comments on commit 4c7959c

Please sign in to comment.