local AnimTexture = {} local frameTime = 0 -- Amount of time for each frame function getFrame(currentTime) print(currentTime) return math.floor(currentTime/frameTime) end function AnimTexture.onInit(self, graph) rootGraph = octane.project.getSceneGraph() local prs = octane.project.getProjectSettings() local sceneFps = prs:getAttribute(octane.A_FRAMES_PER_SECOND) frameTime = 1.0/sceneFps print("Each frame is "..frameTime.." seconds long") self:setEvaluateTimeChanges(true) end function AnimTexture.onEvaluate(self, graph) print("\n") print("****Event Started****") local scrubbTime = rootGraph.time local frameNum = getFrame(scrubbTime) print("Scrubber Time - "..scrubbTime) print("I think this is frame # "..frameNum) return true end return AnimTexture