[Closed] currentTime during rendering
Hi all max scripters, I have a problem using the script operator in pFlow. i can not acsess the currentTime systemglobals during rendering.
i want to change the frame number of the ifl to match the frame that is being rendered.
This is the code,
on Proceed pCont do
[size=1]
(
bmp = openbitmap (“c:\ emp\xmaptest\ est.ifl”)
bmp.frame = currentTime
any ideas how to get it to work?
/regards DW
[/size]
I just came back to Europe and don’t have Max installed on the machine I am posting from, but check out the default Birth Script operator’s code- IIRC, it shows an example how to detect the actual evaluation time of a ParticleContainer. Note that there are two times you can access – the start and the end of the evaluation range which is dependent on the sub-frame sampling… Also, most times in PFlow are in Ticks, so you will have to convert the result to frames by dividing by TicksPerFrame.
Thanks Bobo, and yeah you are the man…
Problem solved,
tStart = pCont.getTimeStart() as float
[size=2]curFrame = ((tStart*framerate/4800)+1)[/size]
[size=2]—-[/size]
[size=2]/cheers [/size]
[size=2][/size]
[size=2]DW
[/size]