PDA

View Full Version : Control houdini from maya RPC


vux
01-10-2012, 07:46 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)

CGTalk Moderation
01-10-2012, 07:46 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.