Cleanup: format

This commit is contained in:
Campbell Barton 2022-08-23 23:13:47 +10:00
parent a6056b870b
commit 649807a8cd
4 changed files with 18 additions and 8 deletions

View File

@ -885,7 +885,7 @@ def dump_preset_messages(msgs, reports, settings):
def dump_template_messages(msgs, reports, settings):
bfiles = [""] # General template, no name needed
bfiles = [""] # General template, no name needed.
bfiles += glob.glob(settings.TEMPLATES_DIR + "/**/*.blend", recursive=True)
workspace_names = {}

View File

@ -361,7 +361,8 @@ static int workspace_append_activate_exec(bContext *C, wmOperator *op)
if (appended_workspace) {
if (BLT_translate_new_dataname()) {
/* Translate workspace name */
BKE_libblock_rename(bmain, &appended_workspace->id, CTX_DATA_(BLT_I18NCONTEXT_ID_WORKSPACE, idname));
BKE_libblock_rename(
bmain, &appended_workspace->id, CTX_DATA_(BLT_I18NCONTEXT_ID_WORKSPACE, idname));
}
/* Set defaults. */
@ -446,8 +447,14 @@ static void workspace_append_button(uiLayout *layout,
BLI_assert(STREQ(ot_append->idname, "WORKSPACE_OT_append_activate"));
PointerRNA opptr;
uiItemFullO_ptr(
layout, ot_append, CTX_DATA_(BLT_I18NCONTEXT_ID_WORKSPACE, workspace->id.name + 2), ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &opptr);
uiItemFullO_ptr(layout,
ot_append,
CTX_DATA_(BLT_I18NCONTEXT_ID_WORKSPACE, workspace->id.name + 2),
ICON_NONE,
NULL,
WM_OP_EXEC_DEFAULT,
0,
&opptr);
RNA_string_set(&opptr, "idname", id->name + 2);
RNA_string_set(&opptr, "filepath", filepath);
}
@ -500,8 +507,8 @@ static void workspace_add_menu(bContext *UNUSED(C), uiLayout *layout, void *temp
static int workspace_add_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
uiPopupMenu *pup = UI_popup_menu_begin(C, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT,
op->type->name), ICON_ADD);
uiPopupMenu *pup = UI_popup_menu_begin(
C, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, op->type->name), ICON_ADD);
uiLayout *layout = UI_popup_menu_layout(pup);
uiItemMenuF(layout, IFACE_("General"), ICON_NONE, workspace_add_menu, NULL);

View File

@ -359,7 +359,9 @@ GPUTexture *IMB_create_gpu_texture(const char *name,
return tex;
}
eGPUTextureFormat IMB_gpu_get_texture_format(const ImBuf *ibuf, bool high_bitdepth, bool use_grayscale)
eGPUTextureFormat IMB_gpu_get_texture_format(const ImBuf *ibuf,
bool high_bitdepth,
bool use_grayscale)
{
eGPUTextureFormat gpu_texture_format;
eGPUDataFormat gpu_data_format;

View File

@ -702,7 +702,8 @@ static void wm_file_read_post(bContext *C, const struct wmFileReadPost_Params *p
if (is_factory_startup && BLT_translate_new_dataname()) {
/* Translate workspace names */
LISTBASE_FOREACH_MUTABLE (WorkSpace *, workspace, &bmain->workspaces) {
BKE_libblock_rename(bmain, &workspace->id, CTX_DATA_(BLT_I18NCONTEXT_ID_WORKSPACE, workspace->id.name + 2));
BKE_libblock_rename(
bmain, &workspace->id, CTX_DATA_(BLT_I18NCONTEXT_ID_WORKSPACE, workspace->id.name + 2));
}
}