Skip to content
  • Robert M. O'Bara's avatar
    Add task worklets and a task gallery · 7ab3583d
    Robert M. O'Bara authored
    
    
    There are times when an user will need to interactively extend a task workflow by
    adding new tasks or a pre-connected set of tasks to the existing workflow, including
    new dependencies and adaptors.  To provide this functionality, SMTK adds  the concept
    of a *worklet*.  A *worklet* is an object representing a set of tasks created to
    reuse a set of workflow logic in multiple workflows. In SMTK, a worklet is represented
    as a component of a project and is managed by a project's task-manager in a collection
    of worklets known as the "gallery."
    
    This change also
    + makes `task::Adaptor` inherit `resource::Component`
    + refactors task events and their observers to occur during observation
      of operation results (rather than spontaneously, since now that tasks,
      adaptors, and worklets are components, that would force these events
      to happen during operations).
    + adds a simple worklet example in the data/projects directory called
      SimpleWorkletExample.
    + moves the `math_op.py` plugin (which is used by multiple projects) to
      now be under data/operations
    + adds an `EmplaceWorklet` operation to instantiate tasks, adaptors, and
      dependencies from a worklet into its task manager.
    + adds a `RenameTask` operation that allows users to change task names
      and a context-menu that runs this operation.
    + adds the `qtWorkletModel`, `qtWorkletPalette`, and `pqSMTKWorkletPanel`
      GUI extensions to allow users to drag worklets into the nodal task
      user interface (and thus run `EmplaceWorklet`).
    + removes the task-node UI-state that previously stored the (x,y)-locations
      of tasks in the nodal task UI (this will be replaced with a separate
      facility for storing the information without the overhead and timers
      of the removed approach).
    + fixes an issue when creating instances of the PyOperation class (the
      base for all operations written in Python) from a non-GUI thread by
      providing an override for the create method that runs Python code in
      the GUI thread.
    + Added the concept of UIElementState so that UI Elements such as the pqSMTKTaskPanel can save
      and restore Task Node locations when being rendered.
    + Added a map of UIElementStates to the View Manager so that operations can set and access
      the current configurations of the UIElementStates
    + Task Node locations are now stored in their own JSON element in a Project's JSON.  All UI
      state information should now be stored under the "ui-state" key.
    
    Co-authored-by: default avatarRobert O'Bara <bob.obara@kitware.com>
    Co-authored-by: default avatarDavid Thompson <david.thompson@kitware.com>
    7ab3583d