Saving global data to scene

   2717   6   3
User Avatar
Member
3 posts
Joined: Dec. 2015
Offline
I'm interested in saving custom scene specific data with each scene file. In Maya I can do this by saving attributes to the renderGlobals node… in 3dsMax there is a rootNode that I can save information in. Does Houdini have a similar mechanism?

Thanks,
Andrew
User Avatar
Member
1907 posts
Joined: Nov. 2006
Offline
You could save things as user data on the root node in Houdini.
hou.node(“/”).setUserData(“foo”, “bar”)
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
3 posts
Joined: Dec. 2015
Offline
Thanks… i think that's exactly what I was looking for.

Cheers,
Andrew
User Avatar
Member
538 posts
Joined: Dec. 2006
Offline
Or save data to hou.session module
https://gumroad.com/alexeyvanzhula [gumroad.com]
User Avatar
Member
1907 posts
Joined: Nov. 2006
Offline
hou.session isn't useful in this case since I believe he's talking about saving data that will persist with the hip file and not just for the current session.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
3 posts
Joined: Dec. 2015
Offline
Graham, you are correct, but it's good to know there is a place for session storage as well. Thanks…
User Avatar
Member
19 posts
Joined: Dec. 2013
Offline
Apologies for reviving this old thread but I'm after something very similar, that is being able to keep a list of hou.NetworkMovableItem references that persist across Houdini sessions.

I can imagine implementing this in 2 ways but both have their issues:
- add a user data on the root node / that lists all the items. Alas, the only unique identifier available for these items is through the hou.NetworkMovableItem.sessionId method, which does not persist across sessions.
- add some sort of user data to each node so that I can find them by scanning the scene, alas the `hou.NetworkMovableItem` class doesn't allow storing user data.

Am I missing something?
  • Quick Links