Hi all, I am working on something that I thought would be fairly simply, but I am having trouble getting it to preview properly.
I am taking an int knobs value and using python to format it to a currency string. Then I am setting the message using (knob.setValue(string)). It works and when I scrub the values move up and down according to the integer knobs value, but when I press play it only processes it once so the value is static. Rendering seems to work, but that's not really beneficial. Example node below: Text { message "\$16,500" font /Library/Fonts/Arial.ttf yjustify center Transform 1 box {0 0 1920 1080} center {960 540} name Currency selected true xpos 101 ypos -232 addUserKnob {20 User} addUserKnob {3 amount l Amount} amount {{curve L x20 50 x30 1500 16500 27550 355650 1650250}} addUserKnob {26 PythonHolders l "Python Placeholders below"} addUserKnob {3 setTotal l "Set Total"} setTotal {{"\[python -execlocal import\\ re\\n\\nn\\ =\\ nuke.thisNode()\\nnumber\\ =\\ int(n.knob('amount').value())\\namtLen\\ =\\ len(str(number))\\ntotal\\ =\\ n.knob('total')\\nmsg\\ =\\ n.knob('message')\\n\\nr\\ =\\ ('\$'\\ +\\ re.sub(r'(?<=\\\\d)(?=(\\\\d\\\\d\\\\d)+(\\\\.|\$))',\\ ',',\\ str(number)))\\n\\nmsg.setValue(r)\\n\\n\\nret\\ =\\ 1]"}} addUserKnob {1 total l Total} total "\$719" } Cheers.
_______________________________________________ Nuke-users mailing list Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users