eradiate.test_tools.types.check_scene_element

eradiate.test_tools.types.check_scene_element#

eradiate.test_tools.types.check_scene_element(instance, mi_cls=None, ctx=None, drop_parameters=True)[source]#

Perform kernel dictionary checks on a scene element.

This function checks if the scene element can produce a valid kernel dictionary template, as well as an appropriate parameter table.

The returned Mitsuba object and parameter table can be used to perform additional checks.

Parameters:
  • instance (NodeSceneElement or CompositeSceneElement) – Node scene element to check.

  • mi_cls (mitsuba.Object) – Mitsuba class the node scene element expands to. Must be set if instance is a NodeSceneElement; ignored otherwise.

  • ctx (KernelContext, optional) – If provided, the kernel dictionary context to use. Otherwise, a default context is created.

  • drop_parameters (bool, default: True) – If True, the Mitsuba scene parameter table will be stripped off from untracked parameters.

Returns:

  • mi_obj (mitsuba.Object) – Mitsuba object the scene element was expanded to. See notes for details.

  • mi_params (dict) – Parameter table of the Mitsuba objects generated by the tested scene element.

Notes