Jump to content

python::how to inform a hda that the scene was saved?


sanostol

Recommended Posts

There's no straight forward way currently. There is an hou.hipfile.setOnSaveCallback() function that could be used to do this but it is not implemented yet. Right now a solution would be to write your own save function that calls hou.hipfile.save() and then ran some code to notify your asset. You would need to be sure to call this new function when you wanted to save, either through a shelf button or perhaps attempting to override the main menu entry.

Edited by graham
Link to comment
Share on other sites

thanks graham.

hope that all that not implemented yet get's implemented soon :)

another thing that is quite unclear to me, is how to bundle several customations. for example I have now a digital asses that handles all kind of versioning for me (sim, render, scene versions) as a python object in my scene, next I have modified my MainMenuMaster file to add save incremental and generate database. for me it would make scense to bundle stuff like that into one plugin, but there seems not to be a way to do that.

what if I have to different tools that add stuff to the mainmenumaster, this would mean copy paste into one file?

Martin

Link to comment
Share on other sites

Yeah, I think you'd have to manually add things into just one file. There is currently not any way to do more dynamic and interesting things to main menus, or include entries for them in other things. That's a good RFE though. It would be nice if you could include something like a MainMenuCommon section in a digital asset that can insert elements into different menus. I'm not sure how doable it is given that the menus are being constructed before assets are loaded but I'll log something and see how far it goes.

One thing you can try is creating multiple MainMenuMaster files for example and having them in different locations within the HOUDINI_PATH. Houdini will use as many of them as you might want so you could create one for each thing. It could be a solution to your problem but you'd have to ensure they are all located in the path in different locations.

Link to comment
Share on other sites

xsi has some good workflow here, I miss the ability to dynamicaly undload/load plugins and menus with pluginmanager into a running appliation. sidefx should consider this,too

it is quite boring to start and quit houdini all the time for stuff like that

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...