Can somebody explain please why this code works fine:
hou.node("/obj/").createNode('geo', 'test')
But this does not?
name = hou.ui.readInput('name') hou.node("/obj/").createNode('geo', name) Traceback (most recent call last): File "<console>", line 1, in <module> File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.390/houdini/python2.7libs\houpythonportion\ui.py", line 1035, in decorator func, *args, **kwargs File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.390/houdini/python2.7libs\hdefereval.py", line 45, in executeInMainThreadWithResult return _queueDeferred(code, args, kwargs, block=True) File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.390/houdini/python2.7libs\hdefereval.py", line 104, in _queueDeferred raise exc_info[1] TypeError: in method 'Node_createNode', argument 3 of type 'char const *'
Basically it generates error if i let user set custom name for the node via readInput() method.
The problem is probably simple but i can’t sort why...
Thanks for any help!