Alain2131 Posted February 4, 2019 Share Posted February 4, 2019 (edited) Hello ! I'm trying to do some tests using rpyc to control Houdini over the network (currently only on the same computer) I managed to get it to work (creating some nodes, getting the frame range, setting the frame) But, strangely, I can't get the correct current frame number It will return 1.0, but if I use hou.setFrame(XX) it will then return that value (whatever XX was) even after manually changing the frame in Houdini I tried using hou.frame(), hou.expandString("$F") They both had the same problem My steps to get it to work were copying the rpyc folder at C:\Program Files\Side Effects Software\Houdini 17.0.XXX\python27\lib\site-packages to C:\Program Files\Autodesk\Maya2017\Python\Lib\site-packages In Houdini, open a Python Shell and write/execute import hrpyc hrpyc.start_server() In Maya, open a Python Shell and write/execute import rpyc connection = rpyc.classic.connect("localhost", 18811) hou = connection.modules.hou print hou.frame() # Returns 1.0 hou.setFrame(52) # Sets the frame to 52 print hou.frame() # Returns 52.0 print hou.expandString("$F") # Returns 52 But if you manually change the frame in Houdini and only execute the print hou.frame() line, the problem will be apparent Even in another Houdini instance the problem is present. import hrpyc connection, hou = hrpyc.import_remote_module() print hou.frame() Is there something I did wrong, missed or anything ? Thanks ! Edited February 4, 2019 by Alain2131 Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted February 8, 2019 Share Posted February 8, 2019 I work with hrpyc every day and haven't seen such a problem before. Consider this as a bug and report to SideFx. As a workaround try hou.hscript("fcur"). Quote Link to comment Share on other sites More sharing options...
Alain2131 Posted February 8, 2019 Author Share Posted February 8, 2019 Hey Alex, thanks for the answer ! I'll send an RFE as you proposed But do you think this is because I'm using rpyc in Maya instead of hrpyc ? I don't really know what I'm doing, I'm just poking around Meanwhile, fcur does return the correct frame ! Noice ! Thanks for that =) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.