1. 05 Nov, 2018 1 commit
  2. 03 Nov, 2018 1 commit
  3. 30 Oct, 2018 3 commits
  4. 02 Oct, 2018 1 commit
    • David Thompson's avatar
      Make highlight-on-hover a user preference. · c0781fdd
      David Thompson authored
      This also
      + makes highlighting more robust against unreported
        (i.e., buggy Qt) "leave" events (by also resetting the hover
        selection when the mouse leaves the resource panel dock widget).
      + draws a background on Qt items as the mouse hovers over them
        (when highlight-on-hover is set) so that users get feedback on
        when Qt has skipped events.
      + fixes transforms applied to the representation; previously,
        transforms were not applied to selected/highlighted components.
      + fixes the build against latest ParaView master.
        The old `WRAP_EXCLUDE` and `WRAP_EXCLUDE_PYTHON` CMake source
        properties are no longer used; classes must pay attention to
        the `__VTK_WRAP__` macro to exclude themselves if needed.
      + adds user preferences for selection/hover colors and a default
        model-face color (for model edges, we should use ParaView's
        existing edge color).
        Thanks to Utkarsh for explaining the `<Extension ...>`
        element in PV's SM XML.
      + fixes the "can't deselect" bug (the SMTK model-representation's
        actors/mappers were not being updated when no entities were selected).
  5. 11 Sep, 2018 2 commits
    • David Thompson's avatar
      Really fix tutorial compilation for real. Totally. · 5a49a477
      David Thompson authored
      This still doesn't fix the execution.
      Also, fix a compiler warning and add a release note.
    • David Thompson's avatar
      Only render 1 copy of the data at a time. · f0d78d77
      David Thompson authored
      The model representation previously never turned off
      the visibility of "normal"ly-rendered blocks when an
      object was selected; it merely turned on the "selection"
      actor's copy of the block.
      Now, at most 1 of the 2 will be drawn (0 will be drawn
      if the block is hidden).
      Opacity is not used for highlighted/selected blocks.
      Note that hidden blocks will not be highlighted at all.
      This may be counterintuitive.
  6. 09 Jul, 2018 1 commit
  7. 14 Mar, 2018 1 commit
    • David Thompson's avatar
      Add a qtItem subclass for resource components & more. · 679154d0
      David Thompson authored
      + Add the qtReferenceItem subclass of qtItem. Then add
        qtComponentItem which inherits qtReferenceItem. Eventually,
        qtResourceItem will also exist (or qtReference item will
        encompass functionality for both resources and their components).
          + This item now properly presents and allows editing
            of entries related to a ComponentItem. However, it does
            not update the entries of the ComponentItem upon editing yet.
          + The Qt item displays a synopsis of the selected components
            and indicates whether the selection meets the requirements
            called out by the attribute (specifically, the number of
            entries must be allowed and the selection must come from a
            list of acceptable components).
      + Add callbacks to SMTK resource panel to signal when a row is hovered
        and change the "hovered" selection value.
      + Add support to the model representation to illustrate the "hover"
        selection value in preference to the "selected" value.
      + Fix a memory leak in the model representation.
      + Fix the SMTK attribute panel exposed as a PV plugin:
          + Always clear the widget out when switching between
            attribute resources.
          + Note that this has not been tested with switching between
            views within the same attribute resource, and will probably
            need changes to handle that case.
          + Also note that you must click on a _resource_ entry in the
            resource tree-view panel to switch what is displayed in the
            attribute panel; clicking on an attribute is not enough.
  8. 12 Feb, 2018 1 commit
    • David Thompson's avatar
      Fix various warnings. · 4311350f
      David Thompson authored
      + No virtual Qt signals allowed.
      + MSVC "performance" warning on int->bool cast.
      + Unused variables/parameters.
  9. 10 Feb, 2018 1 commit
    • David Thompson's avatar
      Add per-view, per-component visibility edits. · 7aae9671
      David Thompson authored
      + Visibility editing in the SMTK resource tree, in all its glory.
        Consistent, per-view component visibility editing, including:
        1. Toggling of pqPipelineSource visibility when a resource's visibility is edited.
        2. Immediate updates of all eyeball icons in the entire tree when one
           component's visibility is presented multiple times.
        3. Immediate updates of all eyeball icons when the active view changes.
        4. No eyeballs displayed when the active view is null.
        5. Proper decoration of resource phrases so their visibility may be edited.
        6. Sorting of phrases by default.
      + Other GUI components (besides the SMTK resource tree) may call
        `pqSMTKModelRepresentation::setComponentVisibility()` and the resource panel
        should stay up to date. This is in anticipation of RGG, which wants to change
        ping/duct/assembly/core visibility in response to what's being edited.
      + Adjust the color and opacity used to render selected entities.
        By default, the selection should be rendered as a translucent overlay.
        This removes problems with z-fighting and allows users to see when
        visibility has changed on selected entities.
      + Do not add color arrays to model-entity polydata (in the vtkModelMultiBlockSource).
        This wastes space; instead, entity color is now stored as field-data in an array
        named "entity color".  However, this field data is currently ignored by the model
        representation in SMTK's ParaView plugins; instead, the model resource itself is
        asked for color property information.  The "entity color" array is stored so that
        ParaView and VTK filters ignorant of SMTK can make use of it.
      + Change "mixed-dimension cell(s)" to "cell(s)" in model-entity summaries.
        This is less confusing to users. And more concise.
      + Fix a crash when the resource loader fails.
        This can happen when the plugin for the type of session
        contained in a resource's file is absent.
  10. 02 Feb, 2018 1 commit
    • David Thompson's avatar
      Adapt to the new operator/resource classes. · ff5d9498
      David Thompson authored
      + Use the new resource/operator framework to load model files.
      + Check more pointers to avoid crashes.
      + Eliminate warning from vtkModelMultiBlockSource about model being unset
         because now each **resource** should have its own representation,
        so we should always render everything the resource has to offer
        rather than trying to traverse just one model.
      + Set up SMTK model representation properly: set both the resource and the
        vtkSMTKWrapper instance so that selections are properly synchronized.
  11. 24 Jan, 2018 1 commit
    • David Thompson's avatar
      Simpler and consistent color-by mode and default. · 92147784
      David Thompson authored
      Use the new ParaView plugin macro "add_paraview_toolbar" instead of
      Make the default color-by mode for SMTK models "Entity", not "Field."
      Disable the "Active Variable Controls" toolbar when ParaView's active
      representation is an SMTK model (unless the model is being colored by
      field values).
  12. 18 Jan, 2018 1 commit
    • David Thompson's avatar
      A smorgasboard of fixes + improvements to ParaView support. · b3c27571
      David Thompson authored
      These changes have all been squashed down into 1 commit so
      it will be easier for TJ to rebase the operator branch:
      + Fix the conversion of phrase path to QModelIndex.
        Phrase indices/paths should be ordered top-to-bottom;
        the index of a descriptive phrase goes from top to bottom
        as the index is traversed from beginning to end.
      + Improve phrase-list handling.
        Now manually-specified subphrases are properly handled by
        setting the phrase content to a phrase list that has a
        properly-generated default title.
      + Set active pipeline source from panel.
        When a resource is selected in the panel, make its pipeline source active.
        If multiple sources are selected, make the first we encounter active.
        This allows CMB v6 to do without the pipeline inspector while still
        providing a way to set each resource's color-by mode and other display
        properties individually.
      + Prevent a crash on exit.
        The pqSMTKResourceManager was being destroyed after its server but
        with no signal that the server was going away. This caused the
        resource to ask for a pointer to a partially-destroyed resource
        manager during *its* destruction.
      + Always clear the PV cache-keeper when the model changes.
        Otherwise, the representation geometry can be stale when the filename
        is changed by the user.
      + Remove a debug printout of a JSON-RPC response.
      + Add an SMTK model for testing.
        This is just the pmdc model but with edges and vertices
        created as needed. It also has color set on some (but not
        all) volumes so that color-by-volume mode can be tested.
      + Address TJ's comments on the MR.
      + Add a "color-by" toolbar for the model representation.
        The pqSMTKColorByWidget class draws heavily from ParaView's
        pqDisplayRepresentationWidget and the pqSMTKColorByBehavior class
        similarly from pqRepresentationToolbar.
      + Fix dashboard warnings.
  13. 12 Jan, 2018 1 commit
    • David Thompson's avatar
      Model representation and resource tree for ParaView. · ebe09392
      David Thompson authored
      This commit contains many changes from Alvaro Sanchez and me to address:
      + Color-by-entity and -by-volume mode for the model representation.
        In cases where the begin() entity is invalid, volumeOfEntity() would
        return an entity not flagged as being a volume.
        In order to get access to an EntityRef's color property, pqRepresentation
        provides a smtk::model::ManagerPtr to the vtkSMTKModelRepresentation object.
        The appropriate EntityRef is queried from model::ManagerPtr (Resource)
        depending on the active coloring mode; color-by-entity uses direclty its
        entity color and color-by-volume uses the color of the 0th volume bounded
        by the entity.
      + Use pqSMTKResource's model::Manager instead of a global instance.
      + Representation subtypes (points, wireframe, surface, surface with edges)
        for the model representation.
      + Line color for the model representation.
      + Representation class location.
        Move the server-side classes to the PV server extension and add
        pqProxy subclasses to the appcomponents extension.
        This is necessary to avoid cyclic dependencies between the representation
        and the resource panel (which will soon display/modify the representation's
        visibility information).
      + Move DescriptivePhrase subclasses (that describe content) into
        a PhraseContent class, instances of which are owned by DescriptivePhrase.
        This separates the hierarchy of subjects from the content of the subject
        so that attributes of the subject can be overridden via the decorator pattern.
        This leaves phrase lists with improper descriptions at the moment
        since the common/union flag values are not set properly (among other things).
      + Displaying "eyeball" visibility icon selectively -- only
        when the PhraseContent advertises it as available is it rendered and active.
      + Use the new visitor method of vtkCompositeDataDisplayAttributes to
        fetch per-view block visibility information from mappers and add
        methods to set the per-block visibility, although this is not complete yet.
        This requires us to bump VTK and PV forward, which in turn requires us to
        Fix build issues due to changes in wrapping.
          + Fixes errors: No rule to make target '*Hierarchy'.
          + Manually excludes classes that do not need wrapping.
      + Try to keep `ENTITYID` out of SMTK except for the `vtkModelMultiBlockSource`.
      + Attach UUID to both the multiblock metadata and the actual `vtkDataObject`
        instance. The latter is preferrable in almost every instance since it is
        then possible for methods passed only a data object to get its UUID.
        This is necessary for the PV representation's visibility modification
        queries to work properly since, when iterating over visibility entries in
        vtkCompositeDataDisplayAttribute, only the block is available, not its metadata.
      + Add missing parts to representation xml: property to enable/disable
        multi-block inspector coloring.
      + Create and make representations visible by default in new views.
        pqApplyBehavior makes the model visible on the initial view. Additional
        views need to create and make their representations visible, this is done
        through pqSMTKBehavior.
      + Fix some crashes by holding a weak ref to the selection.
      Co-authored-by: Alvaro Sanchez's avatarAlvaro Sanchez <alvaro.sanchez@kitware.com>
  14. 08 Dec, 2017 1 commit
    • David Thompson's avatar
      Work on the UI for ComponentItem / deprecation of ModelEntityItem. · 3ece72e1
      David Thompson authored
      + Move smtk::resource::SelectionManager to smtk::view::Selection.
        It really isn't a manager; it's a selection. Each instance holds a
        map enumerating the "degree" to which each component is selected.
        You can have multiple selections in an application.
      + Make the ParaView SMTK resource panel respond to selections
        and emit its own. Note that selecting a summary phrase does not
        result in entities in its child phrases being selected. This
        is a departure from the previous phrase view; we may add
        this functionality into the new resource panel at some point
        as it satisfies the priniciple of minimum astonishment.
        The problem is that it requires computation of child phrases,
        which destroys the lazy nature of the algorithm.
      + Fix resource handling when deleting sources.
      + Add a VTK-based attribute "reader" (that produces a pretty empty multiblock
        but has the side effect of adding a resource to the resource manager when
        an observer is attached).
      + Port more code over from old, model-only EntityListPhrase to PhraseList:
        generate more descriptive titles for lists with many, potentially disparate children.
        For now, this only deals with model, not mesh or attribute, components.
      + Adds a currently-uncompiled "unit test" for a component item UI.
      + When inheriting QStyledItemDelegate, do not call the inherited
        `paint()` method inside your own as it will draw each item's
        `Qt::DisplayRole` text overlapping your own.
  15. 04 Dec, 2017 1 commit
    • Alvaro Sanchez's avatar
      Fix re-selection bug. · 4aa473dd
      Alvaro Sanchez authored
      When rubber-band selecting already selected blocks, a different selection
      would be obtained (selection actors would be covering the actual model to
      be selected). For this reason, selection actors also need to be registered
      for hardware selection.
  16. 01 Dec, 2017 1 commit
    • Alvaro Sanchez's avatar
      Added SMTKModelCompositeRepresentation. · a500e4be
      Alvaro Sanchez authored
      In order for SMTKModelRepresentation to update on ColorArrayName
      changes, vtkSMSMTKModelRepresentationProxy had to derive from
      vtkSMPVRepresentationProxy.  PVRepresentationProxy however, required
      its server-side representation be a CompositeRepresentation and so
      SMTKModelRepresentation is now exposed through its composite version.
      This also facilitates adding representation subtypes in the future
      if required (Outline, SurfaceWithEdges, etc.).
  17. 30 Nov, 2017 1 commit
    • David Thompson's avatar
      Many changes to support resource and operation reorg. · d31e963f
      David Thompson authored
      + Add an abstract PhraseModel class and a concrete ResourcePhraseModel class.
        A PhraseModel owns a DescriptivePhrase hierarchy and the SubphraseGenerator
        instances attached to it. The PhraseModel class maintains the hierarchy as
        operations and selections are performed by users.
        A PhraseModel may be configured by an SMTK views.
        PhraseModel provides some methods for its children to override that
        make managing the hierarchy much simpler.
      + Add a JSON deserialization for smtk::view::View and test that it matches
        the equivalent XML description.
      + Add an observe() method to resource manager.
        Now it is possible to get notified when a resource is added/removed.
        Note that the notification comes *after* the operation that reads the
        resource has completed.
      + Track both resources and resource managers with pqProxy subclasses.
      + Add a ParaView plugin panel that presents resources in a model-tree view.
      + Provide minimal registration of the model manager to the resource manager.
      + Add DescriptivePhrase::visitChildren() method for traversing a phrase
        hierarchy in order to update it.
      + Fix issues with operator result creation.
        Model operators still need to use their Session's attribute collection to
        create the result while the new-style operators should use the operator
        manager. This will change again when the new operation manager is
        modified to use an attribute collection per operator rather than a single
        instance for the manager.
      + Implement more of ComponentItemDefinition and partially implement XML
        I/O of attributes with ComponentItems. The associated components of an
        attribute are still not synchronized/serialized/deserialized.
      + Provide some model-operator-specific code to copy result
        summary items from ModelEntityItems to ComponentItems with
        similar names (now also defined in Session.cxx).
        In the long term, ModelEntityItem should disappear.
      + Make Resource store a weak pointer to its manager,
        not a raw pointer. Since the manager may not hold the
        only shared pointer to a resource, the resource may outlive
        its manager and should still behave.
  18. 29 Nov, 2017 1 commit
  19. 28 Nov, 2017 1 commit
  20. 21 Nov, 2017 3 commits
  21. 20 Nov, 2017 1 commit
  22. 18 Nov, 2017 1 commit
    • David Thompson's avatar
      Checkpoint on PV, resource, selection, and operation refactor. · 4e330ba2
      David Thompson authored
      + Implement some stubbed methods in smtk::operation classes
        and test them.
      + Add C++11 callbacks for listening to operator events (all
        of them, not just individual operators like the model-
        operator callbacks did).
      + Add behaviors to the ParaView extensions that do client-
        server communication of selections.
      + Add pqSMTKResourceManager proxy that gets created by
        pqSMTKResourceManagerBehavior upon plugin startup.
        All the selection management stuff in the behavior should
        eventually be moved into the proxy class.
      + Add pqSMTKResource proxy that registers itself with
        the VTK/PV-wrapping of SMTK's resource manager.
      + Fix documentation and add stubs for documenting the
        `smtk/extension` directory.
      + Add Qt extension classes that expose the new
        descriptive phrase classes in `smtk/view`.
      + Use the new qtDescriptivePhraseModel in a panel
        to show resources in ParaView as a behavior.
      + Eliminate client-server duality.
        For now, we work only with PV's built-in server,
        not separate client+server processes.
        This means that there is no need for operator
        forwarding, separate resources on the client and server,
        problems synchronizing the client-only attribute panels
        with models that are modified only on the server, etc.
  23. 16 Nov, 2017 1 commit
  24. 15 Nov, 2017 2 commits
  25. 25 Oct, 2017 1 commit
    • Alvaro Sanchez's avatar
      Improve SMTKModelRepresentation rendering. · baf39424
      Alvaro Sanchez authored
      Makes GlyphMapper use property arrays in its input (Masking, Scaling,
      Orient and Source indexing all enabled by default).
      Set ColorMode in mappers to correctly render translucent blocks (through
      depth-peeling). The default ColorMode would cause CompositeMapper2
      ::GetIsOpaque to return true.
  26. 24 Oct, 2017 1 commit
    • Alvaro Sanchez's avatar
      Added SMTKModelRepresentation plugin. · a0ea643f
      Alvaro Sanchez authored
      This representation makes use of three inputs:
        - Model entities
        - Glyph prototypes
        - Glyph points
      The glyph input properties are set through vtkSMSMTKModelRepresentationProxy.