Jump to content


reload dynamic libraries in linux(dso)


  • Please log in to reply
6 replies to this topic

#1 kare

kare

    Peon

  • Members
  • Pip
  • 29 posts
  • Joined: 03-January 12
  • Location:london, UK
  • Name:ka re

Posted 30 July 2012 - 03:10 AM

Hi,

Is there any way to reload dso path.

I am testing with houdini hdk examples for every time I do a change, I have to open new houdini to check the changes..

Thanks,
Kare

#2 goldleaf

goldleaf

    Initiate

  • Members
  • PipPip
  • 165 posts
  • Joined: 24-April 08
  • Name:Chris Rydalch

Posted 07 August 2012 - 06:48 PM

Sort of, but it's pretty easy to nuke your Houdini session, so be forewarned.

You'll have to rename your *.so/*.dll (and quite possibly the operator name itself), but the following is some Python code that does this (run in the Python Shell, or make a shelf button for it):

hou.nodeTypeCategories()['Sop'].loadDSO('/path/to/dso/foo.so')

Where 'Sop' would be the operator type. Note that hou.nodeTypeCategories() is a dictionary, so hou.nodeTypeCategories().keys() will show you what it's looking for.

Again, this is potentially quite dangerous (and I've only played around with it for a few minutes with a SOP), but it did seem to work, keeping the above caveats in mind. And it could be useful, when doing lots of little changes that require re-compilation.

Edited by goldleaf, 07 August 2012 - 06:59 PM.


#3 cyybermax

cyybermax

    Peon

  • Members
  • Pip
  • 7 posts
  • Joined: 03-December 09
  • Location:Czech republic
  • Name:A B

Posted 08 August 2012 - 03:51 AM

ouuu mannn, At times when I created my HDK plugins, I restarted Houdini every time :(

But Indeed, SESI needs to create some plugins manager, where User just can click on "reload" for some plugin.

Edited by cyybermax, 08 August 2012 - 03:52 AM.


#4 Stalkerx777

Stalkerx777

    Initiate

  • Members
  • PipPip
  • 147 posts
  • Joined: 09-June 08
  • Location:Russia, Moscow
  • Name:Alex Sadroutdinov

Posted 08 August 2012 - 09:36 AM

View Postcyybermax, on 08 August 2012 - 03:51 AM, said:

ouuu mannn, At times when I created my HDK plugins, I restarted Houdini every time :(

But Indeed, SESI needs to create some plugins manager, where User just can click on "reload" for some plugin.
Maya style ? No thx, i don't want this in houdini.... B)
Posted Image

#5 Alanw

Alanw

    Initiate

  • Members
  • PipPip
  • 173 posts
  • Joined: 22-October 07
  • Name:Alan Warren

Posted 09 August 2012 - 11:54 AM

Anything would be better than nothing.  <_<

#6 kare

kare

    Peon

  • Members
  • Pip
  • 29 posts
  • Joined: 03-January 12
  • Location:london, UK
  • Name:ka re

Posted 10 August 2012 - 07:09 AM

View Postgoldleaf, on 07 August 2012 - 06:48 PM, said:

Sort of, but it's pretty easy to nuke your Houdini session, so be forewarned.

You'll have to rename your *.so/*.dll (and quite possibly the operator name itself), but the following is some Python code that does this (run in the Python Shell, or make a shelf button for it):

hou.nodeTypeCategories()['Sop'].loadDSO('/path/to/dso/foo.so')

Where 'Sop' would be the operator type. Note that hou.nodeTypeCategories() is a dictionary, so hou.nodeTypeCategories().keys() will show you what it's looking for.

Again, this is potentially quite dangerous (and I've only played around with it for a few minutes with a SOP), but it did seem to work, keeping the above caveats in mind. And it could be useful, when doing lots of little changes that require re-compilation.


Thanks goldleaf, It is loading the new DSO, but what I want is to reload the existing dso...

Is there any other solution for this?

right now I am renaming my C file and compiling it...

#7 kubabuk

kubabuk

    Illusionist

  • Members
  • PipPipPip
  • 393 posts
  • Joined: 15-February 05
  • Location:Oliwa
  • Name:Kuba Roth

Posted 10 August 2012 - 09:43 AM

Quote

Is there any other solution for this?
I'm afraid not, unfortunately.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users