[Smtk-developers] Operator View

David Thompson david.thompson at kitware.com
Thu Oct 20 18:14:39 EDT 2016


Hi Bob,

> So I’m designing the operator view base calls - which would be used as the default GUI for an operator.  I just wanted to describe some of the design:
> 
> 1. It assumes that the operator is defined by a single attribute definition/attribute - the old way was reusing the existing instanced attribute view.  The reason for doing this is to know where to grab the association information.

Does this mean that each view will have its own attribute-instance? I like it, but be aware that it will lead to frustration in some cases: people sometimes expect a way to re-apply the same operation again (with the same arguments which are not the default arguments) but the view will appear to have forgotten their previous configuration.

For instance, saving to a file requires a filename. The attribute definition cannot provide a meaningful default, so every time users go to save, they will be asked to enter the same filename.

One workaround would be to provide operators with a virtual "auto-populate" method that would get called to set up the operator's attribute (for example, by filling in the filename from the "url" string property on the selected model/session).

> 2. In addition to the top level view attribute it will also have 
> 
> a. auto_apply attribute indicating that by default this operation does not need to use the View but instead can be automatically applied.  This can be over ridden by a setting on the “operation manager”
> 
> b. no_apply attribute indicating that the operator does not need an apply button
> 
> 3. If the operation requires more than one model entity - a list box will be displayed instead of a combo box.  (if it takes in a single entity than it will still use a combo box)
> 
> If you have any comments or suggestions let me know!

I don't know how easy it would be with Qt, but it would be nice for each operator that can both be auto-applied and accept non-default item-values to accept 2 triggers ("apply with defaults" or "customize first"), so that you don't have to change a setting in the "operation manager" twice (once before the operation you want to customize and once afterwards).

	David



More information about the Smtk-developers mailing list