style cleanup: wm, mosyly adding space around ops
This commit is contained in:
@@ -1055,9 +1055,4 @@ BlenderCursor[BC_SWAPAREA_CURSOR]=&SwapCursor;
|
||||
END_CURSOR_BLOCK
|
||||
/********************** Put the cursors in the array ***********************/
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@@ -691,7 +691,8 @@ static wmOperator *wm_operator_create(wmWindowManager *wm, wmOperatorType *ot, P
|
||||
if (properties) {
|
||||
otmacro = ot->macro.first;
|
||||
|
||||
RNA_STRUCT_BEGIN(properties, prop) {
|
||||
RNA_STRUCT_BEGIN(properties, prop)
|
||||
{
|
||||
|
||||
if (otmacro == NULL)
|
||||
break;
|
||||
@@ -919,9 +920,10 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
|
||||
* none to the UI handler */
|
||||
wm_handler_ui_cancel(C);
|
||||
}
|
||||
else
|
||||
else {
|
||||
WM_operator_free(op);
|
||||
}
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
@@ -1092,8 +1094,8 @@ int WM_operator_call_py(bContext *C, wmOperatorType *ot, int context, PointerRNA
|
||||
|
||||
/* keep the reports around if needed later */
|
||||
if ((retval & OPERATOR_RUNNING_MODAL) ||
|
||||
((retval & OPERATOR_FINISHED) && wm_operator_register_check(CTX_wm_manager(C), ot))
|
||||
) {
|
||||
((retval & OPERATOR_FINISHED) && wm_operator_register_check(CTX_wm_manager(C), ot)))
|
||||
{
|
||||
reports->flag |= RPT_FREE; /* let blender manage freeing */
|
||||
}
|
||||
|
||||
@@ -1764,8 +1766,8 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
|
||||
* if its not handled by the keymap - campbell */
|
||||
if ((ABS(event->x - win->eventstate->prevclickx)) <= 2 &&
|
||||
(ABS(event->y - win->eventstate->prevclicky)) <= 2 &&
|
||||
((PIL_check_seconds_timer() - win->eventstate->prevclicktime) * 1000 < U.dbl_click_time)
|
||||
) {
|
||||
((PIL_check_seconds_timer() - win->eventstate->prevclicktime) * 1000 < U.dbl_click_time))
|
||||
{
|
||||
event->val = KM_DBL_CLICK;
|
||||
/* removed this because in cases where we're this is used as a single click
|
||||
* event, this will give old coords,
|
||||
|
@@ -418,7 +418,7 @@ void WM_exit_ext(bContext *C, const short do_python)
|
||||
GPU_extensions_exit();
|
||||
|
||||
if (!G.background) {
|
||||
BKE_undo_save_quit(); // saves quit.blend if global undo is on
|
||||
BKE_undo_save_quit(); /* saves quit.blend if global undo is on */
|
||||
}
|
||||
BKE_reset_undo();
|
||||
|
||||
|
@@ -816,7 +816,8 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type,
|
||||
{FILE_SHORTDISPLAY, "FILE_SHORTDISPLAY", ICON_SHORTDISPLAY, "Short List", "Display files as short list"},
|
||||
{FILE_LONGDISPLAY, "FILE_LONGDISPLAY", ICON_LONGDISPLAY, "Long List", "Display files as a detailed list"},
|
||||
{FILE_IMGDISPLAY, "FILE_IMGDISPLAY", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
|
||||
if (flag & WM_FILESEL_FILEPATH)
|
||||
@@ -975,8 +976,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op)
|
||||
return block;
|
||||
}
|
||||
|
||||
typedef struct wmOpPopUp
|
||||
{
|
||||
typedef struct wmOpPopUp {
|
||||
wmOperator *op;
|
||||
int width;
|
||||
int height;
|
||||
@@ -2751,7 +2751,8 @@ int WM_gesture_lines_cancel(bContext *C, wmOperator *op)
|
||||
|
||||
static int gesture_lasso_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
RNA_BEGIN(op->ptr, itemptr, "path") {
|
||||
RNA_BEGIN(op->ptr, itemptr, "path")
|
||||
{
|
||||
float loc[2];
|
||||
|
||||
RNA_float_get_array(&itemptr, "loc", loc);
|
||||
@@ -3169,7 +3170,8 @@ static int radial_control_get_properties(bContext *C, wmOperator *op)
|
||||
if (!radial_control_get_path(&ctx_ptr, op, "use_secondary",
|
||||
&use_secondary_ptr, &use_secondary_prop,
|
||||
0, (RC_PROP_ALLOW_MISSING |
|
||||
RC_PROP_REQUIRE_BOOL))) {
|
||||
RC_PROP_REQUIRE_BOOL)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
@@ -3429,7 +3431,8 @@ static EnumPropertyItem redraw_timer_type_items[] = {
|
||||
{4, "ANIM_STEP", 0, "Anim Step", "Animation Steps"},
|
||||
{5, "ANIM_PLAY", 0, "Anim Play", "Animation Playback"},
|
||||
{6, "UNDO", 0, "Undo/Redo", "Undo/Redo"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
static int redraw_timer_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
@@ -3697,7 +3700,6 @@ static void gesture_circle_modal_keymap(wmKeyConfig *keyconf)
|
||||
{GESTURE_MODAL_DESELECT, "DESELECT", 0, "DeSelect", ""},
|
||||
{GESTURE_MODAL_NOP, "NOP", 0, "No Operation", ""},
|
||||
|
||||
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "View3D Gesture Circle");
|
||||
|
Reference in New Issue
Block a user