Integrating InlineDrawing in DCCs

バージョン 1.12.0 で追加.

The Inline Drawing extension can be used directly with the provided OpenGL types to render into DCC viewports. This integration is provided for several DCCs, however it can be extended for additional products or in-house systems.

注釈

You can find all of the KL types in the InlineDrawing エクステンション.

To ensure that the InlineDrawing is rendered, you’ll need to construct a FabricCore::RTVal of the DrawContext (object) object in C++:

FabricCore::RTVal drawContext = FabricSplice::constructObjectRTVal("DrawContext");

You will then need to fill all of its members accordingly. See the KL snippet below for more detail.

バージョン 1.12.0 で追加.

The DrawContext is used to provide contextual information during a custom draw. Please see the OGLInlineDrawing for an example of this.

Once that is done you will need to call into Splice’s rendering callback, as seen below, in C++:

try
{
  FabricSplice::SceneManagement::drawOpenGL(drawContext);
}
catch(FabricCore::Exception e)
{
  myLogFunc(e.getDesc_cstr());
}
catch(FabricSplice::Exception e)
{
  myLogFunc(e.what());
}

This will render the content into the DCCs viewport directly.