Setting an attribute to internal
, without actually acting upon it, means we are notified whenever it changes.
There are two reasons to set an attribute as 'internal'. The first, and simplest, is when you want notification that the attribute has been set, or queried. - Reference
aInWorldMatrix = matFn.create("inWorldMatrix", "inwm");
matFn.setInternal(true);
...
bool initialStateNode::setInternalValue(const MPlug& plug, const MDataHandle& dataHandle) {
Print() << "inWorldMatrix was set\n";
return false;
}
So what if inWorldMatrix
was internal? Would it notify us whenever pCube1.worldMatrix
changed? No. It doesn't appear like it. It is called when the attribute is set, but not when a connection to it - like pCube1.worldMatrix
- changes.