All, but especially @Bob_Obara:
I’ve got selections in modelbuilder generating a list of available operations and have come up with a few questions on the operation panel. Here’s what I’m planning:
In real life, the list of operations that work with a given selection is not as appetizing as the prototype above because many unrelated or uninteresting operations are valid and interspersed with the useful operations. For example, with a polygonal face selected I see:
smtk::model::AddImage smtk::model::AssignColors smtk::model::CreateInstances smtk::model::ExportModelJSON smtk::model::GroupAuxiliaryGeometry smtk::model::SetProperty smtk::model::TerrainExtraction smtk::bridge::discrete::RemoveModel <-- probably bad operator xml smtk::bridge::discrete::SetProperty <-- probably bad operator xml smtk::bridge::polygon::CleanGeometry smtk::bridge::polygon::CreateVertices smtk::bridge::polygon::CreateEdge smtk::bridge::polygon::CreateEdgeFromPoints smtk::bridge::polygon::CreateFaces smtk::bridge::polygon::CreateFacesFromEdges smtk::bridge::polygon::Delete smtk::bridge::polygon::DemoteVertex smtk::bridge::polygon::ForceCreateFace smtk::bridge::polygon::SplitEdge smtk::bridge::polygon::TweakEdge smtk::bridge::polygon::ExtractContours smtk::bridge::mesh::EulerCharacteristicRatio smtk::bridge::mesh::Export
I’ve added a workflow directory to SMTK and a new class that will downselect and relabel operations. However, that class must still be initialized and updated. With a manual set of preferred operations, that leads to a view in modelbuilder like this:
That still leaves questions:
- How should this workflow class that filters+orders operations be initialized for now? In my branch, I’m just reading JSON from a fixed path, which is not an answer. It seems like several pieces of information related to the workflow need a place to live:
- the set of plugins that modelbuilder should load by default;
- the workflow task graph (which does not exist yet), which will definitely want to change the preferred order of operations if not also the list of “approved” operations; and
- affinities between operations and workflow tasks (so that not only the first operation listed, but the order of all viable operations can depend on the selection).
- When it comes to using an existing operation in multiple ways (e.g., turning polygon-session’s create edge into both create river and create road), we’ve discussed simply subclassing the operation. But what about relabeling an operation’s items? Overriding an item’s description (brief or detailed)? Hiding items? Marking items as advanced? All of these things are currently stored in the attribute system but arguably belong in “view” instead so that we don’t have to maintain multiple copies of the operator’s XML/JSON specification.
- What if you’re editing an operation’s parameters and change the application selection? Should the operation edits be abandoned (this seems wrong and anyway, edits that don’t invalidate the operator will be preserved in the attribute collection for the operator).
- How should we deal with “operator stay” functionality — where a user wants to re-run an operation multiple times, with or without parameter edits?