Styling the operator panel
We know that the operator panel is displayed in these circumstances:
- When
context.window_manager.invoke_props_dialog
is called explicitly. - When
bl_options
is set to{'REGISTER', 'UNDO'}
and the operator has finished. - When Edit | Adjust Last Operation is called. This circumstance too requires the presence of
bl_options = {'
REGISTER', 'UNDO'}
.
By default, all properties are displayed in a column layout. Most property types can be declared with a hidden=True
flag, but that’s not the case for BoolProperty
, so we cannot do it with set_hours
.
As a workaround, we could change set_hours
to IntProperty
, with a 0
to 1
range and hidden
set to True
, but by implementing the draw
method for our operator, we can just omit the properties that we don’t want to display.
Writing the draw method
We want to change two things in the Create Hour/Minutes Text panel:
- The hour and minutes...