Tuesday 18 January 2022

Get current frame from Maya node - time

 Today I forgot how to get the current frame from a node, something which I wanted to access in order to create a 'turbine' auto-rig component. I tried going into the node editor and created a new 'time' node, but the 'outTime' attribute didn't seem to update with the timeline when I scrubbed through it.

However, it seems that every Maya scene has a persistant 'time' node called time1.

This is the correct node to query when wanting to access the current frame from a node, and as it is persistant in every Maya scene, it's fine to hardcode this name.