there is no thing like a custom viewport.
You can render a given scene (
RenderDocument() using the hardware (OpenGL) renderer. Then you can display the resulting
BaseBitmap in the GUI somehow. That is what the material preview is doing.
One way would be to use a
GeDialog. In this case you could use a
BitmapButtonCustomGui to display a
BaseBitmap. This is something you could implement in Python.
Another way could be to add a bitmap button to the description of your object (
CUSTOMDATATYPE_BITMAPBUTTON). Such a bitmap button would display a registered icon (
BITMAPBUTTON_ICONID1). So you would have to register your bitmap as an icon using RegisterIcon(). But I haven't tried that and I don't know how well that would work.
A third solution would be to use the C++ SDK. Then you could define a custom data type which you could add to your object's parameter description. You could create a custom GUI for that data type that includes a
GeUserArea that draws the bitmap the way you want.
You find more information on parameter descriptions in these manuals:
And more information on GeDialogs and GeUserAreas in these manuals:
You find examples on how to create custom data types or custom GUI elements in C++ here: