Node Help button question - can you link to external website, or add to the path that Houdini is using to look for the help files

   3382   3   1
User Avatar
Member
4 posts
Joined: July 2017
Offline
Hey there,
the company I'm working for is developing a plugin for Houdini and we're looking for a way to conveniently add documentation for the users.
Ideally we'd like to get the help button to link to our website rather than having to carry all the documentation files with the installation. Since the help windows is pretty much a fully featured browser, surely there's a way to do it ? What we would like to happen is for the online documentation for the node on our website to open directly in the Houdini Help browser window once the question mark button has been pressed.

If not feasible, is there an environment variable to append to in order for the help browser to look for help files in directories other than the installdir/houdini/help/nodes/“context”/“node_name.txt” as things currently are, as far as I understand.

Thanks guys, all the best !
User Avatar
Staff
503 posts
Joined: July 2005
Offline
1. Right click an instance of the asset and choose Type Properties.
2. Click the Help tab.
3. At the bottom turn on Use this URL and enter the URL you want the help button to link to.
User Avatar
Member
4 posts
Joined: July 2017
Offline
Hey mchaput, thanks for the input !

I should've been more specific - I am not looking for a way to do it through the Houdini UI since that would make it specific for my own machine.
As things currently are, the UI for the nodes is created with .ds files. I'm not a dev so I have no clue how things work under the surface.

Anyway, my question is: Is there a method somewhere in the HDK that could be used to modify the help flag so that the compiled nodes themselves can carry the link, or alternatively, is there a way to add it as a parmtag on the .ds files.

I've PM'd you the github project if that would clarify things.

Best regards !
User Avatar
Staff
1274 posts
Joined: July 2005
Offline
GoshoGenchev
Anyway, my question is: Is there a method somewhere in the HDK that could be used to modify the help flag so that the compiled nodes themselves can carry the link, or alternatively, is there a way to add it as a parmtag on the .ds files.

Hello,

Yes, there is a way to set a help url in a compiled HDK node. You need to write a custom OP_Operatorfor the compiled node and override the virtual getOpHelpURL()method.

Using $HFS/toolkit/samples/SOP/SOP_Star.C as an example, add this bit of code just above the newSopOperatorfunction in SOP_Star.C:
class SOP_StarOperator : public OP_Operator
{
public:
    SOP_StarOperator()
        : OP_Operator(
            "hdk_star",                 // Internal name
            "Star",                     // UI name
            SOP_Star::myConstructor,    // How to build the SOP
            SOP_Star::myTemplateList,   // My parameters
            0,                          // Min # of sources
            0,                          // Max # of sources
            SOP_Star::myVariables,      // Local variables
            OP_FLAG_GENERATOR)        // Flag it as generator
    {}
    virtual ~SOP_StarOperator() {}

    virtual bool getOpHelpURL(UT_String &url)
        { url.harden("http://www.google.com"); return true; }
};

Then change the contents of the newSopOperatorfunction so that it looks like this:
void
newSopOperator(OP_OperatorTable *table)
{
    table->addOperator(new SOP_StarOperator());
}

Save the changes, compile SOP_Star.C with hcustom and now when you click on the ‘?’ button for the SOP Star operator Houdini will open the help browser pointing to the Google search page.

Note that the code above does not actually populate the “Use this URL” field but it mimics the url field's behaviour.

I hope this helps.

Cheers,
Rob
  • Quick Links