FrameChange Scriptlinks

I want to have objects modified by a script update in realtime in reaction to user changes. Specifically I want an object to stay at a certain location on a curve while the user edits the curve. I have it all working, except updating realtime. The manual says:

“FrameChanged - This event is executed every time the user changes frame, and during rendering and animation playback. To provide more user interaction this script is also executed continuously during editing for Objects.”

I tried this, but it doesn’t seem to work even just printing something to the console. Perhaps I misunderstood what it means to “execute continually.”

Anybody have any ideas?

it wouldn’t surprize me if scripts running on scriptlink are forbidden from using print


import sys

see if that prints…

if sys.stdout [or sys.stderr or sys.stdin] are modified some functions such as print will put their output elsewhere. sys.stdout is the real standard out

AFAIK, they aren’t.

byDesign: You might want to try the OnRedraw event, it’s more suited for what you want IMHO.


you’re right theeth, print works just as well…because it actually prints when I change the frame. Either way, frameChange still doesn’t work the way the docs says it’s supposed to. Is the documentation wrong? Has that feature been removed (been in docs since 2.0)?

I was considering onRedraw, but that doesn’t update during editmode which is when I need to see realtime changes. I suppose I could try to force a bunch of redraws when in editmode or something…but that seems very cumbersome. Any more suggestions on the best way to do this?

Thanks for your help,

edit: ok…I finally have time to play with stuff and it looks like it doesn’t really matter anyway because a script can’t edit an object while it’s in edit mode. So I think I’ll have to change my approach. Ideally I could use BPy to create an extended Curve type which follows my rules even in edit mode…but I don’t think that’s possible (please prove me wrong ;-).