not really. if you render 4 to 5 without warm up frames you don’t execute anything before that. so… the scene is rendering the default all visible, since your function is executed only on frame 2. so… you gotta have atleast enough warm up frames for the engine to execute the code on frame 2.
the engine doesn’t backtrack what should have been there. you gotta execute while you render or during the warm up to the render. i hope i made that clear enough to understand.