[Bf-taskforce25] Operator standardization

Brecht Van Lommel brecht at blender.org
Mon Feb 2 08:34:34 CET 2009


Hi,

Campbell Barton wrote:
> agree from an api perspective 0.0 - 1.0 makes sense.
> But for the UI, "Select Random, 50%" seems more user friendly then
> "Select Random Factor 0.5"

I can add an RNA subtype for this, to show it as percentage in the UI.

Martin Poirier wrote:
> Bit fields as operator properties, acceptable or use many boolean props?

Use boolean properties, bitflags make no sense when you create an UI 
button from it.

> What's happening with modal operators with hotkeys (transform,
> knife, loop cut, ...), I've talked about this in the past, but if
> we want them to be user-modifiable and sort of self documenting, we
> need keymaps for that too. The question is how to do it.

Not sure here. Making these a full 'mode' and having separate 
operators for all these seems inconvenient. So I guess there needs to 
be a way to create a keymap for transform/knife/.. that can be checked 
against manually in invoke(). There would need to be a number of 
events defined then along with the keymap {{MAP_CONSTRAIN_AXIS, 
"Constrain Axis"}, {MAP_TRACKBALL_TOGGLE, "Trackball Toggle"}, ..}, so 
you can link up keymap items to such MAP_ values rather than an operator.

For the UI code this sort of system would be useful too if people want 
to customize the keymaps there. And also in general you may want to 
have some general keymap for configuring things like ESC to exit modal 
tools. Not sure if the latter is useful in practice.

Brecht.


More information about the Bf-taskforce25 mailing list