Frame Count

Is there any way of seeing the frame nos on the playblast?
this option is there in xsi !

try this

CODE
currentTime -query;

Sure 4 ways.

using a hud coupled withe refresh expression.
using a annotation node and a expression.
Uisng a aprticle instancer and expression.

(reason you must use expressio to refresh them is that all other mel events get supended durin playback)
Last but not the least Api

Now none of thees a are prticlulary hard to implement and can all be implemented as part of the command that calls payblast And then kill it once the playblast is over with a ascriptjob.

heres a aexample of method 1 yeah i know the proc could be done with 2 loops, its jsut a quick prototype made in 3 mins (so the code ais bit ad hoc):

CODE
global proc string[] timecode (int $timeBase)
{
   string $build="",$timecode[];
   int $time,$temp;
   $time=currentTime -q;
   $temp=$time/(60*60*$timeBase);
   $time=$time -($temp*60*60*$timeBase);
   if ($temp<10)
     $build+="0";
   $build+=($temp+":");

   $temp=$time/(60*$timeBase);
   $time=$time -($temp*60*$timeBase);
   if ($temp<10)
     $build+="0";
   $build+=($temp+":");

   $temp=$time/($timeBase);
   $time=$time -($temp*$timeBase);
   if ($temp<10)
     $build+="0";
   $build+=($temp+":");
   if ($time<10)
     $build+="0";
   $build+=$time;
   $timecode[0]=$build;
   return $timecode;
}

headsUpDisplay -removePosition 0 0; //clear the previous one
headsUpDisplay -section          0
              -block            0
              -blockAlignment   "left"
              -blockSize        "medium"
              -label            ""
              -dataFontSize    "large"
              -command          "timecode(24)" //set your timebase here!!
  -attachToRefresh  
              timecode;
expression -n "hudRefresh"
          -s ("headsUpDisplay"+
            "-refresh timecode;")  
          -o "" -ae 1 -uc al; //make sure it refreshes duirng playback.

perosnaly i prefeer method 2!

The expresssion can be omitted if yoru not interested in playback

mnhan
yes but thet does not print it on the playblast

Yes, you are right, Joojaa
Very impressive solutions.
I like method 1. It is neat and clear.

the timecode could be expressed in a bit more easily manageable form:

CODE
global proc string[] timecode (int $timeBase)
{
  string $build="",$timecode[];
  int $time,$temp,$times[]={60*60*$timeBase, ///hours
                            60*$timeBase, //mins
                            $timeBase}; //secs
  $time=currentTime -q;
  for ($each in $times){
    $temp=$time/$each;
    $time=$time-$temp*$each;
    if ($temp<10)  // padding!
       $build+="0";
    $build+=($temp+":");
  }
  if ($time<10)
    $build+="0";
  $build+=$time; // frames
  $timecode[0]=$build;
  return $timecode;
}

method 2 is even cleaner. Tough honestly ive ditsched doing this alltogether and let quictime just make a text layer on top taht contains the timecode. This has a added benefit of being nondestructive, post editable and i can have it on final/ preview renders without damaging the footage incase those ones suddenly become the FINALS as they have a tencency to do sometimes.

cool I didn't know that setting up an expression is that easy! See: Still an expression n00p!!

nah whatever:
I've seen if you maybe just want the Nr of the current frame displayed, whouldn't it be simpler without another proc: ?

CODE
headsUpDisplay -removePosition 0 0; //clear the previous one
headsUpDisplay -section          0
   -block            0
   -blockAlignment   "left"
   -blockSize        "medium"
   -label            ""
   -dataFontSize    "large"
   -command          "currentTime -q" //set your timebase here!!
   -attachToRefresh
   timecode;

expression -n "hudRefresh"
   -s ("headsUpDisplay -refresh timecode;")
   -o ""
   -ae 1
   -uc all; //make sure it refreshes duirng playback.

problem is: you have to create another expression if you change the scene. or maybe have a scripjob, that controls the automatic creation of that expression on sceneChanged.

Nice piece learned!

sure but then youd need to do a proc for that, if you need the expression to be persistent then you oculd just easily live with thet one proc defined in the headsupdiplay. Saving you the trouble.

SO aidding aif that querries wether the expresssion exsist or not ifnot then add the expression.

This and the scriptjob does however have a nasty side effect of repliaction form file to file essentialy working like melvirus infecting any filer that it ever coes into contact with.

Thetswhy id rather se the expression bundled in a script for playblast and killed afterwards. Because it acn be nuisance if let loose.

Thanks a ton!!!!!!!!!!!!

QUOTE(Joojaa @ 12/20/05, 03:38 PM)
heres a aexample of method 1 yeah i know the proc could be done with 2 loops, its jsut a quick prototype made in 3 mins (so the code ais  bit ad hoc):

CODE
global proc string[] timecode (int $timeBase)
{

QUOTE(startoon3d @ 12/20/05, 01:54 PM)
Is there any way of seeing the frame nos on the playblast?
this option is there in xsi !
[snapback]222935[/snapback]

THANKS A TON PEOPLE!!!!!!!!!!!!!!!!!!!!!!!!!!