Cleanup: style

This commit is contained in:
Campbell Barton
2018-11-19 13:37:18 +11:00
parent db8f662cc9
commit 740adf2a4b
4 changed files with 12 additions and 13 deletions

View File

@@ -46,7 +46,6 @@ class Params:
self,
*,
legacy=False,
select_mode='AUTO',
select_mouse='RIGHT',
# User preferences.
@@ -294,7 +293,7 @@ def km_window(params):
("wm.toolbar", {"type": 'SPACE', "value": 'PRESS', "shift": True}, None),
)
else:
assert(0)
assert False
else:
# Old shorctus
@@ -728,8 +727,8 @@ def km_uv_editor(params):
# Quick switch to select tool, since left select can't easily
# select with any tool active.
items.extend([
("wm.tool_set_by_name", {"type": 'W', "value": 'PRESS'},
{"properties": [("name", "Select Box")]})
("wm.tool_set_by_name", {"type": 'W', "value": 'PRESS'},
{"properties": [("name", "Select Box")]})
])
return keymap
@@ -1060,8 +1059,8 @@ def km_view3d(params):
# Quick switch to select tool, since left select can't easily
# select with any tool active.
items.extend([
("wm.tool_set_by_name", {"type": 'W', "value": 'PRESS'},
{"properties": [("name", "Select Box")]})
("wm.tool_set_by_name", {"type": 'W', "value": 'PRESS'},
{"properties": [("name", "Select Box")]})
])
return keymap
@@ -2607,7 +2606,7 @@ def km_frames(params):
("screen.animation_play", {"type": 'SPACE', "value": 'PRESS'}, None),
)
else:
assert(0)
assert False
items.extend([
("screen.animation_play", {"type": 'SPACE', "value": 'PRESS', "shift": True, "ctrl": True},

View File

@@ -280,7 +280,7 @@ static void DRW_gpencil_recalc_geometry_caches(Object *ob, MaterialGPencilStyle
static DRWShadingGroup *DRW_gpencil_shgroup_fill_create(
GPENCIL_e_data *e_data, GPENCIL_Data *vedata, DRWPass *pass,
GPUShader *shader, bGPdata *gpd, bGPDlayer *gpl,
MaterialGPencilStyle *gp_style, int id)
MaterialGPencilStyle *gp_style, int id)
{
GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl;
@@ -844,7 +844,7 @@ static void gpencil_draw_strokes(
{
stl->shgroups[id].shgrps_fill = DRW_gpencil_shgroup_fill_create(
e_data, vedata, psl->stroke_pass, e_data->gpencil_fill_sh,
gpd, gpl, gp_style, id);
gpd, gpl, gp_style, id);
}
else {
stl->shgroups[id].shgrps_fill = NULL;

View File

@@ -233,8 +233,8 @@ static void overlay_cache_populate(void *vedata, Object *ob)
View3D *v3d = draw_ctx->v3d;
if ((!stl->g_data->show_overlays) ||
(ob->dt < OB_WIRE) ||
(!DRW_object_is_renderable(ob) && (ob->dt != OB_WIRE)))
(ob->dt < OB_WIRE) ||
(!DRW_object_is_renderable(ob) && (ob->dt != OB_WIRE)))
{
return;
}

View File

@@ -275,8 +275,8 @@ static bNode *ntree_group_output_node(bNodeTree *ntree)
bNode *output_node = NULL;
for (bNode *node = ntree->nodes.first; node; node = node->next) {
if (node->type == NODE_GROUP_OUTPUT &&
node->flag & NODE_DO_OUTPUT)
if ((node->type == NODE_GROUP_OUTPUT) &&
(node->flag & NODE_DO_OUTPUT))
{
output_node = node;
}