Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Subject: Cameras
Subject: scaleDown command
Subject: black out solved
Subject: Aircraft Tutorial
Subject: Mathematical XYZ ?
Subject: Re: Its done This vs That
Subject: Re: Its done first week
recommendations for screen video captures?
Subject: 3DExplorer "Oddity "
Subject: Re: New Director
Subject: ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
Subject: RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Subject: Re: Texturing
Big Break Contest Videos
Subject: New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Subject: Plasma?
Looking for Inspiration
Subject: Weird EMail Q
Subject: Re: It 's done first week ?
Subject: Cherry not cranberry
Subject: Re: New game
Camera Animation Problem
Subject: Particle plugins?
 
Subject: getting current time

Subject: getting current time

2003-12-15       - By Berj Bannayan

 Back
Reply:     1     2     3     4  

Hi all,

Is there a better (more succinct) way to get the current frame than this?

double
getCurrentTime()
{
 MSelectionList    selection;
 MObject           time_node_obj;
 MTime             current_time;
 MPlug             out_time_plug;

 selection.add("time1");
 selection.getDependNode(0, time_node_obj);

 MFnDependencyNode time_node(time_node_obj);

 out_time_plug = time_node.findPlug("outTime");
 out_time_plug.getValue(current_time);

 return current_time.as(MTime::uiUnit());
}

This works fine but it seems a little cumbersome (especially when I add in
error checking).  I feel like I'm missing something.

Thanks,
Berj

--
"A cigar is a banana for the monkey of the soul" -- Switters
Berj Bannayan - soho vfx - berj@(protected) - 416-591-1400


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---
List-help: <mailto:listar@(protected)?Subject=help>
List-archive: <http://www.highend3d.com/maya/devarchive/>