construct::opal::DefinitionGetTask

Return one definition in full, its GLSL source included.

Declared in src/libs/libconstruct/construct/opal/DefinitionGetTask.hpp
Inherits construct::opal::ConstructQueryTask
Group construct

Detailed description

OPAL listed definitions with construct.scene.list_definitions, which gives the parameters and not the shader. No task returned the shader, so asked how a custom operator works, OPAL told the owner that it "could not read the operator's code" and explained it from its parameter names (owner, 2026-10-04, construct fix list item 9).

This task returns what the document resolves for the id: a definition of the scene, of the user library, or a built-in one. It returns the whole serialized definition, its home, and the shader code as its own output, so that the model does not have to dig the code out of the JSON.

It also returns source, the record text of the definition (construct-definition-editor §DUO-3): the YAML with its comments, as the editor shows it. A definition with no text, such as one that construct.definition.add made from a map, gets the serializer's text of its fields. The text is what construct.definition.update takes in its source form, and what construct.definition.validate checks.

See also SceneListDefinitionsTask, DefinitionUpdateTask.