Jump to content

HDA Python callback Class usage


caleb

Recommended Posts

Hi!

I'm looking to maintain persistent data between cooks in an HDA (SOp) that I am creating. The SOp has buttons with associated Python callback functions, and I would like to reduce redundant computation by storing results in class-owned data.

Does anyone have any experience or pointers?

Other approaches to maintaining persistent data would be welcome as well. I am looking to store statistical data (as floats, etc) as well as list data.

I could store this info within Houdini data (lists into point attributes, etc.), but that's inelegant, and lists are faster to access, which is much of the initial reasoning for keeping data in lists in the first place.

Thanks!

-caleb

Link to comment
Share on other sites

Not so much impatient as experienced... The wider the net, the better the catch.

...as to "Apprentice" - I'll accept that, as Yoda has coded Hython for 800 years. I'll cop to having an infinite amount to learn from anyone...

...even though my first version of Houdini was either PRISMS (three point something, I think), ICE, or alpha 0.9 - depending on how you count it. I worked at Side Effects before SGI introduced the Indigo when it was a one-room shop on Maude Street. Now you've got me started... My HP calculator that I got in University is older than most of my coworkers. By gum, I taught Jim Butterfield how to use his Commodore! "Apprentice!" Why, it irks me some.

Clearly I've gotta work on that ego still. Thanks! ;-)

-caleb

Link to comment
Share on other sites

Nothing but tact. ;-)

I never actually got around to watching Ghost Rider. For the most part, the FX weren't bad, though. It was a great crew.

-caleb

Yep, now I know why "Ghost Rider" is such a baaaad film :P

Welcome.

Link to comment
Share on other sites

For the interest of anyone with curiosity, The SESI forum Thread I started got a more useful answer:

http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=17926

So far, there is no straightforward way to maintain my own Python class data to be persistent between cooks, but there is an acceptable workaround of converting Python data to strings by means of the repr() function, and stuffing those strings into hidden string parameters. I haven't tried this for large datasets yet, but this is adequate to my needs.

-caleb

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...