f
f
Apple Store
Global SectionArticlesBookstoreDictionaryDownloadsDVDsEventsForumsGalleryJob ListingsNewsNewslettersSchools
USER: PASS:  Login  Register

Subscribe
Site Links
Home > Shake > FAQs > Shake SDK FAQ > Nodes and Plugs > How can I detect when the parameter editor... Change background colorChange background colorChange background colorChange background color
Nodes and Plugs Shake SDK FAQ for Shake


Posted On:  06/15/05   By:  admin  

Question:

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.

static NRiPlug *gTweakerInConst  = NRiGlobals::ref("gui.tweakerInConstruction", kPtr   );

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.

See plugExamples.cpp in the Shake 4 SDK package. 

Related Learning Tools
Shake Related DVDs

No Results.
Shake Related Books



The Art and Science of Digital Compositing
Global DVDs



Shake: Tracking and Transforms


Sponsors

Sponsor

Contact Us | Post Jobs | Post News | Post Events