Make a signal persistant

Hello! I have this script:

 

// Global variable to hold the connectiong_oProp = null;(function(){    function myFunc(){        MessageBox.information("ok", "message", "ok");        // Additional functionality        return true;    }    var oNode = Scene.getPrimarySelection();    if (oNode) {        g_oProp = oNode.findProperty("XRotate");        if (g_oProp) {        	connect(g_oProp, "currentValueChanged()", myFunc);        }    }	g_oProp.setValue(1); //raises currentValueChanged() successfully})();/*...currentValueChanged() stops working after finishing the script.*/

The signal works what I change the property inside the code, but it stops working after finishing the script. Is the any way to make it persistant?

Comments

Sign In or Register to comment.