|
How to get the current frames count (the lenght of time line) in the Sofimage project, please?
I can not find the correct function for it.
Thank you.
|
|
|
|
You have to go through the PlayControl property.
For example, here’s a snippet from the Crosswalk DotXSIConverter example code:
// get the starting frame from XSI
float startframe;
startframe = COMMANDS::GetValue(CString(L"PlayControl.In"), time.GetTime());
l_pSceneInfo->SetStart(startframe);
// get the ending frame from XSI
float endframe;
endframe = COMMANDS::GetValue(CString(L"PlayControl.Out"), time.GetTime());
l_pSceneInfo->SetEnd(endframe);
|
|
|
|
Thanks, Stephen.
As usual, great help. :-)
|
|
|
|
This is, how I did it in C++:
// Get the current project
Application app;
Project ProjectActive = app.GetActiveProject();
// The PlayControl property set is stored with scene data under the project
CRefArray aPropertiesList = ProjectActive.GetProperties();
Property propertyPlayctrl( aPropertiesList.GetItem(L"Play Control") );
int nStartFrame = (int)propertyPlayctrl.GetParameterValue("In");
int nLastFrame = (int)propertyPlayctrl.GetParameterValue("Out");
|
|
|