Notifications
Clear all
[Closed] Callback problem – spline doesn't update on render
Nov 05, 2014 12:07 am
Hi there. I’ve written very simple callback function to animate my spline in time. It works fine in viewport, but when I render an animation, the spline just doesn’t update.
I’m doing something wrong?
--create simple spline
s = SplineShape render_renderable:true render_displayRenderMesh:true
addNewSpline s
addKnot s 1 #corner #curve [0,0,0]
addKnot s 1 #corner #curve [10,10,10]
updateShape s
--callback function
fn moveKnot =
(
setKnotPoint s 1 2 [currentTime+10,10,10]
--animate second vertex
npos = getKnotPoint s 1 2
setKnotPoint s 1 2 (npos+[1,1,1])
updateShape s
)
unregisterTimeCallback moveKnot
registerTimeCallback moveKnot
callbacks.removeScripts #preRenderFrame
callbacks.addScript #preRenderFrame "moveKnot()"
1 Reply
Nov 05, 2014 12:07 am
registerTimeCallback will not working in rendering , its work in viewport only.
ty cache your file before render , or use render callbacks .