PDA

View Full Version : Control houdini from maya RPC


vux
01-10-2012, 08:47 AM
Hi. I use rpc to create nodes in houdini from maya.
I dont undeerstand why this code work in houdini:

hObj = hou.node('/obj').createNode('geo', 'v')
hObj.moveToGoodPosition()
hObj.node('file1').destroy()
hImportFromMaya = hObj.createNode('file','importFromMaya')
hExportToMaya= hObj.createNode('file','exportToMaya')
hImportFromMaya.moveToGoodPosition()
hExportToMaya.moveToGoodPosition()
hExportToMaya.setFirstInput(hImportFromMaya)

and not work in maya.
Maya code:

import houxmlrpc
hou = houxmlrpc.ServerProxy( 'http://localhost:8888' ).hou

hObj = hou.node('/obj').createNode('geo', 'v')
hObj.moveToGoodPosition()
hObj.node('file1').destroy()
hImportFromMaya = hObj.createNode('file','importFromMaya')
hExportToMaya= hObj.createNode('file','exportToMaya')
hImportFromMaya.moveToGoodPosition()
hExportToMaya.moveToGoodPosition()
hExportToMaya.setFirstInput(hImportFromMaya)

vux
01-12-2012, 06:26 AM
it works up to last line:
hExportToMaya.setFirstInput(hImportFromMaya)
and than error:
# Error: TypeError: cannot marshal recursive dictionaries #

CGTalk Moderation
01-12-2012, 06:26 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.