Problem loading a project file with Motive API

Post Reply
mtmike
Posts: 3
Joined: Fri Feb 26, 2016 3:16 pm

Problem loading a project file with Motive API

Post by mtmike »

I'm trying to run Motive in headless mode using the Motive API. When I call TT_LoadProject(), it returns NPRESULT_FAILED.

The code can continue on and does communicate with the Motive API -- it can enumerate the attached cameras, for instance. I would like to get the project file to load, though, since it has all my settings and rigid body definitions.

Has anyone run into this problem? Any ideas on what to check? Also, I was wondering if the Motive API is actively maintained and recommended for new projects, since the documentation was quite sparse.

I have Motive 1.9.0 installed and am using the API files from there. I've tried Motive project files from 1.9.0, 1.8.0, and a 1.5 file that I downloaded from here (https://github.com/orhirshfeld/Motive-A ... -Real-time), but they all produce the NPRESULT_FAILED error.
steven.andrews
NaturalPoint Employee
NaturalPoint Employee
Posts: 718
Joined: Mon Jan 19, 2015 11:52 am

Re: Problem loading a project file with Motive API

Post by steven.andrews »

Hello mtmike,

Thank you for posting with us.

There are two things that cause load failures for projects, rigid bodies, etc.
- The filename is specified incorrectly.
- The file is corrupt or saved from a future version of the software.

The most likely issue is that the filename is specified incorrectly. We typically recommend that a user name their project: project.ttp and place it at the root directory on drive C. Then attempt to load with the following:

TT_LoadProject( "C:\\project.ttp" );

It is important to use the 'double backslash' when specifying a filename in C/C++ because \ is a control character. You must also keep in mind whether you've built with multi-byte strings or unicode. The above example is compiled multi-byte. (this setting is in the project settings of your Visual Studio project under general).




Regarding versions, it is important that you recompile your application when you change the version of Motive you have installed. If the version of Motive you are saving a Project file from does not match the version on which the API application was compiled, there may be compatibility issues.


Documentation for the API is almost nonexistent, but we do maintain the API as we upgrade Motive. Documentation is something we hope to improve with time.

I hope you find this information to be useful. If you require any further assistance with this, please feel free to open a Support ticket with us at help.naturalpoint.com

Best,
Steven
--
Steven Andrews
OptiTrack | Customer Support Engineer
Post Reply