SceneChangeNotifier Class Reference

The SceneChangeNotifier JavaScript class. Execute client code upon scene change events. More...

Public Slots

void disconnectAll ()
 Disconnect all signals, to stop callback invocation. More...
 

Signals

void currentFrameChanged ()
 Signal emitted upon change of the current frame in the scene. More...
 
void networkChanged (StringList list)
 Signal emitted upon change of the node network links. More...
 
void nodeChanged (StringList list)
 Signal emitted upon change of the node property or attribute value. More...
 
void sceneChanged ()
 Signal emitted upon change of the scene. More...
 
void selectionChanged ()
 Signal emitted upon change of the current selection. More...
 
void columnValuesChanged (StringList columnNames)
 Signal emitted upon change of the column / timed Values. More...
 

Public Member Functions

 SceneChangeNotifier (QObject parent)
 Create a new SceneChangeNotifier. More...
 

Detailed Description

The SceneChangeNotifier JavaScript class. Execute client code upon scene change events.

User can connect a function to any available signal from this class. Once a function is connected to a signal, the client code will be executed when the specific event is triggered in the scene, until the parent object is destroyed.

Example with a MasterController:

{
//Create the SceneChangeNotifier, using the Controller for parent
//Connect a local function to "nodeChanged" signal.
//The connected function will be executed when the signal is triggered,
//for as long as the parent object is alive (until the Controller is hidden).
scn.nodeChanged.connect( function(nodeList)
{
MessageLog.trace("nodeChanged Callback!");
for(var i=0; i < nodeList.length; ++i)
{
MessageLog.trace(" affected node: " + nodeList[i] );
}
});
}

Example with a Dialog:

this.setupUI = function()
{
this.ui = UiLoader.load( this.getLibPath()+"/TB_InterpolationSlider.ui");
var scn = new SceneChangeNotifier(this.ui);
scn.currentFrameChanged.connect( function()
{
//Code your callback logic here...
MessageLog.trace("currentFrameChanged Callback!");
});
};

Constructor & Destructor Documentation

◆ SceneChangeNotifier()

SceneChangeNotifier::SceneChangeNotifier ( QObject  parent)

Create a new SceneChangeNotifier.

Parameters
parentThe parent object, controlling the the newly created object life duration.
var dialog = UiLoader.load( "myDialog.ui");
var myNotifier = new SceneChangeNotifier(dialog);

Member Function Documentation

◆ columnValuesChanged

void SceneChangeNotifier::columnValuesChanged ( StringList  columnNames)
signal

Signal emitted upon change of the column / timed Values.

myNotifier.columnValuesChanged.connect( function(columnList)
{
MessageLog.trace("columnValuesChanged Callback!");
for(var i=0; i < columnList.length; ++i)
{
MessageLog.trace(" affected column: " + columnList[i] );
}
});

◆ currentFrameChanged

void SceneChangeNotifier::currentFrameChanged ( )
signal

Signal emitted upon change of the current frame in the scene.

myNotifier.currentFrameChanged.connect( function()
{
//Code your callback logic here...
MessageLog.trace("currentFrameChanged Callback!");
});

◆ disconnectAll

void SceneChangeNotifier::disconnectAll ( )
slot

Disconnect all signals, to stop callback invocation.

myNotifier.disconnectAll();

◆ networkChanged

void SceneChangeNotifier::networkChanged ( StringList  list)
signal

Signal emitted upon change of the node network links.

Parameters
listThe list of nodes which are concerned by the current network changes.
myNotifier.networkChanged.connect( function(nodeList)
{
//Code your callback logic here...
MessageLog.trace("networkChanged Callback!");
for(var i=0; i < nodeList.length; ++i)
{
MessageLog.trace(" affected node: " + nodeList[i] );
}
});

◆ nodeChanged

void SceneChangeNotifier::nodeChanged ( StringList  list)
signal

Signal emitted upon change of the node property or attribute value.

Parameters
listThe list of nodes which are concerned by the current network changes.
myNotifier.nodeChanged.connect( function(nodeList)
{
//Code your callback logic here...
MessageLog.trace("nodeChanged Callback!");
for(var i=0; i < nodeList.length; ++i)
{
MessageLog.trace(" affected node: " + nodeList[i] );
}
});

◆ sceneChanged

void SceneChangeNotifier::sceneChanged ( )
signal

Signal emitted upon change of the scene.

myNotifier.sceneChanged.connect( function(nodeList)
{
//Code your callback logic here...
MessageLog.trace("sceneChanged Callback!");
});

◆ selectionChanged

void SceneChangeNotifier::selectionChanged ( )
signal

Signal emitted upon change of the current selection.

myNotifier.selectionChanged.connect( function()
{
//Code your callback logic here...
MessageLog.trace("selectionChanged Callback!");
});