Finding nodes with Display flag set, from within SceneHook.

   235   0   0
User Avatar
Member
5 posts
Joined: Jan. 2024
Offline
First off, a request:

This forum could really use a board for HDK questions. As Technical seems to broad, and Houdini Engine API seems not to be geared towards HDK?

My actual question:

I wrote a SceneHook, and I would like to quickly find the Node with the display flag set, in the /obj network.

How can I accomplish this?

Currently, I traverse all known nodes, and check if they have the display flag set, but I would like a more event driven approach to that.

How can I make sure my SceneHook gets a signal when a display flag changes?

Thanks.

Current code:
    // Retrieve all nodes.
    OP_NodeList list;
    OP_Node::getAllNodes(list);
    // Check all nodes.
    for (OP_NodeList::iterator it=list.begin(); it!=list.end(); ++it)
    {
        OP_Node* n = *it;
        if (n->isNetwork())
        {
            // This node is a network, which means we can ask for the displayed node.
            OP_Network* netw = (OP_Network*)n;
            OP_Node* dpyNode = netw->getDisplayNodePtr();
  • Quick Links