<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Dave,<div class=""><br class=""></div><div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Robert M. O'Bara, MEng.<br class="">Assistant Director of Scientific Computing<br class=""><br class="">Kitware Inc.<br class="">28 Corporate Drive<br class="">Suite 101<br class="">Clifton Park, NY 12065<br class=""><br class="">Phone: (518) 881- 4931</div><div class=""><br class=""></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Oct 20, 2016, at 6:14 PMEDT, David Thompson <<a href="mailto:david.thompson@kitware.com" class="">david.thompson@kitware.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi Bob,<br class=""><br class=""><blockquote type="cite" class="">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:<br class=""><br class="">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.<br class=""></blockquote><br class="">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.<br class=""><br class=""></div></div></blockquote><div><br class=""></div>No - I was more going after the fact that right now an operator could be defined by multiple attributes (it inherited this functionality because under the covers it uses an instance view which can have multiple attribute definitions).</div><div><br class=""></div><div>Actually what I would like to do is to change things so that an operator is defined as an attribute definition and an object that can perform the operation - for example a session already has the operators registered - what is missing is the ability to getting the attribute definitions directly from the session instead of instantiating the operator itself. This way we determine what operations are valid based on the entities selected. It would also allow us to hold onto the attribute (which would have the previously entered values).</div><div><br class=""></div><div>Does that make sense?</div><div><br class=""></div><div>Bob</div><div><br class=""><blockquote type="cite" class=""><div class=""><div class="">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.<br class=""><br class="">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).<br class=""><br class=""><blockquote type="cite" class="">2. In addition to the top level view attribute it will also have <br class=""><br class="">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”<br class=""><br class="">b. no_apply attribute indicating that the operator does not need an apply button<br class=""><br class="">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)<br class=""><br class="">If you have any comments or suggestions let me know!<br class=""></blockquote><br class="">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).<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>David<br class=""><br class=""></div></div></blockquote></div><br class=""></div></body></html>