C++ Plugins Example

This example registers multiple node plug-ins written in C++.

  • LerpExample.cpp: A simple node which interpolates two floats.
  • TransformGeometryExample.cpp: A node which transforms a geometry vertices by a matrix.
  • register.cpp: Registers the plugins.

Windows Compilation

Prerequisite

  • Visual Studio with the Visual Studio 2015 (v140) Plateform Toolset installed.
  • CMake >= 3.10

Compile

cd rumba/sdk/examples/cxx_plugins
mkdir build
cd build
cmake .. -G "Visual Studio 14 2015 Win64" "-Drumba_DIR=rumba_installation_path/sdk/"
cmake --build . --config Release

Linux Compilation

Prerequisite

  • clang-9, or another modern C++ compiler like clang >= 7, gcc >= 9
  • CMake >= 3.10

Compile

To compile with clang-9

cd rumba/sdk/examples/cxx_plugins
mkdir build
cd build
CXX=clang-9 cmake .. "-Drumba_DIR=rumba_installation_path/sdk/"
cmake --build .

To compile with your default compiler

cd rumba/sdk/examples/cxx_plugins
mkdir build
cd build
cmake .. "-Drumba_DIR=rumba_installation_path/sdk/"
cmake --build .

Installing the plug-ins

You have now to register your plug-ins in Rumba. To do that, add the directory plug-in path to the RUMBA_USER_PLUGINS environment variable:

RUMBA_USER_PLUGINS=path_to_the_plugin_binaries"

See Environment Variables.

Register with MTORBA

If your plug-in is the translation of an existing Maya plug-in, you also want to register it with MTORBA in order to be exported from Maya.

To do that, you need to write a MTORBA ‘exporter’ script. You have lot of exporter samples in module/python/mtorba/exporters/. Place your exporters in a folder and add the path of this folder to the MTORBA_USER_EXPORTERS environment variable. MTORBA will load them automatically.