Cleanup: Make format

This commit is contained in:
Jeroen Bakker 2023-10-09 12:49:02 +02:00
parent e7e1ec55d2
commit 03040f3b7f
7 changed files with 11 additions and 22 deletions

View File

@ -1474,8 +1474,7 @@ void EEVEE_lightbake_job(void *custom_data, wmJobWorkerStatus *worker_status)
lbake->grid_sample_len = prb->grid_resolution_x * prb->grid_resolution_y * lbake->grid_sample_len = prb->grid_resolution_x * prb->grid_resolution_y *
prb->grid_resolution_z; prb->grid_resolution_z;
for (lbake->grid_sample = 0; lbake->grid_sample < lbake->grid_sample_len; for (lbake->grid_sample = 0; lbake->grid_sample < lbake->grid_sample_len;
++lbake->grid_sample) ++lbake->grid_sample) {
{
lightbake_do_sample(lbake, eevee_lightbake_render_grid_sample); lightbake_do_sample(lbake, eevee_lightbake_render_grid_sample);
} }
} }

View File

@ -2144,8 +2144,7 @@ static int ui_id_brush_get_icon(const bContext *C, ID *id)
/* reset the icon */ /* reset the icon */
if ((ob != nullptr) && (ob->mode & OB_MODE_ALL_PAINT_GPENCIL) && if ((ob != nullptr) && (ob->mode & OB_MODE_ALL_PAINT_GPENCIL) &&
(br->gpencil_settings != nullptr)) (br->gpencil_settings != nullptr)) {
{
switch (br->gpencil_settings->icon_id) { switch (br->gpencil_settings->icon_id) {
case GP_BRUSH_ICON_PENCIL: case GP_BRUSH_ICON_PENCIL:
br->id.icon_id = ICON_GPBRUSH_PENCIL; br->id.icon_id = ICON_GPBRUSH_PENCIL;

View File

@ -687,8 +687,7 @@ static bool bake_objects_check(Main *bmain,
LISTBASE_FOREACH (CollectionPointerLink *, link, selected_objects) { LISTBASE_FOREACH (CollectionPointerLink *, link, selected_objects) {
if (!bake_object_check( if (!bake_object_check(
scene, view_layer, static_cast<Object *>(link->ptr.data), target, reports)) scene, view_layer, static_cast<Object *>(link->ptr.data), target, reports)) {
{
return false; return false;
} }
} }
@ -1739,8 +1738,7 @@ static int bake(const BakeAPIRender *bkr,
else { else {
/* save the results */ /* save the results */
if (bake_targets_output( if (bake_targets_output(
bkr, &targets, ob_low, ob_low_eval, me_low_eval, pixel_array_low, reports)) bkr, &targets, ob_low, ob_low_eval, me_low_eval, pixel_array_low, reports)) {
{
op_result = OPERATOR_FINISHED; op_result = OPERATOR_FINISHED;
} }
else { else {

View File

@ -185,8 +185,7 @@ ModifierData *ED_object_modifier_add(
md = static_cast<ModifierData *>(ob->modifiers.first); md = static_cast<ModifierData *>(ob->modifiers.first);
while (md && while (md &&
BKE_modifier_get_info((ModifierType)md->type)->type == eModifierTypeType_OnlyDeform) BKE_modifier_get_info((ModifierType)md->type)->type == eModifierTypeType_OnlyDeform) {
{
md = md->next; md = md->next;
} }
@ -773,8 +772,7 @@ static Mesh *create_applied_mesh_for_modifier(Depsgraph *depsgraph,
if (build_shapekey_layers && me->key) { if (build_shapekey_layers && me->key) {
if (KeyBlock *kb = static_cast<KeyBlock *>( if (KeyBlock *kb = static_cast<KeyBlock *>(
BLI_findlink(&me->key->block, ob_eval->shapenr - 1))) BLI_findlink(&me->key->block, ob_eval->shapenr - 1))) {
{
BKE_keyblock_convert_to_mesh( BKE_keyblock_convert_to_mesh(
kb, reinterpret_cast<float(*)[3]>(me->vert_positions_for_write().data()), me->totvert); kb, reinterpret_cast<float(*)[3]>(me->vert_positions_for_write().data()), me->totvert);
} }

View File

@ -419,8 +419,7 @@ static const char *preview_world_name(const Scene *sce,
* this approximation. * this approximation.
*/ */
if (id_type == ID_MA && pr_method == PR_ICON_RENDER && if (id_type == ID_MA && pr_method == PR_ICON_RENDER &&
!render_engine_supports_ray_visibility(sce)) !render_engine_supports_ray_visibility(sce)) {
{
return "WorldFloor"; return "WorldFloor";
} }
return "World"; return "World";
@ -1438,8 +1437,7 @@ static void icon_preview_startjob(void *customdata, bool *stop, bool *do_update)
* only get existing `ibuf`. */ * only get existing `ibuf`. */
ibuf = BKE_image_acquire_ibuf(ima, &iuser, nullptr); ibuf = BKE_image_acquire_ibuf(ima, &iuser, nullptr);
if (ibuf == nullptr || if (ibuf == nullptr ||
(ibuf->byte_buffer.data == nullptr && ibuf->float_buffer.data == nullptr)) (ibuf->byte_buffer.data == nullptr && ibuf->float_buffer.data == nullptr)) {
{
BKE_image_release_ibuf(ima, ibuf, nullptr); BKE_image_release_ibuf(ima, ibuf, nullptr);
return; return;
} }

View File

@ -1640,8 +1640,7 @@ static void filelist_cache_previews_push(FileList *filelist, FileDirEntry *entry
* some time in heavy files, because otherwise for each missing preview and for each preview * some time in heavy files, because otherwise for each missing preview and for each preview
* reload, we'd reopen the .blend to look for the preview. */ * reload, we'd reopen the .blend to look for the preview. */
if ((entry->typeflag & FILE_TYPE_BLENDERLIB) && if ((entry->typeflag & FILE_TYPE_BLENDERLIB) &&
(entry->flags & FILE_ENTRY_BLENDERLIB_NO_PREVIEW)) (entry->flags & FILE_ENTRY_BLENDERLIB_NO_PREVIEW)) {
{
return; return;
} }
@ -3748,8 +3747,7 @@ static void filelist_readjob_recursive_dir_add_items(const bool do_lib,
entry->free_name = true; entry->free_name = true;
if (filelist_readjob_should_recurse_into_entry( if (filelist_readjob_should_recurse_into_entry(
max_recursion, is_lib, recursion_level, entry)) max_recursion, is_lib, recursion_level, entry)) {
{
/* We have a directory we want to list, add it to todo list! /* We have a directory we want to list, add it to todo list!
* Using #BLI_path_join works but isn't needed as `root` has a trailing slash. */ * Using #BLI_path_join works but isn't needed as `root` has a trailing slash. */
BLI_string_join(dir, sizeof(dir), root, entry->relpath); BLI_string_join(dir, sizeof(dir), root, entry->relpath);

View File

@ -2677,8 +2677,7 @@ static int smart_uv_project_thickface_area_cmp_fn(const void *tf_a_p, const void
/* Ignore the area of small faces. /* Ignore the area of small faces.
* Also, order checks so `!isfinite(...)` values are counted as zero area. */ * Also, order checks so `!isfinite(...)` values are counted as zero area. */
if (!((tf_a->area > smart_uv_project_area_ignore) || if (!((tf_a->area > smart_uv_project_area_ignore) ||
(tf_b->area > smart_uv_project_area_ignore))) (tf_b->area > smart_uv_project_area_ignore))) {
{
return 0; return 0;
} }