Simply put, the node needs a "notes" (or s/n "nts") attribute first, then its plain sailing (manually writing a note creates the attr, which then stores the string - or so im assuming, looks like that's handled through a scriptJob)
So to add a note to a node, first check whether it already has an attribute called "notes", create one if not, then write something.
string $node[]=`polyCube` ;
if(!`attributeQuery -node $node[0] -ex "notes"`)
addAttr -ln "notes" -sn "nts" -dt "string" $node[0] ;
setAttr -type "string" ($node[0]+".notes") "This node now has a Note. You can store various bits of information here." ;
(The note on this script example is on the transform node of the polyCube object ($node[0]) as $node[1] would be the shape object)
Nice one Lee, do you know if you can add notes to Key-frames or independent markers in the timeline? (so that you don't have to have something selected to see the marker)
ReplyDeletenot that I know of but will have a look.
ReplyDeleteYou can however use the annotation tool (Create -> Annotation...) and animate its visibility over specific frames (and perhaps constrain it to your camera/ubercam)
It would also be fairly simple to create a UI to add notes to the HUD, which then gets updated every frame.
ReplyDeleteUsing the HUD would probably be the better solution really, i've been meaning to rewrite the old one I had, and this gives me a valid excuse...
Johnny ComeLately, but thanks for this!
ReplyDelete