Cleanup: format

This commit is contained in:
Campbell Barton 2022-08-04 07:41:03 +10:00
parent cc1daa9b76
commit 1ec7f75b2a
6 changed files with 11 additions and 10 deletions

View File

@ -282,7 +282,8 @@ static void mesh_recalc_looptri__multi_threaded(const MLoop *mloop,
{
struct TessellationUserTLS tls_data_dummy = {nullptr};
struct TessellationUserData data {};
struct TessellationUserData data {
};
data.mloop = mloop;
data.mpoly = mpoly;
data.mvert = mvert;

View File

@ -359,8 +359,7 @@ static void oldnewmap_insert(OldNewMap *onm, const void *oldaddr, void *newaddr,
oldnewmap_insert_or_replace(onm, entry);
}
static void oldnewmap_lib_insert(
FileData *fd, const void *oldaddr, ID *newaddr, int nr)
static void oldnewmap_lib_insert(FileData *fd, const void *oldaddr, ID *newaddr, int nr)
{
oldnewmap_insert(fd->libmap, oldaddr, newaddr, nr);
}

View File

@ -1213,8 +1213,7 @@ void uiTemplateImageInfo(uiLayout *layout, bContext *C, Image *ima, ImageUser *i
eGPUTextureFormat texture_format = IMB_gpu_get_texture_format(ibuf,
ima->flag & IMA_HIGH_BITDEPTH);
const char *texture_format_description = GPU_texture_format_description(
texture_format);
const char *texture_format_description = GPU_texture_format_description(texture_format);
ofs += BLI_snprintf_rlen(str + ofs, len - ofs, TIP_(", %s"), texture_format_description);
uiItemL(col, str, ICON_NONE);

View File

@ -99,6 +99,7 @@ if inside_blender:
print(e)
sys.exit(1)
def get_gpu_device_type(blender):
command = [
blender,
@ -119,7 +120,6 @@ def get_gpu_device_type(blender):
return None
def get_arguments(filepath, output_filepath):
return [
"--background",

View File

@ -7,7 +7,7 @@ import bpy
import gpu
import sys
# Render with workbench to initialize the GPU backend otherwise it would fail when running in
# Render with workbench to initialize the GPU backend otherwise it would fail when running in
# background mode as the GPU backend won't be initialized.
scene = bpy.context.scene
scene.render.resolution_x = 1
@ -21,4 +21,4 @@ print('GPU_RENDERER:' + gpu.platform.renderer_get())
print('GPU_VERSION:' + gpu.platform.version_get())
print('GPU_DEVICE_TYPE:' + gpu.platform.device_type_get())
sys.exit(0)
sys.exit(0)

View File

@ -354,7 +354,8 @@ class Report:
name = test_get_name(filepath)
name = name.replace('_', ' ')
old_img, ref_img, new_img, diff_img = test_get_images(self.output_dir, filepath, self.reference_dir, self.reference_override_dir)
old_img, ref_img, new_img, diff_img = test_get_images(
self.output_dir, filepath, self.reference_dir, self.reference_override_dir)
status = error if error else ""
tr_style = """ class="table-danger" """ if error else ""
@ -401,7 +402,8 @@ class Report:
self.compare_tests += test_html
def _diff_output(self, filepath, tmp_filepath):
old_img, ref_img, new_img, diff_img = test_get_images(self.output_dir, filepath, self.reference_dir, self.reference_override_dir)
old_img, ref_img, new_img, diff_img = test_get_images(
self.output_dir, filepath, self.reference_dir, self.reference_override_dir)
# Create reference render directory.
old_dirpath = os.path.dirname(old_img)