Announcement

Collapse
No announcement yet.

how to embed simple timecode into .exr header

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to embed simple timecode into .exr header

    I know there is the arbitrary data field in the exr options. But i'm trying to figure out how to embed simple frame equivalent timecode into the header so other programs like the Flame could read it properly.

    I'm going to try a post process as the procedure has a bit of math to it and inject it into the exr data field. I'm just not sure about format and var name that other programs will see?

    thoughts? any ideas?

    thanks in advance.

    Andy

  • #2
    got it.

    searching the interwebs... i found this (frames_to_timecode) that i added to a post translate process. seems to work still testing

    Code:
    import math
    import maya.cmds as cmds
    
    framerate = 24
    
    def frames_to_timecode(frames):
        return '{0:02d}:{1:02d}:{2:02d}:{3:02d}'.format(frames / (3600*framerate),
                                                        frames / (60*framerate) % 60,
                                                        frames / framerate % 60,
                                                        frames % framerate)
    
    curFrame = cmds.currentTime( query=True )
    curFrame = frames_to_timecode(int(curFrame))
    
    cmds.setAttr('vraySettings.imgOpt_exr_attributes', '' ,type="string")
    cmds.setAttr('vraySettings.imgOpt_exr_attributes', 'Timecode = %s' % str(curFrame) ,type="string")
    Last edited by mr furious; 08-06-2015, 01:33 PM.

    Comment

    Working...
    X