Subject: getting current time 2003-12-16 - By Erick Miller
Back MAnimControl::currentTime ()
Berj Bannayan wrote:
>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 >
-- Erick Miller Technical Director emiller@(protected) Digital Domain, 300 Rose Ave, Venice, CA 90291 (310)314-2800 ext.3504 __ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- List-help: <mailto:listar@(protected)?Subject=help> List-archive: <http://www.highend3d.com/maya/devarchive/>
|
|