Share

Procedural Viewport - Arnold Developer Guide

Here is an example of how to use the procedural API to create a fixed size (10x10) bounding box viewport representation in a 3rd party procedural. This viewport representation should be displayed automatically in the DCC viewport, once the procedural is added in the scene.


node_parameters
{
  ...
}

procedural_init
{
  ...
}

procedural_cleanup
{
  ...
}

procedural_num_nodes
{
  ...
}


procedural_get_node
{
  ...
}

procedural_viewport
{
    if (mode == AI_PROC_BOXES)
    {
      AtNode* bbox_node = AiNode(universe, "box", "bbox0");
      AiNodeSetVec(bbox_node, "min", -5, -5, -5);
      AiNodeSetVec(bbox_node, "max", 5, 5, 5);
    }
   return AI_SUCCESS;
}

Was this information helpful?