0

Running python thread from rv menu

Hi, I'm running rv on Windows 7.  

I have a menu in rv that starts a pyQT UI. When the user has filled out the fields, they hit the "publish" button which gets the filenames via rv.commands calls, and then copies those files to a published area.   This all works fine.

I'm currently trying to get the publish call to run in a separate thread, using the python "thread" module.  This works great most of the time, but about one in 4 times rv freezes, all the windows get whited out and the OS says "rv has stopped running" or something to that effect.  The only interaction the publish call has with rv is to call nodesOfType, getStringProperty, and existingFilesInSequence.   

Do you have any ideas about what's going on? 

 

Thanks!

댓글 3개

  • Avatar
    Jon Morley 공식 댓글

    Hi Sumit,

    RV's commands API is not thread safe. If you want to talk to a running RV from another thread to ask questions about the graph and session you should look into communicating with the running RV over the network protocol. In the src/python/network directory of your install you will find the rvNetwork.py module as well as some sample scripts that use it. I would base your work on that.

    Thanks,
    Jon

  • 0
    Avatar
    Sumit Das

    I was afraid of that...  Thanks Jon!  I'll look at rvNetwork.

  • 0
    Avatar
    Jon Morley

    Great! Please let me know if you have follow up questions.

댓글을 남기려면 로그인하세요.