Is there a function called PostSaveScripts

   2142   4   1
User Avatar
Member
6 posts
Joined: 5月 2011
Offline
Hi, guys.

Is there any function called PreSaveScripts or PostSaveScripts?
Or can I use my function to override the default one?

So I can do some checking before saving the hip file.
If something wrong, the user can not save the hip file.

Is it possible to do that?
User Avatar
Member
229 posts
Joined: 5月 2006
Offline
MainMenuCommon is the file you're looking for, remove the standard save entries and replace them with your own that do the pre/post save functions.
it might also be useful than to overwrite the shortcuts for saving to use your function

Infernal
User Avatar
Member
6 posts
Joined: 5月 2011
Offline
Thank you.

I found that file and I found the save script:

<actionItem id=“h.save”>
<label>Save</label>
</actionItem>

It seems like the command is h.save.
My question is that where is the definition of h.save?
If I make my function, how does houdini call my function?
User Avatar
Member
229 posts
Joined: 5月 2006
Offline
have a look here

http://www.sidefx.com/docs/houdini12.0/basics/config_menus [sidefx.com]
User Avatar
Member
6 posts
Joined: 5月 2011
Offline
Thank you.

This is pretty cool!!

I'm researching on it.

Infernalspawn
have a look here

http://www.sidefx.com/docs/houdini12.0/basics/config_menus [sidefx.com]
  • Quick Links