I have a Maya/cpp code with an MPxLocator. This locator has an attribute called "Frame", and whenever the frame changes, I have a function that updates that attribute:
MFnDagNode myDagNode(MPxLocatorMObject);
myDagNode.findPlug("Frame").setValue(frame);
However the draw functions is not always started, only sometimes. How can I make the MPxLocator "dirty" when frame attribute is changed ?
Found out that the MPxLocator gets refreshed only if it is visible on screen (or at least the point representing its coordinates).