• OctoMY API
  • OctoMY API Reference
  • C++ Classes
  • OctoMY
  • SDFPrimitiveEditorWidget
  • SDFPrimitiveEditorWidget Class

    The definition editor: the GLSL code, the parameters and a live preview of one SDF definition. More...

    Header: #include <SDFPrimitiveEditorWidget>
    Inherits: QWidget

    Detailed Description

    The left column holds the shader code editor with its toolbar. The right column holds a 3D preview, SDFPreviewWidget, above the validation, metadata and parameter cards. The editor validates the code as the user types.

    A definition of the open document is saved back through the document's executor, so the edit can be undone. setDocumentContext() points the editor at the active document; with no document it edits the user library only. publishDefinition() copies a scene definition to the library.

    ConstructShell creates the editor once, as a top-level window, and shows or hides it from a toolbar toggle. The definition to edit comes from outside: the host shows a DefinitionPicker when pickDefinitionRequested() is emitted, and calls selectPrimitiveById().

    See also SDFPreviewWidget and ConstructShell.