How can I detect when the parameter editor (tweaker) for my node is about to be built and displayed to the user?
Answer:
When Shake is about to build a tweaker for an image processing node, it sets the pointer to the image processing node into a global plug called gui.tweakerInConstruction. To access this global plug, place the following code at the global scope in your source file.
To get notified when the value stored in the gui.tweakerInConstruction plug changes, you must add an internal plug to your node that is connected to this global plug. The internal plug must have its notification flag activated.
Next, you must implement a notify() function that handles the callback when the value stored in the internal plug (which is connected to the global plug) changes. If the pointer value stored in the internal plug is equal to your node's "this" pointer, then you know that a tweaker is about to be constructed for your node.