Announcing the Release of SMTK 21.10

The major improvements under this release can be grouped into the following areas:

  • Making it easier to debug Observers
  • Expanding Attribute Resource’s Query Grammar
  • New View for displaying Resource Components and their associated Attributes
  • Improving qtAssociation2ColumnWidget’s Operation Hander
  • Support for String Tokens
  • Dynamic Initialization in Plugins

Debugging Observers

In the previous version of SMTK, turning on Observer debugging would printed the messages for all Observers. Now smtk::common::Observers takes a second template parameter: a boolean indicating whether to print debug messages or not. This does away with the previous macro (which printed messages for all observers – resource, operation, etc.) in favor of messages that can be enabled for a single specialization.

Expanding Attribute Resource’s Query Grammar

It is possible to ask the attribute resource to filter its attributes using a string that specifies some
search criteria (i.e., a filter). The current implementation expands on the base functionality provided by smtk::resource::Resource::queryOperation which allows users to filter components based on the existence and values of properties by adding the ability to search for attributes based on their type (i.e., the name of its definition and those definitions which inherit it).

Note that these query strings can be used in a resource’s find(…) method as well as in a Reference Item Definition’s Accept or Reject rules

New View for Displaying Resource Components and their Associated Attributes

Previously SMTK provided the qtModelEnityAttributeView class to display a list of model entities along with an attribute that is uniquely associated with it. Unlike the qtAttributeView which allows a single Attribute to be associated with several Resource Components.

This new qtComponentAttributeView class expands the capabilities of qtModelEnityAttributeView by now supporting Components of any Resources not just Model Resources which will allow it to be used in workflows involving graphs resources such as the new OpenCascade support.

Also there is no longer a need to specifier the filter type. The View will look at the association rule associated with the Attribute Definition specified in the view configuration. If more than one Definition is specified, then the first one is chosen.

As a result the new constraints to using this View are:

  • The Attribute Definition(s) in the configuration must contain the association rule to be used to determine which Resource Components need to be attributed
  • If more than one Attribute Definition is listed, then the first one’s association rule will be used.

In addition the following improvements have been made:

  • Selection of the Type of Attribute via the ComboBox no longer requires any button press after the selection has been made
  • Also addressed a bug related to the View being updated when selecting a different attribute to be assigned to the SMTK component. The symptom was that instead of accepting the requested type, the View would instead display “Please Select” indicating that the component had no attribute associated with it. The reason was due to the fact that the View was being updated via the call to removeAttribute prior to the new attribute being created. The fix was to postpone calling that method until after the new attribute was in place.

The figure below shows new qtComponentAttributeView UI being displayed in the bottom left panel. In this example every side set in the model needs to be associated with one of several types of boundary condition Attributes.

CMB ModelBuilder running with SMTK 21.10 showing the new qtComponentAttributeView display (bottom left corner).

Improving qtAsscoiation2ColumnWidget’s Operation Handler

The original implementation would cause a large number of refreshes due to the fact it merely would see if the were any resource changes. The new logic is a bit more intelligent and will only cause a refresh if any of the following conditions happen:

  • A modified component is either the widget’s attribute or can be associated with the widget’s attribute
  • A deleted component could have been associated with the widget’s attribute
  • A created component could be associated with the widget’s attribute

The result should be a more responsive UI.

Support for String Tokens

SMTK now provides a smtk::string::Token class for working with tokenized strings. A token can always provide its source string data, but equality and inequality comparisons are done by comparing an integer token identifier.

Dynamic Initialization in Plugins

The CMake macro SMTK provides to create plugins now uses a new feature in ParaView to ensure that plugins are initialized properly in both Qt-based GUI applications and python interpreters.

This should not require any changes to your code; it simply changes the code generated by the smtk_add_plugin() macro. Instead of generating a ParaView plugin with an automatically-generated pqAutoStartInterface class,
it generates a ParaView plugin with a vtkPVDyanmicInitializerPluginInterface class which calls a free function to initialize the plugin’s registrars.

Questions or comments are always welcome!