Menu

Compilation_instructions

Javier Taibo

NOTE: This page was valid until Maya2OSG 0.4.2c. For newer releases or SVN trunk, check the new page [Building_and_installing]

Prerequisites

To use the Maya2OSG plug-in, the following dependencies must be installed in the system:

  • Maya SDK (installs automatically with Maya).
  • OpenSceneGraph libraries and headers.

This software has been tested on the following environments, although not all of these project files are currently included or maintained:

  • Maya 6.0
  • Maya 7.0
  • Maya 8.5
  • Maya 2008
  • Maya 2009
  • Maya 2010
  • Windows XP
  • Windows Vista
  • Windows 7
  • GNU/Linux (at least Debian and Ubuntu distributions)
  • Microsoft Visual Studio 2005
  • Microsoft Visual Studio 2008
  • Microsoft Visual Studio 2008 Express Edition
  • OpenSceneGraph 2.6.x
  • OpenSceneGraph 2.8.x
  • OpenSceneGraph 2.9.x

Windows (Visual Studio)

Change to the directory of the Maya version you intend to compile the plug-in for and then to the corresponding (or nearest) Visual Studio folder.

NOTE: Current distribution is tested with Visual Studio 2008 Express Edition, although it should work perfectly in Visual Studio 2008 and later versions.

Add to

Tools > Options > Projects and Solutions > VC++ Directories

the

bin

,

include

and

lib

directories of the installed Maya SDK and OSG libraries. Current Visual Studio project try to install the plug-in (

maya2osg.mll

) in the plug-ins directory of Maya in its default location (e.g.

C:\Program Files\Autodesk\Maya 2010\bin\plug-ins

). However, it can fail in some systems (such as Windows Vista or Windows 7) because of file permissions, so check it.

Additional files (MEL scripts, shelf buttons, ...) will also be automatically installed in the current user Maya default directory.

A fast workaround to the above mentioned permission problem is to give modification access to the plug-ins directory for the user that is doing the compilation.

Linux

Change to the directory of the Maya version you intend to compile the plug-in for and then to the Linux folder. Execute GNU makefile to compile the plug-in.

For example, the Maya 2010 plug-in for Linux can be built just type:

$ cd wherever_it_is/maya2osg/maya2010/Linux
$ make

and it will create the

wherever_it_is/maya2osg/maya2010/bin/maya2osg.so

file.

**WARNING: Some Maya versions have a bug in

maya/MFnDependencyNode.h

header file that prevented compilation with g++ (it works perfectly with Visual C++). It is a missing semicolon (;) after the line reading**


declareMFn(MFnDependencyNode, MFnBase)

This issue was solved in Maya 2011.

Output

The compiled plug-in will be stored in the

bin

directory under the directory for the chosen Maya version. It will be

maya2osg.mll

in Windows and

maya2osg.so

in Linux.


Related

Wiki: Building_and_installing
Wiki: Compilation_instructions_(deprecated)

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.