A couple of questions about customizing menus

   2946   4   0
User Avatar
Member
2 posts
Joined: 4月 2017
Offline
Hello everyone - I have some questions about customizing the menus in Houdini (i.e. http://www.sidefx.com/docs/houdini/basics/config_menus) [sidefx.com]

1) Is there any way to edit or view the built-in functionality that is being called in the xml files? For example, I'm looking to add an extra function to the MPlay window in MainMenuMPlay.xml which will act as a custom save function (save to a directory and then do some other automated magic) but I'm not sure how to build a custom save function, as I don't see any way to access the images in MPlay. The default save button calls ‘mplay.saveseq’, which I believe is black boxed, so I can't see what's happening there. Can I replicate this behavior somehow?

2) Is it possible to modify the node info menu that pops up when you middle mouse over a node? We would like to display some custom information there. I'm aware we could add a comment, but we want the info to be dynamically calculated anytime the middle mouse is clicked, so static values wouldn't be applicable in this situation.

Hopefully those questions made sense. Thanks for any help!
User Avatar
スタッフ
1452 posts
Joined: 7月 2005
Offline
Is there any way to edit or view the built-in functionality
Nope. The built-in event is intercepted and processed internally.

Rikki-Tikki-Tavi
custom save function (save to a directory and then do some other automated magic)
I think there is an RFE to provide pre- and post-save hooks, but at the moment, if you want to do it explicitly thru the XML menu definition, you will need to find a way to do all that with HOM functions, without relying on built-in saving mechanism.
http://www.sidefx.com/docs/houdini/hom/_index [sidefx.com]
eg, to save a hip file you can call save() function from http://www.sidefx.com/docs/houdini/hom/hou/hipFile [sidefx.com]

But it looks like you wan to save images from MPlay, which is currently not possible. There is an RFE 32671 for it, though.

Rikki-Tikki-Tavi
Is it possible to modify the node info menu that pops up when you middle mouse over a node?
It's a question for the new network editor rather than menus. I think, while you may be able to customize the way the info appears in there thru files in $HH/config/NodeInfoTemplates, it may be tricky to provide own info on the node. YOu will have to read thru nodegraphui.py to see how these templates are used. Then probably you will be able to add some custom info to the info tree and display it thru your custom template.
User Avatar
スタッフ
4470 posts
Joined: 7月 2005
Offline
Rikki-Tikki-Tavi
2) Is it possible to modify the node info menu that pops up when you middle mouse over a node?

As mentioned by @rafal, the files you want to look at are in $HH/config/NodeInfoTemplates. Just to clarify, any information you can extract from a node using HOM/python can be displayed in the node info window without resorting to the HDK, or modifying nodegraphui.py. The template files in that directory are mako templates (http://www.makotemplates.org/) [makotemplates.org] and so can run arbitrary python code to generate whatever info you want to display.

If the info you want to display is not accessible through HOM, you would have to extend HOM/hscript using the HDK, or if you are interested in displaying this custom information only on nodes you write with the HDK, you can override the `fillInfoTreeNodeSpecific` function on your nodes.
User Avatar
Member
2 posts
Joined: 4月 2017
Offline
Great, thanks for the info! I'll keep an eye on that RFE, and poke around in the NodeInfoTemplates.
User Avatar
Member
16 posts
Joined: 4月 2015
Offline
rafal
But it looks like you want to save images from MPlay, which is currently not possible. There is an RFE 32671 for it, though.
Is there any update on this RFE?

We'd like to add custom MPlay functions to make saving flipbooks into our pipeline easier, it seems there is no way to call MPlay hscript through the custom xml menus.

mtucker
If the info you want to display is not accessible through HOM, you would have to extend HOM/hscript using the HDK
As there is currently no access to HOM through MPlay, can the HDK achieve this?
  • Quick Links