The project settings
in the samples *.vcproj contain
the required configuration options for Visual Studio development.
How to set up Visual Studio
- Create a new project. Select a DLL project
template.
- Add any sample project to the newly created
workspace.
- Open the project settings for the workspace.
- Configure the new project to correspond
exactly to the sample project settings.
- Delete the sample project from the workspace.
C++ plugins are made
by compiling code into Dynamically Linked Libraries (DLLs) which
you put in [MotionBuilder]\bin\plugins from where they are detected
and loaded at startup.
You can also define additional
custom plugin paths via Settings > Preferences > SDK. You
could define network directories, for example, enabling a group
of users to share a centralized repository of plugins on a file server.
- Choose a Unique Name: you must declare
a library using the library declaration macro FBLibraryDeclare(LibName).
LibName must be unique because this macro is used to identify the
class to be created when loading an FBX file, and because it declares
global symbols. Since this unique name should not interfere with other
third-party developers, we suggest that you prefix (or suffix) it
with your company name or other unique identifier. For example: FBLibraryDeclare(CustomLibraryName);
- Registering Classes: certain plugin types
require classes to be registered in the MotionBuilder registry (devices,
tools, constraints, and so on.) These classes must be registered
in the library declaration (FBLibraryDeclare), which includes the
following:
FBLibraryDeclare( mylibname )
{
FBLibraryRegister( MyDeviceClass );
FBLibraryRegister( MyDeviceLayoutClass );
}
FBLibraryDeclareEnd;
Code samples are in [MotionBuilder]\OpenRealitySDK\samples.
In each sub-directory there are detailed descriptions of each plug-in,
indluding how to test them.