diff --git a/intern/cycles/blender/mesh.cpp b/intern/cycles/blender/mesh.cpp index 268afce27cae0584bb5b6c4206a6c5a32da18835..75794cba86375e850e3872dd07a5974abda774cb 100644 --- a/intern/cycles/blender/mesh.cpp +++ b/intern/cycles/blender/mesh.cpp @@ -313,7 +313,8 @@ static void attr_create_generic(Scene *scene, } if (b_attr.domain == blender::bke::AttrDomain::Corner && - meta_data.data_type == CD_PROP_BYTE_COLOR) { + meta_data.data_type == CD_PROP_BYTE_COLOR) + { Attribute *attr = attributes.add(name, TypeRGBA, ATTR_ELEMENT_CORNER_BYTE); if (is_render_color) { attr->std = ATTR_STD_VERTEX_COLOR; @@ -422,7 +423,8 @@ static set<ustring> get_blender_uv_names(const ::Mesh &b_mesh) b_mesh.attributes().for_all([&](const blender::bke::AttributeIDRef &id, const blender::bke::AttributeMetaData meta_data) { if (meta_data.domain == blender::bke::AttrDomain::Corner && - meta_data.data_type == CD_PROP_FLOAT2) { + meta_data.data_type == CD_PROP_FLOAT2) + { if (!id.is_anonymous()) { uv_names.emplace(std::string_view(id.name())); } @@ -1250,7 +1252,8 @@ void BlenderSync::sync_mesh_motion(BL::Depsgraph b_depsgraph, if (new_attribute) { /* In case of new attribute, we verify if there really was any motion. */ if (b_verts_num != numverts || - memcmp(mP, &mesh->get_verts()[0], sizeof(float3) * numverts) == 0) { + memcmp(mP, &mesh->get_verts()[0], sizeof(float3) * numverts) == 0) + { /* no motion, remove attributes again */ if (b_verts_num != numverts) { VLOG_WARNING << "Topology differs, disabling motion blur for object " << ob_name; diff --git a/intern/cycles/blender/python.cpp b/intern/cycles/blender/python.cpp index 83728a65d6db3714fa9a1128b38e6c8de306436d..e701728208384c2d4f6e1429895df20c1728d5a3 100644 --- a/intern/cycles/blender/python.cpp +++ b/intern/cycles/blender/python.cpp @@ -807,7 +807,8 @@ static PyObject *merge_func(PyObject * /*self*/, PyObject *args, PyObject *keywo PyObject *pyinput, *pyoutput = NULL; if (!PyArg_ParseTupleAndKeywords( - args, keywords, "OO", (char **)keyword_list, &pyinput, &pyoutput)) { + args, keywords, "OO", (char **)keyword_list, &pyinput, &pyoutput)) + { return NULL; } diff --git a/intern/cycles/blender/sync.cpp b/intern/cycles/blender/sync.cpp index 49d031b53b725b711cbdb14b232a3d2430425e12..d82718d7cab130331a55cd2eee28343738c343bc 100644 --- a/intern/cycles/blender/sync.cpp +++ b/intern/cycles/blender/sync.cpp @@ -187,7 +187,8 @@ void BlenderSync::sync_recalc(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d if (updated_geometry) { BL::Object::particle_systems_iterator b_psys; for (b_ob.particle_systems.begin(b_psys); b_psys != b_ob.particle_systems.end(); - ++b_psys) { + ++b_psys) + { particle_system_map.set_recalc(b_ob); } } @@ -405,7 +406,8 @@ void BlenderSync::sync_integrator(BL::ViewLayer &b_view_layer, bool background) /* Only use scrambling distance in the viewport if user wants to. */ bool preview_scrambling_distance = get_boolean(cscene, "preview_scrambling_distance"); if ((preview && !preview_scrambling_distance) || - sampling_pattern == SAMPLING_PATTERN_SOBOL_BURLEY) { + sampling_pattern == SAMPLING_PATTERN_SOBOL_BURLEY) + { scrambling_distance = 1.0f; } diff --git a/intern/cycles/bvh/binning.cpp b/intern/cycles/bvh/binning.cpp index 894da7ded7c4b0222226b335cab0a36b7544743e..af469dbf9b6227a5e3daeb024e1711b4ce63c292 100644 --- a/intern/cycles/bvh/binning.cpp +++ b/intern/cycles/bvh/binning.cpp @@ -5,7 +5,7 @@ * * Adapted code from Intel Corporation. */ -//#define __KERNEL_SSE__ +// #define __KERNEL_SSE__ #include "bvh/binning.h" diff --git a/intern/cycles/device/metal/bvh.mm b/intern/cycles/device/metal/bvh.mm index 6e753688c1b217efc1074ef6a290166d2a85afa3..39565e656620b7b1ce943b4a46e905a2730d2e5c 100644 --- a/intern/cycles/device/metal/bvh.mm +++ b/intern/cycles/device/metal/bvh.mm @@ -23,7 +23,7 @@ CCL_NAMESPACE_BEGIN metal_printf("%s\n", str.c_str()); \ } -//# define BVH_THROTTLE_DIAGNOSTICS +// # define BVH_THROTTLE_DIAGNOSTICS # ifdef BVH_THROTTLE_DIAGNOSTICS # define bvh_throttle_printf(...) printf("BVHMetalBuildThrottler::" __VA_ARGS__) # else diff --git a/intern/cycles/device/metal/kernel.mm b/intern/cycles/device/metal/kernel.mm index c300fdc9d9691706e4ecdc6e7de5bb9045b60bf1..c13052ac261e5cf605a8a2d29574f67b544664fc 100644 --- a/intern/cycles/device/metal/kernel.mm +++ b/intern/cycles/device/metal/kernel.mm @@ -361,7 +361,8 @@ MetalKernelPipeline *ShaderCache::get_best_pipeline(DeviceKernel kernel, const M thread_scoped_lock lock(cache_mutex); for (auto &candidate : pipelines[kernel]) { if (candidate->loaded && - candidate->kernels_md5 == device->kernels_md5[candidate->pso_type]) { + candidate->kernels_md5 == device->kernels_md5[candidate->pso_type]) + { /* Replace existing match if candidate is more specialized. */ if (!best_match || candidate->pso_type > best_match->pso_type) { best_match = candidate.get(); @@ -795,7 +796,8 @@ void MetalKernelPipeline::compile() if (ShaderCache::running) { if (creating_new_archive || recreate_archive) { if (![archive serializeToURL:[NSURL fileURLWithPath:@(metalbin_path.c_str())] - error:&error]) { + error:&error]) + { metal_printf("Failed to save binary archive to %s, error:\n%s\n", metalbin_path.c_str(), [[error localizedDescription] UTF8String]); diff --git a/intern/cycles/device/metal/queue.mm b/intern/cycles/device/metal/queue.mm index 596f1f94cbcaa9e2a16355859376a04c201c0614..81d9e781c4d182077b8611119ca4fd9330e2b67f 100644 --- a/intern/cycles/device/metal/queue.mm +++ b/intern/cycles/device/metal/queue.mm @@ -652,7 +652,8 @@ bool MetalDeviceQueue::enqueue(DeviceKernel kernel, ((MyDeviceMemory *)it.first)->device_copy_from__IntegratorQueueCounter(); if (IntegratorQueueCounter *queue_counter = (IntegratorQueueCounter *) - it.first->host_pointer) { + it.first->host_pointer) + { for (int i = 0; i < DEVICE_KERNEL_INTEGRATOR_NUM; i++) printf("%s%d", i == 0 ? "" : ",", int(queue_counter->num_queued[i])); } diff --git a/intern/cycles/hydra/curves.cpp b/intern/cycles/hydra/curves.cpp index 3d71c4ce7f6352b40ab3275f1ccf2a4a4b1858ea..4dd830471519b8305e60542f26d8bcf386111da5 100644 --- a/intern/cycles/hydra/curves.cpp +++ b/intern/cycles/hydra/curves.cpp @@ -154,7 +154,8 @@ void HdCyclesCurves::PopulatePrimvars(HdSceneDelegate *sceneDelegate) for (const auto &interpolation : interpolations) { for (const HdPrimvarDescriptor &desc : - GetPrimvarDescriptors(sceneDelegate, interpolation.first)) { + GetPrimvarDescriptors(sceneDelegate, interpolation.first)) + { // Skip special primvars that are handled separately if (desc.name == HdTokens->points || desc.name == HdTokens->widths) { continue; @@ -172,7 +173,8 @@ void HdCyclesCurves::PopulatePrimvars(HdSceneDelegate *sceneDelegate) std = ATTR_STD_UV; } else if (desc.name == HdTokens->displayColor && - interpolation.first == HdInterpolationConstant) { + interpolation.first == HdInterpolationConstant) + { if (value.IsHolding<VtVec3fArray>() && value.GetArraySize() == 1) { const GfVec3f color = value.UncheckedGet<VtVec3fArray>()[0]; _instances[0]->set_color(make_float3(color[0], color[1], color[2])); diff --git a/intern/cycles/hydra/curves.h b/intern/cycles/hydra/curves.h index 134eebf6b148c89ada90b54ad861465f0363849e..76a2ce9319f0496d321a0aa89eacd83639113a33 100644 --- a/intern/cycles/hydra/curves.h +++ b/intern/cycles/hydra/curves.h @@ -14,11 +14,10 @@ HDCYCLES_NAMESPACE_OPEN_SCOPE class HdCyclesCurves final : public HdCyclesGeometry<PXR_NS::HdBasisCurves, CCL_NS::Hair> { public: - HdCyclesCurves( - const PXR_NS::SdfPath &rprimId + HdCyclesCurves(const PXR_NS::SdfPath &rprimId #if PXR_VERSION < 2102 - , - const PXR_NS::SdfPath &instancerId = {} + , + const PXR_NS::SdfPath &instancerId = {} #endif ); ~HdCyclesCurves() override; diff --git a/intern/cycles/hydra/mesh.cpp b/intern/cycles/hydra/mesh.cpp index eb25623eeedd1da7fc08daba34f6bc116ac159cb..5ceaea1c7e9d926d738b84d0ed1e4886705a8c84 100644 --- a/intern/cycles/hydra/mesh.cpp +++ b/intern/cycles/hydra/mesh.cpp @@ -311,7 +311,8 @@ void HdCyclesMesh::PopulatePrimvars(HdSceneDelegate *sceneDelegate) for (const auto &interpolation : interpolations) { for (const HdPrimvarDescriptor &desc : - GetPrimvarDescriptors(sceneDelegate, interpolation.first)) { + GetPrimvarDescriptors(sceneDelegate, interpolation.first)) + { // Skip special primvars that are handled separately if (desc.name == HdTokens->points || desc.name == HdTokens->normals) { continue; @@ -337,7 +338,8 @@ void HdCyclesMesh::PopulatePrimvars(HdSceneDelegate *sceneDelegate) } } else if (desc.name == HdTokens->displayColor && - interpolation.first == HdInterpolationConstant) { + interpolation.first == HdInterpolationConstant) + { if (value.IsHolding<VtVec3fArray>() && value.GetArraySize() == 1) { const GfVec3f color = value.UncheckedGet<VtVec3fArray>()[0]; _instances[0]->set_color(make_float3(color[0], color[1], color[2])); diff --git a/intern/cycles/hydra/mesh.h b/intern/cycles/hydra/mesh.h index f53d0ce8b02e4e7d86a56db1b0e6ecf429ed25e0..dd4f74fd852a77a976ed748e130cff2e36da5938 100644 --- a/intern/cycles/hydra/mesh.h +++ b/intern/cycles/hydra/mesh.h @@ -15,11 +15,10 @@ HDCYCLES_NAMESPACE_OPEN_SCOPE class HdCyclesMesh final : public HdCyclesGeometry<PXR_NS::HdMesh, CCL_NS::Mesh> { public: - HdCyclesMesh( - const PXR_NS::SdfPath &rprimId + HdCyclesMesh(const PXR_NS::SdfPath &rprimId #if PXR_VERSION < 2102 - , - const PXR_NS::SdfPath &instancerId = {} + , + const PXR_NS::SdfPath &instancerId = {} #endif ); ~HdCyclesMesh() override; diff --git a/intern/cycles/hydra/pointcloud.cpp b/intern/cycles/hydra/pointcloud.cpp index 660067fe2afef6a45deae0440c06ba4f77a77d32..17e2283cd961ea7ce7eb58c6c3526b9d11f98278 100644 --- a/intern/cycles/hydra/pointcloud.cpp +++ b/intern/cycles/hydra/pointcloud.cpp @@ -154,7 +154,8 @@ void HdCyclesPoints::PopulatePrimvars(HdSceneDelegate *sceneDelegate) for (const auto &interpolation : interpolations) { for (const HdPrimvarDescriptor &desc : - GetPrimvarDescriptors(sceneDelegate, interpolation.first)) { + GetPrimvarDescriptors(sceneDelegate, interpolation.first)) + { // Skip special primvars that are handled separately if (desc.name == HdTokens->points || desc.name == HdTokens->widths) { continue; @@ -180,7 +181,8 @@ void HdCyclesPoints::PopulatePrimvars(HdSceneDelegate *sceneDelegate) } } else if (desc.name == HdTokens->displayColor && - interpolation.first == HdInterpolationConstant) { + interpolation.first == HdInterpolationConstant) + { if (value.IsHolding<VtVec3fArray>() && value.GetArraySize() == 1) { const GfVec3f color = value.UncheckedGet<VtVec3fArray>()[0]; _instances[0]->set_color(make_float3(color[0], color[1], color[2])); diff --git a/intern/cycles/hydra/pointcloud.h b/intern/cycles/hydra/pointcloud.h index 35eda015916af9e6e6dbbb6d01f92bb76808b2a3..c6678f9476f9e3e561b4bb2c01a548137458d714 100644 --- a/intern/cycles/hydra/pointcloud.h +++ b/intern/cycles/hydra/pointcloud.h @@ -14,11 +14,10 @@ HDCYCLES_NAMESPACE_OPEN_SCOPE class HdCyclesPoints final : public HdCyclesGeometry<PXR_NS::HdPoints, CCL_NS::PointCloud> { public: - HdCyclesPoints( - const PXR_NS::SdfPath &rprimId + HdCyclesPoints(const PXR_NS::SdfPath &rprimId #if PXR_VERSION < 2102 - , - const PXR_NS::SdfPath &instancerId = {} + , + const PXR_NS::SdfPath &instancerId = {} #endif ); ~HdCyclesPoints() override; diff --git a/intern/cycles/hydra/volume.h b/intern/cycles/hydra/volume.h index c77f4c41dd1038362ae21e7e076b50cb69fd1725..8bb269cf3d9d7d16ec70708d099da66db4ec142b 100644 --- a/intern/cycles/hydra/volume.h +++ b/intern/cycles/hydra/volume.h @@ -14,11 +14,10 @@ HDCYCLES_NAMESPACE_OPEN_SCOPE class HdCyclesVolume final : public HdCyclesGeometry<PXR_NS::HdVolume, CCL_NS::Volume> { public: - HdCyclesVolume( - const PXR_NS::SdfPath &rprimId + HdCyclesVolume(const PXR_NS::SdfPath &rprimId #if PXR_VERSION < 2102 - , - const PXR_NS::SdfPath &instancerId = {} + , + const PXR_NS::SdfPath &instancerId = {} #endif ); ~HdCyclesVolume() override; diff --git a/intern/cycles/integrator/denoiser_oidn.cpp b/intern/cycles/integrator/denoiser_oidn.cpp index ab10fc05814bbb7deb2bc3bc978f4ed3f88bae98..e956699b30b54b59b02eb0e1c3fb0fb64646f33d 100644 --- a/intern/cycles/integrator/denoiser_oidn.cpp +++ b/intern/cycles/integrator/denoiser_oidn.cpp @@ -215,7 +215,8 @@ class OIDNDenoiseContext { DCHECK(!oidn_pass.use_compositing); if (denoise_params_.prefilter != DENOISER_PREFILTER_ACCURATE && - !is_pass_scale_needed(oidn_pass)) { + !is_pass_scale_needed(oidn_pass)) + { /* Pass data is available as-is from the render buffers. */ return; } diff --git a/intern/cycles/integrator/pass_accessor.cpp b/intern/cycles/integrator/pass_accessor.cpp index ea72cb0e1c27e605dc4052fed9c089a1ff16fd3c..ba41d10ad87cfc7f2b1fe8780f063e6434638269 100644 --- a/intern/cycles/integrator/pass_accessor.cpp +++ b/intern/cycles/integrator/pass_accessor.cpp @@ -196,7 +196,8 @@ bool PassAccessor::get_render_tile_pixels(const RenderBuffers *render_buffers, /* Use alpha for colors passes. */ if (type == PASS_DIFFUSE_COLOR || type == PASS_GLOSSY_COLOR || - type == PASS_TRANSMISSION_COLOR) { + type == PASS_TRANSMISSION_COLOR) + { num_written_components = destination.num_components; } } @@ -206,7 +207,8 @@ bool PassAccessor::get_render_tile_pixels(const RenderBuffers *render_buffers, get_pass_float3(render_buffers, buffer_params, destination); } else if (type == PASS_COMBINED || type == PASS_SHADOW_CATCHER || - type == PASS_SHADOW_CATCHER_MATTE) { + type == PASS_SHADOW_CATCHER_MATTE) + { /* Passes with transparency as 4th component. */ get_pass_combined(render_buffers, buffer_params, destination); } diff --git a/intern/cycles/integrator/path_trace_display.cpp b/intern/cycles/integrator/path_trace_display.cpp index 0d510263e31c481459bbce53de8901f6d180baff..1ba1527acf125d41687a3bed476fa5e2068c9a46 100644 --- a/intern/cycles/integrator/path_trace_display.cpp +++ b/intern/cycles/integrator/path_trace_display.cpp @@ -127,7 +127,8 @@ void PathTraceDisplay::copy_pixels_to_texture( const half4 *rgba_row = rgba_pixels; half4 *mapped_rgba_row = mapped_rgba_pixels + texture_y * texture_width + texture_x; for (int y = 0; y < pixels_height; - ++y, rgba_row += pixels_width, mapped_rgba_row += texture_width) { + ++y, rgba_row += pixels_width, mapped_rgba_row += texture_width) + { memcpy(mapped_rgba_row, rgba_row, sizeof(half4) * pixels_width); } } diff --git a/intern/cycles/integrator/path_trace_work_cpu.cpp b/intern/cycles/integrator/path_trace_work_cpu.cpp index 239bab989f6917e41d003edea9dc18761eb4c0c7..ae35635973ca84b50b1f61d4d113bb3df572c2eb 100644 --- a/intern/cycles/integrator/path_trace_work_cpu.cpp +++ b/intern/cycles/integrator/path_trace_work_cpu.cpp @@ -134,13 +134,15 @@ void PathTraceWorkCPU::render_samples_full_pipeline(KernelGlobalsCPU *kernel_glo if (has_bake) { if (!kernels_.integrator_init_from_bake( - kernel_globals, state, &sample_work_tile, render_buffer)) { + kernel_globals, state, &sample_work_tile, render_buffer)) + { break; } } else { if (!kernels_.integrator_init_from_camera( - kernel_globals, state, &sample_work_tile, render_buffer)) { + kernel_globals, state, &sample_work_tile, render_buffer)) + { break; } } diff --git a/intern/cycles/integrator/path_trace_work_gpu.cpp b/intern/cycles/integrator/path_trace_work_gpu.cpp index 41882b85b64ac75af92325e0a5ff103efe725d6f..0c0bad0d5f6cb4e312513c06c36eb64d634da07f 100644 --- a/intern/cycles/integrator/path_trace_work_gpu.cpp +++ b/intern/cycles/integrator/path_trace_work_gpu.cpp @@ -964,7 +964,8 @@ void PathTraceWorkGPU::copy_to_display_naive(PathTraceDisplay *display, * change of the resolution divider. However, if the display becomes smaller, shrink the * allocated memory as well. */ if (display_rgba_half_.data_width != final_width || - display_rgba_half_.data_height != final_height) { + display_rgba_half_.data_height != final_height) + { display_rgba_half_.alloc(final_width, final_height); /* TODO(sergey): There should be a way to make sure device-side memory is allocated without * transferring zeroes to the device. */ diff --git a/intern/cycles/integrator/render_scheduler.cpp b/intern/cycles/integrator/render_scheduler.cpp index 17ae2cd15e428b116e58b95c191c1cfe6d4338ab..34736c22c40510a17a64eef10db6f21f84be0684 100644 --- a/intern/cycles/integrator/render_scheduler.cpp +++ b/intern/cycles/integrator/render_scheduler.cpp @@ -971,7 +971,8 @@ bool RenderScheduler::work_need_denoise(bool &delayed, bool &ready_to_display) /* Immediately denoise when we reach the start sample or last sample. */ if (num_samples_finished == denoiser_params_.start_sample || - num_samples_finished == num_samples_) { + num_samples_finished == num_samples_) + { return true; } diff --git a/intern/cycles/kernel/bvh/local.h b/intern/cycles/kernel/bvh/local.h index 6e8db3af59d9c8efa7abd16ef2d44f2e399d153a..0c2be9e03806bc39e8a628f28725d5b1a3975927 100644 --- a/intern/cycles/kernel/bvh/local.h +++ b/intern/cycles/kernel/bvh/local.h @@ -24,12 +24,13 @@ ccl_device #else ccl_device_inline #endif - bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg, - ccl_private const Ray *ray, - ccl_private LocalIntersection *local_isect, - int local_object, - ccl_private uint *lcg_state, - int max_hits) + bool + BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg, + ccl_private const Ray *ray, + ccl_private LocalIntersection *local_isect, + int local_object, + ccl_private uint *lcg_state, + int max_hits) { /* todo: * - test if pushing distance on the stack helps (for non shadow rays) diff --git a/intern/cycles/kernel/bvh/shadow_all.h b/intern/cycles/kernel/bvh/shadow_all.h index 0efb7a396c8a0b43cfa69ebee73e1531740441df..54310b881a99371a69282f600eaab67b8d38bd08 100644 --- a/intern/cycles/kernel/bvh/shadow_all.h +++ b/intern/cycles/kernel/bvh/shadow_all.h @@ -26,13 +26,14 @@ ccl_device #else ccl_device_inline #endif - bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg, - ccl_private const Ray *ray, - IntegratorShadowState state, - const uint visibility, - const uint max_hits, - ccl_private uint *r_num_recorded_hits, - ccl_private float *r_throughput) + bool + BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg, + ccl_private const Ray *ray, + IntegratorShadowState state, + const uint visibility, + const uint max_hits, + ccl_private uint *r_num_recorded_hits, + ccl_private float *r_throughput) { /* todo: * - likely and unlikely for if() statements diff --git a/intern/cycles/kernel/bvh/volume.h b/intern/cycles/kernel/bvh/volume.h index d6d62c40e75e19fc3e4c25a67d89a856611d6f1a..59120700f9b68eced872ccac112f7e7940e8b63d 100644 --- a/intern/cycles/kernel/bvh/volume.h +++ b/intern/cycles/kernel/bvh/volume.h @@ -24,10 +24,11 @@ ccl_device #else ccl_device_inline #endif - bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg, - ccl_private const Ray *ray, - ccl_private Intersection *isect, - const uint visibility) + bool + BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg, + ccl_private const Ray *ray, + ccl_private Intersection *isect, + const uint visibility) { /* todo: * - test if pushing distance on the stack helps (for non shadow rays) diff --git a/intern/cycles/kernel/bvh/volume_all.h b/intern/cycles/kernel/bvh/volume_all.h index 03d5b44d16665ba5b6bf31cbecf0390362968562..30826275deb00f78d590d3ccdc7d3f71351a32cc 100644 --- a/intern/cycles/kernel/bvh/volume_all.h +++ b/intern/cycles/kernel/bvh/volume_all.h @@ -24,11 +24,12 @@ ccl_device #else ccl_device_inline #endif - uint BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg, - ccl_private const Ray *ray, - Intersection *isect_array, - const uint max_hits, - const uint visibility) + uint + BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg, + ccl_private const Ray *ray, + Intersection *isect_array, + const uint max_hits, + const uint visibility) { /* todo: * - test if pushing distance on the stack helps (for non shadow rays) diff --git a/intern/cycles/kernel/closure/bsdf_principled_hair_huang.h b/intern/cycles/kernel/closure/bsdf_principled_hair_huang.h index 47b678620451debb96b45f7b4394d2b9136210b8..518820997fbe504dca9c89e250ac0b4b4f99b6ae 100644 --- a/intern/cycles/kernel/closure/bsdf_principled_hair_huang.h +++ b/intern/cycles/kernel/closure/bsdf_principled_hair_huang.h @@ -747,7 +747,8 @@ ccl_device int bsdf_hair_huang_sample(const KernelGlobals kg, const float T3 = 1.0f - R3; if (cos_theta_t3 != 0.0f && - microfacet_visible(wtr, -wtrt, make_float3(wmtr.x, 0.0f, wmtr.z), wh3)) { + microfacet_visible(wtr, -wtrt, make_float3(wmtr.x, 0.0f, wmtr.z), wh3)) + { TRT = bsdf->extra->TRT * TR * make_spectrum(T3) * bsdf_Go(roughness2, cos_mi3, dot(wmtr, -wtrt)); } diff --git a/intern/cycles/kernel/device/cpu/bvh.h b/intern/cycles/kernel/device/cpu/bvh.h index 8c64777c797fc23b947786f95ebaad6ea69d9c3c..2a0260df6f50294090d62aa7057053595dcd3461 100644 --- a/intern/cycles/kernel/device/cpu/bvh.h +++ b/intern/cycles/kernel/device/cpu/bvh.h @@ -741,7 +741,8 @@ ccl_device_intersect bool kernel_embree_intersect(KernelGlobals kg, rtcIntersect1(kernel_data.device_bvh, &ctx, &ray_hit); #endif if (ray_hit.hit.geomID == RTC_INVALID_GEOMETRY_ID || - ray_hit.hit.primID == RTC_INVALID_GEOMETRY_ID) { + ray_hit.hit.primID == RTC_INVALID_GEOMETRY_ID) + { return false; } diff --git a/intern/cycles/kernel/device/oneapi/kernel.cpp b/intern/cycles/kernel/device/oneapi/kernel.cpp index 51c370c0a931e69cb499e06366a4f51fde450dc0..d27aebd8006b3b0d51aab5dd542d53396cff7aa7 100644 --- a/intern/cycles/kernel/device/oneapi/kernel.cpp +++ b/intern/cycles/kernel/device/oneapi/kernel.cpp @@ -25,14 +25,13 @@ static OneAPIErrorCallback s_error_cb = nullptr; static void *s_error_user_ptr = nullptr; # ifdef WITH_EMBREE_GPU -static const RTCFeatureFlags CYCLES_ONEAPI_EMBREE_BASIC_FEATURES = - (const RTCFeatureFlags)(RTC_FEATURE_FLAG_TRIANGLE | RTC_FEATURE_FLAG_INSTANCE | - RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS | - RTC_FEATURE_FLAG_POINT | RTC_FEATURE_FLAG_MOTION_BLUR); -static const RTCFeatureFlags CYCLES_ONEAPI_EMBREE_ALL_FEATURES = - (const RTCFeatureFlags)(CYCLES_ONEAPI_EMBREE_BASIC_FEATURES | - RTC_FEATURE_FLAG_ROUND_CATMULL_ROM_CURVE | - RTC_FEATURE_FLAG_FLAT_CATMULL_ROM_CURVE); +static const RTCFeatureFlags CYCLES_ONEAPI_EMBREE_BASIC_FEATURES = (const RTCFeatureFlags)( + RTC_FEATURE_FLAG_TRIANGLE | RTC_FEATURE_FLAG_INSTANCE | + RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS | RTC_FEATURE_FLAG_POINT | + RTC_FEATURE_FLAG_MOTION_BLUR); +static const RTCFeatureFlags CYCLES_ONEAPI_EMBREE_ALL_FEATURES = (const RTCFeatureFlags)( + CYCLES_ONEAPI_EMBREE_BASIC_FEATURES | RTC_FEATURE_FLAG_ROUND_CATMULL_ROM_CURVE | + RTC_FEATURE_FLAG_FLAT_CATMULL_ROM_CURVE); # endif void oneapi_set_error_cb(OneAPIErrorCallback cb, void *user_ptr) diff --git a/intern/cycles/kernel/geom/subd_triangle.h b/intern/cycles/kernel/geom/subd_triangle.h index e30b52b2510f05e5a3a630fc57f07937106d830b..058891f202457b767841f24e5396c9b40de43ccf 100644 --- a/intern/cycles/kernel/geom/subd_triangle.h +++ b/intern/cycles/kernel/geom/subd_triangle.h @@ -136,90 +136,90 @@ ccl_device_noinline float subd_triangle_attribute_float(KernelGlobals kg, } else #endif /* __PATCH_EVAL__ */ - if (desc.element == ATTR_ELEMENT_FACE) - { - if (dx) - *dx = 0.0f; - if (dy) - *dy = 0.0f; - - return kernel_data_fetch(attributes_float, desc.offset + subd_triangle_patch_face(kg, patch)); - } - else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { - float2 uv[3]; - subd_triangle_patch_uv(kg, sd, uv); + if (desc.element == ATTR_ELEMENT_FACE) { + if (dx) + *dx = 0.0f; + if (dy) + *dy = 0.0f; + + return kernel_data_fetch(attributes_float, + desc.offset + subd_triangle_patch_face(kg, patch)); + } + else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); - uint4 v = subd_triangle_patch_indices(kg, patch); + uint4 v = subd_triangle_patch_indices(kg, patch); - float f0 = kernel_data_fetch(attributes_float, desc.offset + v.x); - float f1 = kernel_data_fetch(attributes_float, desc.offset + v.y); - float f2 = kernel_data_fetch(attributes_float, desc.offset + v.z); - float f3 = kernel_data_fetch(attributes_float, desc.offset + v.w); + float f0 = kernel_data_fetch(attributes_float, desc.offset + v.x); + float f1 = kernel_data_fetch(attributes_float, desc.offset + v.y); + float f2 = kernel_data_fetch(attributes_float, desc.offset + v.z); + float f3 = kernel_data_fetch(attributes_float, desc.offset + v.w); - if (subd_triangle_patch_num_corners(kg, patch) != 4) { - f1 = (f1 + f0) * 0.5f; - f3 = (f3 + f0) * 0.5f; - } + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } - float a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); - float b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); - float c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + float a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); #ifdef __RAY_DIFFERENTIALS__ - if (dx) - *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; - if (dy) - *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; + if (dx) + *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; + if (dy) + *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; #endif - return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; - } - else if (desc.element == ATTR_ELEMENT_CORNER) { - float2 uv[3]; - subd_triangle_patch_uv(kg, sd, uv); + return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; + } + else if (desc.element == ATTR_ELEMENT_CORNER) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); - int corners[4]; - subd_triangle_patch_corners(kg, patch, corners); + int corners[4]; + subd_triangle_patch_corners(kg, patch, corners); - float f0 = kernel_data_fetch(attributes_float, corners[0] + desc.offset); - float f1 = kernel_data_fetch(attributes_float, corners[1] + desc.offset); - float f2 = kernel_data_fetch(attributes_float, corners[2] + desc.offset); - float f3 = kernel_data_fetch(attributes_float, corners[3] + desc.offset); + float f0 = kernel_data_fetch(attributes_float, corners[0] + desc.offset); + float f1 = kernel_data_fetch(attributes_float, corners[1] + desc.offset); + float f2 = kernel_data_fetch(attributes_float, corners[2] + desc.offset); + float f3 = kernel_data_fetch(attributes_float, corners[3] + desc.offset); - if (subd_triangle_patch_num_corners(kg, patch) != 4) { - f1 = (f1 + f0) * 0.5f; - f3 = (f3 + f0) * 0.5f; - } + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } - float a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); - float b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); - float c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + float a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); #ifdef __RAY_DIFFERENTIALS__ - if (dx) - *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; - if (dy) - *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; + if (dx) + *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; + if (dy) + *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; #endif - return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; - } - else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { - if (dx) - *dx = 0.0f; - if (dy) - *dy = 0.0f; + return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; + } + else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { + if (dx) + *dx = 0.0f; + if (dy) + *dy = 0.0f; - return kernel_data_fetch(attributes_float, desc.offset); - } - else { - if (dx) - *dx = 0.0f; - if (dy) - *dy = 0.0f; + return kernel_data_fetch(attributes_float, desc.offset); + } + else { + if (dx) + *dx = 0.0f; + if (dy) + *dy = 0.0f; - return 0.0f; - } + return 0.0f; + } } ccl_device_noinline float2 subd_triangle_attribute_float2(KernelGlobals kg, @@ -277,92 +277,92 @@ ccl_device_noinline float2 subd_triangle_attribute_float2(KernelGlobals kg, } else #endif /* __PATCH_EVAL__ */ - if (desc.element == ATTR_ELEMENT_FACE) - { - if (dx) - *dx = make_float2(0.0f, 0.0f); - if (dy) - *dy = make_float2(0.0f, 0.0f); - - return kernel_data_fetch(attributes_float2, desc.offset + subd_triangle_patch_face(kg, patch)); - } - else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { - float2 uv[3]; - subd_triangle_patch_uv(kg, sd, uv); + if (desc.element == ATTR_ELEMENT_FACE) { + if (dx) + *dx = make_float2(0.0f, 0.0f); + if (dy) + *dy = make_float2(0.0f, 0.0f); + + return kernel_data_fetch(attributes_float2, + desc.offset + subd_triangle_patch_face(kg, patch)); + } + else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); - uint4 v = subd_triangle_patch_indices(kg, patch); + uint4 v = subd_triangle_patch_indices(kg, patch); - float2 f0 = kernel_data_fetch(attributes_float2, desc.offset + v.x); - float2 f1 = kernel_data_fetch(attributes_float2, desc.offset + v.y); - float2 f2 = kernel_data_fetch(attributes_float2, desc.offset + v.z); - float2 f3 = kernel_data_fetch(attributes_float2, desc.offset + v.w); + float2 f0 = kernel_data_fetch(attributes_float2, desc.offset + v.x); + float2 f1 = kernel_data_fetch(attributes_float2, desc.offset + v.y); + float2 f2 = kernel_data_fetch(attributes_float2, desc.offset + v.z); + float2 f3 = kernel_data_fetch(attributes_float2, desc.offset + v.w); - if (subd_triangle_patch_num_corners(kg, patch) != 4) { - f1 = (f1 + f0) * 0.5f; - f3 = (f3 + f0) * 0.5f; - } + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } - float2 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); - float2 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); - float2 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + float2 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float2 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float2 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); #ifdef __RAY_DIFFERENTIALS__ - if (dx) - *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; - if (dy) - *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; + if (dx) + *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; + if (dy) + *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; #endif - return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; - } - else if (desc.element == ATTR_ELEMENT_CORNER) { - float2 uv[3]; - subd_triangle_patch_uv(kg, sd, uv); + return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; + } + else if (desc.element == ATTR_ELEMENT_CORNER) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); - int corners[4]; - subd_triangle_patch_corners(kg, patch, corners); + int corners[4]; + subd_triangle_patch_corners(kg, patch, corners); - float2 f0, f1, f2, f3; + float2 f0, f1, f2, f3; - f0 = kernel_data_fetch(attributes_float2, corners[0] + desc.offset); - f1 = kernel_data_fetch(attributes_float2, corners[1] + desc.offset); - f2 = kernel_data_fetch(attributes_float2, corners[2] + desc.offset); - f3 = kernel_data_fetch(attributes_float2, corners[3] + desc.offset); + f0 = kernel_data_fetch(attributes_float2, corners[0] + desc.offset); + f1 = kernel_data_fetch(attributes_float2, corners[1] + desc.offset); + f2 = kernel_data_fetch(attributes_float2, corners[2] + desc.offset); + f3 = kernel_data_fetch(attributes_float2, corners[3] + desc.offset); - if (subd_triangle_patch_num_corners(kg, patch) != 4) { - f1 = (f1 + f0) * 0.5f; - f3 = (f3 + f0) * 0.5f; - } + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } - float2 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); - float2 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); - float2 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + float2 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float2 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float2 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); #ifdef __RAY_DIFFERENTIALS__ - if (dx) - *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; - if (dy) - *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; + if (dx) + *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; + if (dy) + *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; #endif - return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; - } - else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { - if (dx) - *dx = make_float2(0.0f, 0.0f); - if (dy) - *dy = make_float2(0.0f, 0.0f); + return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; + } + else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { + if (dx) + *dx = make_float2(0.0f, 0.0f); + if (dy) + *dy = make_float2(0.0f, 0.0f); - return kernel_data_fetch(attributes_float2, desc.offset); - } - else { - if (dx) - *dx = make_float2(0.0f, 0.0f); - if (dy) - *dy = make_float2(0.0f, 0.0f); + return kernel_data_fetch(attributes_float2, desc.offset); + } + else { + if (dx) + *dx = make_float2(0.0f, 0.0f); + if (dy) + *dy = make_float2(0.0f, 0.0f); - return make_float2(0.0f, 0.0f); - } + return make_float2(0.0f, 0.0f); + } } ccl_device_noinline float3 subd_triangle_attribute_float3(KernelGlobals kg, @@ -419,92 +419,92 @@ ccl_device_noinline float3 subd_triangle_attribute_float3(KernelGlobals kg, } else #endif /* __PATCH_EVAL__ */ - if (desc.element == ATTR_ELEMENT_FACE) - { - if (dx) - *dx = make_float3(0.0f, 0.0f, 0.0f); - if (dy) - *dy = make_float3(0.0f, 0.0f, 0.0f); - - return kernel_data_fetch(attributes_float3, desc.offset + subd_triangle_patch_face(kg, patch)); - } - else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { - float2 uv[3]; - subd_triangle_patch_uv(kg, sd, uv); + if (desc.element == ATTR_ELEMENT_FACE) { + if (dx) + *dx = make_float3(0.0f, 0.0f, 0.0f); + if (dy) + *dy = make_float3(0.0f, 0.0f, 0.0f); + + return kernel_data_fetch(attributes_float3, + desc.offset + subd_triangle_patch_face(kg, patch)); + } + else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); - uint4 v = subd_triangle_patch_indices(kg, patch); + uint4 v = subd_triangle_patch_indices(kg, patch); - float3 f0 = kernel_data_fetch(attributes_float3, desc.offset + v.x); - float3 f1 = kernel_data_fetch(attributes_float3, desc.offset + v.y); - float3 f2 = kernel_data_fetch(attributes_float3, desc.offset + v.z); - float3 f3 = kernel_data_fetch(attributes_float3, desc.offset + v.w); + float3 f0 = kernel_data_fetch(attributes_float3, desc.offset + v.x); + float3 f1 = kernel_data_fetch(attributes_float3, desc.offset + v.y); + float3 f2 = kernel_data_fetch(attributes_float3, desc.offset + v.z); + float3 f3 = kernel_data_fetch(attributes_float3, desc.offset + v.w); - if (subd_triangle_patch_num_corners(kg, patch) != 4) { - f1 = (f1 + f0) * 0.5f; - f3 = (f3 + f0) * 0.5f; - } + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } - float3 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); - float3 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); - float3 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + float3 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float3 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float3 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); #ifdef __RAY_DIFFERENTIALS__ - if (dx) - *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; - if (dy) - *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; + if (dx) + *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; + if (dy) + *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; #endif - return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; - } - else if (desc.element == ATTR_ELEMENT_CORNER) { - float2 uv[3]; - subd_triangle_patch_uv(kg, sd, uv); + return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; + } + else if (desc.element == ATTR_ELEMENT_CORNER) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); - int corners[4]; - subd_triangle_patch_corners(kg, patch, corners); + int corners[4]; + subd_triangle_patch_corners(kg, patch, corners); - float3 f0, f1, f2, f3; + float3 f0, f1, f2, f3; - f0 = kernel_data_fetch(attributes_float3, corners[0] + desc.offset); - f1 = kernel_data_fetch(attributes_float3, corners[1] + desc.offset); - f2 = kernel_data_fetch(attributes_float3, corners[2] + desc.offset); - f3 = kernel_data_fetch(attributes_float3, corners[3] + desc.offset); + f0 = kernel_data_fetch(attributes_float3, corners[0] + desc.offset); + f1 = kernel_data_fetch(attributes_float3, corners[1] + desc.offset); + f2 = kernel_data_fetch(attributes_float3, corners[2] + desc.offset); + f3 = kernel_data_fetch(attributes_float3, corners[3] + desc.offset); - if (subd_triangle_patch_num_corners(kg, patch) != 4) { - f1 = (f1 + f0) * 0.5f; - f3 = (f3 + f0) * 0.5f; - } + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } - float3 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); - float3 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); - float3 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + float3 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float3 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float3 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); #ifdef __RAY_DIFFERENTIALS__ - if (dx) - *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; - if (dy) - *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; + if (dx) + *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; + if (dy) + *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; #endif - return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; - } - else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { - if (dx) - *dx = make_float3(0.0f, 0.0f, 0.0f); - if (dy) - *dy = make_float3(0.0f, 0.0f, 0.0f); + return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; + } + else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { + if (dx) + *dx = make_float3(0.0f, 0.0f, 0.0f); + if (dy) + *dy = make_float3(0.0f, 0.0f, 0.0f); - return kernel_data_fetch(attributes_float3, desc.offset); - } - else { - if (dx) - *dx = make_float3(0.0f, 0.0f, 0.0f); - if (dy) - *dy = make_float3(0.0f, 0.0f, 0.0f); + return kernel_data_fetch(attributes_float3, desc.offset); + } + else { + if (dx) + *dx = make_float3(0.0f, 0.0f, 0.0f); + if (dy) + *dy = make_float3(0.0f, 0.0f, 0.0f); - return make_float3(0.0f, 0.0f, 0.0f); - } + return make_float3(0.0f, 0.0f, 0.0f); + } } ccl_device_noinline float4 subd_triangle_attribute_float4(KernelGlobals kg, @@ -566,104 +566,104 @@ ccl_device_noinline float4 subd_triangle_attribute_float4(KernelGlobals kg, } else #endif /* __PATCH_EVAL__ */ - if (desc.element == ATTR_ELEMENT_FACE) - { - if (dx) - *dx = zero_float4(); - if (dy) - *dy = zero_float4(); - - return kernel_data_fetch(attributes_float4, desc.offset + subd_triangle_patch_face(kg, patch)); - } - else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { - float2 uv[3]; - subd_triangle_patch_uv(kg, sd, uv); + if (desc.element == ATTR_ELEMENT_FACE) { + if (dx) + *dx = zero_float4(); + if (dy) + *dy = zero_float4(); + + return kernel_data_fetch(attributes_float4, + desc.offset + subd_triangle_patch_face(kg, patch)); + } + else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); - uint4 v = subd_triangle_patch_indices(kg, patch); + uint4 v = subd_triangle_patch_indices(kg, patch); - float4 f0 = kernel_data_fetch(attributes_float4, desc.offset + v.x); - float4 f1 = kernel_data_fetch(attributes_float4, desc.offset + v.y); - float4 f2 = kernel_data_fetch(attributes_float4, desc.offset + v.z); - float4 f3 = kernel_data_fetch(attributes_float4, desc.offset + v.w); + float4 f0 = kernel_data_fetch(attributes_float4, desc.offset + v.x); + float4 f1 = kernel_data_fetch(attributes_float4, desc.offset + v.y); + float4 f2 = kernel_data_fetch(attributes_float4, desc.offset + v.z); + float4 f3 = kernel_data_fetch(attributes_float4, desc.offset + v.w); - if (subd_triangle_patch_num_corners(kg, patch) != 4) { - f1 = (f1 + f0) * 0.5f; - f3 = (f3 + f0) * 0.5f; - } + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } - float4 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); - float4 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); - float4 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + float4 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float4 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float4 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); #ifdef __RAY_DIFFERENTIALS__ - if (dx) - *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; - if (dy) - *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; + if (dx) + *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; + if (dy) + *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; #endif - return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; - } - else if (desc.element == ATTR_ELEMENT_CORNER || desc.element == ATTR_ELEMENT_CORNER_BYTE) { - float2 uv[3]; - subd_triangle_patch_uv(kg, sd, uv); - - int corners[4]; - subd_triangle_patch_corners(kg, patch, corners); - - float4 f0, f1, f2, f3; - - if (desc.element == ATTR_ELEMENT_CORNER_BYTE) { - f0 = color_srgb_to_linear_v4( - color_uchar4_to_float4(kernel_data_fetch(attributes_uchar4, corners[0] + desc.offset))); - f1 = color_srgb_to_linear_v4( - color_uchar4_to_float4(kernel_data_fetch(attributes_uchar4, corners[1] + desc.offset))); - f2 = color_srgb_to_linear_v4( - color_uchar4_to_float4(kernel_data_fetch(attributes_uchar4, corners[2] + desc.offset))); - f3 = color_srgb_to_linear_v4( - color_uchar4_to_float4(kernel_data_fetch(attributes_uchar4, corners[3] + desc.offset))); - } - else { - f0 = kernel_data_fetch(attributes_float4, corners[0] + desc.offset); - f1 = kernel_data_fetch(attributes_float4, corners[1] + desc.offset); - f2 = kernel_data_fetch(attributes_float4, corners[2] + desc.offset); - f3 = kernel_data_fetch(attributes_float4, corners[3] + desc.offset); + return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; } + else if (desc.element == ATTR_ELEMENT_CORNER || desc.element == ATTR_ELEMENT_CORNER_BYTE) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); + + int corners[4]; + subd_triangle_patch_corners(kg, patch, corners); + + float4 f0, f1, f2, f3; + + if (desc.element == ATTR_ELEMENT_CORNER_BYTE) { + f0 = color_srgb_to_linear_v4(color_uchar4_to_float4( + kernel_data_fetch(attributes_uchar4, corners[0] + desc.offset))); + f1 = color_srgb_to_linear_v4(color_uchar4_to_float4( + kernel_data_fetch(attributes_uchar4, corners[1] + desc.offset))); + f2 = color_srgb_to_linear_v4(color_uchar4_to_float4( + kernel_data_fetch(attributes_uchar4, corners[2] + desc.offset))); + f3 = color_srgb_to_linear_v4(color_uchar4_to_float4( + kernel_data_fetch(attributes_uchar4, corners[3] + desc.offset))); + } + else { + f0 = kernel_data_fetch(attributes_float4, corners[0] + desc.offset); + f1 = kernel_data_fetch(attributes_float4, corners[1] + desc.offset); + f2 = kernel_data_fetch(attributes_float4, corners[2] + desc.offset); + f3 = kernel_data_fetch(attributes_float4, corners[3] + desc.offset); + } - if (subd_triangle_patch_num_corners(kg, patch) != 4) { - f1 = (f1 + f0) * 0.5f; - f3 = (f3 + f0) * 0.5f; - } + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } - float4 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); - float4 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); - float4 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + float4 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float4 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float4 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); #ifdef __RAY_DIFFERENTIALS__ - if (dx) - *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; - if (dy) - *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; + if (dx) + *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; + if (dy) + *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; #endif - return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; - } - else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { - if (dx) - *dx = zero_float4(); - if (dy) - *dy = zero_float4(); + return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; + } + else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { + if (dx) + *dx = zero_float4(); + if (dy) + *dy = zero_float4(); - return kernel_data_fetch(attributes_float4, desc.offset); - } - else { - if (dx) - *dx = zero_float4(); - if (dy) - *dy = zero_float4(); + return kernel_data_fetch(attributes_float4, desc.offset); + } + else { + if (dx) + *dx = zero_float4(); + if (dy) + *dy = zero_float4(); - return zero_float4(); - } + return zero_float4(); + } } CCL_NAMESPACE_END diff --git a/intern/cycles/kernel/integrator/guiding.h b/intern/cycles/kernel/integrator/guiding.h index 0d04963558a3a3f3096b4e9a7185f834210f7f53..10d7982918aa545e7fced9cb35d6494057c00d34 100644 --- a/intern/cycles/kernel/integrator/guiding.h +++ b/intern/cycles/kernel/integrator/guiding.h @@ -513,7 +513,8 @@ ccl_device_forceinline bool guiding_bsdf_init(KernelGlobals kg, { #if defined(__PATH_GUIDING__) && PATH_GUIDING_LEVEL >= 4 if (kg->opgl_surface_sampling_distribution->Init( - kg->opgl_guiding_field, guiding_point3f(P), rand)) { + kg->opgl_guiding_field, guiding_point3f(P), rand)) + { kg->opgl_surface_sampling_distribution->ApplyCosineProduct(guiding_point3f(N)); return true; } @@ -576,7 +577,8 @@ ccl_device_forceinline bool guiding_phase_init(KernelGlobals kg, } if (kg->opgl_volume_sampling_distribution->Init( - kg->opgl_guiding_field, guiding_point3f(P), rand)) { + kg->opgl_guiding_field, guiding_point3f(P), rand)) + { kg->opgl_volume_sampling_distribution->ApplySingleLobeHenyeyGreensteinProduct(guiding_vec3f(D), g); return true; diff --git a/intern/cycles/kernel/integrator/intersect_volume_stack.h b/intern/cycles/kernel/integrator/intersect_volume_stack.h index bb18d0f4c21de7b755c83bd49af86a57b6456a82..8503a4337bc04cba2078e4ba1afdcb74d7f64f6a 100644 --- a/intern/cycles/kernel/integrator/intersect_volume_stack.h +++ b/intern/cycles/kernel/integrator/intersect_volume_stack.h @@ -58,7 +58,8 @@ ccl_device void integrator_volume_stack_update_for_subsurface(KernelGlobals kg, Intersection isect; int step = 0; while (step < 2 * volume_stack_size && - scene_intersect_volume(kg, &volume_ray, &isect, visibility)) { + scene_intersect_volume(kg, &volume_ray, &isect, visibility)) + { /* Ignore self, SSS itself already enters and exits the object. */ if (isect.object != volume_ray.self.object) { shader_setup_from_ray(kg, stack_sd, &volume_ray, &isect); diff --git a/intern/cycles/kernel/integrator/shade_background.h b/intern/cycles/kernel/integrator/shade_background.h index 703bc3abaeef5696b9f76b48e8aea07fafebf244..10d4a4c01bdba3d4dd84b1871bf90559fe3ca397 100644 --- a/intern/cycles/kernel/integrator/shade_background.h +++ b/intern/cycles/kernel/integrator/shade_background.h @@ -110,7 +110,8 @@ ccl_device_inline void integrate_background(KernelGlobals kg, float mis_weight = 1.0f; /* Check if background light exists or if we should skip PDF. */ if (!(INTEGRATOR_STATE(state, path, flag) & PATH_RAY_MIS_SKIP) && - kernel_data.background.use_mis) { + kernel_data.background.use_mis) + { mis_weight = light_sample_mis_weight_forward_background(kg, state, path_flag); } diff --git a/intern/cycles/kernel/integrator/shade_surface.h b/intern/cycles/kernel/integrator/shade_surface.h index e34eb347f1399174377ea78788dd3c62d6b7cde2..6ed26dc1eb2c06bf04962a6e75c27bcf230e46ec 100644 --- a/intern/cycles/kernel/integrator/shade_surface.h +++ b/intern/cycles/kernel/integrator/shade_surface.h @@ -560,7 +560,8 @@ ccl_device_forceinline void integrate_surface_ao(KernelGlobals kg, const uint32_t path_flag = INTEGRATOR_STATE(state, path, flag); if (!(kernel_data.kernel_features & KERNEL_FEATURE_AO_ADDITIVE) && - !(path_flag & PATH_RAY_CAMERA)) { + !(path_flag & PATH_RAY_CAMERA)) + { return; } diff --git a/intern/cycles/kernel/integrator/shade_volume.h b/intern/cycles/kernel/integrator/shade_volume.h index 177f26508750da84d1b30d49afbe9e4fbbbe8589..1b2c884e07adc9331e49e9f919d4b29eba4785e6 100644 --- a/intern/cycles/kernel/integrator/shade_volume.h +++ b/intern/cycles/kernel/integrator/shade_volume.h @@ -1212,7 +1212,8 @@ ccl_device void integrator_shade_volume(KernelGlobals kg, # ifdef __SHADOW_LINKING__ if (shadow_linking_schedule_intersection_kernel<DEVICE_KERNEL_INTEGRATOR_SHADE_VOLUME>(kg, - state)) { + state)) + { return; } # endif /* __SHADOW_LINKING__ */ diff --git a/intern/cycles/kernel/integrator/surface_shader.h b/intern/cycles/kernel/integrator/surface_shader.h index 03be2f6d1c1fec4f6e52a7e2949ca5b644c436a5..22e2a56b8b7989fd9c0572366e2cf9ca38d3d828 100644 --- a/intern/cycles/kernel/integrator/surface_shader.h +++ b/intern/cycles/kernel/integrator/surface_shader.h @@ -167,7 +167,8 @@ ccl_device_inline void surface_shader_prepare_closures(KernelGlobals kg, sc->sample_weight = 0.0f; } else if ((CLOSURE_IS_BSDF_TRANSPARENT(sc->type) && - (filter_closures & FILTER_CLOSURE_TRANSPARENT))) { + (filter_closures & FILTER_CLOSURE_TRANSPARENT))) + { sc->type = CLOSURE_HOLDOUT_ID; sc->sample_weight = 0.0f; sd->flag |= SD_HOLDOUT; diff --git a/intern/cycles/kernel/light/background.h b/intern/cycles/kernel/light/background.h index 984293fa79c55d13915542664235e583f3a78a25..002fa6e4b74ebc19781fda38c6353263846b14ba 100644 --- a/intern/cycles/kernel/light/background.h +++ b/intern/cycles/kernel/light/background.h @@ -55,7 +55,8 @@ ccl_device float3 background_map_sample(KernelGlobals kg, float2 rand, ccl_priva int middle = first + step; if (kernel_data_fetch(light_background_conditional_cdf, index_v * cdf_width + middle).y < - rand.x) { + rand.x) + { first = middle + 1; count -= step + 1; } diff --git a/intern/cycles/kernel/osl/services.cpp b/intern/cycles/kernel/osl/services.cpp index 93595b0a458d9e02338fe99a1849fa5b8e043829..9637fe7ab9d9f59873cd42cc261263d62094f551 100644 --- a/intern/cycles/kernel/osl/services.cpp +++ b/intern/cycles/kernel/osl/services.cpp @@ -712,7 +712,8 @@ static bool set_attribute_int(int i, TypeDesc type, bool derivatives, void *val) static bool set_attribute_string(ustring str, TypeDesc type, bool derivatives, void *val) { if (type.basetype == TypeDesc::STRING && type.aggregate == TypeDesc::SCALAR && - type.arraylen == 0) { + type.arraylen == 0) + { ustring *sval = (ustring *)val; sval[0] = str; diff --git a/intern/cycles/kernel/osl/types.h b/intern/cycles/kernel/osl/types.h index 8cb5779961a200cc6209a59eaef017e4dc6e4c24..d057550a6d9757bf18a1295a3748f9015a957919 100644 --- a/intern/cycles/kernel/osl/types.h +++ b/intern/cycles/kernel/osl/types.h @@ -101,11 +101,9 @@ struct ShaderGlobals { int backfacing; }; -struct OSLNoiseOptions { -}; +struct OSLNoiseOptions {}; -struct OSLTextureOptions { -}; +struct OSLTextureOptions {}; #define OSL_TEXTURE_HANDLE_TYPE_IES ((uintptr_t)0x2 << 30) #define OSL_TEXTURE_HANDLE_TYPE_SVM ((uintptr_t)0x1 << 30) diff --git a/intern/cycles/kernel/sample/pattern.h b/intern/cycles/kernel/sample/pattern.h index f02a75edcf691dd6be898e1fa81dd1403a17edc2..18b520502422c611096fd34818cdf6a7586abe28 100644 --- a/intern/cycles/kernel/sample/pattern.h +++ b/intern/cycles/kernel/sample/pattern.h @@ -12,7 +12,7 @@ CCL_NAMESPACE_BEGIN /* Pseudo random numbers, uncomment this for debugging correlations. Only run * this single threaded on a CPU for repeatable results. */ -//#define __DEBUG_CORRELATION__ +// #define __DEBUG_CORRELATION__ /* * The `path_rng_*()` functions below use a shuffled scrambled Sobol diff --git a/intern/cycles/kernel/types.h b/intern/cycles/kernel/types.h index 50713f31357aa1dfb9ae6522af15005c4c702bf6..eea1df193924909f9be938114f6cbf835ea2aa57 100644 --- a/intern/cycles/kernel/types.h +++ b/intern/cycles/kernel/types.h @@ -341,8 +341,8 @@ enum PathRayMNEE { #define SHADOW_CATCHER_VISIBILITY_SHIFT(visibility) ((visibility) << 16) #define SHADOW_CATCHER_PATH_VISIBILITY(path_flag, visibility) \ - (((path_flag)&PATH_RAY_SHADOW_CATCHER_PASS) ? SHADOW_CATCHER_VISIBILITY_SHIFT(visibility) : \ - (visibility)) + (((path_flag) & PATH_RAY_SHADOW_CATCHER_PASS) ? SHADOW_CATCHER_VISIBILITY_SHIFT(visibility) : \ + (visibility)) #define SHADOW_CATCHER_OBJECT_VISIBILITY(is_shadow_catcher, visibility) \ (((is_shadow_catcher) ? SHADOW_CATCHER_VISIBILITY_SHIFT(visibility) : 0) | (visibility)) @@ -648,7 +648,8 @@ typedef enum PrimitiveType { } PrimitiveType; /* Convert type to index in range 0..PRIMITIVE_NUM-1. */ -#define PRIMITIVE_INDEX(type) (bitscan((uint32_t)(type)) * 2 + (((type)&PRIMITIVE_MOTION) ? 1 : 0)) +#define PRIMITIVE_INDEX(type) \ + (bitscan((uint32_t)(type)) * 2 + (((type) & PRIMITIVE_MOTION) ? 1 : 0)) /* Pack segment into type value to save space. */ #define PRIMITIVE_PACK_SEGMENT(type, segment) ((segment << PRIMITIVE_NUM_BITS) | (type)) diff --git a/intern/cycles/kernel/util/nanovdb.h b/intern/cycles/kernel/util/nanovdb.h index 6073eb1266ea80e612eaee04b64e47766edd66d9..2a73adaf0cd9909712cc7acf4e51e458647b3e21 100644 --- a/intern/cycles/kernel/util/nanovdb.h +++ b/intern/cycles/kernel/util/nanovdb.h @@ -236,8 +236,7 @@ template<uint32_t LOG2DIM> struct alignas(NANOVDB_DATA_ALIGNMENT) LeafFnBase { /* LeafData<Fp16> */ -class Fp16 { -}; +class Fp16 {}; template<uint32_t LOG2DIM> struct alignas(NANOVDB_DATA_ALIGNMENT) LeafData<Fp16, LOG2DIM> { using ValueType = float; @@ -254,8 +253,7 @@ template<uint32_t LOG2DIM> struct alignas(NANOVDB_DATA_ALIGNMENT) LeafData<Fp16, /* LeafData<FpN> */ -class FpN { -}; +class FpN {}; template<uint32_t LOG2DIM> struct alignas(NANOVDB_DATA_ALIGNMENT) LeafData<FpN, LOG2DIM> { using ValueType = float; diff --git a/intern/cycles/kernel/util/profiling.h b/intern/cycles/kernel/util/profiling.h index 69b3fbcaf7a21367131bc72208d5da63e9bc251c..54a90e836da851e13eef073711cd02d175b66f24 100644 --- a/intern/cycles/kernel/util/profiling.h +++ b/intern/cycles/kernel/util/profiling.h @@ -17,7 +17,7 @@ CCL_NAMESPACE_BEGIN # define PROFILING_INIT_FOR_SHADER(kg, event) \ ProfilingWithShaderHelper profiling_helper((ProfilingState *)&kg->profiler, event) # define PROFILING_SHADER(object, shader) \ - profiling_helper.set_shader(object, (shader)&SHADER_MASK); + profiling_helper.set_shader(object, (shader) & SHADER_MASK); #else # define PROFILING_INIT(kg, event) # define PROFILING_EVENT(event) diff --git a/intern/cycles/scene/alembic.h b/intern/cycles/scene/alembic.h index 1d751484ac56c710d85d23b808a6054d67b089d0..1234df8f9fd4d19d56e020f25ae239747cf161c2 100644 --- a/intern/cycles/scene/alembic.h +++ b/intern/cycles/scene/alembic.h @@ -32,11 +32,9 @@ struct MatrixSamplesData { }; /* Helpers to detect if some type is a `ccl::array`. */ -template<typename> struct is_array : public std::false_type { -}; +template<typename> struct is_array : public std::false_type {}; -template<typename T> struct is_array<array<T>> : public std::true_type { -}; +template<typename T> struct is_array<array<T>> : public std::true_type {}; /* Holds the data for a cache lookup at a given time, as well as information to * help disambiguate successes or failures to get data from the cache. */ diff --git a/intern/cycles/scene/geometry_attributes.cpp b/intern/cycles/scene/geometry_attributes.cpp index 558455b9f3c1fa9dd75cba19825ae637f7ad5179..dccf0637853dab14ccd30b7938b31a3d6ac1a705 100644 --- a/intern/cycles/scene/geometry_attributes.cpp +++ b/intern/cycles/scene/geometry_attributes.cpp @@ -390,7 +390,8 @@ void GeometryManager::update_attribute_element_offset(Geometry *geom, if (geom->is_mesh()) { Mesh *mesh = static_cast<Mesh *>(geom); if (mesh->subdivision_type == Mesh::SUBDIVISION_CATMULL_CLARK && - desc.flags & ATTR_SUBDIVIDED) { + desc.flags & ATTR_SUBDIVIDED) + { /* Indices for subdivided attributes are retrieved * from patch table so no need for correction here. */ } diff --git a/intern/cycles/scene/image.cpp b/intern/cycles/scene/image.cpp index 6ab6aba9e73ad360b0bfdc90177139d7aeded88a..38dbdff8e3e4678edd6c794a43a384a89705c06d 100644 --- a/intern/cycles/scene/image.cpp +++ b/intern/cycles/scene/image.cpp @@ -620,7 +620,8 @@ bool ImageManager::file_load_image(Image *img, int texture_limit) } if (img->metadata.colorspace != u_colorspace_raw && - img->metadata.colorspace != u_colorspace_srgb) { + img->metadata.colorspace != u_colorspace_srgb) + { /* Convert to scene linear. */ ColorSpaceManager::to_scene_linear( img->metadata.colorspace, pixels, num_pixels, is_rgba, img->metadata.compress_as_srgb); @@ -635,7 +636,8 @@ bool ImageManager::file_load_image(Image *img, int texture_limit) for (size_t i = 0; i < num_pixels; i += 4) { StorageType *pixel = &pixels[i * 4]; if (!isfinite(pixel[0]) || !isfinite(pixel[1]) || !isfinite(pixel[2]) || - !isfinite(pixel[3])) { + !isfinite(pixel[3])) + { pixel[0] = 0; pixel[1] = 0; pixel[2] = 0; diff --git a/intern/cycles/scene/pass.cpp b/intern/cycles/scene/pass.cpp index 42335e21f633947dc4c4726382ff7dbae9751a9f..062d7cbb3d30634312bb52cdb5d2832927847f3f 100644 --- a/intern/cycles/scene/pass.cpp +++ b/intern/cycles/scene/pass.cpp @@ -386,7 +386,8 @@ const Pass *Pass::find(const vector<Pass *> &passes, { for (const Pass *pass : passes) { if (pass->get_type() != type || pass->get_mode() != mode || - pass->get_lightgroup() != lightgroup) { + pass->get_lightgroup() != lightgroup) + { continue; } return pass; diff --git a/intern/cycles/session/denoising.cpp b/intern/cycles/session/denoising.cpp index 531f89dc6e09dad68b274826713b6b44731cf01a..d4f14ccbe3a7c4153836f924e9ec95de66604feb 100644 --- a/intern/cycles/session/denoising.cpp +++ b/intern/cycles/session/denoising.cpp @@ -361,7 +361,8 @@ bool DenoiseImage::parse_channels(const ImageSpec &in_spec, string &error) /* Loop over all detected RenderLayers, check whether they contain a full set of input channels. * Any channels that won't be processed internally are also passed through. */ for (map<string, DenoiseImageLayer>::iterator i = file_layers.begin(); i != file_layers.end(); - ++i) { + ++i) + { const string &name = i->first; DenoiseImageLayer &layer = i->second; diff --git a/intern/cycles/session/merge.cpp b/intern/cycles/session/merge.cpp index c3b59f39f9a6269a6e6d993e6a490748c7cbb4ce..e4837714366198cd1c8b9a5a680f98bad7dcf401 100644 --- a/intern/cycles/session/merge.cpp +++ b/intern/cycles/session/merge.cpp @@ -157,7 +157,8 @@ static bool parse_channels(const ImageSpec &in_spec, string layername, channelname; if (parse_channel_name( - pass.channel_name, layername, pass.name, channelname, multiview_channels)) { + pass.channel_name, layername, pass.name, channelname, multiview_channels)) + { /* Channel part of a render layer. */ pass.op = parse_channel_operation(pass.name); } @@ -459,7 +460,8 @@ static bool merge_pixels(const vector<MergeImage> &images, case MERGE_CHANNEL_SAMPLES: { const auto &samples = layer_samples.at(layer.name); for (size_t i = 0; offset < num_pixels; - offset += stride, out_offset += out_stride, i++) { + offset += stride, out_offset += out_stride, i++) + { out_pixels[out_offset] = 1.0f * samples.per_pixel[i] / samples.total; } break; diff --git a/intern/cycles/util/path.cpp b/intern/cycles/util/path.cpp index c6e82c1da8e202b67fe13d5d80cb48ef924ff882..373b33f838d05e1a455c67c7f650091fe85fa157 100644 --- a/intern/cycles/util/path.cpp +++ b/intern/cycles/util/path.cpp @@ -49,7 +49,7 @@ typedef struct _stati64 path_stat_t; typedef struct _stat path_stat_t; # endif # ifndef S_ISDIR -# define S_ISDIR(x) (((x)&_S_IFDIR) == _S_IFDIR) +# define S_ISDIR(x) (((x) & _S_IFDIR) == _S_IFDIR) # endif #else typedef struct stat path_stat_t; diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index f3a3db6bceffdd2ab74bb176a9ef4b57ed3a7e90..a45c505d4cb3eb7b4bcf7996b66071964f52716c 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -36,12 +36,12 @@ typedef unsigned char uchar; typedef struct name##__ { \ int unused; \ MEM_CXX_CLASS_ALLOC_FUNCS(#name) \ - } * name + } *name #else # define GHOST_DECLARE_HANDLE(name) \ typedef struct name##__ { \ int unused; \ - } * name + } *name #endif /** diff --git a/intern/ghost/intern/GHOST_Context.hh b/intern/ghost/intern/GHOST_Context.hh index acd22d426a863cb314615d4d30df13a3d88455ab..0f20a4f338443d9cd64cd9066bba948b7a8386db 100644 --- a/intern/ghost/intern/GHOST_Context.hh +++ b/intern/ghost/intern/GHOST_Context.hh @@ -201,7 +201,7 @@ bool win32_chk(bool result, const char *file = nullptr, int line = 0, const char bool win32_silent_chk(bool result); # ifndef NDEBUG -# define WIN32_CHK(x) win32_chk((x), __FILE__, __LINE__, # x) +# define WIN32_CHK(x) win32_chk((x), __FILE__, __LINE__, #x) # else # define WIN32_CHK(x) win32_chk(x) # endif diff --git a/intern/ghost/intern/GHOST_ContextEGL.cc b/intern/ghost/intern/GHOST_ContextEGL.cc index 38d18030223aeb176f4e0cb10a0c854ae5d1d64f..a68e91e185b4b368a0bad5123bfb55cc8d355091 100644 --- a/intern/ghost/intern/GHOST_ContextEGL.cc +++ b/intern/ghost/intern/GHOST_ContextEGL.cc @@ -147,7 +147,7 @@ static bool egl_chk(bool result, } #ifndef NDEBUG -# define EGL_CHK(x) egl_chk((x), __FILE__, __LINE__, # x) +# define EGL_CHK(x) egl_chk((x), __FILE__, __LINE__, #x) #else # define EGL_CHK(x) egl_chk(x) #endif @@ -475,7 +475,8 @@ GHOST_TSuccess GHOST_ContextEGL::initializeDrawingContext() attrib_list.clear(); if (epoxy_egl_version(m_display) >= 15 || - epoxy_has_egl_extension(m_display, "KHR_create_context")) { + epoxy_has_egl_extension(m_display, "KHR_create_context")) + { if (m_api == EGL_OPENGL_API || m_api == EGL_OPENGL_ES_API) { if (m_contextMajorVersion != 0) { attrib_list.push_back(EGL_CONTEXT_MAJOR_VERSION_KHR); diff --git a/intern/ghost/intern/GHOST_ContextWGL.hh b/intern/ghost/intern/GHOST_ContextWGL.hh index a95fb530bafc98e3bc2220943ca5d225601456c0..12458e333262cbe4a518aaa452708c1a57a1379a 100644 --- a/intern/ghost/intern/GHOST_ContextWGL.hh +++ b/intern/ghost/intern/GHOST_ContextWGL.hh @@ -8,7 +8,7 @@ #pragma once -//#define WIN32_COMPOSITING +// #define WIN32_COMPOSITING #include "GHOST_Context.hh" diff --git a/intern/ghost/intern/GHOST_SystemCocoa.hh b/intern/ghost/intern/GHOST_SystemCocoa.hh index da1813a88adebbe438297d96e6c3c12f06194d94..2efedc6245b65214cbaaec6bbbf705e9745568f5 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.hh +++ b/intern/ghost/intern/GHOST_SystemCocoa.hh @@ -13,7 +13,7 @@ # error Apple OSX only! #endif // __APPLE__ -//#define __CARBONSOUND__ +// #define __CARBONSOUND__ #include "GHOST_System.hh" diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index be0d7d903e9352284ba5400979e8dbf83a2ccd79..35dbdf562084507733877c58e8ea1216e55a7ed8 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -2047,7 +2047,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr) false)); } if ((modifiers & NSEventModifierFlagControl) != - (m_modifierMask & NSEventModifierFlagControl)) { + (m_modifierMask & NSEventModifierFlagControl)) + { pushEvent(new GHOST_EventKey( [event timestamp] * 1000, (modifiers & NSEventModifierFlagControl) ? GHOST_kEventKeyDown : GHOST_kEventKeyUp, @@ -2065,7 +2066,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr) false)); } if ((modifiers & NSEventModifierFlagCommand) != - (m_modifierMask & NSEventModifierFlagCommand)) { + (m_modifierMask & NSEventModifierFlagCommand)) + { pushEvent(new GHOST_EventKey( [event timestamp] * 1000, (modifiers & NSEventModifierFlagCommand) ? GHOST_kEventKeyDown : GHOST_kEventKeyUp, diff --git a/intern/ghost/intern/GHOST_SystemWayland.cc b/intern/ghost/intern/GHOST_SystemWayland.cc index dc757037116d7ad7da788f010f280280ed2c685e..9657154727a27449f200b60cfe842fa9c09ea22e 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cc +++ b/intern/ghost/intern/GHOST_SystemWayland.cc @@ -4644,7 +4644,8 @@ static void keyboard_handle_keymap(void *data, if (seat->xkb.state_empty_with_shift) { seat->xkb_use_non_latin_workaround = true; for (xkb_keycode_t key_code = KEY_1 + EVDEV_OFFSET; key_code <= KEY_0 + EVDEV_OFFSET; - key_code++) { + key_code++) + { const xkb_keysym_t sym_test = xkb_state_key_get_one_sym(seat->xkb.state_empty_with_shift, key_code); if (!(sym_test >= XKB_KEY_0 && sym_test <= XKB_KEY_9)) { @@ -8534,7 +8535,8 @@ bool GHOST_SystemWayland::window_cursor_grab_set(const GHOST_TGrabCursorMode mod } else if (mode_current == GHOST_kGrabHide) { if ((init_grab_xy[0] != seat->grab_lock_xy[0]) || - (init_grab_xy[1] != seat->grab_lock_xy[1])) { + (init_grab_xy[1] != seat->grab_lock_xy[1])) + { const wl_fixed_t xy_next[2] = { gwl_window_scale_wl_fixed_from(scale_params, wl_fixed_from_int(init_grab_xy[0])), gwl_window_scale_wl_fixed_from(scale_params, wl_fixed_from_int(init_grab_xy[1])), diff --git a/intern/ghost/intern/GHOST_SystemWin32.cc b/intern/ghost/intern/GHOST_SystemWin32.cc index a38e25719a7f22f8987335d11e77a73ab9988075..d52f241a496f8f82ed894ba69263f79603d91350 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cc +++ b/intern/ghost/intern/GHOST_SystemWin32.cc @@ -964,7 +964,8 @@ void GHOST_SystemWin32::processWintabEvent(GHOST_WindowWin32 *window) * event queue. */ MSG msg; if (PeekMessage(&msg, window->getHWND(), message, message, PM_NOYIELD) && - msg.message != WM_QUIT) { + msg.message != WM_QUIT) + { /* Test for Win32/Wintab button down match. */ useWintabPos = wt->testCoordinates(msg.pt.x, msg.pt.y, info.x, info.y); @@ -1283,7 +1284,8 @@ GHOST_EventKey *GHOST_SystemWin32::processKeyEvent(GHOST_WindowWin32 *window, RA /* TODO: #ToUnicodeEx can respond with up to 4 utf16 chars (only 2 here). * Could be up to 24 utf8 bytes. */ if ((r = ToUnicodeEx( - vk, raw.data.keyboard.MakeCode, state, utf16, 2, 0, system->m_keylayout))) { + vk, raw.data.keyboard.MakeCode, state, utf16, 2, 0, system->m_keylayout))) + { if ((r > 0 && r < 3)) { utf16[r] = 0; conv_utf_16_to_8(utf16, utf8_char, 6); diff --git a/intern/ghost/intern/GHOST_SystemX11.cc b/intern/ghost/intern/GHOST_SystemX11.cc index c92a315b6d536af2486229697e741c81c7c714e7..66e1d1d81ac766141544c952ef3bb022aeaa5a91 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cc +++ b/intern/ghost/intern/GHOST_SystemX11.cc @@ -638,7 +638,8 @@ bool GHOST_SystemX11::processEvents(bool waitForEvent) } else if (xevent.type == KeyPress) { if ((xevent.xkey.keycode == m_last_release_keycode) && - (xevent.xkey.time <= m_last_release_time)) { + (xevent.xkey.time <= m_last_release_time)) + { continue; } } @@ -1149,7 +1150,8 @@ void GHOST_SystemX11::processEvent(XEvent *xe) /* Use utf8 because its not locale repentant, from XORG docs. */ if (!(len = Xutf8LookupString( - xic, xke, utf8_buf, sizeof(utf8_array) - 5, &key_sym, &status))) { + xic, xke, utf8_buf, sizeof(utf8_array) - 5, &key_sym, &status))) + { utf8_buf[0] = '\0'; } diff --git a/intern/ghost/intern/GHOST_WindowWayland.cc b/intern/ghost/intern/GHOST_WindowWayland.cc index d2de09bf72821587e071972e3ef6420a6979d6a8..07787f0e66f8b8aa4feef7d57df20aba214466f7 100644 --- a/intern/ghost/intern/GHOST_WindowWayland.cc +++ b/intern/ghost/intern/GHOST_WindowWayland.cc @@ -1276,7 +1276,8 @@ static void libdecor_frame_handle_configure(libdecor_frame *frame, win->frame.buffer_scale; const int scale_as_fractional = scale * FRACTIONAL_DENOMINATOR; if (libdecor_configuration_get_content_size( - configuration, frame, &size_next[0], &size_next[1])) { + configuration, frame, &size_next[0], &size_next[1])) + { if (fractional_scale) { frame_pending.size[0] = gwl_window_fractional_to_viewport_round(win->frame, size_next[0]); frame_pending.size[1] = gwl_window_fractional_to_viewport_round(win->frame, size_next[1]); diff --git a/intern/ghost/intern/GHOST_WindowWin32.cc b/intern/ghost/intern/GHOST_WindowWin32.cc index d1af0ae01af6fd61cd0e82aad85cc5c5cdea7090..d6c5e184705753f1651e277e30090d0916068157 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cc +++ b/intern/ghost/intern/GHOST_WindowWin32.cc @@ -541,7 +541,8 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state) case GHOST_kWindowStateNormal: default: if (curstate == GHOST_kWindowStateFullScreen && - m_normal_state == GHOST_kWindowStateMaximized) { + m_normal_state == GHOST_kWindowStateMaximized) + { wp.showCmd = SW_SHOWMAXIMIZED; m_normal_state = GHOST_kWindowStateNormal; } diff --git a/intern/ghost/intern/GHOST_WindowX11.cc b/intern/ghost/intern/GHOST_WindowX11.cc index 0c643ca4e3de148e99a09fbb25ac6b2fa702d6c3..76968e7daa63d4d7131f2337023034d9898cdee6 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cc +++ b/intern/ghost/intern/GHOST_WindowX11.cc @@ -638,7 +638,7 @@ int GHOST_WindowX11::icccmGetState() const struct { CARD32 state; XID icon; - } * prop_ret; + } *prop_ret; ulong bytes_after, num_ret; Atom type_ret; int ret, format_ret; diff --git a/intern/ghost/intern/GHOST_XrContext.cc b/intern/ghost/intern/GHOST_XrContext.cc index aa527dcc563f25e475c963bad49ef119af5a0f4d..686102395927dfaa97bbce2638df375d4c05ffea 100644 --- a/intern/ghost/intern/GHOST_XrContext.cc +++ b/intern/ghost/intern/GHOST_XrContext.cc @@ -554,7 +554,8 @@ void GHOST_XrContext::drawSessionViews(void *draw_customdata) void GHOST_XrContext::handleSessionStateChange(const XrEventDataSessionStateChanged &lifecycle) { if (m_session && - m_session->handleStateChangeEvent(lifecycle) == GHOST_XrSession::SESSION_DESTROY) { + m_session->handleStateChangeEvent(lifecycle) == GHOST_XrSession::SESSION_DESTROY) + { m_session = nullptr; } } diff --git a/intern/guardedalloc/intern/mallocn_guarded_impl.c b/intern/guardedalloc/intern/mallocn_guarded_impl.c index 8d2fc904b7377e6b1a880cbc7e218f4de8513c9e..acd47ed5ad24396359c50256d9c52a54ab17cfd2 100644 --- a/intern/guardedalloc/intern/mallocn_guarded_impl.c +++ b/intern/guardedalloc/intern/mallocn_guarded_impl.c @@ -37,13 +37,13 @@ * but this introduces some overhead to memory header and makes * things slower a bit, so better to keep disabled by default */ -//#define DEBUG_MEMDUPLINAME +// #define DEBUG_MEMDUPLINAME /* Only for debugging: * lets you count the allocations so as to find the allocator of unfreed memory * in situations where the leak is predictable */ -//#define DEBUG_MEMCOUNTER +// #define DEBUG_MEMCOUNTER /* Only for debugging: * Defining DEBUG_BACKTRACE will display a back-trace from where memory block was allocated and diff --git a/intern/iksolver/intern/IK_QJacobianSolver.cpp b/intern/iksolver/intern/IK_QJacobianSolver.cpp index 4978e2f83e04f3925ec03f1fcfe3d4aba4e228b8..35b2f49003b924fc9bd9b7729a9092a1413201a4 100644 --- a/intern/iksolver/intern/IK_QJacobianSolver.cpp +++ b/intern/iksolver/intern/IK_QJacobianSolver.cpp @@ -10,7 +10,7 @@ #include "IK_QJacobianSolver.h" -//#include "analyze.h" +// #include "analyze.h" IK_QJacobianSolver::IK_QJacobianSolver() { m_poleconstraint = false; diff --git a/intern/libmv/intern/stub.cc b/intern/libmv/intern/stub.cc index 30d25fc35123db01ea92f1b23f4051c71558b979..456ab74234d36123fd9e01e459959c0849dbcd56 100644 --- a/intern/libmv/intern/stub.cc +++ b/intern/libmv/intern/stub.cc @@ -303,8 +303,8 @@ void libmv_cameraIntrinsicsInvert( *y1 = 0.0; } -void libmv_homography2DFromCorrespondencesEuc(/* const */ double (*/*x1*/)[2], - /* const */ double (*/*x2*/)[2], +void libmv_homography2DFromCorrespondencesEuc(/* const */ double (* /*x1*/)[2], + /* const */ double (* /*x2*/)[2], int /*num_points*/, double H[3][3]) { memset(H, 0, sizeof(double[3][3])); diff --git a/intern/libmv/libmv/simple_pipeline/detect.cc b/intern/libmv/libmv/simple_pipeline/detect.cc index a67d139a957df7b9d7e055537cc3c41142d08146..e22c078516692f07b9a4be4d7406c887d637a046 100644 --- a/intern/libmv/libmv/simple_pipeline/detect.cc +++ b/intern/libmv/libmv/simple_pipeline/detect.cc @@ -257,7 +257,7 @@ void DetectMORAVEC(const FloatImage& grayscale_image, histogram[s]--; } c[0] = score, histogram[score]++; - nonmax : {} // Do nothing. + nonmax: {} // Do nothing. } } int min = 255, total = 0; diff --git a/intern/opensubdiv/internal/evaluator/shaders/glsl_compute_kernel.glsl b/intern/opensubdiv/internal/evaluator/shaders/glsl_compute_kernel.glsl index 2f60aee099916eadb74733784158acd7e0f1805e..952c65bc919764de8821fd4dac4de1f294163c5d 100644 --- a/intern/opensubdiv/internal/evaluator/shaders/glsl_compute_kernel.glsl +++ b/intern/opensubdiv/internal/evaluator/shaders/glsl_compute_kernel.glsl @@ -40,7 +40,7 @@ layout(binding = 1) buffer dst_buffer float dstVertexBuffer[]; }; - // derivative buffers (if needed) +// derivative buffers (if needed) #if defined(OPENSUBDIV_GLSL_COMPUTE_USE_1ST_DERIVATIVES) uniform ivec3 duDesc; @@ -73,7 +73,7 @@ layout(binding = 12) buffer dvv_buffer }; #endif - // stencil buffers +// stencil buffers #if defined(OPENSUBDIV_GLSL_COMPUTE_KERNEL_EVAL_STENCILS) diff --git a/intern/opensubdiv/internal/topology/mesh_topology_compare.cc b/intern/opensubdiv/internal/topology/mesh_topology_compare.cc index 8ec272612020b7e914f45f234a3b77b39613bf77..3098ffd651798aae7fe522cb4b90d7a6ec96cabb 100644 --- a/intern/opensubdiv/internal/topology/mesh_topology_compare.cc +++ b/intern/opensubdiv/internal/topology/mesh_topology_compare.cc @@ -178,7 +178,8 @@ bool isEqualEdgeTags(const MeshTopology &mesh_topology, const OpenSubdiv_Convert int requested_edge_vertices[2]; converter->getEdgeVertices(converter, edge_index, requested_edge_vertices); if (!mesh_topology.isEdgeEqual( - edge_index, requested_edge_vertices[0], requested_edge_vertices[1])) { + edge_index, requested_edge_vertices[0], requested_edge_vertices[1])) + { return false; } } diff --git a/intern/opensubdiv/internal/topology/topology_refiner_impl.h b/intern/opensubdiv/internal/topology/topology_refiner_impl.h index 87700a30bd25ec2c213fbfa2a1fc7017bbcc4e21..8b4d01456c6e5423a11e737377415149d7caf636 100644 --- a/intern/opensubdiv/internal/topology/topology_refiner_impl.h +++ b/intern/opensubdiv/internal/topology/topology_refiner_impl.h @@ -64,7 +64,6 @@ class TopologyRefinerImpl { } // namespace opensubdiv } // namespace blender -struct OpenSubdiv_TopologyRefinerImpl : public blender::opensubdiv::TopologyRefinerImpl { -}; +struct OpenSubdiv_TopologyRefinerImpl : public blender::opensubdiv::TopologyRefinerImpl {}; #endif // OPENSUBDIV_TOPOLOGY_REFINER_IMPL_H_ diff --git a/intern/rigidbody/RBI_hull_api.h b/intern/rigidbody/RBI_hull_api.h index 89118e8a9dadd54e909256a54df0273600da0efa..7f7eb676536111137d6a3256d59e9b02db8138a5 100644 --- a/intern/rigidbody/RBI_hull_api.h +++ b/intern/rigidbody/RBI_hull_api.h @@ -15,7 +15,7 @@ extern "C" { typedef struct plConvexHull__ { int unused; -} * plConvexHull; +} *plConvexHull; plConvexHull plConvexHullCompute(float (*coords)[3], int count); void plConvexHullDelete(plConvexHull hull); diff --git a/source/blender/asset_system/AS_asset_catalog.hh b/source/blender/asset_system/AS_asset_catalog.hh index 12cdc8327585087bae84fb26eea88cc77e1c3fa8..2c8ccf82a216920e332a9e0ae840e4d9e9da01dc 100644 --- a/source/blender/asset_system/AS_asset_catalog.hh +++ b/source/blender/asset_system/AS_asset_catalog.hh @@ -52,8 +52,7 @@ class AssetCatalogService { public: static const CatalogFilePath DEFAULT_CATALOG_FILENAME; - struct read_only_tag { - }; + struct read_only_tag {}; public: AssetCatalogService(); diff --git a/source/blender/asset_system/intern/asset_catalog.cc b/source/blender/asset_system/intern/asset_catalog.cc index e779f7086b948342f72d2b329636cadcd9202b2e..1ea1229541419bcac06b4526576ca0f543a833e7 100644 --- a/source/blender/asset_system/intern/asset_catalog.cc +++ b/source/blender/asset_system/intern/asset_catalog.cc @@ -501,7 +501,8 @@ bool AssetCatalogService::write_to_disk_ex(const CatalogFilePath &blend_file_pat } if (catalog_collection_->catalogs_.is_empty() && - catalog_collection_->deleted_catalogs_.is_empty()) { + catalog_collection_->deleted_catalogs_.is_empty()) + { /* Avoid saving anything, when there is nothing to save. */ return true; /* Writing nothing when there is nothing to write is still a success. */ } diff --git a/source/blender/asset_system/intern/asset_library_service.cc b/source/blender/asset_system/intern/asset_library_service.cc index 161cd59c01a50aa7f1088745cd2d36c456ae6d27..cdf17a843daa4536a7b0ac6d04b12bb4f0c2c6d0 100644 --- a/source/blender/asset_system/intern/asset_library_service.cc +++ b/source/blender/asset_system/intern/asset_library_service.cc @@ -32,7 +32,7 @@ * Should be addressed with a proper ownership model for the asset system: * https://wiki.blender.org/wiki/Source/Architecture/Asset_System/Back_End#Ownership_Model */ -//#define WITH_DESTROY_VIA_LOAD_HANDLER +// #define WITH_DESTROY_VIA_LOAD_HANDLER static CLG_LogRef LOG = {"asset_system.asset_library_service"}; @@ -309,7 +309,8 @@ int64_t AssetLibraryService::rfind_blendfile_extension(StringRef path) } if ((blendfile_extension_pos == StringRef::not_found) || - (blendfile_extension_pos < iter_ext_pos)) { + (blendfile_extension_pos < iter_ext_pos)) + { blendfile_extension_pos = iter_ext_pos; } } diff --git a/source/blender/asset_system/tests/asset_catalog_tree_test.cc b/source/blender/asset_system/tests/asset_catalog_tree_test.cc index dda2bae4d7c42eaad945376a15e5b2b1b7572975..0e799024390ffb685e276c5f6b6462895482f51b 100644 --- a/source/blender/asset_system/tests/asset_catalog_tree_test.cc +++ b/source/blender/asset_system/tests/asset_catalog_tree_test.cc @@ -70,8 +70,7 @@ void AssetCatalogTreeTestFunctions::expect_tree_item_child_items( }); } -class AssetCatalogTreeTest : public AssetLibraryTestBase, public AssetCatalogTreeTestFunctions { -}; +class AssetCatalogTreeTest : public AssetLibraryTestBase, public AssetCatalogTreeTestFunctions {}; TEST_F(AssetCatalogTreeTest, insert_item_into_tree) { diff --git a/source/blender/blenfont/intern/blf_glyph.cc b/source/blender/blenfont/intern/blf_glyph.cc index 0f4e4a63c8ea2ac5cfeaffb86c884d5d3bd4a137..1f5e4368d8d299e8d2f149dabe8745c2c4753975 100644 --- a/source/blender/blenfont/intern/blf_glyph.cc +++ b/source/blender/blenfont/intern/blf_glyph.cc @@ -296,7 +296,8 @@ static GlyphBLF *blf_glyph_cache_add_glyph(FontBLF *font, if (ELEM(glyph->bitmap.pixel_mode, FT_PIXEL_MODE_GRAY, FT_PIXEL_MODE_GRAY2, - FT_PIXEL_MODE_GRAY4)) { + FT_PIXEL_MODE_GRAY4)) + { /* Scale 1, 2, 4-bit gray to 8-bit. */ const char scale = char(255 / (glyph->bitmap.num_grays - 1)); for (int i = 0; i < buffer_size; i++) { @@ -1662,7 +1663,8 @@ static void blf_glyph_to_curves(FT_Outline ftoutline, ListBase *nurbsbase, const { const int l_next = (k < n - 1) ? (l + 1) : l_first; if (ftoutline.tags[l] == FT_Curve_Tag_Conic && - ftoutline.tags[l_next] == FT_Curve_Tag_Conic) { + ftoutline.tags[l_next] == FT_Curve_Tag_Conic) + { onpoints[j]++; } } @@ -1697,7 +1699,8 @@ static void blf_glyph_to_curves(FT_Outline ftoutline, ListBase *nurbsbase, const { const int l_next = (k < n - 1) ? (l + 1) : l_first; if (ftoutline.tags[l] == FT_Curve_Tag_Conic && - ftoutline.tags[l_next] == FT_Curve_Tag_Conic) { + ftoutline.tags[l_next] == FT_Curve_Tag_Conic) + { dx = float(ftoutline.points[l].x + ftoutline.points[l_next].x) * scale / 2.0f; dy = float(ftoutline.points[l].y + ftoutline.points[l_next].y) * scale / 2.0f; diff --git a/source/blender/blenkernel/BKE_cloth.hh b/source/blender/blenkernel/BKE_cloth.hh index c17ce880194a74f381e174f4b9bbb64a9289ddd4..424226a8f411437daa2a10f715be6fe174fdf84e 100644 --- a/source/blender/blenkernel/BKE_cloth.hh +++ b/source/blender/blenkernel/BKE_cloth.hh @@ -140,42 +140,42 @@ struct ClothSpring { /* Some macro enhancements for vector treatment. */ #define VECSUBADDSS(v1, v2, aS, v3, bS) \ { \ - *(v1) -= *(v2)*aS + *(v3)*bS; \ + *(v1) -= *(v2) * aS + *(v3) * bS; \ *(v1 + 1) -= *(v2 + 1) * aS + *(v3 + 1) * bS; \ *(v1 + 2) -= *(v2 + 2) * aS + *(v3 + 2) * bS; \ } \ ((void)0) #define VECADDSS(v1, v2, aS, v3, bS) \ { \ - *(v1) = *(v2)*aS + *(v3)*bS; \ + *(v1) = *(v2) * aS + *(v3) * bS; \ *(v1 + 1) = *(v2 + 1) * aS + *(v3 + 1) * bS; \ *(v1 + 2) = *(v2 + 2) * aS + *(v3 + 2) * bS; \ } \ ((void)0) #define VECADDS(v1, v2, v3, bS) \ { \ - *(v1) = *(v2) + *(v3)*bS; \ + *(v1) = *(v2) + *(v3) * bS; \ *(v1 + 1) = *(v2 + 1) + *(v3 + 1) * bS; \ *(v1 + 2) = *(v2 + 2) + *(v3 + 2) * bS; \ } \ ((void)0) #define VECSUBMUL(v1, v2, aS) \ { \ - *(v1) -= *(v2)*aS; \ + *(v1) -= *(v2) * aS; \ *(v1 + 1) -= *(v2 + 1) * aS; \ *(v1 + 2) -= *(v2 + 2) * aS; \ } \ ((void)0) #define VECSUBS(v1, v2, v3, bS) \ { \ - *(v1) = *(v2) - *(v3)*bS; \ + *(v1) = *(v2) - *(v3) * bS; \ *(v1 + 1) = *(v2 + 1) - *(v3 + 1) * bS; \ *(v1 + 2) = *(v2 + 2) - *(v3 + 2) * bS; \ } \ ((void)0) #define VECADDMUL(v1, v2, aS) \ { \ - *(v1) += *(v2)*aS; \ + *(v1) += *(v2) * aS; \ *(v1 + 1) += *(v2 + 1) * aS; \ *(v1 + 2) += *(v2 + 2) * aS; \ } \ diff --git a/source/blender/blenkernel/BKE_context.hh b/source/blender/blenkernel/BKE_context.hh index 939b5d3cd825a325a9e55c86755a96d5bbe2f9ae..5f32fdeff5abc7f3252f12263bdcc9452d047afd 100644 --- a/source/blender/blenkernel/BKE_context.hh +++ b/source/blender/blenkernel/BKE_context.hh @@ -320,7 +320,8 @@ bool CTX_data_dir(const char *member); CollectionPointerLink *ctx_link; \ CTX_data_##member(C, &ctx_data_list); \ for (ctx_link = (CollectionPointerLink *)ctx_data_list.first; ctx_link; \ - ctx_link = ctx_link->next) { \ + ctx_link = ctx_link->next) \ + { \ Type instance = (Type)ctx_link->ptr.data; #define CTX_DATA_END \ diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h index f86d82b082c8a142fbb0657e78dab98f06938a06..59b15f6830a8257764015e5ecea40119ed8d732a 100644 --- a/source/blender/blenkernel/BKE_idprop.h +++ b/source/blender/blenkernel/BKE_idprop.h @@ -265,15 +265,25 @@ void IDP_Reset(struct IDProperty *prop, const struct IDProperty *reference); /* C11 const correctness for casts */ #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) # define IDP_Float(prop) \ - _Generic((prop), struct IDProperty * : (*(float *)&(prop)->data.val), const struct IDProperty * : (*(const float *)&(prop)->data.val)) + _Generic((prop), \ + struct IDProperty *: (*(float *)&(prop)->data.val), \ + const struct IDProperty *: (*(const float *)&(prop)->data.val)) # define IDP_Double(prop) \ - _Generic((prop), struct IDProperty * : (*(double *)&(prop)->data.val), const struct IDProperty * : (*(const double *)&(prop)->data.val)) + _Generic((prop), \ + struct IDProperty *: (*(double *)&(prop)->data.val), \ + const struct IDProperty *: (*(const double *)&(prop)->data.val)) # define IDP_String(prop) \ - _Generic((prop), struct IDProperty * : ((char *)(prop)->data.pointer), const struct IDProperty * : ((const char *)(prop)->data.pointer)) + _Generic((prop), \ + struct IDProperty *: ((char *)(prop)->data.pointer), \ + const struct IDProperty *: ((const char *)(prop)->data.pointer)) # define IDP_IDPArray(prop) \ - _Generic((prop), struct IDProperty * : ((struct IDProperty *)(prop)->data.pointer), const struct IDProperty * : ((const struct IDProperty *)(prop)->data.pointer)) + _Generic((prop), \ + struct IDProperty *: ((struct IDProperty *)(prop)->data.pointer), \ + const struct IDProperty *: ((const struct IDProperty *)(prop)->data.pointer)) # define IDP_Id(prop) \ - _Generic((prop), struct IDProperty * : ((ID *)(prop)->data.pointer), const struct IDProperty * : ((const ID *)(prop)->data.pointer)) + _Generic((prop), \ + struct IDProperty *: ((ID *)(prop)->data.pointer), \ + const struct IDProperty *: ((const ID *)(prop)->data.pointer)) #else # define IDP_Float(prop) (*(float *)&(prop)->data.val) # define IDP_Double(prop) (*(double *)&(prop)->data.val) diff --git a/source/blender/blenkernel/BKE_main.hh b/source/blender/blenkernel/BKE_main.hh index 38cdcb2dbe412b91b14d533ed7e458137820287d..714990133ddb9dc3bf867fc91b7ed03d9d5457b3 100644 --- a/source/blender/blenkernel/BKE_main.hh +++ b/source/blender/blenkernel/BKE_main.hh @@ -472,7 +472,7 @@ const char *BKE_main_blendfile_path_from_global(void); */ ListBase *which_libbase(Main *bmain, short type); -//#define INDEX_ID_MAX 41 +// #define INDEX_ID_MAX 41 /** * Put the pointers to all the #ListBase structs in given `bmain` into the `*lb[INDEX_ID_MAX]` * array, and return the number of those for convenience. diff --git a/source/blender/blenkernel/BKE_mesh_types.hh b/source/blender/blenkernel/BKE_mesh_types.hh index cf659cc6cdd32b8ceacf8c7ac62813d4ca758ab6..4cf9c4dae710432c48b5d13df2fc934c7c1498da 100644 --- a/source/blender/blenkernel/BKE_mesh_types.hh +++ b/source/blender/blenkernel/BKE_mesh_types.hh @@ -84,13 +84,11 @@ struct LooseGeomCache { /** * Cache of a mesh's loose edges, accessed with #Mesh::loose_edges(). * */ -struct LooseEdgeCache : public LooseGeomCache { -}; +struct LooseEdgeCache : public LooseGeomCache {}; /** * Cache of a mesh's loose vertices or vertices not used by faces. */ -struct LooseVertCache : public LooseGeomCache { -}; +struct LooseVertCache : public LooseGeomCache {}; struct MeshRuntime { /* Evaluated mesh for objects which do not have effective modifiers. diff --git a/source/blender/blenkernel/BKE_subsurf.hh b/source/blender/blenkernel/BKE_subsurf.hh index 20420afd741d23ca16f05d21f52580311ea15a4b..474a78468692200fa574b117620880f4be871fdb 100644 --- a/source/blender/blenkernel/BKE_subsurf.hh +++ b/source/blender/blenkernel/BKE_subsurf.hh @@ -81,18 +81,18 @@ struct CCGDerivedMesh { struct { int startVert; CCGVert *vert; - } * vertMap; + } *vertMap; struct { int startVert; int startEdge; CCGEdge *edge; - } * edgeMap; + } *edgeMap; struct { int startVert; int startEdge; int startFace; CCGFace *face; - } * faceMap; + } *faceMap; int *reverseFaceMap; diff --git a/source/blender/blenkernel/BKE_volume_grid.hh b/source/blender/blenkernel/BKE_volume_grid.hh index dffd0a7956446e8950febfefc46696b874f0d679..e608e3f62953babccd091f4571c93bd829d465bd 100644 --- a/source/blender/blenkernel/BKE_volume_grid.hh +++ b/source/blender/blenkernel/BKE_volume_grid.hh @@ -57,8 +57,7 @@ class VolumeGridData : public ImplicitSharingMixin { /** * Empty struct that exists so that it can be used as token in #VolumeTreeAccessToken. */ - struct AccessToken { - }; + struct AccessToken {}; /** * A mutex that needs to be locked whenever working with the data members below. diff --git a/source/blender/blenkernel/intern/DerivedMesh.cc b/source/blender/blenkernel/intern/DerivedMesh.cc index f4a0d527e892385c1d848f6fb5456dbe3f05c512..e4c582036541454ab513c7d00d50ae8ec3aac3b7 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.cc +++ b/source/blender/blenkernel/intern/DerivedMesh.cc @@ -79,7 +79,7 @@ using blender::bke::GeometrySet; using blender::bke::MeshComponent; /* very slow! enable for testing only! */ -//#define USE_MODIFIER_VALIDATE +// #define USE_MODIFIER_VALIDATE #ifdef USE_MODIFIER_VALIDATE # define ASSERT_IS_VALID_MESH(mesh) \ @@ -674,7 +674,8 @@ static void mesh_calc_modifiers(Depsgraph *depsgraph, } if ((mti->flags & eModifierTypeFlag_RequiresOriginalData) && - have_non_onlydeform_modifiers_applied) { + have_non_onlydeform_modifiers_applied) + { BKE_modifier_set_error(ob, md, "Modifier requires original data, bad stack position"); continue; } @@ -761,7 +762,8 @@ static void mesh_calc_modifiers(Depsgraph *depsgraph, * These are created when either requested by evaluation, or if * following modifiers requested them. */ if (need_mapping || - ((nextmask.vmask | nextmask.emask | nextmask.pmask) & CD_MASK_ORIGINDEX)) { + ((nextmask.vmask | nextmask.emask | nextmask.pmask) & CD_MASK_ORIGINDEX)) + { /* calc */ CustomData_add_layer( &mesh_final->vert_data, CD_ORIGINDEX, CD_CONSTRUCT, mesh_final->verts_num); diff --git a/source/blender/blenkernel/intern/action.cc b/source/blender/blenkernel/intern/action.cc index ef3923fa65fb8d755a2680747bc6cfbb43b83f99..c60593faae4da4cbc66fdd058d7451995bbbcecf 100644 --- a/source/blender/blenkernel/intern/action.cc +++ b/source/blender/blenkernel/intern/action.cc @@ -1206,7 +1206,8 @@ void BKE_pose_update_constraint_flags(bPose *pose) { bPoseChannel *chain_bone = chain_tip; for (short index = 0; chain_bone && (data->rootbone == 0 || index < data->rootbone); - index++) { + index++) + { chain_bone->constflag |= PCHAN_INFLUENCED_BY_IK; chain_bone = chain_bone->parent; } diff --git a/source/blender/blenkernel/intern/anim_sys.cc b/source/blender/blenkernel/intern/anim_sys.cc index 5b3434d9a801f1f7c839d02fa9c95fe27b245e41..aaeca0d81e4d91ac4de19a1690d3e79da36ea4e6 100644 --- a/source/blender/blenkernel/intern/anim_sys.cc +++ b/source/blender/blenkernel/intern/anim_sys.cc @@ -604,7 +604,8 @@ static int animsys_quaternion_evaluate_fcurves(PathResolvedRNA quat_rna, int fcurve_offset = 0; for (; fcurve_offset < 4 && quat_curve_fcu; - ++fcurve_offset, quat_curve_fcu = quat_curve_fcu->next) { + ++fcurve_offset, quat_curve_fcu = quat_curve_fcu->next) + { if (!STREQ(quat_curve_fcu->rna_path, first_fcurve->rna_path)) { /* This should never happen when the quaternion is fully keyed. Some * people do use half-keyed quaternions, though, so better to check. */ diff --git a/source/blender/blenkernel/intern/appdir.cc b/source/blender/blenkernel/intern/appdir.cc index e82e17b2a41d11301654fea7e8b466d23e1abb7c..c605a60d69381cc6a53f3d425cc8b40a301a00d4 100644 --- a/source/blender/blenkernel/intern/appdir.cc +++ b/source/blender/blenkernel/intern/appdir.cc @@ -703,28 +703,32 @@ const char *BKE_appdir_folder_id_user_notest(const int folder_id, const char *su switch (folder_id) { case BLENDER_USER_DATAFILES: if (get_path_environment_ex( - path, sizeof(path), subfolder, "BLENDER_USER_DATAFILES", check_is_dir)) { + path, sizeof(path), subfolder, "BLENDER_USER_DATAFILES", check_is_dir)) + { break; } get_path_user_ex(path, sizeof(path), "datafiles", subfolder, version, check_is_dir); break; case BLENDER_USER_CONFIG: if (get_path_environment_ex( - path, sizeof(path), subfolder, "BLENDER_USER_CONFIG", check_is_dir)) { + path, sizeof(path), subfolder, "BLENDER_USER_CONFIG", check_is_dir)) + { break; } get_path_user_ex(path, sizeof(path), "config", subfolder, version, check_is_dir); break; case BLENDER_USER_AUTOSAVE: if (get_path_environment_ex( - path, sizeof(path), subfolder, "BLENDER_USER_AUTOSAVE", check_is_dir)) { + path, sizeof(path), subfolder, "BLENDER_USER_AUTOSAVE", check_is_dir)) + { break; } get_path_user_ex(path, sizeof(path), "autosave", subfolder, version, check_is_dir); break; case BLENDER_USER_SCRIPTS: if (get_path_environment_ex( - path, sizeof(path), subfolder, "BLENDER_USER_SCRIPTS", check_is_dir)) { + path, sizeof(path), subfolder, "BLENDER_USER_SCRIPTS", check_is_dir)) + { break; } get_path_user_ex(path, sizeof(path), "scripts", subfolder, version, check_is_dir); @@ -1053,7 +1057,8 @@ bool BKE_appdir_app_template_has_userpref(const char *app_template) char app_template_path[FILE_MAX]; if (!BKE_appdir_app_template_id_search( - app_template, app_template_path, sizeof(app_template_path))) { + app_template, app_template_path, sizeof(app_template_path))) + { return false; } diff --git a/source/blender/blenkernel/intern/armature_update.cc b/source/blender/blenkernel/intern/armature_update.cc index ee019ecfbf0d66d677747d17d42b01342307cf7d..6e88fdd01e0cbc4761a879dc63a32a7ea43e85ac 100644 --- a/source/blender/blenkernel/intern/armature_update.cc +++ b/source/blender/blenkernel/intern/armature_update.cc @@ -93,7 +93,8 @@ static void splineik_init_tree_from_pchan(Scene * /*scene*/, /* Find the root bone and the chain of bones from the root to the tip. * NOTE: this assumes that the bones are connected, but that may not be true... */ for (pchan = pchan_tip; pchan && (segcount < ik_data->chainlen); - pchan = pchan->parent, segcount++) { + pchan = pchan->parent, segcount++) + { /* Store this segment in the chain. */ pchan_chain[segcount] = pchan; diff --git a/source/blender/blenkernel/intern/attribute.cc b/source/blender/blenkernel/intern/attribute.cc index 92e5996668cf001ca674e8849bf9a37e32c7731e..ddcb7bfe05639cbebc460820b9c7102aa0128713 100644 --- a/source/blender/blenkernel/intern/attribute.cc +++ b/source/blender/blenkernel/intern/attribute.cc @@ -819,7 +819,8 @@ int BKE_id_attribute_to_index(const ID *id, for (int i = 0; i < customdata->totlayer; i++) { const CustomDataLayer *layer_iter = customdata->layers + i; if (!(layer_mask & CD_TYPE_AS_MASK(layer_iter->type)) || - (layer_iter->flag & CD_FLAG_TEMPORARY)) { + (layer_iter->flag & CD_FLAG_TEMPORARY)) + { continue; } diff --git a/source/blender/blenkernel/intern/bake_items_serialize.cc b/source/blender/blenkernel/intern/bake_items_serialize.cc index 9f0fd27f1bca891d19b862d05b06a46cd3ef365c..fe492147228dddd539c050b28160b056ab532e05 100644 --- a/source/blender/blenkernel/intern/bake_items_serialize.cc +++ b/source/blender/blenkernel/intern/bake_items_serialize.cc @@ -1032,7 +1032,8 @@ static std::unique_ptr<BakeItem> deserialize_bake_item(const DictionaryValue &io return std::make_unique<StringBakeItem>(io_string.value()); } else if (const io::serialize::DictionaryValue *io_string = - io_data->get()->as_dictionary_value()) { + io_data->get()->as_dictionary_value()) + { const std::optional<int64_t> size = io_string->lookup_int("size"); if (!size) { return {}; diff --git a/source/blender/blenkernel/intern/bake_items_socket.cc b/source/blender/blenkernel/intern/bake_items_socket.cc index ddd30a5da7dc2eda466c51f5465714c954844210..945a4beea1f0be4ea347bd3af79f744355bf9e76 100644 --- a/source/blender/blenkernel/intern/bake_items_socket.cc +++ b/source/blender/blenkernel/intern/bake_items_socket.cc @@ -193,7 +193,8 @@ static void rename_attributes(const Span<GeometrySet *> geometries, GeometryComponent &component = geometry->get_component_for_write(type); MutableAttributeAccessor attributes = *component.attributes_for_write(); for (const MapItem<std::string, AnonymousAttributeIDPtr> &attribute_item : - attribute_map.items()) { + attribute_map.items()) + { attributes.rename(attribute_item.key, *attribute_item.value); } } diff --git a/source/blender/blenkernel/intern/blender_user_menu.cc b/source/blender/blenkernel/intern/blender_user_menu.cc index 3b51f2038b5ce3b07913055bde70f504f8740a0e..4f740bbd6b166d52a6d2091e21c761452caf38b9 100644 --- a/source/blender/blenkernel/intern/blender_user_menu.cc +++ b/source/blender/blenkernel/intern/blender_user_menu.cc @@ -93,7 +93,8 @@ void BKE_blender_user_menu_item_free(bUserMenuItem *umi) void BKE_blender_user_menu_item_free_list(ListBase *lb) { for (bUserMenuItem *umi = static_cast<bUserMenuItem *>(lb->first), *umi_next; umi; - umi = umi_next) { + umi = umi_next) + { umi_next = umi->next; BKE_blender_user_menu_item_free(umi); } diff --git a/source/blender/blenkernel/intern/blendfile_link_append.cc b/source/blender/blenkernel/intern/blendfile_link_append.cc index c8cde14936630a3ad836f80237b8733d4a488092..13d584b33f244f587b481f4ae9d47d2762c294ad 100644 --- a/source/blender/blenkernel/intern/blendfile_link_append.cc +++ b/source/blender/blenkernel/intern/blendfile_link_append.cc @@ -224,7 +224,8 @@ void BKE_blendfile_link_append_context_free(BlendfileLinkAppendContext *lapp_con } for (LinkNode *liblink = lapp_context->libraries.list; liblink != nullptr; - liblink = liblink->next) { + liblink = liblink->next) + { BlendfileLinkAppendContextLibrary *lib_context = static_cast<BlendfileLinkAppendContextLibrary *>(liblink->link); link_append_context_library_blohandle_release(lapp_context, lib_context); @@ -465,7 +466,8 @@ static bool object_in_any_collection(Main *bmain, Object *ob) LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { if (scene->master_collection != nullptr && - BKE_collection_has_object(scene->master_collection, ob)) { + BKE_collection_has_object(scene->master_collection, ob)) + { return true; } } @@ -1900,7 +1902,8 @@ void BKE_blendfile_library_relocate(BlendfileLinkAppendContext *lapp_context, ID *id; FOREACH_MAIN_ID_BEGIN (bmain, id) { if (ID_IS_LINKED(id) || !ID_IS_OVERRIDE_LIBRARY_REAL(id) || - (id->tag & LIB_TAG_PRE_EXISTING) == 0) { + (id->tag & LIB_TAG_PRE_EXISTING) == 0) + { continue; } if ((id->override_library->reference->tag & LIB_TAG_MISSING) == 0) { diff --git a/source/blender/blenkernel/intern/bpath.cc b/source/blender/blenkernel/intern/bpath.cc index c5e1c69e00d02a2de6ab7ba07a2c15a419f8a295..863544f004f3bd452f58b9597a84d4b14e51abfe 100644 --- a/source/blender/blenkernel/intern/bpath.cc +++ b/source/blender/blenkernel/intern/bpath.cc @@ -96,7 +96,8 @@ void BKE_bpath_foreach_path_id(BPathForeachPathData *bpath_data, ID *id) } if (id->library_weak_reference != nullptr && - (flag & BKE_BPATH_TRAVERSE_SKIP_WEAK_REFERENCES) == 0) { + (flag & BKE_BPATH_TRAVERSE_SKIP_WEAK_REFERENCES) == 0) + { BKE_bpath_foreach_path_fixed_process(bpath_data, id->library_weak_reference->library_filepath, sizeof(id->library_weak_reference->library_filepath)); @@ -182,7 +183,8 @@ bool BKE_bpath_foreach_path_dirfile_fixed_process(BPathForeachPathData *bpath_da } if (bpath_data->callback_function( - bpath_data, path_dst, sizeof(path_dst), (const char *)path_src)) { + bpath_data, path_dst, sizeof(path_dst), (const char *)path_src)) + { BLI_path_split_dir_file(path_dst, path_dir, path_dir_maxncpy, path_file, path_file_maxncpy); bpath_data->is_path_modified = true; return true; diff --git a/source/blender/blenkernel/intern/collection.cc b/source/blender/blenkernel/intern/collection.cc index baba0e1af2fa9614e72dc1826624d3aa19db69ae..e2e3e4ccff86cfe0e1d13742eb3defc7f3226e4d 100644 --- a/source/blender/blenkernel/intern/collection.cc +++ b/source/blender/blenkernel/intern/collection.cc @@ -1655,7 +1655,8 @@ static bool collection_instance_fix_recursive(Collection *parent_collection, LISTBASE_FOREACH (CollectionObject *, collection_object, &parent_collection->gobject) { if (collection_object->ob != nullptr && - collection_object->ob->instance_collection == collection) { + collection_object->ob->instance_collection == collection) + { id_us_min(&collection->id); collection_object->ob->instance_collection = nullptr; cycles_found = true; diff --git a/source/blender/blenkernel/intern/constraint.cc b/source/blender/blenkernel/intern/constraint.cc index 07261330ad31d510741ef33f49bf98de9ad30e23..494708a30183541d19d87edd079729816f0bfa84 100644 --- a/source/blender/blenkernel/intern/constraint.cc +++ b/source/blender/blenkernel/intern/constraint.cc @@ -288,7 +288,8 @@ void BKE_constraint_mat_convertspace(Object *ob, if (ELEM(to, CONSTRAINT_SPACE_LOCAL, CONSTRAINT_SPACE_PARLOCAL, - CONSTRAINT_SPACE_OWNLOCAL)) { + CONSTRAINT_SPACE_OWNLOCAL)) + { /* Call self with slightly different values. */ BKE_constraint_mat_convertspace( ob, pchan, cob, mat, CONSTRAINT_SPACE_POSE, to, keep_scale); diff --git a/source/blender/blenkernel/intern/curve.cc b/source/blender/blenkernel/intern/curve.cc index 27227b15d7e996dd94b60f16e6e5cd4cad4064b1..434b95d7a48dbd09aa2ce5a81570f52125469545 100644 --- a/source/blender/blenkernel/intern/curve.cc +++ b/source/blender/blenkernel/intern/curve.cc @@ -4256,7 +4256,8 @@ void BKE_nurbList_handles_set(ListBase *editnurb, while (a--) { const short flag = BKE_nurb_bezt_handle_test_calc_flag(bezt, SELECT, handle_mode); if (((flag & (1 << 0)) && bezt->h1 != HD_FREE) || - ((flag & (1 << 2)) && bezt->h2 != HD_FREE)) { + ((flag & (1 << 2)) && bezt->h2 != HD_FREE)) + { h_new = HD_AUTO; break; } @@ -4879,7 +4880,8 @@ bool BKE_nurb_type_convert(Nurb *nu, bp = nu->bp; while (a--) { if ((type == CU_POLY && bezt->h1 == HD_VECT && bezt->h2 == HD_VECT) || - (use_handles == false)) { + (use_handles == false)) + { /* vector handle becomes one poly vertex */ copy_v3_v3(bp->vec, bezt->vec[1]); bp->vec[3] = 1.0; diff --git a/source/blender/blenkernel/intern/curves_geometry.cc b/source/blender/blenkernel/intern/curves_geometry.cc index 3951b91a10106861e79e46b7c7c80bf687195bdb..f054f83514b813312be21436808920951d49a53b 100644 --- a/source/blender/blenkernel/intern/curves_geometry.cc +++ b/source/blender/blenkernel/intern/curves_geometry.cc @@ -773,7 +773,8 @@ Span<float3> CurvesGeometry::evaluated_tangents() const positions[points.first()]); } if (!math::almost_equal_relative( - handles_left[points.last()], positions[points.last()], epsilon)) { + handles_left[points.last()], positions[points.last()], epsilon)) + { tangents[evaluated_points.last()] = math::normalize(positions[points.last()] - handles_left[points.last()]); } diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc index 44e04fdf6f1860d67126a0857808a85a9bbc598e..beefade662423057686ccb059d447f0ef9660498 100644 --- a/source/blender/blenkernel/intern/customdata.cc +++ b/source/blender/blenkernel/intern/customdata.cc @@ -367,7 +367,8 @@ static void layerCopyValue_normal(const void *source, if (ELEM(mixmode, CDT_MIX_NOMIX, CDT_MIX_REPLACE_ABOVE_THRESHOLD, - CDT_MIX_REPLACE_BELOW_THRESHOLD)) { + CDT_MIX_REPLACE_BELOW_THRESHOLD)) + { /* Above/below threshold modes are not supported here, fallback to nomix (just in case). */ copy_v3_v3(no_dst, no_src); } @@ -813,7 +814,8 @@ static void layerCopyValue_mloopcol(const void *source, if (ELEM(mixmode, CDT_MIX_NOMIX, CDT_MIX_REPLACE_ABOVE_THRESHOLD, - CDT_MIX_REPLACE_BELOW_THRESHOLD)) { + CDT_MIX_REPLACE_BELOW_THRESHOLD)) + { /* Modes that do a full copy or nothing. */ if (ELEM(mixmode, CDT_MIX_REPLACE_ABOVE_THRESHOLD, CDT_MIX_REPLACE_BELOW_THRESHOLD)) { /* TODO: Check for a real valid way to get 'factor' value of our dest color? */ @@ -1244,7 +1246,8 @@ static void layerCopyValue_propcol(const void *source, if (ELEM(mixmode, CDT_MIX_NOMIX, CDT_MIX_REPLACE_ABOVE_THRESHOLD, - CDT_MIX_REPLACE_BELOW_THRESHOLD)) { + CDT_MIX_REPLACE_BELOW_THRESHOLD)) + { /* Modes that do a full copy or nothing. */ if (ELEM(mixmode, CDT_MIX_REPLACE_ABOVE_THRESHOLD, CDT_MIX_REPLACE_BELOW_THRESHOLD)) { /* TODO: Check for a real valid way to get 'factor' value of our dest color? */ diff --git a/source/blender/blenkernel/intern/dynamicpaint.cc b/source/blender/blenkernel/intern/dynamicpaint.cc index 66a802a2668b74594f0c308ac8a850eb71f99448..a9e7b8ad7a1893bda3c1f878c6e05f936c185b06 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.cc +++ b/source/blender/blenkernel/intern/dynamicpaint.cc @@ -79,7 +79,7 @@ using blender::int3; /* could enable at some point but for now there are far too many conversions */ #ifdef __GNUC__ -//# pragma GCC diagnostic ignored "-Wdouble-promotion" +// # pragma GCC diagnostic ignored "-Wdouble-promotion" #endif static CLG_LogRef LOG = {"bke.dynamicpaint"}; @@ -2121,7 +2121,8 @@ static void dynamicPaint_frameUpdate( /* image sequences are handled by bake operator */ if ((surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ) || - !(surface->flags & MOD_DPAINT_ACTIVE)) { + !(surface->flags & MOD_DPAINT_ACTIVE)) + { continue; } @@ -3024,7 +3025,8 @@ int dynamicPaint_createUVSurface(Scene *scene, if (n_target >= 0 && n_target != index) { if (!dynamicPaint_pointHasNeighbor( - ed, final_index[index], final_index[n_target])) { + ed, final_index[index], final_index[n_target])) + { ed->n_target[n_pos] = final_index[n_target]; ed->n_num[final_index[index]]++; n_pos++; @@ -4770,7 +4772,8 @@ static void dynamic_paint_paint_single_point_cb_ex(void *__restrict userdata, if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) { if (brush->proximity_falloff == MOD_DPAINT_PRFALL_RAMP && - !(brush->flags & MOD_DPAINT_RAMP_ALPHA)) { + !(brush->flags & MOD_DPAINT_RAMP_ALPHA)) + { paintColor[0] = colorband[0]; paintColor[1] = colorband[1]; paintColor[2] = colorband[2]; diff --git a/source/blender/blenkernel/intern/effect.cc b/source/blender/blenkernel/intern/effect.cc index be8f9dc549fdf30eaa54a8eeee1de1f0647dd18d..3e3496149112e423078f9cd8cab46d8fe2ad694e 100644 --- a/source/blender/blenkernel/intern/effect.cc +++ b/source/blender/blenkernel/intern/effect.cc @@ -695,7 +695,8 @@ bool get_effector_data(EffectorCache *eff, /* In case surface object is in Edit mode when loading the .blend, * surface modifier is never executed and bvhtree never built, see #48415. */ if (eff->pd && eff->pd->shape == PFIELD_SHAPE_SURFACE && eff->surmd && - eff->surmd->runtime.bvhtree) { + eff->surmd->runtime.bvhtree) + { /* closest point in the object surface is an effector */ float vec[3]; @@ -848,7 +849,8 @@ static void get_effector_tot( efd->charge = eff->pd->f_strength; } else if (eff->pd->forcefield == PFIELD_HARMONIC && - (eff->pd->flag & PFIELD_MULTIPLE_SPRINGS) == 0) { + (eff->pd->flag & PFIELD_MULTIPLE_SPRINGS) == 0) + { /* every particle is mapped to only one harmonic effector particle */ *p = point->index % eff->psys->totpart; *tot = *p + 1; diff --git a/source/blender/blenkernel/intern/fluid.cc b/source/blender/blenkernel/intern/fluid.cc index 25f0081a2e2cb3c2f282306c8e1659e4299e40fb..0811de98e5dc2b7310542cf4da6421cf816bff70 100644 --- a/source/blender/blenkernel/intern/fluid.cc +++ b/source/blender/blenkernel/intern/fluid.cc @@ -1239,7 +1239,8 @@ static void compute_obstaclesemission(Scene *scene, /* Set scene time */ /* Handle emission subframe */ if ((subframe < subframes || time_per_frame + dt + FLT_EPSILON < frame_length) && - !is_first_frame) { + !is_first_frame) + { scene->r.subframe = (time_per_frame + (subframe + 1.0f) * subframe_dt) / frame_length; scene->r.cfra = frame - 1; } @@ -1422,7 +1423,8 @@ static void update_obstacles(Depsgraph *depsgraph, d_index = manta_get_index(dx, fds->res[0], dy, fds->res[1], dz); /* Make sure emission cell is inside the new domain boundary. */ if (dx < 0 || dy < 0 || dz < 0 || dx >= fds->res[0] || dy >= fds->res[1] || - dz >= fds->res[2]) { + dz >= fds->res[2]) + { continue; } @@ -2257,7 +2259,8 @@ static void adaptive_domain_adjust( /* skip if cell already belongs to new area */ if (xn >= min[0] && xn <= max[0] && yn >= min[1] && yn <= max[1] && zn >= min[2] && - zn <= max[2]) { + zn <= max[2]) + { continue; } @@ -2753,7 +2756,8 @@ static void compute_flowsemission(Scene *scene, /* Set scene time */ if ((subframe < subframes || time_per_frame + dt + FLT_EPSILON < frame_length) && - !is_first_frame) { + !is_first_frame) + { scene->r.subframe = (time_per_frame + (subframe + 1.0f) * subframe_dt) / frame_length; scene->r.cfra = frame - 1; } @@ -2998,7 +3002,8 @@ static void update_flowsfluids(Depsgraph *depsgraph, d_index = manta_get_index(dx, fds->res[0], dy, fds->res[1], dz); /* Make sure emission cell is inside the new domain boundary. */ if (dx < 0 || dy < 0 || dz < 0 || dx >= fds->res[0] || dy >= fds->res[1] || - dz >= fds->res[2]) { + dz >= fds->res[2]) + { continue; } @@ -4111,7 +4116,8 @@ Mesh *BKE_fluid_modifier_do( /* Always update viewport in cache replay mode. */ if (fds->cache_type == FLUID_DOMAIN_CACHE_REPLAY || - fds->flags & FLUID_DOMAIN_USE_ADAPTIVE_DOMAIN) { + fds->flags & FLUID_DOMAIN_USE_ADAPTIVE_DOMAIN) + { needs_viewport_update = true; } /* In other cache modes, only update the viewport when no bake is going on. */ diff --git a/source/blender/blenkernel/intern/fmodifier.cc b/source/blender/blenkernel/intern/fmodifier.cc index af53dadd214205c9d520a37c8aca54279867f336..da3f3ae90a2419df14a907af591b54b6104f0f49 100644 --- a/source/blender/blenkernel/intern/fmodifier.cc +++ b/source/blender/blenkernel/intern/fmodifier.cc @@ -1363,14 +1363,16 @@ static float eval_fmodifier_influence(FModifier *fcm, float evaltime) return 0.0f; } if ((fcm->blendin != 0.0f) && (evaltime >= fcm->sfra) && - (evaltime <= fcm->sfra + fcm->blendin)) { + (evaltime <= fcm->sfra + fcm->blendin)) + { /* blend in range */ float a = fcm->sfra; float b = fcm->sfra + fcm->blendin; return influence * (evaltime - a) / (b - a); } if ((fcm->blendout != 0.0f) && (evaltime <= fcm->efra) && - (evaltime >= fcm->efra - fcm->blendout)) { + (evaltime >= fcm->efra - fcm->blendout)) + { /* blend out range */ float a = fcm->efra; float b = fcm->efra - fcm->blendout; @@ -1409,7 +1411,8 @@ float evaluate_time_fmodifiers(FModifiersStackStorage *storage, */ uint fcm_index = storage->modifier_count - 1; for (FModifier *fcm = static_cast<FModifier *>(modifiers->last); fcm; - fcm = fcm->prev, fcm_index--) { + fcm = fcm->prev, fcm_index--) + { const FModifierTypeInfo *fmi = fmodifier_get_typeinfo(fcm); if (fmi == nullptr) { diff --git a/source/blender/blenkernel/intern/geometry_component_curves.cc b/source/blender/blenkernel/intern/geometry_component_curves.cc index 7a574339105c85bc83fd6f2005f8d88d2e780780..47b8b63055bc5a83a7e59fa7229aa10fda457c72 100644 --- a/source/blender/blenkernel/intern/geometry_component_curves.cc +++ b/source/blender/blenkernel/intern/geometry_component_curves.cc @@ -402,7 +402,8 @@ class CurvesVertexGroupsAttributeProvider final : public DynamicAttributesProvid int index; bDeformGroup *group; if (!BKE_defgroup_listbase_name_find( - &curves->vertex_group_names, name.c_str(), &index, &group)) { + &curves->vertex_group_names, name.c_str(), &index, &group)) + { return false; } BLI_remlink(&curves->vertex_group_names, group); diff --git a/source/blender/blenkernel/intern/geometry_fields.cc b/source/blender/blenkernel/intern/geometry_fields.cc index 03aba37df6744406004d5456786aa0feb8ee8271..132968dda8194f6a3004977c7391bcbf79e13f8c 100644 --- a/source/blender/blenkernel/intern/geometry_fields.cc +++ b/source/blender/blenkernel/intern/geometry_fields.cc @@ -319,7 +319,8 @@ GVArray CurvesFieldInput::get_varray_for_context(const fn::FieldContext &context } } if (const CurvesFieldContext *curves_context = dynamic_cast<const CurvesFieldContext *>( - &context)) { + &context)) + { return this->get_varray_for_context(curves_context->curves(), curves_context->domain(), mask); } return {}; @@ -838,7 +839,8 @@ std::optional<AttrDomain> try_detect_field_domain(const GeometryComponent &compo } for (const fn::FieldInput &field_input : field_inputs->deduplicated_nodes) { if (const auto *geometry_field_input = dynamic_cast<const GeometryFieldInput *>( - &field_input)) { + &field_input)) + { if (!handle_domain(geometry_field_input->preferred_domain(component))) { return std::nullopt; } @@ -861,13 +863,15 @@ std::optional<AttrDomain> try_detect_field_domain(const GeometryComponent &compo } for (const fn::FieldInput &field_input : field_inputs->deduplicated_nodes) { if (const auto *geometry_field_input = dynamic_cast<const GeometryFieldInput *>( - &field_input)) { + &field_input)) + { if (!handle_domain(geometry_field_input->preferred_domain(component))) { return std::nullopt; } } else if (const auto *curves_field_input = dynamic_cast<const CurvesFieldInput *>( - &field_input)) { + &field_input)) + { if (!handle_domain(curves_field_input->preferred_domain(curves->geometry.wrap()))) { return std::nullopt; } diff --git a/source/blender/blenkernel/intern/gpencil_curve_legacy.cc b/source/blender/blenkernel/intern/gpencil_curve_legacy.cc index d216ea718afe2668e0c247d94edfbe1610f1c0e6..36f549b1936a13e413b93fb475b0e94f9add8b9c 100644 --- a/source/blender/blenkernel/intern/gpencil_curve_legacy.cc +++ b/source/blender/blenkernel/intern/gpencil_curve_legacy.cc @@ -479,7 +479,8 @@ void BKE_gpencil_convert_curve(Main *bmain, const float sample) { if (ELEM(nullptr, ob_gp, ob_cu) || (ob_gp->type != OB_GPENCIL_LEGACY) || - (ob_gp->data == nullptr)) { + (ob_gp->data == nullptr)) + { return; } diff --git a/source/blender/blenkernel/intern/gpencil_legacy.cc b/source/blender/blenkernel/intern/gpencil_legacy.cc index 50a940612f8f27d169687d8e97d6ca8aa43ac588..47336aad35eec5ffeb8af0c6ef024a1cc5b48609 100644 --- a/source/blender/blenkernel/intern/gpencil_legacy.cc +++ b/source/blender/blenkernel/intern/gpencil_legacy.cc @@ -2017,7 +2017,8 @@ bool BKE_gpencil_merge_materials_table_get(Object *ob, /* Read secondary material to compare with primary material. */ ma_secondary = BKE_gpencil_material(ob, idx_secondary + 1); if ((ma_secondary == nullptr) || - BLI_ghash_haskey(r_mat_table, POINTER_FROM_INT(idx_secondary))) { + BLI_ghash_haskey(r_mat_table, POINTER_FROM_INT(idx_secondary))) + { continue; } gp_style_primary = ma_primary->gp_style; @@ -2142,7 +2143,8 @@ bool BKE_gpencil_merge_materials(Object *ob, continue; } if (((gpl->flag & GP_LAYER_UNLOCK_COLOR) == 0) && - (gp_style->flag & GP_MATERIAL_LOCKED)) { + (gp_style->flag & GP_MATERIAL_LOCKED)) + { continue; } } @@ -2495,7 +2497,8 @@ void BKE_gpencil_visible_stroke_advanced_iter(ViewLayer *view_layer, /* Special cases when cframe is before first frame. */ bGPDframe *gpf_first = static_cast<bGPDframe *>(gpl->frames.first); if ((gpf_first != nullptr) && (act_gpf != nullptr) && - (gpf_first->framenum > act_gpf->framenum)) { + (gpf_first->framenum > act_gpf->framenum)) + { is_before_first = true; } if ((gpf_first != nullptr) && (act_gpf == nullptr)) { @@ -2596,7 +2599,8 @@ void BKE_gpencil_visible_stroke_advanced_iter(ViewLayer *view_layer, /* If layer solo mode and Paint mode, only keyframes with data are displayed. */ if (GPENCIL_PAINT_MODE(gpd) && (gpl->flag & GP_LAYER_SOLO_MODE) && - (act_gpf->framenum != cfra)) { + (act_gpf->framenum != cfra)) + { gpl->opacity = prev_opacity; continue; } diff --git a/source/blender/blenkernel/intern/gpencil_modifier_legacy.cc b/source/blender/blenkernel/intern/gpencil_modifier_legacy.cc index 4133763a57006ba5de3bb50119908716a5fc4a29..fd2c7eb9800f3c06c96ed3ca44751a5d384cd724 100644 --- a/source/blender/blenkernel/intern/gpencil_modifier_legacy.cc +++ b/source/blender/blenkernel/intern/gpencil_modifier_legacy.cc @@ -104,7 +104,8 @@ void BKE_gpencil_cache_data_init(Depsgraph *depsgraph, Object *ob) mmd->cache_data = static_cast<ShrinkwrapTreeData *>( MEM_callocN(sizeof(ShrinkwrapTreeData), __func__)); if (BKE_shrinkwrap_init_tree( - mmd->cache_data, target, mmd->shrink_type, mmd->shrink_mode, false)) { + mmd->cache_data, target, mmd->shrink_type, mmd->shrink_mode, false)) + { } else { MEM_SAFE_FREE(mmd->cache_data); diff --git a/source/blender/blenkernel/intern/image.cc b/source/blender/blenkernel/intern/image.cc index 6bfc51895e04f6d755bffc6b6b7591fc0fe282f4..f932ece9ab28bfc12ea7d07513039dc6e7692e3f 100644 --- a/source/blender/blenkernel/intern/image.cc +++ b/source/blender/blenkernel/intern/image.cc @@ -1573,7 +1573,8 @@ void BKE_image_free_all_textures(Main *bmain) } for (tex = static_cast<Tex *>(bmain->textures.first); tex; - tex = static_cast<Tex *>(tex->id.next)) { + tex = static_cast<Tex *>(tex->id.next)) + { if (tex->ima) { tex->ima->id.tag |= LIB_TAG_DOIT; } @@ -3711,7 +3712,8 @@ void BKE_image_multiview_index(const Image *ima, ImageUser *iuser) } else { if ((iuser->view < 0) || - (iuser->view >= BLI_listbase_count_at_most(&ima->views, iuser->view + 1))) { + (iuser->view >= BLI_listbase_count_at_most(&ima->views, iuser->view + 1))) + { iuser->multi_index = iuser->view = 0; } else { diff --git a/source/blender/blenkernel/intern/image_gen.cc b/source/blender/blenkernel/intern/image_gen.cc index fab4de47b1378b3215260cca5c3f44863f5d2b4b..f576625f3679d575a6706ac3010a6ec78b55ab2f 100644 --- a/source/blender/blenkernel/intern/image_gen.cc +++ b/source/blender/blenkernel/intern/image_gen.cc @@ -268,7 +268,8 @@ static void checker_board_color_tint( for (y = offset; y < height + offset; y++) { for (x = 0; x < width; x++) { if (((y / size) % 2 == 1 && (x / size) % 2 == 1) || - ((y / size) % 2 == 0 && (x / size) % 2 == 0)) { + ((y / size) % 2 == 0 && (x / size) % 2 == 0)) + { if (rect) { rect[0] = char(BLEND_CHAR(rect[0], blend)); rect[1] = char(BLEND_CHAR(rect[1], blend)); diff --git a/source/blender/blenkernel/intern/image_save.cc b/source/blender/blenkernel/intern/image_save.cc index 9605b8803b2d4b6cbd49a275a71ee79270edf151..fa07199c3565ec19af1f70b3296095a9f83c9280 100644 --- a/source/blender/blenkernel/intern/image_save.cc +++ b/source/blender/blenkernel/intern/image_save.cc @@ -123,7 +123,8 @@ bool BKE_image_save_options_init(ImageSaveOptions *opts, else { BKE_image_format_from_imbuf(&opts->im_format, ibuf); if (ima->source == IMA_SRC_GENERATED && - !IMB_colormanagement_space_name_is_data(ima_colorspace)) { + !IMB_colormanagement_space_name_is_data(ima_colorspace)) + { ima_colorspace = IMB_colormanagement_role_colorspace_name_get(COLOR_ROLE_DEFAULT_BYTE); } diff --git a/source/blender/blenkernel/intern/ipo.cc b/source/blender/blenkernel/intern/ipo.cc index b9819da6bc48d1325363bdac98501b3e822071dd..644ce71787967124c5a37d393355fe3de215a643 100644 --- a/source/blender/blenkernel/intern/ipo.cc +++ b/source/blender/blenkernel/intern/ipo.cc @@ -769,15 +769,15 @@ static const char *camera_adrcodes_to_paths(int adrcode, int *r_array_index) /* result depends on adrcode */ switch (adrcode) { case CAM_LENS: -#if 0 /* XXX this cannot be resolved easily... \ - * perhaps we assume camera is perspective (works for most cases... */ +#if 0 /* XXX this cannot be resolved easily... \ + * perhaps we assume camera is perspective (works for most cases... */ if (ca->type == CAM_ORTHO) { return "ortho_scale"; } else { return "lens"; } -#else /* XXX lazy hack for now... */ +#else /* XXX lazy hack for now... */ return "lens"; #endif /* XXX this cannot be resolved easily */ diff --git a/source/blender/blenkernel/intern/lattice.cc b/source/blender/blenkernel/intern/lattice.cc index 18d6407b58cfc81de882c3966fec6896cd3a2e50..fa3920c642b76389c13ec33777297a69559349ff 100644 --- a/source/blender/blenkernel/intern/lattice.cc +++ b/source/blender/blenkernel/intern/lattice.cc @@ -417,7 +417,8 @@ void outside_lattice(Lattice *lt) for (u = 0; u < lt->pntsu; u++, bp++) { if (u == 0 || v == 0 || w == 0 || u == lt->pntsu - 1 || v == lt->pntsv - 1 || - w == lt->pntsw - 1) { + w == lt->pntsw - 1) + { /* pass */ } else { diff --git a/source/blender/blenkernel/intern/layer.cc b/source/blender/blenkernel/intern/layer.cc index 9c09cb0838c4194e024a548aad3835c2060e4337..57a6e7c1fd0ba66a703c6a42fffb53d494c14fc5 100644 --- a/source/blender/blenkernel/intern/layer.cc +++ b/source/blender/blenkernel/intern/layer.cc @@ -2677,7 +2677,8 @@ void BKE_view_layer_rename_lightgroup(Scene *scene, /* Update the scene's world to refer to the new name instead. */ if (scene->world != nullptr && !ID_IS_LINKED(scene->world) && - scene->world->lightgroup != nullptr) { + scene->world->lightgroup != nullptr) + { LightgroupMembership *lgm = scene->world->lightgroup; if (STREQ(lgm->name, old_name)) { STRNCPY_UTF8(lgm->name, lightgroup->name); diff --git a/source/blender/blenkernel/intern/lib_id.cc b/source/blender/blenkernel/intern/lib_id.cc index 2b7e57e0cb12d1f15c5a3c53213d6c6c1db239d4..684a320b6b30fc92679c4b80fe98255447b8868d 100644 --- a/source/blender/blenkernel/intern/lib_id.cc +++ b/source/blender/blenkernel/intern/lib_id.cc @@ -71,7 +71,7 @@ #include "lib_intern.hh" -//#define DEBUG_TIME +// #define DEBUG_TIME #ifdef DEBUG_TIME # include "PIL_time_utildefines.h" @@ -1166,7 +1166,8 @@ void BKE_main_lib_objects_recalc_all(Main *bmain) /* flag for full recalc */ for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { if (ID_IS_LINKED(ob)) { DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); } diff --git a/source/blender/blenkernel/intern/lib_id_delete.cc b/source/blender/blenkernel/intern/lib_id_delete.cc index be65bcb9e070b34cb0d874ed61c9bf87c039542a..fcb3cdcf2f9603abcd4de58011b0d8aaea632a00 100644 --- a/source/blender/blenkernel/intern/lib_id_delete.cc +++ b/source/blender/blenkernel/intern/lib_id_delete.cc @@ -305,7 +305,8 @@ static size_t id_delete(Main *bmain, /* Since we removed IDs from Main, their own other IDs usages need to be removed 'manually'. */ blender::Vector<ID *> cleanup_ids; for (ID *id = static_cast<ID *>(tagged_deleted_ids.first); id; - id = static_cast<ID *>(id->next)) { + id = static_cast<ID *>(id->next)) + { cleanup_ids.append(id); } BKE_libblock_relink_multiple(bmain, @@ -325,7 +326,8 @@ static size_t id_delete(Main *bmain, * deleted IDs may not be properly decreased by the remappings (since `NO_MAIN` ID user-counts * is never affected). */ for (ID *id = static_cast<ID *>(tagged_deleted_ids.first); id; - id = static_cast<ID *>(id->next)) { + id = static_cast<ID *>(id->next)) + { id->tag |= LIB_TAG_NO_MAIN; /* User-count needs to be reset artificially, since some usages may not be cleared in batch * deletion (typically, if one deleted ID uses another deleted ID, this may not be cleared by diff --git a/source/blender/blenkernel/intern/lib_override.cc b/source/blender/blenkernel/intern/lib_override.cc index 8beb889758e585fbd2ccb07d1ee32090b43cdc48..ea7742e07586c9d824d53e4ca791f8567d8f6437 100644 --- a/source/blender/blenkernel/intern/lib_override.cc +++ b/source/blender/blenkernel/intern/lib_override.cc @@ -474,7 +474,8 @@ static void lib_override_prefill_newid_from_existing_overrides(Main *bmain, ID * BLI_assert(id != nullptr); } if (ID_IS_OVERRIDE_LIBRARY_REAL(id) && - id->override_library->hierarchy_root == id_hierarchy_root) { + id->override_library->hierarchy_root == id_hierarchy_root) + { id->override_library->reference->newid = id; if (GS(id_iter->name) == ID_KE) { Key *reference_key = BKE_key_from_id(id->override_library->reference); @@ -953,7 +954,8 @@ static bool lib_override_hierarchy_dependencies_recursive_tag(LibOverrideGroupTa /* We only consider IDs from the same library. */ ID *to_id = *to_id_entry->id_pointer.to; if (to_id == nullptr || to_id->lib != id->lib || - (is_override && !ID_IS_OVERRIDE_LIBRARY(to_id))) { + (is_override && !ID_IS_OVERRIDE_LIBRARY(to_id))) + { /* IDs from different libraries, or non-override IDs in case we are processing overrides, are * both barriers of dependency. */ continue; @@ -1233,7 +1235,8 @@ static void lib_override_linked_group_tag(LibOverrideGroupTagData *data) } if (instantiating_collection == nullptr && - instantiating_collection_override_candidate != nullptr) { + instantiating_collection_override_candidate != nullptr) + { data->id_tag_set( &instantiating_collection_override_candidate->id, bool(instantiating_collection_override_candidate->id.tag & LIB_TAG_MISSING)); @@ -2283,7 +2286,8 @@ static bool lib_override_library_resync(Main *bmain, FOREACH_MAIN_LISTBASE_BEGIN (bmain, lb) { FOREACH_MAIN_LISTBASE_ID_BEGIN (lb, id) { if ((id->tag & LIB_TAG_DOIT) == 0 || id->newid == nullptr || - id->lib != id_root_reference->lib) { + id->lib != id_root_reference->lib) + { continue; } ID *id_override_new = id->newid; @@ -2340,7 +2344,8 @@ static bool lib_override_library_resync(Main *bmain, * generated by resync of linked overrides. So nothing is expected to be overridden here. */ if (ID_IS_OVERRIDE_LIBRARY_REAL(id_override_new) && - (id_override_old->tag & LIB_TAG_MISSING) == 0) { + (id_override_old->tag & LIB_TAG_MISSING) == 0) + { BLI_assert(ID_IS_OVERRIDE_LIBRARY_REAL(id_override_old)); id_override_new->override_library->flag = id_override_old->override_library->flag; @@ -3136,7 +3141,8 @@ static void lib_override_resync_tagging_finalize(Main *bmain, LinkNodePair **id_resync_roots_p; if (!BLI_ghash_ensure_p( - id_roots, hierarchy_root, reinterpret_cast<void ***>(&id_resync_roots_p))) { + id_roots, hierarchy_root, reinterpret_cast<void ***>(&id_resync_roots_p))) + { *id_resync_roots_p = MEM_cnew<LinkNodePair>(__func__); } BLI_linklist_append(*id_resync_roots_p, id_iter); @@ -3563,7 +3569,8 @@ void BKE_lib_override_library_main_resync(Main *bmain, Collection *override_resync_residual_storage = static_cast<Collection *>(BLI_findstring( &bmain->collections, OVERRIDE_RESYNC_RESIDUAL_STORAGE_NAME, offsetof(ID, name) + 2)); if (override_resync_residual_storage != nullptr && - ID_IS_LINKED(override_resync_residual_storage)) { + ID_IS_LINKED(override_resync_residual_storage)) + { override_resync_residual_storage = nullptr; } if (override_resync_residual_storage == nullptr) { @@ -4592,7 +4599,8 @@ static bool lib_override_library_id_reset_do(Main *bmain, } LISTBASE_FOREACH_MUTABLE ( - IDOverrideLibraryProperty *, op, &id_root->override_library->properties) { + IDOverrideLibraryProperty *, op, &id_root->override_library->properties) + { bool do_op_delete = true; const bool is_collection = op->rna_prop_type == PROP_COLLECTION; if (is_collection || op->rna_prop_type == PROP_POINTER) { @@ -4743,7 +4751,8 @@ void BKE_lib_override_library_operations_tag(IDOverrideLibraryProperty *liboverr } LISTBASE_FOREACH ( - IDOverrideLibraryPropertyOperation *, opop, &liboverride_property->operations) { + IDOverrideLibraryPropertyOperation *, opop, &liboverride_property->operations) + { if (do_set) { opop->tag |= tag; } @@ -4781,7 +4790,8 @@ void BKE_lib_override_library_id_unused_cleanup(ID *local) { if (ID_IS_OVERRIDE_LIBRARY_REAL(local)) { LISTBASE_FOREACH_MUTABLE ( - IDOverrideLibraryProperty *, op, &local->override_library->properties) { + IDOverrideLibraryProperty *, op, &local->override_library->properties) + { if (op->tag & LIBOVERRIDE_PROP_OP_TAG_UNUSED) { BKE_lib_override_library_property_delete(local->override_library, op); } diff --git a/source/blender/blenkernel/intern/lib_query.cc b/source/blender/blenkernel/intern/lib_query.cc index e6285a8c8714d771fdf0379316e22d88430bfb9c..e0d2560cb46b64528362c25c8a9a29b9fca5e17d 100644 --- a/source/blender/blenkernel/intern/lib_query.cc +++ b/source/blender/blenkernel/intern/lib_query.cc @@ -851,7 +851,8 @@ void BKE_lib_query_unused_ids_tag(Main *bmain, BKE_main_relations_create(bmain, 0); FOREACH_MAIN_ID_BEGIN (bmain, id) { if (lib_query_unused_ids_tag_recurse( - bmain, tag, do_local_ids, do_linked_ids, id, r_num_tagged)) { + bmain, tag, do_local_ids, do_linked_ids, id, r_num_tagged)) + { /* This root processed ID is part of one or more dependency loops. * * If it was not tagged, and its matching relations entry is not marked as processed, it diff --git a/source/blender/blenkernel/intern/main.cc b/source/blender/blenkernel/intern/main.cc index 10550ab24e037e207fab24f67a67abf5c413587b..9c6863b9e3b6bd2453705fd9dff6fbbed266e038 100644 --- a/source/blender/blenkernel/intern/main.cc +++ b/source/blender/blenkernel/intern/main.cc @@ -467,7 +467,8 @@ static int main_relations_create_idlink_cb(LibraryIDLinkCallbackData *cb_data) /* Add `id_pointer` as child of `self_id`. */ { if (!BLI_ghash_ensure_p( - bmain_relations->relations_from_pointers, self_id, (void ***)&entry_p)) { + bmain_relations->relations_from_pointers, self_id, (void ***)&entry_p)) + { *entry_p = static_cast<MainIDRelationsEntry *>(MEM_callocN(sizeof(**entry_p), __func__)); (*entry_p)->session_uuid = self_id->session_uuid; } @@ -487,7 +488,8 @@ static int main_relations_create_idlink_cb(LibraryIDLinkCallbackData *cb_data) /* Add `self_id` as parent of `id_pointer`. */ if (*id_pointer != nullptr) { if (!BLI_ghash_ensure_p( - bmain_relations->relations_from_pointers, *id_pointer, (void ***)&entry_p)) { + bmain_relations->relations_from_pointers, *id_pointer, (void ***)&entry_p)) + { *entry_p = static_cast<MainIDRelationsEntry *>(MEM_callocN(sizeof(**entry_p), __func__)); (*entry_p)->session_uuid = (*id_pointer)->session_uuid; } diff --git a/source/blender/blenkernel/intern/main_namemap.cc b/source/blender/blenkernel/intern/main_namemap.cc index 9479ef408cad636e733df4a96e146bca06abc86e..5d423c5fec164c7159d02efe405dbad3bf6fefa7 100644 --- a/source/blender/blenkernel/intern/main_namemap.cc +++ b/source/blender/blenkernel/intern/main_namemap.cc @@ -30,7 +30,7 @@ static CLG_LogRef LOG = {"bke.main_namemap"}; -//#define DEBUG_PRINT_MEMORY_USAGE +// #define DEBUG_PRINT_MEMORY_USAGE using namespace blender; diff --git a/source/blender/blenkernel/intern/mask_rasterize.cc b/source/blender/blenkernel/intern/mask_rasterize.cc index 438ccdb23b96a17be04ead6ed821b609add0479c..703076344ad85ada03c9aafb248382405cf579de 100644 --- a/source/blender/blenkernel/intern/mask_rasterize.cc +++ b/source/blender/blenkernel/intern/mask_rasterize.cc @@ -292,7 +292,8 @@ static void maskrasterize_spline_differentiate_point_outset(float (*diff_feather normalize_v2(d_next); if ((do_test == false) || - (len_squared_v2v2(diff_feather_points[k], diff_points[k]) < ofs_squared)) { + (len_squared_v2v2(diff_feather_points[k], diff_points[k]) < ofs_squared)) + { add_v2_v2v2(d, d_prev, d_next); @@ -539,7 +540,8 @@ static void layer_bucket_init(MaskRasterLayer *layer, const float pixel_size) buckets_face[bucket_index] = bucket; for (bucket_node = bucketstore[bucket_index]; bucket_node; - bucket_node = bucket_node->next) { + bucket_node = bucket_node->next) + { *bucket = POINTER_AS_UINT(bucket_node->link); bucket++; } diff --git a/source/blender/blenkernel/intern/material.cc b/source/blender/blenkernel/intern/material.cc index b0ec1d10919c5a65867202971e9eef8935f2297c..9051f075b536164d80cf023ddbdd01745b7f3c0f 100644 --- a/source/blender/blenkernel/intern/material.cc +++ b/source/blender/blenkernel/intern/material.cc @@ -927,7 +927,8 @@ void BKE_objects_materials_test_all(Main *bmain, ID *id) BKE_main_lock(bmain); int processed_objects = 0; for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { if (ob->data == id) { BKE_object_material_resize(bmain, ob, *totcol, false); processed_objects++; diff --git a/source/blender/blenkernel/intern/mball_tessellate.cc b/source/blender/blenkernel/intern/mball_tessellate.cc index e69463c90dacc03feaaf8b455bd50a9bf7650584..d0175554b9dd34a5174a82679f38f945359b886e 100644 --- a/source/blender/blenkernel/intern/mball_tessellate.cc +++ b/source/blender/blenkernel/intern/mball_tessellate.cc @@ -293,7 +293,7 @@ static void build_bvh_spatial( /** Hash table size (32768). */ #define HASHSIZE size_t(1 << (3 * HASHBIT)) -#define HASH(i, j, k) ((((((i)&31) << 5) | ((j)&31)) << 5) | ((k)&31)) +#define HASH(i, j, k) ((((((i) & 31) << 5) | ((j) & 31)) << 5) | ((k) & 31)) #define MB_BIT(i, bit) (((i) >> (bit)) & 1) // #define FLIP(i, bit) ((i) ^ 1 << (bit)) /* flip the given bit of i */ diff --git a/source/blender/blenkernel/intern/mesh_compare.cc b/source/blender/blenkernel/intern/mesh_compare.cc index ec1efb9cde4e43a106aab05d6de01bd426ff1596..14ccbaf4c339091b89bfa53bcc491803f08b1574 100644 --- a/source/blender/blenkernel/intern/mesh_compare.cc +++ b/source/blender/blenkernel/intern/mesh_compare.cc @@ -629,7 +629,8 @@ static void make_set_sizes_one(IndexMapping &indices) } int match = sorted_i; for (const int other_index : - IndexRange(indices.set_ids[sorted_i], indices.set_sizes[sorted_i])) { + IndexRange(indices.set_ids[sorted_i], indices.set_sizes[sorted_i])) + { if (indices.from_sorted1[sorted_i] == indices.from_sorted2[other_index]) { match = other_index; break; @@ -637,7 +638,8 @@ static void make_set_sizes_one(IndexMapping &indices) } std::swap(indices.from_sorted2[sorted_i], indices.from_sorted2[match]); for (const int other_set_i : - IndexRange(indices.set_ids[sorted_i], indices.set_sizes[sorted_i])) { + IndexRange(indices.set_ids[sorted_i], indices.set_sizes[sorted_i])) + { /* New first element, since this one is now in a new set. */ indices.set_ids[other_set_i] = sorted_i + 1; indices.set_sizes[other_set_i] -= 1; diff --git a/source/blender/blenkernel/intern/mesh_mapping.cc b/source/blender/blenkernel/intern/mesh_mapping.cc index 81e0493265f475273b81ec9a12c037a976ded95e..2d8770895bbc4f9b8d23e1bba5d0665cfcc5da58 100644 --- a/source/blender/blenkernel/intern/mesh_mapping.cc +++ b/source/blender/blenkernel/intern/mesh_mapping.cc @@ -585,7 +585,8 @@ static void face_edge_loop_islands_calc(const int totedge, for (; i--; p++) { int bit = face_groups[*p]; if (!ELEM(bit, 0, face_group_id, face_group_id_overflowed) && - !(bit_face_group_mask & bit)) { + !(bit_face_group_mask & bit)) + { bit_face_group_mask |= bit; } } @@ -953,7 +954,8 @@ static bool mesh_calc_islands_loop_face_uv(const int totedge, const int edge_i = corner_edges[corner]; loop_indices[num_lidx++] = int(corner); if (num_edge_borders && BLI_BITMAP_TEST(edge_borders, edge_i) && - (edge_border_count[edge_i] < 2)) { + (edge_border_count[edge_i] < 2)) + { edge_border_count[edge_i]++; if (edge_border_count[edge_i] == 2) { edge_innercut_indices[num_einnercuts++] = edge_i; diff --git a/source/blender/blenkernel/intern/mesh_mirror.cc b/source/blender/blenkernel/intern/mesh_mirror.cc index 716b59b890e43220620a1d709138dee0d84f8654..7c80697f64074e775778925c7c47d9f1736b6e58 100644 --- a/source/blender/blenkernel/intern/mesh_mirror.cc +++ b/source/blender/blenkernel/intern/mesh_mirror.cc @@ -244,7 +244,8 @@ Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(MirrorModifierData *mmd, */ if (use_correct_order_on_merge) { if (UNLIKELY(len_squared_v3v3(positions[vert_index_prev], positions[vert_index]) < - tolerance_sq)) { + tolerance_sq)) + { *vtmap_b = i; (*r_vert_merge_map_len)++; @@ -261,7 +262,8 @@ Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(MirrorModifierData *mmd, } else { if (UNLIKELY(len_squared_v3v3(positions[vert_index_prev], positions[vert_index]) < - tolerance_sq)) { + tolerance_sq)) + { *vtmap_a = src_verts_num + i; (*r_vert_merge_map_len)++; @@ -454,7 +456,8 @@ Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(MirrorModifierData *mmd, for (int i = 0; i < src_verts_num; dvert++, i++) { /* merged vertices get both groups, others get flipped */ if (use_correct_order_on_merge && do_vtargetmap && - ((*r_vert_merge_map)[i + src_verts_num] != -1)) { + ((*r_vert_merge_map)[i + src_verts_num] != -1)) + { BKE_defvert_flip_merged(dvert - src_verts_num, flip_map, flip_map_len); } else if (!use_correct_order_on_merge && do_vtargetmap && ((*r_vert_merge_map)[i] != -1)) diff --git a/source/blender/blenkernel/intern/mesh_normals.cc b/source/blender/blenkernel/intern/mesh_normals.cc index 17b0b1281366cc523f85d4c622e5516f09a9e735..b02e1c36025d4ea322cbbc329fa5b0fd40cd8efe 100644 --- a/source/blender/blenkernel/intern/mesh_normals.cc +++ b/source/blender/blenkernel/intern/mesh_normals.cc @@ -227,7 +227,8 @@ blender::bke::MeshNormalDomain Mesh::normals_domain() const } if (edge_mix == array_utils::BooleanMix::AllFalse && - face_mix == array_utils::BooleanMix::AllFalse) { + face_mix == array_utils::BooleanMix::AllFalse) + { return MeshNormalDomain::Point; } diff --git a/source/blender/blenkernel/intern/mesh_remap.cc b/source/blender/blenkernel/intern/mesh_remap.cc index c004263b5e98aba40fc4272d36e0d8681e8f6a9e..8b5911338e7b8b31afde61bc25da989e11ef441c 100644 --- a/source/blender/blenkernel/intern/mesh_remap.cc +++ b/source/blender/blenkernel/intern/mesh_remap.cc @@ -614,7 +614,8 @@ void BKE_mesh_remap_calc_verts_from_mesh(const int mode, } if (mesh_remap_bvhtree_query_nearest( - &treedata, &nearest, tmp_co, max_dist_sq, &hit_dist)) { + &treedata, &nearest, tmp_co, max_dist_sq, &hit_dist)) + { const int face_index = tri_faces[nearest.index]; if (mode == MREMAP_MODE_VERT_FACE_NEAREST) { @@ -746,7 +747,8 @@ void BKE_mesh_remap_calc_edges_from_mesh(const int mode, } if (mesh_remap_bvhtree_query_nearest( - &treedata, &nearest, tmp_co, max_dist_sq, &hit_dist)) { + &treedata, &nearest, tmp_co, max_dist_sq, &hit_dist)) + { v_dst_to_src_map[vidx_dst].hit_dist = hit_dist; v_dst_to_src_map[vidx_dst].index = nearest.index; } @@ -1660,7 +1662,8 @@ void BKE_mesh_remap_calc_loops_from_mesh(const int mode, islands_res[tindex][plidx_dst].factor = 0.0f; if (mesh_remap_bvhtree_query_nearest( - tdata, &nearest, tmp_co, max_dist_sq, &hit_dist)) { + tdata, &nearest, tmp_co, max_dist_sq, &hit_dist)) + { islands_res[tindex][plidx_dst].hit_dist = hit_dist; islands_res[tindex][plidx_dst].index_src = tri_faces[nearest.index]; copy_v3_v3(islands_res[tindex][plidx_dst].hit_point, nearest.co); diff --git a/source/blender/blenkernel/intern/modifier.cc b/source/blender/blenkernel/intern/modifier.cc index 93dac9c69f49262a118ad4058de30de8a77b5a61..a76839cd5cfd59275955bf546803f0a6529ffb65 100644 --- a/source/blender/blenkernel/intern/modifier.cc +++ b/source/blender/blenkernel/intern/modifier.cc @@ -544,7 +544,8 @@ bool BKE_modifier_is_enabled(const Scene *scene, ModifierData *md, int required_ return false; } if ((required_mode & eModifierMode_Editmode) && - !(mti->flags & eModifierTypeFlag_SupportsEditmode)) { + !(mti->flags & eModifierTypeFlag_SupportsEditmode)) + { return false; } diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index d75fdc2a334aa337f6d1a4bfc2a6f3880057277e..cbc6d62bc22bd182dcf7f6cd863f349a772c57dd 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -226,7 +226,8 @@ static void ntree_copy_data(Main * /*bmain*/, ID *id_dst, const ID *id_src, cons std::make_unique<AnonymousAttributeInferencingResult>( *ntree_src->runtime->anonymous_attribute_inferencing); for (FieldSource &field_source : - dst_runtime.anonymous_attribute_inferencing->all_field_sources) { + dst_runtime.anonymous_attribute_inferencing->all_field_sources) + { if (auto *socket_field_source = std::get_if<SocketFieldSource>(&field_source.data)) { socket_field_source->socket = socket_map.lookup(socket_field_source->socket); } @@ -2723,7 +2724,8 @@ bNodeLink *nodeAddLink( bNodeLink *link = nullptr; if (eNodeSocketInOut(fromsock->in_out) == SOCK_OUT && - eNodeSocketInOut(tosock->in_out) == SOCK_IN) { + eNodeSocketInOut(tosock->in_out) == SOCK_IN) + { link = MEM_cnew<bNodeLink>("link"); if (ntree) { BLI_addtail(&ntree->links, link); @@ -2857,7 +2859,8 @@ void nodeInternalRelink(bNodeTree *ntree, bNode *node) /* remove the link that would be the same as the relinked one */ LISTBASE_FOREACH_MUTABLE (bNodeLink *, link_to_compare, &ntree->links) { if (link_to_compare->fromsock == fromlink->fromsock && - link_to_compare->tosock == link->tosock) { + link_to_compare->tosock == link->tosock) + { blender::bke::adjust_multi_input_indices_after_removed_link( ntree, link_to_compare->tosock, link_to_compare->multi_input_socket_index); duplicate_links_to_remove.append_non_duplicates(link_to_compare); diff --git a/source/blender/blenkernel/intern/node_tree_anonymous_attributes.cc b/source/blender/blenkernel/intern/node_tree_anonymous_attributes.cc index 29f7306eb7c6b0ee160b2e558deebbed29fe73b0..a61985633a3234c0b30ca02ceb9b409ecc819a34 100644 --- a/source/blender/blenkernel/intern/node_tree_anonymous_attributes.cc +++ b/source/blender/blenkernel/intern/node_tree_anonymous_attributes.cc @@ -483,12 +483,14 @@ static AnonymousAttributeInferencingResult analyze_anonymous_attribute_usages( geometry_source.data); for (const int field_source_index : geometry_source.field_sources) { for (const bNodeSocket *other_socket : - group_output_node->input_sockets().drop_back(1)) { + group_output_node->input_sockets().drop_back(1)) + { if (!nodes::socket_type_supports_fields(eNodeSocketDatatype(other_socket->type))) { continue; } if (propagated_fields_by_socket[other_socket->index_in_tree()][field_source_index] - .test()) { + .test()) + { tree_relations.available_relations.append( aal::AvailableRelation{other_socket->index(), socket->index()}); required_fields_by_geometry_socket[socket->index_in_tree()][field_source_index] diff --git a/source/blender/blenkernel/intern/node_tree_field_inferencing.cc b/source/blender/blenkernel/intern/node_tree_field_inferencing.cc index d584e42d7492344259354806b3c7563be13d83d9..9ccafa40e318acf3bfb9ca2d83c7314ba998351e 100644 --- a/source/blender/blenkernel/intern/node_tree_field_inferencing.cc +++ b/source/blender/blenkernel/intern/node_tree_field_inferencing.cc @@ -448,7 +448,8 @@ static void propagate_data_requirements_from_right_to_left( continue; } if (inferencing_interface.inputs[input_socket->index()] == - InputSocketFieldType::Implicit) { + InputSocketFieldType::Implicit) + { if (!input_socket->is_logically_linked()) { any_input_is_field_implicitly = true; break; @@ -579,7 +580,8 @@ static void propagate_field_status_from_left_to_right( state.is_single = true; if (!input_socket->is_directly_linked()) { if (inferencing_interface.inputs[input_socket->index()] == - InputSocketFieldType::Implicit) { + InputSocketFieldType::Implicit) + { state.is_single = false; } } @@ -612,7 +614,8 @@ static void propagate_field_status_from_left_to_right( case OutputSocketFieldType::PartiallyDependent: case OutputSocketFieldType::DependentField: { for (const bNodeSocket *input_socket : - gather_input_socket_dependencies(field_dependency, *node)) { + gather_input_socket_dependencies(field_dependency, *node)) + { if (!input_socket->is_available()) { continue; } diff --git a/source/blender/blenkernel/intern/node_tree_zones.cc b/source/blender/blenkernel/intern/node_tree_zones.cc index 156b11502d910eed83798958cc5610f1b31f87ce..3697dd1b71712ca1a8ca2485d79f62bfcc445065 100644 --- a/source/blender/blenkernel/intern/node_tree_zones.cc +++ b/source/blender/blenkernel/intern/node_tree_zones.cc @@ -154,7 +154,8 @@ static bool update_zone_per_node(const Span<const bNode *> all_nodes, return; } for (bNodeTreeZone *iter_zone = zone->parent_zone; iter_zone; - iter_zone = iter_zone->parent_zone) { + iter_zone = iter_zone->parent_zone) + { if (iter_zone == parent_zone) { /* This zone is nested in the parent zone, so it becomes the new parent of the node. */ parent_zone = zone; diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc index e9184e42c45ffa4c0954719ffbf50b5af457ee1b..2787e15701f121e9e5771018cda123ab737ed9b3 100644 --- a/source/blender/blenkernel/intern/object.cc +++ b/source/blender/blenkernel/intern/object.cc @@ -527,7 +527,8 @@ static void object_foreach_path_pointcache(ListBase *ptcache_list, BPathForeachPathData *bpath_data) { for (PointCache *cache = (PointCache *)ptcache_list->first; cache != nullptr; - cache = cache->next) { + cache = cache->next) + { if (cache->flag & PTCACHE_DISK_CACHE) { BKE_bpath_foreach_path_fixed_process(bpath_data, cache->path, sizeof(cache->path)); } @@ -3107,7 +3108,8 @@ static void give_parvert(Object *par, int nr, float vec[3]) } if (nr < numVerts) { if (me_eval && me_eval->runtime->edit_data && - !me_eval->runtime->edit_data->vertexCos.is_empty()) { + !me_eval->runtime->edit_data->vertexCos.is_empty()) + { add_v3_v3(vec, me_eval->runtime->edit_data->vertexCos[nr]); } else { @@ -4626,7 +4628,8 @@ int BKE_object_is_modified(Scene *scene, Object *ob) md = md->next) { if ((flag & eModifierMode_Render) == 0 && - BKE_modifier_is_enabled(scene, md, eModifierMode_Render)) { + BKE_modifier_is_enabled(scene, md, eModifierMode_Render)) + { flag |= eModifierMode_Render; } @@ -4772,12 +4775,14 @@ int BKE_object_is_deform_modified(Scene *scene, Object *ob) if (can_deform) { if (!(flag & eModifierMode_Render) && - BKE_modifier_is_enabled(scene, md, eModifierMode_Render)) { + BKE_modifier_is_enabled(scene, md, eModifierMode_Render)) + { flag |= eModifierMode_Render; } if (!(flag & eModifierMode_Realtime) && - BKE_modifier_is_enabled(scene, md, eModifierMode_Realtime)) { + BKE_modifier_is_enabled(scene, md, eModifierMode_Realtime)) + { flag |= eModifierMode_Realtime; } } @@ -5035,7 +5040,8 @@ KDTree_3d *BKE_object_as_kdtree(Object *ob, int *r_tot) const int *index; if (me_eval && - (index = (const int *)CustomData_get_layer(&me_eval->vert_data, CD_ORIGINDEX))) { + (index = (const int *)CustomData_get_layer(&me_eval->vert_data, CD_ORIGINDEX))) + { const Span<float3> positions = mesh->vert_positions(); /* Tree over-allocates in case where some verts have #ORIGINDEX_NONE. */ diff --git a/source/blender/blenkernel/intern/object_dupli.cc b/source/blender/blenkernel/intern/object_dupli.cc index 541dae8f1cd3def0d1a7db3836d52730a4ee4283..c781d216021ef7bc191f779431fbf338adf7af19 100644 --- a/source/blender/blenkernel/intern/object_dupli.cc +++ b/source/blender/blenkernel/intern/object_dupli.cc @@ -1464,7 +1464,8 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem psys_find_group_weights(part); LISTBASE_FOREACH (ParticleDupliWeight *, dw, &part->instance_weights) { FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN ( - part->instance_collection, object, mode) { + part->instance_collection, object, mode) + { if (dw->ob == object) { totcollection += dw->count; break; @@ -1489,7 +1490,8 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem a = 0; LISTBASE_FOREACH (ParticleDupliWeight *, dw, &part->instance_weights) { FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN ( - part->instance_collection, object, mode) { + part->instance_collection, object, mode) + { if (dw->ob == object) { for (b = 0; b < dw->count; b++, a++) { oblist[a] = dw->ob; diff --git a/source/blender/blenkernel/intern/packedFile.cc b/source/blender/blenkernel/intern/packedFile.cc index 796e7ee24d6ae4da6f91307ac5df0eda983e3e70..201e26044ce703df3b973b31e373908509b60f3f 100644 --- a/source/blender/blenkernel/intern/packedFile.cc +++ b/source/blender/blenkernel/intern/packedFile.cc @@ -263,7 +263,8 @@ void BKE_packedfile_pack_all(Main *bmain, ReportList *reports, bool verbose) vfont = static_cast<VFont *>(vfont->id.next)) { if (vfont->packedfile == nullptr && !ID_IS_LINKED(vfont) && - BKE_vfont_is_builtin(vfont) == false) { + BKE_vfont_is_builtin(vfont) == false) + { vfont->packedfile = BKE_packedfile_new( reports, vfont->filepath, BKE_main_blendfile_path(bmain)); tot++; diff --git a/source/blender/blenkernel/intern/paint.cc b/source/blender/blenkernel/intern/paint.cc index 42e940d8d7b37100f579ab016e3abed95ccd93ac..632f31d6b5afcb7e099870920f611d43bfb5f040 100644 --- a/source/blender/blenkernel/intern/paint.cc +++ b/source/blender/blenkernel/intern/paint.cc @@ -1840,7 +1840,8 @@ static void sculpt_update_object(Depsgraph *depsgraph, if (U.experimental.use_sculpt_texture_paint && ss->pbvh) { char *paint_canvas_key = BKE_paint_canvas_key_get(&scene->toolsettings->paint_mode, ob); if (ss->last_paint_canvas_key == nullptr || - !STREQ(paint_canvas_key, ss->last_paint_canvas_key)) { + !STREQ(paint_canvas_key, ss->last_paint_canvas_key)) + { MEM_SAFE_FREE(ss->last_paint_canvas_key); ss->last_paint_canvas_key = paint_canvas_key; BKE_pbvh_mark_rebuild_pixels(ss->pbvh); @@ -2511,7 +2512,8 @@ static SculptAttribute *sculpt_get_cached_layer(SculptSession *ss, SculptAttribute *attr = ss->temp_attributes + i; if (attr->used && STREQ(attr->name, name) && attr->proptype == proptype && - attr->domain == domain) { + attr->domain == domain) + { return attr; } diff --git a/source/blender/blenkernel/intern/particle.cc b/source/blender/blenkernel/intern/particle.cc index 0b7660cd14f37b1c7bf58c0a446c0c3180f1d71c..a55369a0843d335933f2dfc5f131dcb5cb06a7d0 100644 --- a/source/blender/blenkernel/intern/particle.cc +++ b/source/blender/blenkernel/intern/particle.cc @@ -774,7 +774,8 @@ void psys_check_group_weights(ParticleSettings *part) dw = static_cast<ParticleDupliWeight *>(part->instance_weights.first); while (dw) { if (dw->ob == nullptr || - !BKE_collection_has_object_recursive(part->instance_collection, dw->ob)) { + !BKE_collection_has_object_recursive(part->instance_collection, dw->ob)) + { tdw = dw->next; BLI_freelinkN(&part->instance_weights, dw); dw = tdw; @@ -1918,7 +1919,8 @@ int psys_particle_dm_face_lookup(Mesh *mesh_final, /* If current tessface from 'final' DM and orig tessface (given by index) * map to the same orig poly. */ if (BKE_mesh_origindex_mface_mpoly(index_mf_to_mpoly, index_mp_to_orig, findex_dst) == - pindex_orig) { + pindex_orig) + { faceuv = osface_final[findex_dst].uv; /* check that this intersects - Its possible this misses :/ - @@ -2382,7 +2384,8 @@ bool do_guides(Depsgraph *depsgraph, } else { if (BKE_where_on_path(eff->ob, guidetime, guidevec, guidedir, nullptr, &radius, &weight) == - 0) { + 0) + { return false; } } diff --git a/source/blender/blenkernel/intern/particle_system.cc b/source/blender/blenkernel/intern/particle_system.cc index 7db3acb254ac522eeee992515f88a3fa9ef87234..f536f8353b3e58772c5816fc52396371a95b0233 100644 --- a/source/blender/blenkernel/intern/particle_system.cc +++ b/source/blender/blenkernel/intern/particle_system.cc @@ -1903,7 +1903,8 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa -10.0f * spring_constant * (1.0f - rij / h) * (spring->rest_length - rij)); } else if (fluid->spring_frames == 0 || - (pa->prev_state.time - pa->time) <= fluid->spring_frames) { + (pa->prev_state.time - pa->time) <= fluid->spring_frames) + { ParticleSpring temp_spring; temp_spring.particle_index[0] = index; temp_spring.particle_index[1] = pfn->index; diff --git a/source/blender/blenkernel/intern/pbvh.cc b/source/blender/blenkernel/intern/pbvh.cc index 3272b4725116c856e8287a9ca600255321a459d3..6bc2d46d7312e0ac29f2b7ab3e6a382bb9525df9 100644 --- a/source/blender/blenkernel/intern/pbvh.cc +++ b/source/blender/blenkernel/intern/pbvh.cc @@ -57,12 +57,12 @@ using blender::bke::AttrDomain; /* Uncomment to test if triangles of the same face are * properly clustered into single nodes. */ -//#define TEST_PBVH_FACE_SPLIT +// #define TEST_PBVH_FACE_SPLIT /* Uncomment to test that faces are only assigned to one PBVHNode */ -//#define VALIDATE_UNIQUE_NODE_FACES +// #define VALIDATE_UNIQUE_NODE_FACES -//#define PERFCNTRS +// #define PERFCNTRS #define STACK_FIXED_DEPTH 100 struct PBVHStack { @@ -2068,7 +2068,8 @@ static bool pbvh_faces_node_raycast(PBVH *pbvh, * uninitialized values. This stores the closest vertex in the current intersecting * triangle. */ if (j == 0 || - len_squared_v3v3(location, co[j]) < len_squared_v3v3(location, nearest_vertex_co)) { + len_squared_v3v3(location, co[j]) < len_squared_v3v3(location, nearest_vertex_co)) + { copy_v3_v3(nearest_vertex_co, co[j]); r_active_vertex->i = corner_verts[tri[j]]; *r_active_face_index = pbvh->corner_tri_faces[tri_i]; @@ -2131,7 +2132,8 @@ static bool pbvh_grids_node_raycast(PBVH *pbvh, } if (ray_face_intersection_quad( - ray_start, isect_precalc, co[0], co[1], co[2], co[3], depth)) { + ray_start, isect_precalc, co[0], co[1], co[2], co[3], depth)) + { hit = true; if (r_face_normal) { @@ -2150,7 +2152,8 @@ static bool pbvh_grids_node_raycast(PBVH *pbvh, * uninitialized values. This stores the closest vertex in the current intersecting * quad. */ if (j == 0 || len_squared_v3v3(location, co[j]) < - len_squared_v3v3(location, nearest_vertex_co)) { + len_squared_v3v3(location, nearest_vertex_co)) + { copy_v3_v3(nearest_vertex_co, co[j]); r_active_vertex->i = gridkey->grid_area * grid_index + diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.cc b/source/blender/blenkernel/intern/pbvh_bmesh.cc index 96d212ba3d69623526515e1f38bd723618a700de..4b55ea9b7d81b88bcd6d81e2f7e569d2681ffb5f 100644 --- a/source/blender/blenkernel/intern/pbvh_bmesh.cc +++ b/source/blender/blenkernel/intern/pbvh_bmesh.cc @@ -1793,8 +1793,9 @@ bool bmesh_node_raycast(PBVHNode *node, float location[3] = {0.0f}; madd_v3_v3v3fl(location, ray_start, ray_normal, *depth); for (const int j : IndexRange(3)) { - if (j == 0 || len_squared_v3v3(location, cos[j]) < - len_squared_v3v3(location, nearest_vertex_co)) { + if (j == 0 || + len_squared_v3v3(location, cos[j]) < len_squared_v3v3(location, nearest_vertex_co)) + { copy_v3_v3(nearest_vertex_co, cos[j]); r_active_vertex->i = intptr_t(node->bm_orvert[node->bm_ortri[i][j]]); } @@ -1994,7 +1995,8 @@ static void pbvh_bmesh_node_limit_ensure_fast(PBVH *pbvh, BMFace *f_iter = nodeinfo[i_iter]; const int face_iter_i = BM_elem_index_get(f_iter); if (math::midpoint(face_bounds[face_iter_i].min[axis], - face_bounds[face_iter_i].max[axis]) <= mid) { + face_bounds[face_iter_i].max[axis]) <= mid) + { candidate = i_iter; break; } diff --git a/source/blender/blenkernel/intern/pbvh_pixels.cc b/source/blender/blenkernel/intern/pbvh_pixels.cc index 49cb7aa2f0e82b4a8ec38f4ab814fb477f6d7066..b5445f40117bb1a8d3feb6788cae6b4cce0a9462 100644 --- a/source/blender/blenkernel/intern/pbvh_pixels.cc +++ b/source/blender/blenkernel/intern/pbvh_pixels.cc @@ -443,7 +443,8 @@ struct UVPrimitiveLookup { uint64_t uv_island_index = 0; for (uv_islands::UVIsland &uv_island : uv_islands.islands) { for (VectorList<uv_islands::UVPrimitive>::UsedVector &uv_primitives : - uv_island.uv_primitives) { + uv_island.uv_primitives) + { for (uv_islands::UVPrimitive &uv_primitive : uv_primitives) { lookup[uv_primitive.primitive_i].append_as(Entry(&uv_primitive, uv_island_index)); } @@ -487,7 +488,8 @@ static void do_encode_pixels(EncodePixelsUserData *data, const int n) for (const int geom_prim_index : node->prim_indices) { for (const UVPrimitiveLookup::Entry &entry : - data->uv_primitive_lookup->lookup[geom_prim_index]) { + data->uv_primitive_lookup->lookup[geom_prim_index]) + { uv_islands::UVBorder uv_border = entry.uv_primitive->extract_border(); float2 uvs[3] = { entry.uv_primitive->get_uv_vertex(mesh_data, 0)->uv - tile_offset, @@ -735,7 +737,7 @@ static bool update_pixels(PBVH *pbvh, Mesh *mesh, Image *image, ImageUser *image } } -//#define DO_PRINT_STATISTICS +// #define DO_PRINT_STATISTICS #ifdef DO_PRINT_STATISTICS /* Print some statistics about compression ratio. */ { diff --git a/source/blender/blenkernel/intern/pbvh_pixels_copy.cc b/source/blender/blenkernel/intern/pbvh_pixels_copy.cc index e0bd1e4a7b26a01e66bfc6f3af256660935b841a..9318fb279fae679cc4a3063ccba401cce9f069da 100644 --- a/source/blender/blenkernel/intern/pbvh_pixels_copy.cc +++ b/source/blender/blenkernel/intern/pbvh_pixels_copy.cc @@ -95,8 +95,7 @@ static const Edge<CoordSpace::Tile> convert_coord_space(const Edge<CoordSpace::U }; } -class NonManifoldTileEdges : public Vector<Edge<CoordSpace::Tile>> { -}; +class NonManifoldTileEdges : public Vector<Edge<CoordSpace::Tile>> {}; class NonManifoldUVEdges : public Vector<Edge<CoordSpace::UV>> { public: diff --git a/source/blender/blenkernel/intern/pbvh_uv_islands.cc b/source/blender/blenkernel/intern/pbvh_uv_islands.cc index 97ea043de2f214b6de42ddfac60e6163eed7f7a9..cc2a6f301fe23e8fa1bac38e6daa577f125c1d00 100644 --- a/source/blender/blenkernel/intern/pbvh_uv_islands.cc +++ b/source/blender/blenkernel/intern/pbvh_uv_islands.cc @@ -345,7 +345,8 @@ UVEdge *UVIsland::lookup(const UVEdge &edge) for (UVEdge *e : found_vertex->uv_edges) { UVVertex *other_vertex = e->get_other_uv_vertex(found_vertex->vertex); if (other_vertex->vertex == edge.vertices[1]->vertex && - other_vertex->uv == edge.vertices[1]->uv) { + other_vertex->uv == edge.vertices[1]->uv) + { return e; } } diff --git a/source/blender/blenkernel/intern/pointcache.cc b/source/blender/blenkernel/intern/pointcache.cc index 026c13143668b7d4e6e8a61326a9078a3a99428b..336a206c0a9f8a914493af993c11af84a871a4c1 100644 --- a/source/blender/blenkernel/intern/pointcache.cc +++ b/source/blender/blenkernel/intern/pointcache.cc @@ -93,7 +93,7 @@ #define PTCACHE_DATA_TO(data, type, index, to) \ if (data[type]) { \ memcpy(to, \ - (char *)(data)[type] + ((index) ? (index)*ptcache_data_size[type] : 0), \ + (char *)(data)[type] + ((index) ? (index) * ptcache_data_size[type] : 0), \ ptcache_data_size[type]); \ } \ (void)0 @@ -1651,7 +1651,8 @@ static int ptcache_file_data_write(PTCacheFile *pf) for (i = 0; i < BPHYS_TOT_DATA; i++) { if ((pf->data_types & (1 << i)) && - !ptcache_file_write(pf, pf->cur[i], 1, ptcache_data_size[i])) { + !ptcache_file_write(pf, pf->cur[i], 1, ptcache_data_size[i])) + { return 0; } } @@ -2993,7 +2994,8 @@ int BKE_ptcache_object_reset(Scene *scene, Object *ob, int mode) FluidModifierData *fmd = (FluidModifierData *)md; FluidDomainSettings *fds = fmd->domain; if ((fmd->type & MOD_FLUID_TYPE_DOMAIN) && fds && - fds->cache_type == FLUID_DOMAIN_CACHE_REPLAY) { + fds->cache_type == FLUID_DOMAIN_CACHE_REPLAY) + { BKE_ptcache_id_from_smoke(&pid, ob, fmd); reset |= BKE_ptcache_id_reset(scene, &pid, mode); } @@ -3835,7 +3837,8 @@ static void direct_link_pointcache_cb(BlendDataReader *reader, void *data) /* the cache saves non-struct data without DNA */ if (pm->data[i] && ptcache_data_struct[i][0] == '\0' && - BLO_read_requires_endian_switch(reader)) { + BLO_read_requires_endian_switch(reader)) + { /* data_size returns bytes. */ int tot = (BKE_ptcache_data_size(i) * pm->totpoint) / sizeof(int); diff --git a/source/blender/blenkernel/intern/rigidbody.cc b/source/blender/blenkernel/intern/rigidbody.cc index 97bf9ade451626e936d04c472eec9734f11808a3..f66a0b66b4fb004f2532ff31295ae04e8d6e0775 100644 --- a/source/blender/blenkernel/intern/rigidbody.cc +++ b/source/blender/blenkernel/intern/rigidbody.cc @@ -316,7 +316,8 @@ void BKE_rigidbody_object_copy(Main *bmain, Object *ob_dst, const Object *ob_src } if ((flag & LIB_ID_CREATE_NO_DEG_TAG) == 0 && - (need_objects_update || need_constraints_update)) { + (need_objects_update || need_constraints_update)) + { BKE_rigidbody_cache_reset(rigidbody_world); DEG_relations_tag_update(bmain); @@ -2044,7 +2045,8 @@ static void rigidbody_update_external_forces(Depsgraph *depsgraph, /* update influence of effectors - but don't do it on an effector */ /* only dynamic bodies need effector update */ if (rbo->type == RBO_TYPE_ACTIVE && - ((ob->pd == nullptr) || (ob->pd->forcefield == PFIELD_NULL))) { + ((ob->pd == nullptr) || (ob->pd->forcefield == PFIELD_NULL))) + { EffectorWeights *effector_weights = rbw->effector_weights; EffectedPoint epoint; ListBase *effectors; diff --git a/source/blender/blenkernel/intern/shrinkwrap.cc b/source/blender/blenkernel/intern/shrinkwrap.cc index a0547e9ecdbbecb6f8dc7eec4ac009802fc4f9ce..85c04932825dc9b44918750ed478901189752b03 100644 --- a/source/blender/blenkernel/intern/shrinkwrap.cc +++ b/source/blender/blenkernel/intern/shrinkwrap.cc @@ -550,7 +550,8 @@ static void shrinkwrap_calc_normal_projection_cb_ex(void *__restrict userdata, char options = calc->smd->shrinkOpts; if ((options & MOD_SHRINKWRAP_INVERT_CULL_TARGET) && - (options & MOD_SHRINKWRAP_CULL_TARGET_MASK)) { + (options & MOD_SHRINKWRAP_CULL_TARGET_MASK)) + { options ^= MOD_SHRINKWRAP_CULL_TARGET_MASK; } @@ -561,7 +562,8 @@ static void shrinkwrap_calc_normal_projection_cb_ex(void *__restrict userdata, } if (BKE_shrinkwrap_project_normal( - options, tmp_co, inv_no, 0.0, &calc->local2target, tree, hit)) { + options, tmp_co, inv_no, 0.0, &calc->local2target, tree, hit)) + { is_aux = false; } } @@ -704,7 +706,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc) * The actual solution vector is [ w0, w1, l ], with w2 eliminated. */ -//#define TRACE_TARGET_PROJECT +// #define TRACE_TARGET_PROJECT struct TargetProjectTriData { const float **vtri_co; diff --git a/source/blender/blenkernel/intern/subdiv_foreach.cc b/source/blender/blenkernel/intern/subdiv_foreach.cc index b61ca665241d2ec83ed3e79b23803fb691a17870..5f699c1dc366717b20474541725204cdbad77b82 100644 --- a/source/blender/blenkernel/intern/subdiv_foreach.cc +++ b/source/blender/blenkernel/intern/subdiv_foreach.cc @@ -421,7 +421,8 @@ static void subdiv_foreach_edge_vertices_regular_do(SubdivForeachTaskContext *ct const int coarse_vert = ctx->coarse_corner_verts[coarse_face[corner]]; const int coarse_edge_index = ctx->coarse_corner_edges[coarse_face[corner]]; if (check_usage && - BLI_BITMAP_TEST_AND_SET_ATOMIC(ctx->coarse_edges_used_map, coarse_edge_index)) { + BLI_BITMAP_TEST_AND_SET_ATOMIC(ctx->coarse_edges_used_map, coarse_edge_index)) + { continue; } const int2 &coarse_edge = ctx->coarse_edges[coarse_edge_index]; @@ -485,7 +486,8 @@ static void subdiv_foreach_edge_vertices_special_do(SubdivForeachTaskContext *ct const int coarse_vert = ctx->coarse_corner_verts[coarse_face[corner]]; const int coarse_edge_index = ctx->coarse_corner_edges[coarse_face[corner]]; if (check_usage && - BLI_BITMAP_TEST_AND_SET_ATOMIC(ctx->coarse_edges_used_map, coarse_edge_index)) { + BLI_BITMAP_TEST_AND_SET_ATOMIC(ctx->coarse_edges_used_map, coarse_edge_index)) + { continue; } const int2 &coarse_edge = ctx->coarse_edges[coarse_edge_index]; diff --git a/source/blender/blenkernel/intern/subdiv_mesh.cc b/source/blender/blenkernel/intern/subdiv_mesh.cc index a003de5aa7b08f8b546b931f6f32f65a0bb8f0cf..4323bec6a36f968b49a401df488b4361ad4f8b13 100644 --- a/source/blender/blenkernel/intern/subdiv_mesh.cc +++ b/source/blender/blenkernel/intern/subdiv_mesh.cc @@ -892,7 +892,8 @@ static void subdiv_mesh_ensure_loop_interpolation(SubdivMeshContext *ctx, } /* Update it for a new corner if needed. */ if (!tls->loop_interpolation_initialized || - tls->loop_interpolation_coarse_corner != coarse_corner) { + tls->loop_interpolation_coarse_corner != coarse_corner) + { loop_interpolation_from_corner(ctx, &tls->loop_interpolation, coarse_face, coarse_corner); } /* Store settings used for the current state of interpolator. */ diff --git a/source/blender/blenkernel/intern/tracking.cc b/source/blender/blenkernel/intern/tracking.cc index 8c80cf494274480a88285786dff6bb268f7281a7..287f259255606e9f30c90630d2ede998194c3097 100644 --- a/source/blender/blenkernel/intern/tracking.cc +++ b/source/blender/blenkernel/intern/tracking.cc @@ -2527,7 +2527,7 @@ void BKE_tracking_max_distortion_delta_across_bound(MovieTracking *tracking, { float pos[2], warped_pos[2]; const int coord_delta = 5; - void (*apply_distortion)(MovieTracking * tracking, + void (*apply_distortion)(MovieTracking *tracking, int image_width, int image_height, const float pos[2], diff --git a/source/blender/blenkernel/intern/vfont.cc b/source/blender/blenkernel/intern/vfont.cc index 0afdd5fc5fcb9d6157b15e3b468d626d99a0f272..6f67150acbaeb3966affeb2206714d53d600fc21 100644 --- a/source/blender/blenkernel/intern/vfont.cc +++ b/source/blender/blenkernel/intern/vfont.cc @@ -117,7 +117,8 @@ static void vfont_foreach_path(ID *id, BPathForeachPathData *bpath_data) VFont *vfont = (VFont *)id; if ((vfont->packedfile != nullptr) && - (bpath_data->flag & BKE_BPATH_FOREACH_PATH_SKIP_PACKED) != 0) { + (bpath_data->flag & BKE_BPATH_FOREACH_PATH_SKIP_PACKED) != 0) + { return; } @@ -1249,7 +1250,8 @@ static bool vfont_to_curve(Object *ob, } for (i = 0; i <= slen; i++) { for (j = i; !ELEM(mem[j], '\0', '\n') && (chartransdata[j].dobreak == 0) && (j < slen); - j++) { + j++) + { /* do nothing */ } @@ -1263,7 +1265,8 @@ static bool vfont_to_curve(Object *ob, float curofs = 0.0f; for (i = 0; i <= slen; i++) { for (j = i; (mem[j]) && (mem[j] != '\n') && (chartransdata[j].dobreak == 0) && (j < slen); - j++) { + j++) + { /* pass */ } diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc index e0ddffc684b243af09680b9ffbf238774f4a62f2..85d2dce0d846d8df84b4c0d64ab82229b9c24a90 100644 --- a/source/blender/blenkernel/intern/volume.cc +++ b/source/blender/blenkernel/intern/volume.cc @@ -205,7 +205,8 @@ static void volume_foreach_path(ID *id, BPathForeachPathData *bpath_data) Volume *volume = reinterpret_cast<Volume *>(id); if (volume->packedfile != nullptr && - (bpath_data->flag & BKE_BPATH_FOREACH_PATH_SKIP_PACKED) != 0) { + (bpath_data->flag & BKE_BPATH_FOREACH_PATH_SKIP_PACKED) != 0) + { return; } diff --git a/source/blender/blenkernel/intern/writeffmpeg.cc b/source/blender/blenkernel/intern/writeffmpeg.cc index bf530be42eadb2ede8b32f1f138b15d76e9846cf..1e66a19e6dbb7a699dd8a9fea75d9429d70e0581 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.cc +++ b/source/blender/blenkernel/intern/writeffmpeg.cc @@ -783,7 +783,8 @@ static AVStream *alloc_video_stream(FFMpegContext *context, if (c->time_base.num != 1) { AVRational new_time_base; if (av_reduce( - &new_time_base.num, &new_time_base.den, c->time_base.num, c->time_base.den, INT_MAX)) { + &new_time_base.num, &new_time_base.den, c->time_base.num, c->time_base.den, INT_MAX)) + { /* Exact reduction was possible. Use the new value. */ c->time_base = new_time_base; } diff --git a/source/blender/blenlib/BLI_assert.h b/source/blender/blenlib/BLI_assert.h index 2019aaa3af652e5105d396808ca58b3f95b13db7..a26594fdf0cd578024ccd7d9cabaa6a8ddfe02c8 100644 --- a/source/blender/blenlib/BLI_assert.h +++ b/source/blender/blenlib/BLI_assert.h @@ -32,11 +32,11 @@ void _BLI_assert_unreachable_print(const char *file, int line, const char *funct #ifndef NDEBUG /* _BLI_ASSERT_PRINT_POS */ # if defined(__GNUC__) -# define _BLI_ASSERT_PRINT_POS(a) _BLI_assert_print_pos(__FILE__, __LINE__, __func__, # a) +# define _BLI_ASSERT_PRINT_POS(a) _BLI_assert_print_pos(__FILE__, __LINE__, __func__, #a) # elif defined(_MSC_VER) -# define _BLI_ASSERT_PRINT_POS(a) _BLI_assert_print_pos(__FILE__, __LINE__, __func__, # a) +# define _BLI_ASSERT_PRINT_POS(a) _BLI_assert_print_pos(__FILE__, __LINE__, __func__, #a) # else -# define _BLI_ASSERT_PRINT_POS(a) _BLI_assert_print_pos(__FILE__, __LINE__, "<?>", # a) +# define _BLI_ASSERT_PRINT_POS(a) _BLI_assert_print_pos(__FILE__, __LINE__, "<?>", #a) # endif /* _BLI_ASSERT_ABORT */ # ifdef WITH_ASSERT_ABORT diff --git a/source/blender/blenlib/BLI_bitmap.h b/source/blender/blenlib/BLI_bitmap.h index a04d1170993594c9edf0b75ea2f7f9b489b89ea0..8439cfa0dae8ea1b8e1fd0f51f1de0d1a23025d0 100644 --- a/source/blender/blenlib/BLI_bitmap.h +++ b/source/blender/blenlib/BLI_bitmap.h @@ -64,13 +64,13 @@ typedef unsigned int BLI_bitmap; */ #define BLI_BITMAP_TEST(_bitmap, _index) \ (CHECK_TYPE_ANY(_bitmap, BLI_bitmap *, const BLI_bitmap *), \ - ((_bitmap)[(_index) >> _BITMAP_POWER] & (1u << ((_index)&_BITMAP_MASK)))) + ((_bitmap)[(_index) >> _BITMAP_POWER] & (1u << ((_index) & _BITMAP_MASK)))) #define BLI_BITMAP_TEST_AND_SET_ATOMIC(_bitmap, _index) \ (CHECK_TYPE_ANY(_bitmap, BLI_bitmap *, const BLI_bitmap *), \ (atomic_fetch_and_or_uint32((uint32_t *)&(_bitmap)[(_index) >> _BITMAP_POWER], \ - (1u << ((_index)&_BITMAP_MASK))) & \ - (1u << ((_index)&_BITMAP_MASK)))) + (1u << ((_index) & _BITMAP_MASK))) & \ + (1u << ((_index) & _BITMAP_MASK)))) #define BLI_BITMAP_TEST_BOOL(_bitmap, _index) \ (CHECK_TYPE_ANY(_bitmap, BLI_bitmap *, const BLI_bitmap *), \ @@ -81,21 +81,21 @@ typedef unsigned int BLI_bitmap; */ #define BLI_BITMAP_ENABLE(_bitmap, _index) \ (CHECK_TYPE_ANY(_bitmap, BLI_bitmap *, const BLI_bitmap *), \ - ((_bitmap)[(_index) >> _BITMAP_POWER] |= (1u << ((_index)&_BITMAP_MASK)))) + ((_bitmap)[(_index) >> _BITMAP_POWER] |= (1u << ((_index) & _BITMAP_MASK)))) /** * Clear the value of a single bit at '_index'. */ #define BLI_BITMAP_DISABLE(_bitmap, _index) \ (CHECK_TYPE_ANY(_bitmap, BLI_bitmap *, const BLI_bitmap *), \ - ((_bitmap)[(_index) >> _BITMAP_POWER] &= ~(1u << ((_index)&_BITMAP_MASK)))) + ((_bitmap)[(_index) >> _BITMAP_POWER] &= ~(1u << ((_index) & _BITMAP_MASK)))) /** * Flip the value of a single bit at '_index'. */ #define BLI_BITMAP_FLIP(_bitmap, _index) \ (CHECK_TYPE_ANY(_bitmap, BLI_bitmap *, const BLI_bitmap *), \ - ((_bitmap)[(_index) >> _BITMAP_POWER] ^= (1u << ((_index)&_BITMAP_MASK)))) + ((_bitmap)[(_index) >> _BITMAP_POWER] ^= (1u << ((_index) & _BITMAP_MASK)))) /** * Set or clear the value of a single bit at '_index'. diff --git a/source/blender/blenlib/BLI_compiler_typecheck.h b/source/blender/blenlib/BLI_compiler_typecheck.h index 5a793f9c9fba3dcb5b3bde488e20bb48ed38ec40..58f6957a75370b2aae4f86313b86e040c63a99af 100644 --- a/source/blender/blenlib/BLI_compiler_typecheck.h +++ b/source/blender/blenlib/BLI_compiler_typecheck.h @@ -57,10 +57,10 @@ /* can be used in simple macros */ #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) # define CHECK_TYPE_INLINE(val, type) \ - (void)((void)(((type)0) != (0 ? (val) : ((type)0))), _Generic((val), type : 0, const type : 0)) + (void)((void)(((type)0) != (0 ? (val) : ((type)0))), _Generic((val), type: 0, const type: 0)) /* NOTE: The NONCONST version is needed for scalar types on CLANG, to avoid warnings. */ # define CHECK_TYPE_INLINE_NONCONST(val, type) \ - (void)((void)(((type)0) != (0 ? (val) : ((type)0))), _Generic((val), type : 0)) + (void)((void)(((type)0) != (0 ? (val) : ((type)0))), _Generic((val), type: 0)) #else # define CHECK_TYPE_INLINE_NONCONST(val, type) ((void)(((type)0) != (0 ? (val) : ((type)0)))) # define CHECK_TYPE_INLINE(val, type) ((void)(((type)0) != (0 ? (val) : ((type)0)))) diff --git a/source/blender/blenlib/BLI_dot_export.hh b/source/blender/blenlib/BLI_dot_export.hh index 8d3d547b0bf724a19d8d35f673d0c1b5d8eca88e..e8b82049e766a2e7808b2a723bc5d15a72fb0000 100644 --- a/source/blender/blenlib/BLI_dot_export.hh +++ b/source/blender/blenlib/BLI_dot_export.hh @@ -248,10 +248,8 @@ struct NodeWithSockets { std::string name; std::optional<std::string> fontcolor; }; - struct Input : public Socket { - }; - struct Output : public Socket { - }; + struct Input : public Socket {}; + struct Output : public Socket {}; std::string node_name; Vector<Input> inputs; diff --git a/source/blender/blenlib/BLI_generic_virtual_array.hh b/source/blender/blenlib/BLI_generic_virtual_array.hh index 2893f975fe78c6b1647c8d060234fd94172765dc..e9cf2092d1c92da80c53bb0771cdf802b78fd580 100644 --- a/source/blender/blenlib/BLI_generic_virtual_array.hh +++ b/source/blender/blenlib/BLI_generic_virtual_array.hh @@ -229,7 +229,7 @@ class GVMutableArray : public GVArrayCommon { static GVMutableArray ForSpan(GMutableSpan span); operator GVArray() const &; - operator GVArray() &&noexcept; + operator GVArray() && noexcept; GVMutableArray &operator=(const GVMutableArray &other); GVMutableArray &operator=(GVMutableArray &&other) noexcept; diff --git a/source/blender/blenlib/BLI_hash.hh b/source/blender/blenlib/BLI_hash.hh index f5ba7128ff2b6567018bc89e07254fa0c8a80584..af88d5c5061ecbbff0d8e12ea0a48a663caebb65 100644 --- a/source/blender/blenlib/BLI_hash.hh +++ b/source/blender/blenlib/BLI_hash.hh @@ -255,10 +255,8 @@ template<typename T> struct PointerHashes { } }; -template<typename T> struct DefaultHash<std::unique_ptr<T>> : public PointerHashes<T> { -}; -template<typename T> struct DefaultHash<std::shared_ptr<T>> : public PointerHashes<T> { -}; +template<typename T> struct DefaultHash<std::unique_ptr<T>> : public PointerHashes<T> {}; +template<typename T> struct DefaultHash<std::shared_ptr<T>> : public PointerHashes<T> {}; template<typename T> struct DefaultHash<std::reference_wrapper<T>> { uint64_t operator()(const std::reference_wrapper<T> &value) const diff --git a/source/blender/blenlib/BLI_hash_tables.hh b/source/blender/blenlib/BLI_hash_tables.hh index f7b6386e33116896ae9a499962a96228c2d135c9..978358670d0a3b455fbd9ce0b0bbddd693846da0 100644 --- a/source/blender/blenlib/BLI_hash_tables.hh +++ b/source/blender/blenlib/BLI_hash_tables.hh @@ -327,10 +327,8 @@ struct PointerComparison { } }; -template<typename T> struct DefaultEquality<std::unique_ptr<T>> : public PointerComparison { -}; -template<typename T> struct DefaultEquality<std::shared_ptr<T>> : public PointerComparison { -}; +template<typename T> struct DefaultEquality<std::unique_ptr<T>> : public PointerComparison {}; +template<typename T> struct DefaultEquality<std::shared_ptr<T>> : public PointerComparison {}; struct SequenceComparison { template<typename T1, typename T2> bool operator()(const T1 &a, const T2 &b) const @@ -347,7 +345,6 @@ struct SequenceComparison { }; template<typename T, int64_t InlineBufferCapacity, typename Allocator> -struct DefaultEquality<Vector<T, InlineBufferCapacity, Allocator>> : public SequenceComparison { -}; +struct DefaultEquality<Vector<T, InlineBufferCapacity, Allocator>> : public SequenceComparison {}; } // namespace blender diff --git a/source/blender/blenlib/BLI_map_slots.hh b/source/blender/blenlib/BLI_map_slots.hh index 58ff68b87b16fc39d534c6de7e45241f49f22d2e..816ab95f552d0dc296163c20a640aa8b160424e6 100644 --- a/source/blender/blenlib/BLI_map_slots.hh +++ b/source/blender/blenlib/BLI_map_slots.hh @@ -96,8 +96,8 @@ template<typename Key, typename Value> class SimpleMapSlot { * from the other have to moved as well. The other slot stays in the state it was in before. Its * optionally stored key and value remain in a moved-from state. */ - SimpleMapSlot(SimpleMapSlot &&other) noexcept( - std::is_nothrow_move_constructible_v<Key> &&std::is_nothrow_move_constructible_v<Value>) + SimpleMapSlot(SimpleMapSlot &&other) noexcept(std::is_nothrow_move_constructible_v<Key> && + std::is_nothrow_move_constructible_v<Value>) { state_ = other.state_; if (other.state_ == Occupied) { diff --git a/source/blender/blenlib/BLI_math_color.h b/source/blender/blenlib/BLI_math_color.h index 420fbb9a11d07512321c8ab9c01a28f7c4f7d973..d841a9d1ae3fc89865b56352efc524b753c1efb2 100644 --- a/source/blender/blenlib/BLI_math_color.h +++ b/source/blender/blenlib/BLI_math_color.h @@ -177,7 +177,7 @@ MINLINE void float_to_byte_dither_v3( unsigned char b[3], const float f[3], float dither, float s, float t); #define rgba_char_args_set_fl(col, r, g, b, a) \ - rgba_char_args_set(col, (r)*255, (g)*255, (b)*255, (a)*255) + rgba_char_args_set(col, (r) * 255, (g) * 255, (b) * 255, (a) * 255) #define rgba_float_args_set_ch(col, r, g, b, a) \ rgba_float_args_set(col, (r) / 255.0f, (g) / 255.0f, (b) / 255.0f, (a) / 255.0f) diff --git a/source/blender/blenlib/BLI_memory_utils.hh b/source/blender/blenlib/BLI_memory_utils.hh index bec02817f2509be5988469dbcd2d65217065b419..0f3768ebf4e166e34f5a2708cafc2e0706b67508 100644 --- a/source/blender/blenlib/BLI_memory_utils.hh +++ b/source/blender/blenlib/BLI_memory_utils.hh @@ -117,8 +117,7 @@ template<typename T> using destruct_ptr = std::unique_ptr<T, DestructValueAtAddr * not be initialized by the default constructor. */ template<size_t Size, size_t Alignment> class AlignedBuffer { - struct Empty { - }; + struct Empty {}; struct alignas(Alignment) Sized { /* Don't create an empty array. This causes problems with some compilers. */ std::byte buffer_[Size > 0 ? Size : 1]; @@ -270,8 +269,7 @@ class alignas(ReservedAlignment) DynamicStackBuffer { * This can be used by container constructors. A parameter of this type should be used to indicate * that the constructor does not construct the elements. */ -class NoInitialization { -}; +class NoInitialization {}; /** * This can be used to mark a constructor of an object that does not throw exceptions. Other @@ -279,8 +277,7 @@ class NoInitialization { * With this, the destructor of the object will be called, even when the remaining constructor * throws. */ -class NoExceptConstructor { -}; +class NoExceptConstructor {}; /** * Helper variable that checks if a pointer type can be converted into another pointer type without @@ -288,8 +285,8 @@ class NoExceptConstructor { * Adding const or casting to a parent class is fine. */ template<typename From, typename To> -inline constexpr bool is_convertible_pointer_v = - std::is_convertible_v<From, To> &&std::is_pointer_v<From> &&std::is_pointer_v<To>; +inline constexpr bool is_convertible_pointer_v = std::is_convertible_v<From, To> && + std::is_pointer_v<From> && std::is_pointer_v<To>; /** * Helper variable that checks if a Span<From> can be converted to Span<To> safely, whereby From @@ -300,7 +297,7 @@ inline constexpr bool is_convertible_pointer_v = template<typename From, typename To> inline constexpr bool is_span_convertible_pointer_v = /* Make sure we are working with pointers. */ - std::is_pointer_v<From> &&std::is_pointer_v<To> && + std::is_pointer_v<From> && std::is_pointer_v<To> && (/* No casting is necessary when both types are the same. */ std::is_same_v<From, To> || /* Allow adding const to the underlying type. */ diff --git a/source/blender/blenlib/BLI_parameter_pack_utils.hh b/source/blender/blenlib/BLI_parameter_pack_utils.hh index 056f526d23d9f241de0cb8eafb1cac12d04f3de7..6602fb76c0424f6267d7becb8ad24248aaa92db2 100644 --- a/source/blender/blenlib/BLI_parameter_pack_utils.hh +++ b/source/blender/blenlib/BLI_parameter_pack_utils.hh @@ -96,8 +96,8 @@ template<typename T, T Value1, T Value2, size_t... Value1Indices, size_t... I> inline ValueSequence<T, (ValueSequence<size_t, Value1Indices...>::template contains<I>() ? Value1 : Value2)...> - make_two_value_sequence_impl(ValueSequence<size_t, Value1Indices...> /*value1_indices*/, - std::index_sequence<I...> /*indices*/) +make_two_value_sequence_impl(ValueSequence<size_t, Value1Indices...> /*value1_indices*/, + std::index_sequence<I...> /*indices*/) { return {}; }; diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index 509ac8604753458d6ae848f06e2fd07c8de5eb13..5e0ef9a67f6b2a3fbce6be2152bfd3ad50854ff5 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -878,10 +878,8 @@ extern bool BLI_memory_is_zero(const void *arr, size_t arr_size); namespace blender::blenlib_internal { /* A replacement for std::is_bounded_array_v until we go C++20. */ -template<class T> struct IsBoundedArray : std::false_type { -}; -template<class T, std::size_t N> struct IsBoundedArray<T[N]> : std::true_type { -}; +template<class T> struct IsBoundedArray : std::false_type {}; +template<class T, std::size_t N> struct IsBoundedArray<T[N]> : std::true_type {}; } // namespace blender::blenlib_internal diff --git a/source/blender/blenlib/BLI_utildefines_iter.h b/source/blender/blenlib/BLI_utildefines_iter.h index 0b993487c6170b975fc4792077ba73273c13500c..cae8a3010f30d18bdda79d059e146ea2ac4bb39a 100644 --- a/source/blender/blenlib/BLI_utildefines_iter.h +++ b/source/blender/blenlib/BLI_utildefines_iter.h @@ -26,6 +26,11 @@ * \note this is mainly useful for numbers that might not divide evenly into each other. */ #define BLI_FOREACH_SPARSE_RANGE(src, dst, i) \ - for (int _src = (src), _src2 = _src * 2, _dst2 = (dst)*2, _error = _dst2 - _src, i = 0, _delta; \ + for (int _src = (src), \ + _src2 = _src * 2, \ + _dst2 = (dst) * 2, \ + _error = _dst2 - _src, \ + i = 0, \ + _delta; \ ((void)(_delta = divide_floor_i(_error, _dst2)), (void)(i -= _delta), (i < _src)); \ _error -= (_delta * _dst2) + _src2) diff --git a/source/blender/blenlib/BLI_virtual_array.hh b/source/blender/blenlib/BLI_virtual_array.hh index 0042ddb46f72ebd4b6ee3e787e440631c41687d3..a74d5aa21c0ce59dfba52d1d8c359f716fa3e1fe 100644 --- a/source/blender/blenlib/BLI_virtual_array.hh +++ b/source/blender/blenlib/BLI_virtual_array.hh @@ -786,12 +786,9 @@ template<typename T> class VMutableArray; * construct the virtual array first and then move it into the vector. */ namespace varray_tag { -struct span { -}; -struct single_ref { -}; -struct single { -}; +struct span {}; +struct single_ref {}; +struct single {}; } // namespace varray_tag /** @@ -948,7 +945,7 @@ template<typename T> class VMutableArray : public VArrayCommon<T> { } /** Convert to a #VArray by moving. */ - operator VArray<T>() &&noexcept + operator VArray<T>() && noexcept { VArray<T> varray; varray.move_from(std::move(*this)); diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h index 4fe5d06c5e052cf2a056bcf9e70a0c5ce6a72543..c71964ded14bbcac70106718699ec8611cddac53 100644 --- a/source/blender/blenlib/BLI_winstuff.h +++ b/source/blender/blenlib/BLI_winstuff.h @@ -47,17 +47,17 @@ extern "C" { #endif #ifndef S_ISREG -# define S_ISREG(x) (((x)&_S_IFREG) == _S_IFREG) +# define S_ISREG(x) (((x) & _S_IFREG) == _S_IFREG) #endif #ifndef S_ISDIR -# define S_ISDIR(x) (((x)&_S_IFDIR) == _S_IFDIR) +# define S_ISDIR(x) (((x) & _S_IFDIR) == _S_IFDIR) #endif #if defined(_MSC_VER) # define R_OK 4 # define W_OK 2 /* Not accepted by `access()` on windows. */ -//# define X_OK 1 +// # define X_OK 1 # define F_OK 0 #endif diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c index 177275f762779182195e98d159ac7da15cc9f6fd..cda177beb3556a21ae9141df611a18054ab75d68 100644 --- a/source/blender/blenlib/intern/BLI_ghash.c +++ b/source/blender/blenlib/intern/BLI_ghash.c @@ -58,8 +58,8 @@ BLI_STATIC_ASSERT(ARRAY_SIZE(hashsizes) == GHASH_MAX_SIZE, "Invalid 'hashsizes' * about 25% - 30% quicker 'dynamic-topology' stroke drawing e.g.). * Min load #GHASH_LIMIT_SHRINK is a quarter of max load, to avoid resizing to quickly. */ -#define GHASH_LIMIT_GROW(_nbkt) (((_nbkt)*3) / 4) -#define GHASH_LIMIT_SHRINK(_nbkt) (((_nbkt)*3) / 16) +#define GHASH_LIMIT_GROW(_nbkt) (((_nbkt) * 3) / 4) +#define GHASH_LIMIT_SHRINK(_nbkt) (((_nbkt) * 3) / 16) /* WARNING! Keep in sync with ugly _gh_Entry in header!!! */ typedef struct Entry { diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index edd6139f1ee03f3e10b5a0228d4baf272e2d286c..b748ea3bfe76934e417d86267241b041eb1f9987 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -1578,7 +1578,8 @@ static void dfs_find_nearest_dfs(BVHNearestData *data, BVHNode *node) for (i = 0; i != node->node_num; i++) { if (calc_nearest_point_squared(data->proj, node->children[i], nearest) >= - data->nearest.dist_sq) { + data->nearest.dist_sq) + { continue; } dfs_find_nearest_dfs(data, node->children[i]); @@ -1587,7 +1588,8 @@ static void dfs_find_nearest_dfs(BVHNearestData *data, BVHNode *node) else { for (i = node->node_num - 1; i >= 0; i--) { if (calc_nearest_point_squared(data->proj, node->children[i], nearest) >= - data->nearest.dist_sq) { + data->nearest.dist_sq) + { continue; } dfs_find_nearest_dfs(data, node->children[i]); @@ -1642,7 +1644,8 @@ static void heap_find_nearest_begin(BVHNearestData *data, BVHNode *root) heap_find_nearest_inner(data, heap, root); while (!BLI_heapsimple_is_empty(heap) && - BLI_heapsimple_top_value(heap) < data->nearest.dist_sq) { + BLI_heapsimple_top_value(heap) < data->nearest.dist_sq) + { BVHNode *node = BLI_heapsimple_pop_min(heap); heap_find_nearest_inner(data, heap, node); } diff --git a/source/blender/blenlib/intern/array_store.c b/source/blender/blenlib/intern/array_store.c index 51c4aa8b3875afe3771eec5d9fcb1ccf71b6b628..fe574541e8b03ac976a6bc803a17e0ceb0ae955c 100644 --- a/source/blender/blenlib/intern/array_store.c +++ b/source/blender/blenlib/intern/array_store.c @@ -1223,7 +1223,8 @@ static BChunkList *bchunk_list_from_data_merge(const BArrayInfo *info, BLI_assert(i != i_prev); if ((cref != chunk_list_reference_last) && - bchunk_data_compare(cref->link, data, data_len, i_prev)) { + bchunk_data_compare(cref->link, data, data_len, i_prev)) + { bchunk_list_append(info, bs_mem, chunk_list, cref->link); ASSERT_CHUNKLIST_SIZE(chunk_list, i); ASSERT_CHUNKLIST_DATA(chunk_list, data); diff --git a/source/blender/blenlib/intern/array_utils.c b/source/blender/blenlib/intern/array_utils.c index 20abcfe3b801633d926d4a5d8deafecc5f15b719..9b7544ab94e2b0d673a99d1b15126c0ee38acfe8 100644 --- a/source/blender/blenlib/intern/array_utils.c +++ b/source/blender/blenlib/intern/array_utils.c @@ -241,7 +241,8 @@ bool _bli_array_iter_span(const void *arr, else { uint i_step = i_curr + 1; while ((i_step != arr_len) && - test_fn(POINTER_OFFSET(arr, i_step * arr_stride_uint), user_data)) { + test_fn(POINTER_OFFSET(arr, i_step * arr_stride_uint), user_data)) + { i_step_prev = i_step; i_step++; } diff --git a/source/blender/blenlib/intern/expr_pylike_eval.c b/source/blender/blenlib/intern/expr_pylike_eval.c index a3c3ac976ab35f9ef65e08c9444aa2fd12375310..2938f499768f9d4108389453189474bbdfe2eeb7 100644 --- a/source/blender/blenlib/intern/expr_pylike_eval.c +++ b/source/blender/blenlib/intern/expr_pylike_eval.c @@ -581,7 +581,8 @@ static bool parse_add_func(ExprParseState *state, eOpCode code, int args, void * CHECK_ERROR(args == 2); if (jmp_gap >= 2 && prev_ops[-2].opcode == OPCODE_CONST && - prev_ops[-1].opcode == OPCODE_CONST) { + prev_ops[-1].opcode == OPCODE_CONST) + { BinaryOpFunc func = funcptr; /* volatile because some compilers overly aggressive optimize this call out. @@ -818,7 +819,8 @@ static bool parse_unary(ExprParseState *state) if (args != opcode_arg_count(builtin_ops[i].op)) { for (int j = i + 1; builtin_ops[j].name; j++) { if (opcode_arg_count(builtin_ops[j].op) == args && - STREQ(builtin_ops[j].name, builtin_ops[i].name)) { + STREQ(builtin_ops[j].name, builtin_ops[i].name)) + { i = j; break; } diff --git a/source/blender/blenlib/intern/fileops_c.cc b/source/blender/blenlib/intern/fileops_c.cc index 3aae8892caf803c00918eca0887ba95990fb1883..77da8a127245716512257c6b9e4a219b088f4dad 100644 --- a/source/blender/blenlib/intern/fileops_c.cc +++ b/source/blender/blenlib/intern/fileops_c.cc @@ -1068,8 +1068,8 @@ static int delete_soft(const char *file, const char **error_message) Class NSStringClass = objc_getClass("NSString"); SEL stringWithUTF8StringSel = sel_registerName("stringWithUTF8String:"); - id pathString = (( - id(*)(Class, SEL, const char *))objc_msgSend)(NSStringClass, stringWithUTF8StringSel, file); + id pathString = ((id(*)(Class, SEL, const char *))objc_msgSend)( + NSStringClass, stringWithUTF8StringSel, file); Class NSFileManagerClass = objc_getClass("NSFileManager"); SEL defaultManagerSel = sel_registerName("defaultManager"); @@ -1080,8 +1080,8 @@ static int delete_soft(const char *file, const char **error_message) id nsurl = ((id(*)(Class, SEL, id))objc_msgSend)(NSURLClass, fileURLWithPathSel, pathString); SEL trashItemAtURLSel = sel_registerName("trashItemAtURL:resultingItemURL:error:"); - BOOL deleteSuccessful = (( - BOOL(*)(id, SEL, id, id, id))objc_msgSend)(fileManager, trashItemAtURLSel, nsurl, nil, nil); + BOOL deleteSuccessful = ((BOOL(*)(id, SEL, id, id, id))objc_msgSend)( + fileManager, trashItemAtURLSel, nsurl, nil, nil); if (deleteSuccessful) { ret = 0; diff --git a/source/blender/blenlib/intern/generic_virtual_array.cc b/source/blender/blenlib/intern/generic_virtual_array.cc index 6027273eceeb71ee45a91ce92997424b9f6c593c..e0812456da0a20db65001b4611cbcd9e3df4dbe2 100644 --- a/source/blender/blenlib/intern/generic_virtual_array.cc +++ b/source/blender/blenlib/intern/generic_virtual_array.cc @@ -758,7 +758,7 @@ GVMutableArray::operator GVArray() const & return varray; } -GVMutableArray::operator GVArray() &&noexcept +GVMutableArray::operator GVArray() && noexcept { GVArray varray; varray.move_from(std::move(*this)); diff --git a/source/blender/blenlib/intern/hash_md5.c b/source/blender/blenlib/intern/hash_md5.c index 821a11abd78a37ddeb1b9532042d4d092d66c7a8..cb745eeb41bbecce9e7d5ddd27524bd27e3dc2d9 100644 --- a/source/blender/blenlib/intern/hash_md5.c +++ b/source/blender/blenlib/intern/hash_md5.c @@ -71,7 +71,7 @@ struct md5_ctx { }; #ifdef __BIG_ENDIAN__ -# define SWAP(n) (((n) << 24) | (((n)&0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24)) +# define SWAP(n) (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24)) #else # define SWAP(n) (n) #endif diff --git a/source/blender/blenlib/intern/hash_mm2a.c b/source/blender/blenlib/intern/hash_mm2a.c index 634660c66ef85d7df72106d51df609770bd1c9ca..eeeccba43ccb5ee5baff4c901a6266e00b1fd889 100644 --- a/source/blender/blenlib/intern/hash_mm2a.c +++ b/source/blender/blenlib/intern/hash_mm2a.c @@ -30,7 +30,7 @@ (k) *= MM2A_M; \ (k) ^= (k) >> 24; \ (k) *= MM2A_M; \ - (h) = ((h)*MM2A_M) ^ (k); \ + (h) = ((h) * MM2A_M) ^ (k); \ } \ (void)0 diff --git a/source/blender/blenlib/intern/index_mask.cc b/source/blender/blenlib/intern/index_mask.cc index f5786d0e584ef0ce34e3215b863f9d4cb6f794c1..a21d3028382d98afaf8a76ed79cb5c84f5eaff3e 100644 --- a/source/blender/blenlib/intern/index_mask.cc +++ b/source/blender/blenlib/intern/index_mask.cc @@ -508,7 +508,8 @@ IndexMask IndexMask::from_indices(const Span<T> indices, IndexMaskMemory &memory return {}; } if (const std::optional<IndexRange> range = unique_sorted_indices::non_empty_as_range_try( - indices)) { + indices)) + { /* Fast case when the indices encode a single range. */ return *range; } diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c index d05988e1280a3f1522e33faa337d583bd1cf4237..92e756f604d3871a7975fc5a721770ee75304673 100644 --- a/source/blender/blenlib/intern/math_base_inline.c +++ b/source/blender/blenlib/intern/math_base_inline.c @@ -232,10 +232,7 @@ MINLINE signed char round_db_to_char(double a){_round_db_impl(a, signed char)} M short round_db_to_short(double a){_round_db_impl(a, short)} MINLINE unsigned short round_db_to_ushort(double a){_round_db_impl(a, unsigned short)} MINLINE int round_db_to_int(double a){_round_db_impl(a, int)} MINLINE - unsigned int round_db_to_uint(double a) -{ - _round_db_impl(a, unsigned int) -} + unsigned int round_db_to_uint(double a){_round_db_impl(a, unsigned int)} #undef _round_fl_impl #undef _round_db_impl @@ -261,10 +258,8 @@ MINLINE signed char round_db_to_char_clamp(double a){ unsigned short round_db_to_ushort_clamp(double a){ _round_clamp_db_impl(a, unsigned short, 0, USHRT_MAX)} MINLINE int round_db_to_int_clamp(double a){_round_clamp_db_impl(a, int, INT_MIN, INT_MAX)} MINLINE - unsigned int round_db_to_uint_clamp(double a) -{ - _round_clamp_db_impl(a, unsigned int, 0, UINT_MAX) -} + unsigned int round_db_to_uint_clamp(double a){ + _round_clamp_db_impl(a, unsigned int, 0, UINT_MAX)} #undef _round_clamp_fl_impl #undef _round_clamp_db_impl diff --git a/source/blender/blenlib/intern/mesh_boolean.cc b/source/blender/blenlib/intern/mesh_boolean.cc index 1b99e7c396b67d2ae7315b8295b3120caee7470e..a3a9567432846a87687591a2e8df67975b4b1e11 100644 --- a/source/blender/blenlib/intern/mesh_boolean.cc +++ b/source/blender/blenlib/intern/mesh_boolean.cc @@ -2459,7 +2459,8 @@ static IMesh extract_from_in_output_volume_diffs(const IMesh &tm_subdivided, bool adjacent_zero_volume_cell = cell_above.zero_volume() || cell_below.zero_volume(); any_zero_volume_cell |= adjacent_zero_volume_cell; if (cell_above.in_output_volume() ^ cell_below.in_output_volume() && - !adjacent_zero_volume_cell) { + !adjacent_zero_volume_cell) + { bool flip = cell_above.in_output_volume(); if (dbg_level > 0) { std::cout << "need tri " << t << " flip=" << flip << "\n"; diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c index 37da5110a220be0ba91d0a5f1d10be468d535ead..f771940f206682777293a8338c55b4f8f3830756 100644 --- a/source/blender/blenlib/intern/noise.c +++ b/source/blender/blenlib/intern/noise.c @@ -26,7 +26,7 @@ static float noise3_perlin(const float vec[3]); * \{ */ /* needed for voronoi */ -#define HASHPNT(x, y, z) hashpntf + 3 * hash[(hash[(hash[(z)&255] + (y)) & 255] + (x)) & 255] +#define HASHPNT(x, y, z) hashpntf + 3 * hash[(hash[(hash[(z) & 255] + (y)) & 255] + (x)) & 255] static const float hashpntf[768] = { 0.536902, 0.020915, 0.501445, 0.216316, 0.517036, 0.822466, 0.965315, 0.377313, 0.678764, 0.744545, 0.097731, 0.396357, 0.247202, 0.520897, 0.613396, 0.542124, 0.146813, 0.255489, @@ -779,7 +779,7 @@ static float noise3_perlin(const float vec[3]) b01 = p[i + by1]; b11 = p[j + by1]; -#define VALUE_AT(rx, ry, rz) ((rx)*q[0] + (ry)*q[1] + (rz)*q[2]) +#define VALUE_AT(rx, ry, rz) ((rx) * q[0] + (ry) * q[1] + (rz) * q[2]) #define SURVE(t) ((t) * (t) * (3.0f - 2.0f * (t))) /* lerp moved to improved perlin above */ diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index ec739dd3b0905786e53625d14ec8970623f103ac..af93fb8220559e37479e5d7c45d2600d50cf0f64 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -545,14 +545,16 @@ static uint scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int flag) if (eed->v1->f == SF_VERT_ZERO_LEN) { v1 = eed->v1; while ((eed->v1->f == SF_VERT_ZERO_LEN) && (eed->v1->tmp.v != v1) && - (eed->v1 != eed->v1->tmp.v)) { + (eed->v1 != eed->v1->tmp.v)) + { eed->v1 = eed->v1->tmp.v; } } if (eed->v2->f == SF_VERT_ZERO_LEN) { v2 = eed->v2; while ((eed->v2->f == SF_VERT_ZERO_LEN) && (eed->v2->tmp.v != v2) && - (eed->v2 != eed->v2->tmp.v)) { + (eed->v2 != eed->v2->tmp.v)) + { eed->v2 = eed->v2->tmp.v; } } diff --git a/source/blender/blenlib/intern/string_cursor_utf8.c b/source/blender/blenlib/intern/string_cursor_utf8.c index f049894ed4ff98f94513bc76149e8c08286afec5..d8c2f40f6335957b7afb34539c68c61f42a2f8d1 100644 --- a/source/blender/blenlib/intern/string_cursor_utf8.c +++ b/source/blender/blenlib/intern/string_cursor_utf8.c @@ -208,7 +208,8 @@ void BLI_str_cursor_step_utf8(const char *str, break; } if ((jump != STRCUR_JUMP_ALL) && - (delim_type != cursor_delim_type_utf8(str, str_maxlen, *pos))) { + (delim_type != cursor_delim_type_utf8(str, str_maxlen, *pos))) + { break; } } @@ -237,7 +238,8 @@ void BLI_str_cursor_step_utf8(const char *str, const int pos_prev = *pos; if (BLI_str_cursor_step_prev_utf8(str, str_maxlen, pos)) { if ((jump != STRCUR_JUMP_ALL) && - (delim_type != cursor_delim_type_utf8(str, str_maxlen, *pos))) { + (delim_type != cursor_delim_type_utf8(str, str_maxlen, *pos))) + { /* left only: compensate for index/change in direction */ if ((pos_orig - *pos) >= 1) { *pos = pos_prev; @@ -317,7 +319,8 @@ void BLI_str_cursor_step_utf32(const char32_t *str, while (*pos < str_maxlen) { if (BLI_str_cursor_step_next_utf32(str, str_maxlen, pos)) { if ((jump != STRCUR_JUMP_ALL) && - (delim_type != cursor_delim_type_unicode((uint)str[*pos]))) { + (delim_type != cursor_delim_type_unicode((uint)str[*pos]))) + { break; } } @@ -346,7 +349,8 @@ void BLI_str_cursor_step_utf32(const char32_t *str, const int pos_prev = *pos; if (BLI_str_cursor_step_prev_utf32(str, str_maxlen, pos)) { if ((jump != STRCUR_JUMP_ALL) && - (delim_type != cursor_delim_type_unicode((uint)str[*pos]))) { + (delim_type != cursor_delim_type_unicode((uint)str[*pos]))) + { /* left only: compensate for index/change in direction */ if ((pos_orig - *pos) >= 1) { *pos = pos_prev; diff --git a/source/blender/blenlib/intern/string_search.cc b/source/blender/blenlib/intern/string_search.cc index 33ffec78f11bc677629e302c5d02fff7d732841c..5b489f16a3afc5b1d5a435c644d14d373430089e 100644 --- a/source/blender/blenlib/intern/string_search.cc +++ b/source/blender/blenlib/intern/string_search.cc @@ -362,7 +362,8 @@ static std::optional<float> score_query_against_words(Span<StringRef> query_word { /* Try to match against word initials. */ if (std::optional<InitialsMatch> match = match_word_initials( - query_word, item, word_match_map)) { + query_word, item, word_match_map)) + { /* If the all matched words are in the main group, give the match a higher priority. */ bool all_main_group_matches = match->count_main_group_matches(item) == match->matched_word_indices.size(); diff --git a/source/blender/blenlib/tests/BLI_array_store_test.cc b/source/blender/blenlib/tests/BLI_array_store_test.cc index 6fafb5e53dc9f7d18b4359c855fe4bfb7d6668ab..29f07a421cba752074cecee4e03debb94e478c78 100644 --- a/source/blender/blenlib/tests/BLI_array_store_test.cc +++ b/source/blender/blenlib/tests/BLI_array_store_test.cc @@ -236,7 +236,8 @@ static void testbuffer_list_data_randomize(ListBase *lb, uint random_seed) static void testbuffer_list_store_populate(BArrayStore *bs, ListBase *lb) { for (TestBuffer *tb = (TestBuffer *)lb->first, *tb_prev = nullptr; tb; - tb_prev = tb, tb = tb->next) { + tb_prev = tb, tb = tb->next) + { tb->state = BLI_array_store_state_add( bs, tb->data, tb->data_len, (tb_prev ? tb_prev->state : nullptr)); } diff --git a/source/blender/blenlib/tests/performance/BLI_ghash_performance_test.cc b/source/blender/blenlib/tests/performance/BLI_ghash_performance_test.cc index 888c2965628c20634b6bd4a8c3e7db3d1af20dcc..5cd1f058428fbb239a38576cd1259234a9d22a9e 100644 --- a/source/blender/blenlib/tests/performance/BLI_ghash_performance_test.cc +++ b/source/blender/blenlib/tests/performance/BLI_ghash_performance_test.cc @@ -24,10 +24,10 @@ #endif /* Resizing the hash has a huge cost over global filling operation! */ -//#define GHASH_RESERVE +// #define GHASH_RESERVE /* Run the longest tests! */ -//#define GHASH_RUN_BIG +// #define GHASH_RUN_BIG /* Size of 'small case' ghash (number of entries). */ #define TESTCASE_SIZE_SMALL 17 diff --git a/source/blender/blenloader/intern/readfile.cc b/source/blender/blenloader/intern/readfile.cc index 003312bebafecbb9beb25a0aacce6308951b8f26..263ba4592f32b81515125e663d2f97fdfd1a2aa3 100644 --- a/source/blender/blenloader/intern/readfile.cc +++ b/source/blender/blenloader/intern/readfile.cc @@ -3319,7 +3319,8 @@ static void lib_link_all(FileData *fd, Main *bmain) const IDTypeInfo *id_type = BKE_idtype_get_info_from_id(id); if ((id->tag & (LIB_TAG_UNDO_OLD_ID_REUSED_UNCHANGED | LIB_TAG_UNDO_OLD_ID_REUSED_NOUNDO)) != - 0) { + 0) + { BLI_assert(fd->flags & FD_FLAGS_IS_MEMFILE); /* This ID has been re-used from 'old' bmain. Since it was therefore unchanged across * current undo step, and old IDs re-use their old memory address, we do not need to liblink diff --git a/source/blender/blenloader/intern/versioning_250.cc b/source/blender/blenloader/intern/versioning_250.cc index 0776839fc582e282f0cf6cf526eb3dde27009355..7bc3c3af71ee69882bf5dc8599985661765fedb0 100644 --- a/source/blender/blenloader/intern/versioning_250.cc +++ b/source/blender/blenloader/intern/versioning_250.cc @@ -1883,7 +1883,8 @@ void blo_do_versions_250(FileData *fd, Library * /*lib*/, Main *bmain) } LISTBASE_FOREACH (bNodeSocket *, sock, &node->outputs) { if (nodeCountSocketLinks(ntree, sock) == 0 && - !((sock->flag & (SOCK_HIDDEN | SOCK_UNAVAIL)) != 0)) { + !((sock->flag & (SOCK_HIDDEN | SOCK_UNAVAIL)) != 0)) + { bNodeSocket *gsock = do_versions_node_group_add_socket_2_56_2( ntree, sock->name, sock->type, SOCK_OUT); diff --git a/source/blender/blenloader/intern/versioning_260.cc b/source/blender/blenloader/intern/versioning_260.cc index 6b972535177c91a3b1ea75fd915374d057917cdb..354b65732af2efc28c24ed2810e4afd238b696d2 100644 --- a/source/blender/blenloader/intern/versioning_260.cc +++ b/source/blender/blenloader/intern/versioning_260.cc @@ -2824,10 +2824,12 @@ void blo_do_versions_260(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "MovieTrackingPlaneTrack", "float", "image_opacity")) { + fd->filesdna, "MovieTrackingPlaneTrack", "float", "image_opacity")) + { LISTBASE_FOREACH (MovieClip *, clip, &bmain->movieclips) { LISTBASE_FOREACH ( - MovieTrackingPlaneTrack *, plane_track, &clip->tracking.plane_tracks_legacy) { + MovieTrackingPlaneTrack *, plane_track, &clip->tracking.plane_tracks_legacy) + { plane_track->image_opacity = 1.0f; } } diff --git a/source/blender/blenloader/intern/versioning_270.cc b/source/blender/blenloader/intern/versioning_270.cc index 829c5528097eb76a8a18ec7d90f45c3961926787..fbc877f3b251c94cb964f5f2440b5e54301c5dde 100644 --- a/source/blender/blenloader/intern/versioning_270.cc +++ b/source/blender/blenloader/intern/versioning_270.cc @@ -508,7 +508,8 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "MovieTrackingSettings", "float", "default_weight")) { + fd->filesdna, "MovieTrackingSettings", "float", "default_weight")) + { LISTBASE_FOREACH (MovieClip *, clip, &bmain->movieclips) { clip->tracking.settings.default_weight = 1.0f; } @@ -1010,7 +1011,8 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) if (!MAIN_VERSION_FILE_ATLEAST(bmain, 276, 3)) { if (!DNA_struct_member_exists( - fd->filesdna, "RenderData", "CurveMapping", "mblur_shutter_curve")) { + fd->filesdna, "RenderData", "CurveMapping", "mblur_shutter_curve")) + { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { CurveMapping *curve_mapping = &scene->r.mblur_shutter_curve; BKE_curvemapping_set_defaults(curve_mapping, 1, 0.0f, 0.0f, 1.0f, 1.0f, HD_AUTO); @@ -1179,7 +1181,8 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) LISTBASE_FOREACH (Camera *, camera, &bmain->cameras) { if (camera->stereo.pole_merge_angle_from == 0.0f && - camera->stereo.pole_merge_angle_to == 0.0f) { + camera->stereo.pole_merge_angle_to == 0.0f) + { camera->stereo.pole_merge_angle_from = DEG2RADF(60.0f); camera->stereo.pole_merge_angle_to = DEG2RADF(75.0f); } @@ -1197,7 +1200,8 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "BooleanModifierData", "float", "double_threshold")) { + fd->filesdna, "BooleanModifierData", "float", "double_threshold")) + { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Boolean) { @@ -1306,7 +1310,8 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "MovieTrackingStabilization", "int", "tot_rot_track")) { + fd->filesdna, "MovieTrackingStabilization", "int", "tot_rot_track")) + { LISTBASE_FOREACH (MovieClip *, clip, &bmain->movieclips) { if (clip->tracking.stabilization.rot_track_legacy) { migrate_single_rot_stabilization_track_settings(&clip->tracking.stabilization); diff --git a/source/blender/blenloader/intern/versioning_280.cc b/source/blender/blenloader/intern/versioning_280.cc index ef7fb3747e415fc3c17ef9c967e14e88e05f608b..3235d7db48540c78c9f9a475f38451f6f3252b76 100644 --- a/source/blender/blenloader/intern/versioning_280.cc +++ b/source/blender/blenloader/intern/versioning_280.cc @@ -1404,7 +1404,8 @@ static void update_vector_math_node_dot_product_operator(bNodeTree *ntree) if (node->type == SH_NODE_VECTOR_MATH) { bNodeSocket *sockOutVector = nodeFindSocket(node, SOCK_OUT, "Vector"); if (version_node_socket_is_used(sockOutVector) && - node->custom1 == NODE_VECTOR_MATH_DOT_PRODUCT) { + node->custom1 == NODE_VECTOR_MATH_DOT_PRODUCT) + { LISTBASE_FOREACH_MUTABLE (bNodeLink *, link, &ntree->links) { if (link->fromsock == sockOutVector) { switch (link->tosock->type) { @@ -3096,7 +3097,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } else if (node->type == SH_NODE_EEVEE_SPECULAR && - STREQ(node->idname, "ShaderNodeOutputSpecular")) { + STREQ(node->idname, "ShaderNodeOutputSpecular")) + { STRNCPY(node->idname, "ShaderNodeEeveeSpecular"); error |= eNTreeDoVersionErrors::NTREE_DOVERSION_NEED_OUTPUT; } @@ -3161,7 +3163,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) /* Grease pencil multi-frame falloff curve. */ if (!DNA_struct_member_exists( - fd->filesdna, "GP_Sculpt_Settings", "CurveMapping", "cur_falloff")) { + fd->filesdna, "GP_Sculpt_Settings", "CurveMapping", "cur_falloff")) + { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { /* sculpt brushes */ GP_Sculpt_Settings *gset = &scene->toolsettings->gp_sculpt; @@ -3201,7 +3204,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 3)) { /* init grease pencil grids and paper */ if (!DNA_struct_member_exists( - fd->filesdna, "View3DOverlay", "float", "gpencil_paper_color[3]")) { + fd->filesdna, "View3DOverlay", "float", "gpencil_paper_color[3]")) + { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -3325,7 +3329,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) if (area->spacetype == SPACE_INFO) { if ((area->v2->vec.y == win_height) && (area->v1->vec.x == 0) && - (area->v4->vec.x == win_width)) { + (area->v4->vec.x == win_width)) + { BKE_screen_area_free(area); BLI_remlink(&screen->areabase, area); @@ -3886,7 +3891,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "RigidBodyWorld", "RigidBodyWorld_Shared", "*shared")) { + fd->filesdna, "RigidBodyWorld", "RigidBodyWorld_Shared", "*shared")) + { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { RigidBodyWorld *rbw = scene->rigidbody_world; @@ -4531,7 +4537,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 36)) { if (!DNA_struct_member_exists( - fd->filesdna, "View3DShading", "float", "curvature_ridge_factor")) { + fd->filesdna, "View3DShading", "float", "curvature_ridge_factor")) + { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -4594,7 +4601,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) /* Grease pencil primitive curve */ if (!DNA_struct_member_exists( - fd->filesdna, "GP_Sculpt_Settings", "CurveMapping", "cur_primitive")) { + fd->filesdna, "GP_Sculpt_Settings", "CurveMapping", "cur_primitive")) + { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { GP_Sculpt_Settings *gset = &scene->toolsettings->gp_sculpt; if ((gset) && (gset->cur_primitive == nullptr)) { @@ -4722,7 +4730,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 40)) { if (!DNA_struct_member_exists( - fd->filesdna, "ToolSettings", "char", "snap_transform_mode_flag")) { + fd->filesdna, "ToolSettings", "char", "snap_transform_mode_flag")) + { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { scene->toolsettings->snap_transform_mode_flag = SCE_SNAP_TRANSFORM_MODE_TRANSLATE; } @@ -5154,7 +5163,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "View3DOverlay", "float", "sculpt_mode_mask_opacity")) { + fd->filesdna, "View3DOverlay", "float", "sculpt_mode_mask_opacity")) + { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -5489,7 +5499,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) region_ui->flag |= RGN_FLAG_DYNAMIC_SIZE; if (region_toolprops && - (region_toolprops->alignment == (RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV))) { + (region_toolprops->alignment == (RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV))) + { SpaceType *stype = BKE_spacetype_from_id(sl->spacetype); /* Remove empty region at old location. */ @@ -5575,7 +5586,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "LayerCollection", "short", "local_collections_bits")) { + fd->filesdna, "LayerCollection", "short", "local_collections_bits")) + { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { LISTBASE_FOREACH (ViewLayer *, view_layer, &scene->view_layers) { LISTBASE_FOREACH (LayerCollection *, layer_collection, &view_layer->layer_collections) { @@ -6082,7 +6094,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } case eGpencilModifierType_Thick: { if (!DNA_struct_member_exists( - fd->filesdna, "ThickGpencilModifierData", "float", "thickness_fac")) { + fd->filesdna, "ThickGpencilModifierData", "float", "thickness_fac")) + { ThickGpencilModifierData *mmd = (ThickGpencilModifierData *)md; mmd->thickness_fac = mmd->thickness; } @@ -6275,7 +6288,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) if (!MAIN_VERSION_FILE_ATLEAST(bmain, 283, 14)) { /* Solidify modifier merge tolerance. */ if (!DNA_struct_member_exists( - fd->filesdna, "SolidifyModifierData", "float", "merge_tolerance")) { + fd->filesdna, "SolidifyModifierData", "float", "merge_tolerance")) + { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Solidify) { diff --git a/source/blender/blenloader/intern/versioning_290.cc b/source/blender/blenloader/intern/versioning_290.cc index db9ff3f75bf9905afebd483f70dd2ef52b42d658..75bdcfd5232bd75ff0a7bd9f4db4ec1eaa7c9a41 100644 --- a/source/blender/blenloader/intern/versioning_290.cc +++ b/source/blender/blenloader/intern/versioning_290.cc @@ -1118,7 +1118,8 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) /* Initialize additional velocity parameter for #CacheFile's. */ if (!DNA_struct_member_exists( - fd->filesdna, "MeshSeqCacheModifierData", "float", "velocity_scale")) { + fd->filesdna, "MeshSeqCacheModifierData", "float", "velocity_scale")) + { LISTBASE_FOREACH (Object *, object, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &object->modifiers) { if (md->type == eModifierType_MeshSequenceCache) { @@ -1331,7 +1332,8 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) if (!DNA_struct_member_exists(fd->filesdna, "WorkSpaceDataRelation", "int", "parentid")) { LISTBASE_FOREACH (WorkSpace *, workspace, &bmain->workspaces) { LISTBASE_FOREACH_MUTABLE ( - WorkSpaceDataRelation *, relation, &workspace->hook_layout_relations) { + WorkSpaceDataRelation *, relation, &workspace->hook_layout_relations) + { relation->parent = blo_read_get_new_globaldata_address(fd, relation->parent); BLI_assert(relation->parentid == 0); if (relation->parent != nullptr) { @@ -1395,7 +1397,8 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "FluidModifierData", "float", "fractions_distance")) { + fd->filesdna, "FluidModifierData", "float", "fractions_distance")) + { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Fluid) { diff --git a/source/blender/blenloader/intern/versioning_300.cc b/source/blender/blenloader/intern/versioning_300.cc index de27a5292d85927692fae21794f851805483996c..11a22d0a4aca6f640a3dd590525ee39fde984025 100644 --- a/source/blender/blenloader/intern/versioning_300.cc +++ b/source/blender/blenloader/intern/versioning_300.cc @@ -1181,7 +1181,8 @@ void do_versions_after_linking_300(FileData * /*fd*/, Main *bmain) SOCK_OBJECT, SOCK_COLLECTION, SOCK_TEXTURE, - SOCK_MATERIAL)) { + SOCK_MATERIAL)) + { link->tosock = link->tosock->next; } } @@ -2644,7 +2645,8 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 13)) { /* Convert Surface Deform to sparse-capable bind structure. */ if (!DNA_struct_member_exists( - fd->filesdna, "SurfaceDeformModifierData", "int", "mesh_verts_num")) { + fd->filesdna, "SurfaceDeformModifierData", "int", "mesh_verts_num")) + { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_SurfaceDeform) { @@ -2671,7 +2673,8 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "WorkSpace", "AssetLibraryReference", "asset_library")) { + fd->filesdna, "WorkSpace", "AssetLibraryReference", "asset_library")) + { LISTBASE_FOREACH (WorkSpace *, workspace, &bmain->workspaces) { BKE_asset_library_reference_init_default(&workspace->asset_library_ref); } diff --git a/source/blender/blenloader/intern/versioning_400.cc b/source/blender/blenloader/intern/versioning_400.cc index 142e341a07ba752e591bd3eadccc17f81ab9b26f..454b583a99e00c9c0a26e2d802e52620bb49f541 100644 --- a/source/blender/blenloader/intern/versioning_400.cc +++ b/source/blender/blenloader/intern/versioning_400.cc @@ -550,7 +550,8 @@ static void version_mesh_crease_generic(Main &bmain) LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { if (STR_ELEM(node->idname, "GeometryNodeStoreNamedAttribute", - "GeometryNodeInputNamedAttribute")) { + "GeometryNodeInputNamedAttribute")) + { bNodeSocket *socket = nodeFindSocket(node, SOCK_IN, "Name"); if (STREQ(socket->default_value_typed<bNodeSocketValueString>()->value, "crease")) { STRNCPY(socket->default_value_typed<bNodeSocketValueString>()->value, "crease_edge"); @@ -982,7 +983,8 @@ static void versioning_replace_musgrave_texture_node(bNodeTree *ntree) else { if (*detail < 1.0f) { if ((noise_type != SHD_NOISE_RIDGED_MULTIFRACTAL) && - (noise_type != SHD_NOISE_HETERO_TERRAIN)) { + (noise_type != SHD_NOISE_HETERO_TERRAIN)) + { /* Add Multiply Math node behind Fac output. */ bNode *mul_node = nodeAddStaticNode(nullptr, ntree, SH_NODE_MATH); @@ -2192,7 +2194,8 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain) RegionAssetShelf *shelf_data = static_cast<RegionAssetShelf *>(region->regiondata); if (shelf_data && shelf_data->active_shelf && - (shelf_data->active_shelf->preferred_row_count == 0)) { + (shelf_data->active_shelf->preferred_row_count == 0)) + { shelf_data->active_shelf->preferred_row_count = 1; } } @@ -2208,7 +2211,8 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain) if (item.item_type == NODE_INTERFACE_SOCKET) { bNodeTreeInterfaceSocket &socket = reinterpret_cast<bNodeTreeInterfaceSocket &>(item); if ((socket.flag & NODE_INTERFACE_SOCKET_INPUT) && - (socket.flag & NODE_INTERFACE_SOCKET_OUTPUT)) { + (socket.flag & NODE_INTERFACE_SOCKET_OUTPUT)) + { sockets_to_split.append(&socket); } } @@ -2569,7 +2573,8 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain) /* Keep this block, even when empty. */ if (!DNA_struct_member_exists( - fd->filesdna, "SceneEEVEE", "RaytraceEEVEE", "ray_tracing_options")) { + fd->filesdna, "SceneEEVEE", "RaytraceEEVEE", "ray_tracing_options")) + { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { scene->eevee.ray_tracing_options.flag = RAYTRACE_EEVEE_USE_DENOISE; scene->eevee.ray_tracing_options.denoise_stages = RAYTRACE_EEVEE_DENOISE_SPATIAL | diff --git a/source/blender/blenloader/intern/versioning_defaults.cc b/source/blender/blenloader/intern/versioning_defaults.cc index 6eb71dfbab0dc9777a6615101b28957d0f701b42..69b06a08d0144dc344cc979cd75035167d4c89cc 100644 --- a/source/blender/blenloader/intern/versioning_defaults.cc +++ b/source/blender/blenloader/intern/versioning_defaults.cc @@ -223,7 +223,8 @@ static void blo_update_defaults_screen(bScreen *screen, LISTBASE_FOREACH (ARegion *, region, regionbase) { if (region->regiontype == RGN_TYPE_TOOL_HEADER) { if (((sl->spacetype == SPACE_IMAGE) && hide_image_tool_header) || - sl->spacetype == SPACE_SEQ) { + sl->spacetype == SPACE_SEQ) + { region->flag |= RGN_FLAG_HIDDEN; } else { @@ -359,7 +360,8 @@ static void blo_update_defaults_scene(Main *bmain, Scene *scene) /* Correct default startup UVs. */ Mesh *mesh = static_cast<Mesh *>(BLI_findstring(&bmain->meshes, "Cube", offsetof(ID, name) + 2)); if (mesh && (mesh->corners_num == 24) && - CustomData_has_layer(&mesh->corner_data, CD_PROP_FLOAT2)) { + CustomData_has_layer(&mesh->corner_data, CD_PROP_FLOAT2)) + { const float uv_values[24][2] = { {0.625, 0.50}, {0.875, 0.50}, {0.875, 0.75}, {0.625, 0.75}, {0.375, 0.75}, {0.625, 0.75}, {0.625, 1.00}, {0.375, 1.00}, {0.375, 0.00}, {0.625, 0.00}, {0.625, 0.25}, {0.375, 0.25}, diff --git a/source/blender/blenloader/intern/versioning_legacy.cc b/source/blender/blenloader/intern/versioning_legacy.cc index 5a874ee90254c00b72883b106515bbe257ed80e4..f605df85a24ff9978747d0f897b3a8c2af56d13c 100644 --- a/source/blender/blenloader/intern/versioning_legacy.cc +++ b/source/blender/blenloader/intern/versioning_legacy.cc @@ -237,7 +237,8 @@ static void idproperties_fix_groups_lengths_recurse(IDProperty *prop) int i; for (loop = static_cast<IDProperty *>(prop->data.group.first), i = 0; loop; - loop = loop->next, i++) { + loop = loop->next, i++) + { if (loop->type == IDP_GROUP) { idproperties_fix_groups_lengths_recurse(loop); } @@ -1248,7 +1249,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* softbody init new vars */ for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { if (ob->soft) { if (ob->soft->defgoal == 0.0f) { ob->soft->defgoal = 0.7f; @@ -1282,7 +1284,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { if (ob->parent) { Object *parent = static_cast<Object *>( blo_do_versions_newlibadr(fd, &ob->id, ID_IS_LINKED(ob), ob->parent)); @@ -1390,7 +1393,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { PartEff *paf; LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { @@ -1407,7 +1411,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) ModifierData *md = static_cast<ModifierData *>(ob->modifiers.first); while (md && BKE_modifier_get_info(ModifierType(md->type))->type == - ModifierTypeType::OnlyDeform) { + ModifierTypeType::OnlyDeform) + { md = md->next; } @@ -1478,7 +1483,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } for (key = static_cast<Key *>(bmain->shapekeys.first); key; - key = static_cast<Key *>(key->id.next)) { + key = static_cast<Key *>(key->id.next)) + { int index = 1; LISTBASE_FOREACH (KeyBlock *, kb, &key->block) { @@ -1506,7 +1512,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* deformflag is local in modifier now */ for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Armature) { ArmatureModifierData *amd = (ArmatureModifierData *)md; @@ -1608,7 +1615,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* for empty drawsize and drawtype */ for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { if (ob->empty_drawsize == 0.0f) { ob->empty_drawtype = OB_ARROWS; ob->empty_drawsize = 1.0; @@ -1690,7 +1698,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* add default radius values to old curve points */ for (cu = static_cast<Curve *>(bmain->curves.first); cu; - cu = static_cast<Curve *>(cu->id.next)) { + cu = static_cast<Curve *>(cu->id.next)) + { LISTBASE_FOREACH (Nurb *, nu, &cu->nurb) { if (nu->bezt) { for (bezt = nu->bezt, a = 0; a < nu->pntsu; a++, bezt++) { @@ -1710,7 +1719,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { ListBase *list; list = &ob->constraints; @@ -1822,7 +1832,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } for (tex = static_cast<Tex *>(bmain->textures.first); tex; - tex = static_cast<Tex *>(tex->id.next)) { + tex = static_cast<Tex *>(tex->id.next)) + { enum { TEX_ANIMCYCLIC = (1 << 6), TEX_ANIM5 = (1 << 7), @@ -1961,7 +1972,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) ((bmain->versionfile < 245) || (bmain->versionfile == 245 && bmain->subversionfile == 0))) { for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { ListBase *list; list = &ob->constraints; @@ -2036,7 +2048,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* add point caches */ for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { if (ob->soft && !ob->soft->pointcache) { ob->soft->pointcache = BKE_ptcache_add(&ob->soft->ptcaches); } @@ -2044,7 +2057,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) LISTBASE_FOREACH (ParticleSystem *, psys, &ob->particlesystem) { if (psys->pointcache) { if (psys->pointcache->flag & PTCACHE_BAKED && - (psys->pointcache->flag & PTCACHE_DISK_CACHE) == 0) { + (psys->pointcache->flag & PTCACHE_DISK_CACHE) == 0) + { printf("Old memory cache isn't supported for particles, so re-bake the simulation!\n"); psys->pointcache->flag &= ~PTCACHE_BAKED; } @@ -2111,7 +2125,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } for (tex = static_cast<Tex *>(bmain->textures.first); tex; - tex = static_cast<Tex *>(tex->id.next)) { + tex = static_cast<Tex *>(tex->id.next)) + { if (tex->iuser.flag & IMA_OLD_PREMUL) { tex->iuser.flag &= ~IMA_OLD_PREMUL; } @@ -2147,7 +2162,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Armature) { ((ArmatureModifierData *)md)->deformflag |= ARM_DEF_B_BONE_REST; @@ -2184,7 +2200,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) Object *ob; for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { if (ob->pose) { LISTBASE_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) { do_version_constraints_245(&pchan->constraints); @@ -2216,7 +2233,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) PartEff *paf = nullptr; for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { if (ob->soft && ob->soft->keys) { SoftBody *sb = ob->soft; int k; @@ -2383,7 +2401,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* dupliface scale */ for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { ob->instance_faces_scale = 1.0f; } } @@ -2393,7 +2412,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* NLA-strips - scale. */ for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { LISTBASE_FOREACH (bActionStrip *, strip, &ob->nlastrips) { float length, actlength, repeat; @@ -2468,7 +2488,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) Object *ob; for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { if (ob->fluidsimSettings) { FluidsimModifierData *fluidmd = (FluidsimModifierData *)BKE_modifier_new( eModifierType_Fluidsim); @@ -2490,7 +2511,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) if (!MAIN_VERSION_FILE_ATLEAST(bmain, 246, 1)) { Object *ob; for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { if (ob->pd && (ob->pd->forcefield == PFIELD_WIND)) { ob->pd->f_noise = 0.0f; } @@ -2502,7 +2524,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) Curve *cu; for (cu = static_cast<Curve *>(bmain->curves.first); cu; - cu = static_cast<Curve *>(cu->id.next)) { + cu = static_cast<Curve *>(cu->id.next)) + { LISTBASE_FOREACH (Nurb *, nu, &cu->nurb) { nu->radius_interp = 3; @@ -2567,7 +2590,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) if (bmain->versionfile < 249 && bmain->subversionfile < 1) { Object *ob; for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { if (ob->pd) { ob->pd->seed = (uint(ceil(PIL_check_seconds_timer())) + 1) % 128; } diff --git a/source/blender/blenloader/tests/blendfile_load_test.cc b/source/blender/blenloader/tests/blendfile_load_test.cc index 8ae9934bc2548bb5220b9348f62918c01805a34c..0c7042afeb68f18ab4b5d1ffefe246dc63e0f4dc 100644 --- a/source/blender/blenloader/tests/blendfile_load_test.cc +++ b/source/blender/blenloader/tests/blendfile_load_test.cc @@ -5,8 +5,7 @@ #include "BLI_path_util.h" -class BlendfileLoadingTest : public BlendfileLoadingBaseTest { -}; +class BlendfileLoadingTest : public BlendfileLoadingBaseTest {}; TEST_F(BlendfileLoadingTest, CanaryTest) { diff --git a/source/blender/blentranslation/BLT_translation.h b/source/blender/blentranslation/BLT_translation.h index 8d122cf46e6746b7c001740d1a029d7910fa010c..6104d0abde9e0f415aaf3c43ee31ec78fd21b988 100644 --- a/source/blender/blentranslation/BLT_translation.h +++ b/source/blender/blentranslation/BLT_translation.h @@ -144,7 +144,7 @@ typedef struct { #define BLT_I18NCONTEXTS_ITEM(ctxt_id, py_id) \ { \ -# ctxt_id, py_id, ctxt_id \ + #ctxt_id, py_id, ctxt_id \ } #define BLT_I18NCONTEXTS_DESC \ diff --git a/source/blender/bmesh/bmesh_class.hh b/source/blender/bmesh/bmesh_class.hh index fc752e80c1cc039dd463d92fe12dc6d2c2284d55..d4a7a822d6bd4f0d3a2bf6d1de95135501f25a0c 100644 --- a/source/blender/bmesh/bmesh_class.hh +++ b/source/blender/bmesh/bmesh_class.hh @@ -534,10 +534,10 @@ typedef bool (*BMLoopPairFilterFunc)(const BMLoop *, const BMLoop *, void *user_ # define BM_ELEM_CD_GET_BOOL_P(ele, offset) \ (BLI_assert(offset != -1), \ _Generic(ele, \ - GENERIC_TYPE_ANY((bool *)POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_NONCONST), \ - GENERIC_TYPE_ANY((const bool *)POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_CONST))) + GENERIC_TYPE_ANY((bool *)POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_NONCONST), \ + GENERIC_TYPE_ANY((const bool *)POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_CONST))) #else # define BM_ELEM_CD_GET_BOOL_P(ele, offset) \ (BLI_assert(offset != -1), (bool *)((char *)(ele)->head.data + (offset))) @@ -547,10 +547,9 @@ typedef bool (*BMLoopPairFilterFunc)(const BMLoop *, const BMLoop *, void *user_ # define BM_ELEM_CD_GET_VOID_P(ele, offset) \ (BLI_assert(offset != -1), \ _Generic(ele, \ - GENERIC_TYPE_ANY(POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_NONCONST), \ - GENERIC_TYPE_ANY((const void *)POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_CONST))) + GENERIC_TYPE_ANY(POINTER_OFFSET((ele)->head.data, offset), _BM_GENERIC_TYPE_ELEM_NONCONST), \ + GENERIC_TYPE_ANY((const void *)POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_CONST))) #else # define BM_ELEM_CD_GET_VOID_P(ele, offset) \ (BLI_assert(offset != -1), (void *)((char *)(ele)->head.data + (offset))) @@ -572,26 +571,26 @@ typedef bool (*BMLoopPairFilterFunc)(const BMLoop *, const BMLoop *, void *user_ # define BM_ELEM_CD_GET_FLOAT_P(ele, offset) \ (BLI_assert(offset != -1), \ _Generic(ele, \ - GENERIC_TYPE_ANY((float *)POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_NONCONST), \ - GENERIC_TYPE_ANY((const float *)POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_CONST))) + GENERIC_TYPE_ANY((float *)POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_NONCONST), \ + GENERIC_TYPE_ANY((const float *)POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_CONST))) # define BM_ELEM_CD_GET_FLOAT2_P(ele, offset) \ (BLI_assert(offset != -1), \ _Generic(ele, \ - GENERIC_TYPE_ANY((float(*)[2])POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_NONCONST), \ - GENERIC_TYPE_ANY((const float(*)[2])POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_CONST))) + GENERIC_TYPE_ANY((float(*)[2])POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_NONCONST), \ + GENERIC_TYPE_ANY((const float(*)[2])POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_CONST))) # define BM_ELEM_CD_GET_FLOAT3_P(ele, offset) \ (BLI_assert(offset != -1), \ _Generic(ele, \ - GENERIC_TYPE_ANY((float(*)[3])POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_NONCONST), \ - GENERIC_TYPE_ANY((const float(*)[3])POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_CONST))) + GENERIC_TYPE_ANY((float(*)[3])POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_NONCONST), \ + GENERIC_TYPE_ANY((const float(*)[3])POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_CONST))) #else diff --git a/source/blender/bmesh/intern/bmesh_core.cc b/source/blender/bmesh/intern/bmesh_core.cc index 9f5715dee676f0690294758043929814d0fe55c2..641c950bcc9f70deebbe7c29c93acde4d792199e 100644 --- a/source/blender/bmesh/intern/bmesh_core.cc +++ b/source/blender/bmesh/intern/bmesh_core.cc @@ -675,7 +675,8 @@ int bmesh_elem_check(void *element, const char htype) } if (l_iter->e && l_iter->v) { if (!BM_vert_in_edge(l_iter->e, l_iter->v) || - !BM_vert_in_edge(l_iter->e, l_iter->next->v)) { + !BM_vert_in_edge(l_iter->e, l_iter->next->v)) + { err |= IS_FACE_LOOP_VERT_NOT_IN_EDGE; } diff --git a/source/blender/bmesh/intern/bmesh_edgeloop.cc b/source/blender/bmesh/intern/bmesh_edgeloop.cc index 781b0b72df3beef0e1502afd141baebb493fd039..4eb2bb6dc49e0b0e9393123647b7239fe6a423a0 100644 --- a/source/blender/bmesh/intern/bmesh_edgeloop.cc +++ b/source/blender/bmesh/intern/bmesh_edgeloop.cc @@ -554,7 +554,8 @@ void BM_edgeloop_edges_get(BMEdgeLoopStore *el_store, BMEdge **e_arr) LinkData *node; int i = 0; for (node = static_cast<LinkData *>(el_store->verts.first); node && node->next; - node = node->next) { + node = node->next) + { e_arr[i++] = BM_edge_exists(NODE_AS_V(node), NODE_AS_V(node->next)); BLI_assert(e_arr[i - 1] != nullptr); } diff --git a/source/blender/bmesh/intern/bmesh_mesh.cc b/source/blender/bmesh/intern/bmesh_mesh.cc index 16c11f24d8c47db91c81084fbad545c2084f077c..5474003ea74ac5a90ea2be82d0c8b683a020ab26 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.cc +++ b/source/blender/bmesh/intern/bmesh_mesh.cc @@ -767,7 +767,8 @@ void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const static_cast<void **>(MEM_mallocN(sizeof(void *) * totvert, __func__)) : nullptr; for (i = totvert, ve = verts_copy + totvert - 1, vep = verts_pool + totvert - 1; i--; - ve--, vep--) { + ve--, vep--) + { *ve = **vep; // printf("*vep: %p, verts_pool[%d]: %p\n", *vep, i, verts_pool[i]); if (cd_vert_pyptr != -1) { @@ -823,7 +824,8 @@ void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const static_cast<void **>(MEM_mallocN(sizeof(void *) * totedge, __func__)) : nullptr; for (i = totedge, ed = edges_copy + totedge - 1, edp = edges_pool + totedge - 1; i--; - ed--, edp--) { + ed--, edp--) + { *ed = **edp; if (cd_edge_pyptr != -1) { void **pyptr = static_cast<void **>(BM_ELEM_CD_GET_VOID_P(((BMElem *)ed), cd_edge_pyptr)); @@ -878,7 +880,8 @@ void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const static_cast<void **>(MEM_mallocN(sizeof(void *) * totface, __func__)) : nullptr; for (i = totface, fa = faces_copy + totface - 1, fap = faces_pool + totface - 1; i--; - fa--, fap--) { + fa--, fap--) + { *fa = **fap; if (cd_poly_pyptr != -1) { void **pyptr = static_cast<void **>(BM_ELEM_CD_GET_VOID_P(((BMElem *)fa), cd_poly_pyptr)); diff --git a/source/blender/bmesh/intern/bmesh_mesh_convert.cc b/source/blender/bmesh/intern/bmesh_mesh_convert.cc index 8a4a16c8c0b8a88c3c1303bd6e07440fca1621c7..bc433d16a6050bcb36a1e18c4d55744c5a3deac7 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_convert.cc +++ b/source/blender/bmesh/intern/bmesh_mesh_convert.cc @@ -237,7 +237,8 @@ void BM_mesh_bm_from_me(BMesh *bm, const Mesh *mesh, const BMeshFromMeshParams * blender::Vector<std::string> temporary_layers_to_delete; for (const int layer_index : - IndexRange(CustomData_number_of_layers(&mesh_ldata, CD_PROP_FLOAT2))) { + IndexRange(CustomData_number_of_layers(&mesh_ldata, CD_PROP_FLOAT2))) + { char name[MAX_CUSTOMDATA_LAYER_NAME]; BKE_uv_map_vert_select_name_get( CustomData_get_layer_name(&mesh_ldata, CD_PROP_FLOAT2, layer_index), name); diff --git a/source/blender/bmesh/intern/bmesh_mesh_normals.cc b/source/blender/bmesh/intern/bmesh_mesh_normals.cc index 83aa6316a8fe5e87a8fe38cc3dd1b9fa6f959370..bc33063bae4f446aca3679f92eb3ad582e1b20be 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_normals.cc +++ b/source/blender/bmesh/intern/bmesh_mesh_normals.cc @@ -1849,7 +1849,8 @@ void BM_lnorspace_rebuild(BMesh *bm, bool preserve_clnor) BM_ITER_MESH (f, &fiter, bm, BM_FACES_OF_MESH) { BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) { if (BM_ELEM_API_FLAG_TEST(l, BM_LNORSPACE_UPDATE) || - bm->spacearr_dirty & BM_SPACEARR_DIRTY_ALL) { + bm->spacearr_dirty & BM_SPACEARR_DIRTY_ALL) + { short(*clnor)[2] = static_cast<short(*)[2]>( BM_ELEM_CD_GET_VOID_P(l, cd_loop_clnors_offset)); int l_index = BM_elem_index_get(l); @@ -1879,7 +1880,8 @@ void BM_lnorspace_rebuild(BMesh *bm, bool preserve_clnor) BM_ITER_MESH (f, &fiter, bm, BM_FACES_OF_MESH) { BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) { if (BM_ELEM_API_FLAG_TEST(l, BM_LNORSPACE_UPDATE) || - bm->spacearr_dirty & BM_SPACEARR_DIRTY_ALL) { + bm->spacearr_dirty & BM_SPACEARR_DIRTY_ALL) + { if (preserve_clnor) { short(*clnor)[2] = static_cast<short(*)[2]>( BM_ELEM_CD_GET_VOID_P(l, cd_loop_clnors_offset)); diff --git a/source/blender/bmesh/intern/bmesh_operators.cc b/source/blender/bmesh/intern/bmesh_operators.cc index 4e344e6dba84334fcd13eb9460d731286146c7b9..dc4493acc708256cd32af5a5a62a5c4b8812ae9d 100644 --- a/source/blender/bmesh/intern/bmesh_operators.cc +++ b/source/blender/bmesh/intern/bmesh_operators.cc @@ -101,7 +101,8 @@ static void bmo_op_slots_init(const BMOSlotType *slot_types, BMOpSlot *slot_args case BMO_OP_SLOT_INT: if (ELEM(slot->slot_subtype.intg, BMO_OP_SLOT_SUBTYPE_INT_ENUM, - BMO_OP_SLOT_SUBTYPE_INT_FLAG)) { + BMO_OP_SLOT_SUBTYPE_INT_FLAG)) + { slot->data.enum_data.flags = slot_types[i].enum_flags; /* Set the first value of the enum as the default value. */ slot->data.i = slot->data.enum_data.flags[0].value; diff --git a/source/blender/bmesh/intern/bmesh_polygon.cc b/source/blender/bmesh/intern/bmesh_polygon.cc index 4a99c1eb61460a2d75c0694b60e8237975d17d7a..b5c6c88a48c2da62472ae2ad65238dabf28b5cb2 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.cc +++ b/source/blender/bmesh/intern/bmesh_polygon.cc @@ -1261,7 +1261,8 @@ void BM_face_splits_check_legal(BMesh *bm, BMFace *f, BMLoop *(*loops)[2], int l for (j = i + 1; j < len; j++) { if ((loops[j][0] != nullptr) && !EDGE_SHARE_VERT(edgeverts[i], edgeverts[j])) { if (isect_seg_seg_v2(UNPACK2(edgeverts[i]), UNPACK2(edgeverts[j])) == - ISECT_LINE_LINE_CROSS) { + ISECT_LINE_LINE_CROSS) + { loops[i][0] = nullptr; break; } diff --git a/source/blender/bmesh/intern/bmesh_polygon_edgenet.cc b/source/blender/bmesh/intern/bmesh_polygon_edgenet.cc index 026f6b7f28b846b1bb1e31464f35066336caab4e..f881a67dfdde85d8e3b42954d2be28199fecbc65 100644 --- a/source/blender/bmesh/intern/bmesh_polygon_edgenet.cc +++ b/source/blender/bmesh/intern/bmesh_polygon_edgenet.cc @@ -427,7 +427,8 @@ static bool bm_face_split_edgenet_find_loop(BMVert *v_init, (bm_edge_flagged_radial_count(e_pair[1]) == 1)); if (bm_face_split_edgenet_find_loop_walk( - v_init, face_normal, edge_order, edge_order_len, e_pair)) { + v_init, face_normal, edge_order, edge_order_len, e_pair)) + { uint i = 0; r_face_verts[i++] = v_init; @@ -823,7 +824,8 @@ static void bvhtree_test_edges_isect_2d_ray_cb(void *user_data, /* direction is normalized, so this will be the distance */ float dist_new; if (isect_ray_seg_v2( - data->v_origin->co, ray->direction, e->v1->co, e->v2->co, &dist_new, nullptr)) { + data->v_origin->co, ray->direction, e->v1->co, e->v2->co, &dist_new, nullptr)) + { /* avoid float precision issues, possible this is greater, * check above zero to allow some overlap * (and needed for partial-connect which will overlap vertices) */ @@ -998,7 +1000,8 @@ static int bm_face_split_edgenet_find_connection(const EdgeGroup_FindConnection_ BMVert *v_pair[2]; /* ensure the closest vertex is popped back off the stack first */ if (len_squared_v2v2(v_origin->co, e_hit->v1->co) > - len_squared_v2v2(v_origin->co, e_hit->v2->co)) { + len_squared_v2v2(v_origin->co, e_hit->v2->co)) + { ARRAY_SET_ITEMS(v_pair, e_hit->v1, e_hit->v2); } else { diff --git a/source/blender/bmesh/intern/bmesh_query.cc b/source/blender/bmesh/intern/bmesh_query.cc index f7eb76f7bdadd99065d39046424a8f854c767a1d..1d007e574ae8136fbc747a7cc2e1c2707afab581 100644 --- a/source/blender/bmesh/intern/bmesh_query.cc +++ b/source/blender/bmesh/intern/bmesh_query.cc @@ -155,7 +155,8 @@ BMFace *BM_vert_pair_shared_face_cb(BMVert *v_a, BMFace *f = l_a->f; l_b = BM_face_vert_share_loop(f, v_b); if (l_b && (allow_adjacent || !BM_loop_is_adjacent(l_a, l_b)) && - callback(f, l_a, l_b, user_data)) { + callback(f, l_a, l_b, user_data)) + { *r_l_a = l_a; *r_l_b = l_b; @@ -2206,7 +2207,8 @@ int BM_mesh_calc_face_groups(BMesh *bm, do { BMLoop *l_radial_iter = l_iter->radial_next; if ((l_radial_iter != l_iter) && - ((filter_fn == nullptr) || filter_fn(l_iter, user_data))) { + ((filter_fn == nullptr) || filter_fn(l_iter, user_data))) + { do { if ((filter_pair_fn == nullptr) || filter_pair_fn(l_iter, l_radial_iter, user_data)) { diff --git a/source/blender/bmesh/intern/bmesh_walkers_impl.cc b/source/blender/bmesh/intern/bmesh_walkers_impl.cc index 6326bd7012d618eb5ead472817eef5339c6d2cf6..9f5b020b9861f6ab6b325b294f34fd1af5236af2 100644 --- a/source/blender/bmesh/intern/bmesh_walkers_impl.cc +++ b/source/blender/bmesh/intern/bmesh_walkers_impl.cc @@ -1078,7 +1078,8 @@ static void *bmw_EdgeLoopWalker_step(BMWalker *walker) if (l != nullptr) { if (l != e->l && bmw_mask_check_edge(walker, l->e) && - !BLI_gset_haskey(walker->visit_set, l->e)) { + !BLI_gset_haskey(walker->visit_set, l->e)) + { lwalk = static_cast<BMwEdgeLoopWalker *>(BMW_state_add(walker)); lwalk->cur = l->e; lwalk->lastv = v; @@ -1129,7 +1130,8 @@ static void *bmw_EdgeLoopWalker_step(BMWalker *walker) if (l != nullptr) { if (l != e->l && bmw_mask_check_edge(walker, l->e) && - !BLI_gset_haskey(walker->visit_set, l->e)) { + !BLI_gset_haskey(walker->visit_set, l->e)) + { lwalk = static_cast<BMwEdgeLoopWalker *>(BMW_state_add(walker)); lwalk->cur = l->e; lwalk->lastv = v; diff --git a/source/blender/bmesh/operators/bmo_connect_pair.cc b/source/blender/bmesh/operators/bmo_connect_pair.cc index c2cf6d3acaf90d57e00f377faa7e31bd4556df4f..9a7de247d93590834d04c4f9ff8a3cf65657c886 100644 --- a/source/blender/bmesh/operators/bmo_connect_pair.cc +++ b/source/blender/bmesh/operators/bmo_connect_pair.cc @@ -344,7 +344,8 @@ static PathLinkState *state_step__face_edges(PathContext *pc, BMElem *ele_next_from = (BMElem *)l_iter->f; if (FACE_WALK_TEST((BMFace *)ele_next_from) && - (ELE_TOUCH_TEST_EDGE((BMEdge *)ele_next) == false)) { + (ELE_TOUCH_TEST_EDGE((BMEdge *)ele_next) == false)) + { min_dist_dir_update(mddir, dist_dir); mddir->dist_min[index] = dist_test; l_iter_best[index] = l_iter; @@ -389,7 +390,8 @@ static PathLinkState *state_step__face_verts(PathContext *pc, BMElem *ele_next_from = (BMElem *)l_iter->f; if (FACE_WALK_TEST((BMFace *)ele_next_from) && - (ELE_TOUCH_TEST_VERT((BMVert *)ele_next) == false)) { + (ELE_TOUCH_TEST_VERT((BMVert *)ele_next) == false)) + { min_dist_dir_update(mddir, dist_dir); mddir->dist_min[index] = dist_test; l_iter_best[index] = l_iter; diff --git a/source/blender/bmesh/operators/bmo_dissolve.cc b/source/blender/bmesh/operators/bmo_dissolve.cc index 4ce95b85beba498267b6fef7abca6e503239c67b..7a8b255ff632c37a42b838c1a2ee72afa0a4bb6a 100644 --- a/source/blender/bmesh/operators/bmo_dissolve.cc +++ b/source/blender/bmesh/operators/bmo_dissolve.cc @@ -566,7 +566,8 @@ void bmo_dissolve_degenerate_exec(BMesh *bm, BMOperator *op) /* add a joining edge and tag for removal */ BMLoop *l_split; if (BM_face_split( - bm, l_iter->f, l_iter->prev, l_iter->next, &l_split, nullptr, true)) { + bm, l_iter->f, l_iter->prev, l_iter->next, &l_split, nullptr, true)) + { BMO_edge_flag_enable(bm, l_split->e, EDGE_COLLAPSE); found = true; reset = true; @@ -582,7 +583,8 @@ void bmo_dissolve_degenerate_exec(BMesh *bm, BMOperator *op) BLI_assert(v_new == l_iter->next->v); (void)v_new; if (BM_face_split( - bm, l_iter->f, l_iter->prev, l_iter->next, &l_split, nullptr, true)) { + bm, l_iter->f, l_iter->prev, l_iter->next, &l_split, nullptr, true)) + { BMO_edge_flag_enable(bm, l_split->e, EDGE_COLLAPSE); found = true; } @@ -597,7 +599,8 @@ void bmo_dissolve_degenerate_exec(BMesh *bm, BMOperator *op) BLI_assert(v_new == l_iter->prev->v); (void)v_new; if (BM_face_split( - bm, l_iter->f, l_iter->prev, l_iter->next, &l_split, nullptr, true)) { + bm, l_iter->f, l_iter->prev, l_iter->next, &l_split, nullptr, true)) + { BMO_edge_flag_enable(bm, l_split->e, EDGE_COLLAPSE); found = true; } diff --git a/source/blender/bmesh/operators/bmo_dupe.cc b/source/blender/bmesh/operators/bmo_dupe.cc index 87ffe841933eb638d18a23b7c1aa38c2fc2248ac..c7d63578b1ac3a867b54a7bca2f7c182ee6f75e6 100644 --- a/source/blender/bmesh/operators/bmo_dupe.cc +++ b/source/blender/bmesh/operators/bmo_dupe.cc @@ -247,7 +247,8 @@ static void bmo_mesh_copy(BMOperator *op, BMesh *bm_dst, BMesh *bm_src) /* duplicate flagged vertices */ BM_ITER_MESH (v, &viter, bm_src, BM_VERTS_OF_MESH) { if (BMO_vert_flag_test(bm_src, v, DUPE_INPUT) && - BMO_vert_flag_test(bm_src, v, DUPE_DONE) == false) { + BMO_vert_flag_test(bm_src, v, DUPE_DONE) == false) + { BMIter iter; bool isolated = true; @@ -280,7 +281,8 @@ static void bmo_mesh_copy(BMOperator *op, BMesh *bm_dst, BMesh *bm_src) /* now we dupe all the edges */ BM_ITER_MESH (e, &eiter, bm_src, BM_EDGES_OF_MESH) { if (BMO_edge_flag_test(bm_src, e, DUPE_INPUT) && - BMO_edge_flag_test(bm_src, e, DUPE_DONE) == false) { + BMO_edge_flag_test(bm_src, e, DUPE_DONE) == false) + { /* make sure that verts are copied */ if (!BMO_vert_flag_test(bm_src, e->v1, DUPE_DONE)) { bmo_vert_copy(op, slot_vert_map_out, bm_dst, cd_vert_map, e->v1, vhash); diff --git a/source/blender/bmesh/operators/bmo_fill_grid.cc b/source/blender/bmesh/operators/bmo_fill_grid.cc index 553baa471567a859c44e9fbdc99ae03ce9c40871..864df11a05ac8e72ca46ae166871633eb1fcedb2 100644 --- a/source/blender/bmesh/operators/bmo_fill_grid.cc +++ b/source/blender/bmesh/operators/bmo_fill_grid.cc @@ -540,7 +540,8 @@ static void bm_grid_fill(BMesh *bm, for (i = 0; i < 4; i++) { LinkData *el_next; for (el = static_cast<LinkData *>(lb_iter[i]->first); el && (el_next = el->next); - el = el->next) { + el = el->next) + { BMEdge *e = BM_edge_exists(static_cast<BMVert *>(el->data), static_cast<BMVert *>(el_next->data)); if (BM_edge_is_boundary(e)) { diff --git a/source/blender/bmesh/operators/bmo_hull.cc b/source/blender/bmesh/operators/bmo_hull.cc index 4191d0399c603c8626c29283fec5ac6dcecb739a..288fe37bbfdfd12ad4a574c419019bb2c52230f7 100644 --- a/source/blender/bmesh/operators/bmo_hull.cc +++ b/source/blender/bmesh/operators/bmo_hull.cc @@ -138,7 +138,8 @@ static void hull_output_triangles(BMesh *bm, BLI_mempool *hull_triangles) const int next = (i == 2 ? 0 : i + 1); BMEdge *e = BM_edge_exists(t->v[i], t->v[next]); if (e && BMO_edge_flag_test(bm, e, HULL_FLAG_INPUT) && - !BMO_edge_flag_test(bm, e, HULL_FLAG_HOLE)) { + !BMO_edge_flag_test(bm, e, HULL_FLAG_HOLE)) + { BMO_edge_flag_enable(bm, e, HULL_FLAG_OUTPUT_GEOM); } } diff --git a/source/blender/bmesh/operators/bmo_inset.cc b/source/blender/bmesh/operators/bmo_inset.cc index f12a85a9b562f00177eb2826520b4c1471345c45..23c2fabbb76166efd3c274d76587f221f9899382 100644 --- a/source/blender/bmesh/operators/bmo_inset.cc +++ b/source/blender/bmesh/operators/bmo_inset.cc @@ -904,7 +904,8 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op) /* find adjacent */ BM_ITER_ELEM (e, &iter, v_split, BM_EDGES_OF_VERT) { if (BM_elem_flag_test(e, BM_ELEM_TAG) && e->l && - BM_elem_flag_test(e->l->f, BM_ELEM_TAG)) { + BM_elem_flag_test(e->l->f, BM_ELEM_TAG)) + { if (vert_edge_tag_tot < 2) { vecpair[vert_edge_tag_tot] = BM_elem_index_get(e); BLI_assert(vecpair[vert_edge_tag_tot] != -1); diff --git a/source/blender/bmesh/operators/bmo_offset_edgeloops.cc b/source/blender/bmesh/operators/bmo_offset_edgeloops.cc index b94cc1a6e12edb2738ce017c6e46fbdead5e5f86..2f9a31d597f1c2049b8fae78e1930f8dc6635cf4 100644 --- a/source/blender/bmesh/operators/bmo_offset_edgeloops.cc +++ b/source/blender/bmesh/operators/bmo_offset_edgeloops.cc @@ -52,7 +52,8 @@ static BMFace *bm_face_split_walk_back(BMesh *bm, BMLoop *l_src, BMLoop **r_l) cos = BLI_array_alloca(cos, num); for (l_dst = l_src->prev, i = 0; BM_elem_index_get(l_dst->prev->v) != -1; - l_dst = l_dst->prev, i++) { + l_dst = l_dst->prev, i++) + { copy_v3_v3(cos[num - (i + 1)], l_dst->v->co); } diff --git a/source/blender/bmesh/operators/bmo_removedoubles.cc b/source/blender/bmesh/operators/bmo_removedoubles.cc index c8e22cecc974b13e2f0e5e91a4b6db040d4b3902..9225ffaaad9eb45a688de7de1fc705d86f1d2c9b 100644 --- a/source/blender/bmesh/operators/bmo_removedoubles.cc +++ b/source/blender/bmesh/operators/bmo_removedoubles.cc @@ -140,7 +140,7 @@ static BMFace *remdoubles_createface(BMesh *bm, #undef LOOP_MAP_VERT_INIT } -finally : { +finally: { uint i; for (i = 0; i < STACK_SIZE(verts); i++) { BMO_vert_flag_disable(bm, verts[i], VERT_IN_FACE); diff --git a/source/blender/bmesh/operators/bmo_subdivide_edgering.cc b/source/blender/bmesh/operators/bmo_subdivide_edgering.cc index 07bccc1f2433be874cb2c4745fc71849fcc4837f..f921b3a0b370798f3fd3abafcb12640f95bd12e8 100644 --- a/source/blender/bmesh/operators/bmo_subdivide_edgering.cc +++ b/source/blender/bmesh/operators/bmo_subdivide_edgering.cc @@ -641,7 +641,8 @@ static void bm_edgering_pair_interpolate(BMesh *bm, LinkData *v_iter; for (v_iter = static_cast<LinkData *>(lb_ring->first), i = 0; v_iter; - v_iter = v_iter->next, i++) { + v_iter = v_iter->next, i++) + { if (i > 0 && i < resolu - 1) { /* shape */ if (falloff_cache) { diff --git a/source/blender/bmesh/tools/bmesh_bevel.cc b/source/blender/bmesh/tools/bmesh_bevel.cc index 8f0f9fec4f0652576d0f5ae14686a828079dd9e3..cc7a9626c67c80f2068eb7acf19dfd008cb028b9 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.cc +++ b/source/blender/bmesh/tools/bmesh_bevel.cc @@ -58,7 +58,7 @@ using blender::Vector; #define BEVEL_MAX_AUTO_ADJUST_PCT 300.0f #define BEVEL_MATCH_SPEC_WEIGHT 0.2 -//#define DEBUG_CUSTOM_PROFILE_CUTOFF +// #define DEBUG_CUSTOM_PROFILE_CUTOFF /* Happens far too often, uncomment for development. */ // #define BEVEL_ASSERT_PROJECT @@ -2299,7 +2299,8 @@ static void check_edge_data_seam_sharp_edges(BevVert *bv, int flag, bool neg) /* If no such edge found, return. */ if ((!neg && !BEV_EXTEND_EDGE_DATA_CHECK(e, flag)) || - (neg && BEV_EXTEND_EDGE_DATA_CHECK(e, flag))) { + (neg && BEV_EXTEND_EDGE_DATA_CHECK(e, flag))) + { return; } @@ -6750,7 +6751,8 @@ static bool bev_rebuild_polygon(BMesh *bm, BevelParams *bp, BMFace *f) } /* Actually want "sharp" to be contiguous, so reverse the test. */ if (!BM_elem_flag_test(ee[k], BM_ELEM_SMOOTH) && - BM_elem_flag_test(bme_prev, BM_ELEM_SMOOTH)) { + BM_elem_flag_test(bme_prev, BM_ELEM_SMOOTH)) + { BM_elem_flag_enable(bme_new, BM_ELEM_SMOOTH); } } diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.cc b/source/blender/bmesh/tools/bmesh_decimate_collapse.cc index bd4310e75e49ea2eaba27cc9777783534fbf6e47..2fe912a2d54b290e2ef8b410241f2ad248ed3edd 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_collapse.cc +++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.cc @@ -687,7 +687,7 @@ static void bm_edge_collapse_loop_customdata( { /* Disable seam check - the seam check would have to be done per layer, * its not really that important. */ - //#define USE_SEAM + // #define USE_SEAM /* these don't need to be updated, since they will get removed when the edge collapses */ BMLoop *l_clear, *l_other; const bool is_manifold = BM_edge_is_manifold(l->e); @@ -789,7 +789,7 @@ static void bm_edge_collapse_loop_customdata( } } - //#undef USE_SEAM + // #undef USE_SEAM } #endif /* USE_CUSTOMDATA */ diff --git a/source/blender/bmesh/tools/bmesh_decimate_dissolve.cc b/source/blender/bmesh/tools/bmesh_decimate_dissolve.cc index fdf5e288df0d427ae7166d3098b7f50160a37716..380b4d116f8cde8e681ac6d876ee457c32ca1c5c 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_dissolve.cc +++ b/source/blender/bmesh/tools/bmesh_decimate_dissolve.cc @@ -513,7 +513,8 @@ void BM_mesh_decimate_dissolve_ex(BMesh *bm, do { const int j = BM_elem_index_get(l_cycle_iter->v); if (j != -1 && vheap_table[j] && - (BLI_heap_node_value(vheap_table[j]) == COST_INVALID)) { + (BLI_heap_node_value(vheap_table[j]) == COST_INVALID)) + { const float cost = bm_vert_edge_face_angle( l_cycle_iter->v, delimit, &delimit_data); BLI_heap_node_value_update(vheap, vheap_table[j], cost); diff --git a/source/blender/bmesh/tools/bmesh_edgenet.cc b/source/blender/bmesh/tools/bmesh_edgenet.cc index ac461cb5002248bbcb5197d77fd01434c9d1a12e..4136dadff3fcdc873dc1c873cdf5666df82ae49a 100644 --- a/source/blender/bmesh/tools/bmesh_edgenet.cc +++ b/source/blender/bmesh/tools/bmesh_edgenet.cc @@ -200,7 +200,8 @@ begin: if (vn_curr->pass == -vn_next->pass) { if ((vn_curr->flag & VNINFO_FLAG_IS_MIXFACE) || - (vn_next->flag & VNINFO_FLAG_IS_MIXFACE)) { + (vn_next->flag & VNINFO_FLAG_IS_MIXFACE)) + { /* found connecting edge */ if (bm_edgenet_path_check_overlap(v_curr, v_next, vnet_info) == false) { return e; diff --git a/source/blender/bmesh/tools/bmesh_intersect.cc b/source/blender/bmesh/tools/bmesh_intersect.cc index de805730b53bcaf51b7c6ea6652489df39bd7492..719ada88ed9754c92eb2105f9c5fe8b7636ee7c0 100644 --- a/source/blender/bmesh/tools/bmesh_intersect.cc +++ b/source/blender/bmesh/tools/bmesh_intersect.cc @@ -315,7 +315,8 @@ static enum ISectType intersect_line_tri(const float p0[3], /* check ray isn't planar with tri */ if (fabsf(dot_v3v3(p_dir, t_nor)) >= e->eps) { if (isect_line_segment_tri_epsilon_v3( - p0, p1, t_cos[0], t_cos[1], t_cos[2], &fac, nullptr, 0.0f)) { + p0, p1, t_cos[0], t_cos[1], t_cos[2], &fac, nullptr, 0.0f)) + { if ((fac >= e->eps_margin) && (fac <= 1.0f - e->eps_margin)) { interp_v3_v3v3(r_ix, p0, p1, fac); if (min_fff(len_squared_v3v3(t_cos[0], r_ix), @@ -1426,7 +1427,8 @@ bool BM_mesh_intersect(BMesh *bm, !BLI_gset_haskey(verts_invalid, splice_ls[i][1])) { if (!BM_edge_exists(UNPACK2(splice_ls[i])) && - !BM_vert_splice_check_double(UNPACK2(splice_ls[i]))) { + !BM_vert_splice_check_double(UNPACK2(splice_ls[i]))) + { BM_vert_splice(bm, splice_ls[i][1], splice_ls[i][0]); } } diff --git a/source/blender/bmesh/tools/bmesh_intersect_edges.cc b/source/blender/bmesh/tools/bmesh_intersect_edges.cc index e2df87686e4915e7598e10e5e9a99e90db4be699..7d52ed9c40cc2a936219b30bec59680ff323eb03 100644 --- a/source/blender/bmesh/tools/bmesh_intersect_edges.cc +++ b/source/blender/bmesh/tools/bmesh_intersect_edges.cc @@ -21,7 +21,7 @@ #include "bmesh_intersect_edges.hh" /* own include */ -//#define INTERSECT_EDGES_DEBUG +// #define INTERSECT_EDGES_DEBUG #define KDOP_TREE_TYPE 4 #define KDOP_AXIS_LEN 14 @@ -316,7 +316,8 @@ static bool bm_edgexvert_isect_cb(void *userdata, int index_a, int index_b, int EDBMSplitElem pair_tmp[2]; if (bm_edgexvert_isect_impl( - v, e, co, dir, lambda, data->dist_sq, &data->cut_edges_len, pair_tmp)) { + v, e, co, dir, lambda, data->dist_sq, &data->cut_edges_len, pair_tmp)) + { EDBMSplitElem *pair = static_cast<EDBMSplitElem *>(BLI_stack_push_r(data->pair_stack[thread])); pair[0] = pair_tmp[0]; pair[1] = pair_tmp[1]; @@ -718,7 +719,7 @@ bool BM_mesh_intersect_edges( int cuts_index[]; }; int as_int[0]; - } * e_map_iter, *e_map; + } *e_map_iter, *e_map; # ifdef INTERSECT_EDGES_DEBUG int cut_edges_len = 0; @@ -965,7 +966,8 @@ bool BM_mesh_intersect_edges( edgenet[0] = BM_edge_create(bm, va_dest, vb, e_net, BM_CREATE_NOP); } if ((edgenet_len > 1) && (v_other_dest != v_other) && - !BM_edge_exists(v_other_dest, v_other)) { + !BM_edge_exists(v_other_dest, v_other)) + { /** * <pre> * ---v---v_other @@ -987,7 +989,8 @@ bool BM_mesh_intersect_edges( continue; } if (!BM_elem_flag_test(e_test->v1, BM_ELEM_TAG) && - !BM_elem_flag_test(e_test->v2, BM_ELEM_TAG)) { + !BM_elem_flag_test(e_test->v2, BM_ELEM_TAG)) + { continue; } /* Avoids endless loop. */ diff --git a/source/blender/bmesh/tools/bmesh_region_match.cc b/source/blender/bmesh/tools/bmesh_region_match.cc index d3387226b28ed9536ce64c818145d6c5c2b59000..5e170a41993c402fd520d14406574fded1a05784 100644 --- a/source/blender/bmesh/tools/bmesh_region_match.cc +++ b/source/blender/bmesh/tools/bmesh_region_match.cc @@ -677,7 +677,8 @@ static bool bm_uuidwalk_facestep_begin(UUIDWalk *uuidwalk, UUIDFaceStep *fstep) static void bm_uuidwalk_facestep_end(UUIDWalk *uuidwalk, UUIDFaceStep *fstep) { while ( - UUIDFaceStepItem *fstep_item = static_cast<UUIDFaceStepItem *>(BLI_pophead(&fstep->items))) { + UUIDFaceStepItem *fstep_item = static_cast<UUIDFaceStepItem *>(BLI_pophead(&fstep->items))) + { BLI_mempool_free(uuidwalk->step_pool_items, fstep_item); } } @@ -735,7 +736,8 @@ static BMFace **bm_mesh_region_match_pair( /* setup the initial state */ if (UNLIKELY(bm_uuidwalk_init_from_edge(w_src, e_src) != - bm_uuidwalk_init_from_edge(w_dst, e_dst))) { + bm_uuidwalk_init_from_edge(w_dst, e_dst))) + { /* should never happen, if verts passed are compatible, but to be safe... */ goto finally; } @@ -766,7 +768,8 @@ static BMFace **bm_mesh_region_match_pair( } if (bm_uuidwalk_facestep_begin(w_src, fstep_src) && - bm_uuidwalk_facestep_begin(w_dst, fstep_dst)) { + bm_uuidwalk_facestep_begin(w_dst, fstep_dst)) + { /* Step over face-lists with matching UUID's * both lists are sorted, so no need for lookups. * The data is created on 'begin' and cleared on 'end' */ diff --git a/source/blender/compositor/intern/COM_FullFrameExecutionModel.cc b/source/blender/compositor/intern/COM_FullFrameExecutionModel.cc index 6eb8817c81da7fcf849dcb31356d66767088997f..7e1d01925e462c34dd49647869f928bbcef73b4b 100644 --- a/source/blender/compositor/intern/COM_FullFrameExecutionModel.cc +++ b/source/blender/compositor/intern/COM_FullFrameExecutionModel.cc @@ -194,7 +194,8 @@ void FullFrameExecutionModel::determine_areas_to_render(NodeOperation *output_op NodeOperation *operation = pair.first; const rcti &render_area = pair.second; if (BLI_rcti_is_empty(&render_area) || - active_buffers_.is_area_registered(operation, render_area)) { + active_buffers_.is_area_registered(operation, render_area)) + { continue; } diff --git a/source/blender/compositor/intern/COM_MetaData.cc b/source/blender/compositor/intern/COM_MetaData.cc index f885b201f5a8168fd9cb8a96f1c1d5f0bb332e8b..e823d455f06ceca86a70460cc2a5cc3ae5385026 100644 --- a/source/blender/compositor/intern/COM_MetaData.cc +++ b/source/blender/compositor/intern/COM_MetaData.cc @@ -30,7 +30,8 @@ void MetaData::replace_hash_neutral_cryptomatte_keys(const blender::StringRef la std::string cryptomatte_manifest = entries_.pop_default(META_DATA_KEY_CRYPTOMATTE_MANIFEST, ""); if (cryptomatte_hash.length() || cryptomatte_conversion.length() || - cryptomatte_manifest.length()) { + cryptomatte_manifest.length()) + { add_cryptomatte_entry(layer_name, "name", layer_name); } if (cryptomatte_hash.length()) { diff --git a/source/blender/compositor/intern/COM_NodeGraph.cc b/source/blender/compositor/intern/COM_NodeGraph.cc index 01605130ca5084617c11f45c669e9154fb5bcf85..013d55d1845cc0faf306882bc912ab4bf18e291f 100644 --- a/source/blender/compositor/intern/COM_NodeGraph.cc +++ b/source/blender/compositor/intern/COM_NodeGraph.cc @@ -279,7 +279,8 @@ void NodeGraph::add_proxies_group(const CompositorContext &context, /* create proxy nodes for group input/output nodes */ for (bNode *b_node_io = (bNode *)b_group_tree->nodes.first; b_node_io; - b_node_io = b_node_io->next) { + b_node_io = b_node_io->next) + { if (b_node_io->type == NODE_GROUP_INPUT) { add_proxies_group_inputs(b_node, b_node_io); } diff --git a/source/blender/compositor/intern/COM_NodeOperationBuilder.cc b/source/blender/compositor/intern/COM_NodeOperationBuilder.cc index 9388e7ca3f12a1ebaacef9fe873da50400b9a647..70a2fbbe12fb7c442069d20bcb7567e09f19abea 100644 --- a/source/blender/compositor/intern/COM_NodeOperationBuilder.cc +++ b/source/blender/compositor/intern/COM_NodeOperationBuilder.cc @@ -289,7 +289,8 @@ void NodeOperationBuilder::add_datatype_conversions() NodeOperation *from_op = &link.from()->get_operation(); NodeOperation *to_op = &link.to()->get_operation(); if (!(from_op->get_flags().use_datatype_conversion || - to_op->get_flags().use_datatype_conversion)) { + to_op->get_flags().use_datatype_conversion)) + { continue; } diff --git a/source/blender/compositor/intern/COM_TiledExecutionModel.cc b/source/blender/compositor/intern/COM_TiledExecutionModel.cc index 48fa0477925c003ce8c9da6047498c67e220bdd2..ae5c767e61bb0b3fd3f2e7cb94c9f51b2dbdc2d1 100644 --- a/source/blender/compositor/intern/COM_TiledExecutionModel.cc +++ b/source/blender/compositor/intern/COM_TiledExecutionModel.cc @@ -138,7 +138,8 @@ void TiledExecutionModel::execute_groups(eCompositorPriority priority, { for (ExecutionGroup *execution_group : groups_) { if (execution_group->get_flags().is_output && - execution_group->get_render_priority() == priority) { + execution_group->get_render_priority() == priority) + { execution_group->execute(&exec_system); } } diff --git a/source/blender/compositor/nodes/COM_ImageNode.cc b/source/blender/compositor/nodes/COM_ImageNode.cc index 5c31fdb40ba65e98179040f1833393c818599b76..965f7a302ff3ed6d5e9370aff67057d394d92f38 100644 --- a/source/blender/compositor/nodes/COM_ImageNode.cc +++ b/source/blender/compositor/nodes/COM_ImageNode.cc @@ -81,7 +81,8 @@ void ImageNode::convert_to_operations(NodeConverter &converter, int view = 0; if (STREQ(storage->pass_name, RE_PASSNAME_COMBINED) && - STREQ(bnode_socket->name, "Alpha")) { + STREQ(bnode_socket->name, "Alpha")) + { /* Alpha output is already handled with the associated combined output. */ continue; } diff --git a/source/blender/compositor/nodes/COM_RenderLayersNode.cc b/source/blender/compositor/nodes/COM_RenderLayersNode.cc index 9263145a1710528cda43c1200d21889ca33e9963..823a8478d60fbd2945ed45ca399514245c5ac871 100644 --- a/source/blender/compositor/nodes/COM_RenderLayersNode.cc +++ b/source/blender/compositor/nodes/COM_RenderLayersNode.cc @@ -68,7 +68,8 @@ void RenderLayersNode::test_render_link(NodeConverter &converter, RenderLayersProg *operation; bool is_preview; if (STREQ(rpass->name, RE_PASSNAME_COMBINED) && - STREQ(output->get_bnode_socket()->name, "Alpha")) { + STREQ(output->get_bnode_socket()->name, "Alpha")) + { operation = new RenderLayersAlphaProg(rpass->name, DataType::Value, rpass->channels); is_preview = false; } diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cc b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cc index 7695302dde29568a36ee9adf4f16faea2ead853f..9bf88ac04e74342de592a707bbb25cc85ce2942e 100644 --- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cc +++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cc @@ -814,7 +814,8 @@ static void do_allEdgeDetection(uint t, } else { if (!limask[pix_nextCol] || !limask[pix_prevCol] || !limask[pix_nextRow] || - !limask[pix_prevRow]) { + !limask[pix_prevRow]) + { in_isz++; /* Increment the inner boundary pixel count. */ lres[a] = 4; /* Flag pixel as part of inner edge. */ } diff --git a/source/blender/compositor/operations/COM_PreviewOperation.cc b/source/blender/compositor/operations/COM_PreviewOperation.cc index cc40bbd4ca3d4b39060b692e858ae5c35115d9c0..0e1406e503f2f8636d7516a6adc3e05b57555749 100644 --- a/source/blender/compositor/operations/COM_PreviewOperation.cc +++ b/source/blender/compositor/operations/COM_PreviewOperation.cc @@ -43,7 +43,8 @@ void PreviewOperation::init_execution() output_image_ = preview_->ibuf; if (this->get_width() == uint(preview_->ibuf->x) && - this->get_height() == uint(preview_->ibuf->y)) { + this->get_height() == uint(preview_->ibuf->y)) + { return; } const uint size[2] = {get_width(), get_height()}; diff --git a/source/blender/compositor/operations/COM_SMAAOperation.cc b/source/blender/compositor/operations/COM_SMAAOperation.cc index 52e99f8355c09475ae6ccf845c736f3c8ac397bc..523fa8c9e77abc59c672e6969016cb46f9416a13 100644 --- a/source/blender/compositor/operations/COM_SMAAOperation.cc +++ b/source/blender/compositor/operations/COM_SMAAOperation.cc @@ -1031,7 +1031,7 @@ void SMAANeighborhoodBlendingOperation::execute_pixel(float output[4], } /* Calculate the blending offsets: */ - void (*samplefunc)(SocketReader * reader, int x, int y, float xoffset, float color[4]); + void (*samplefunc)(SocketReader *reader, int x, int y, float xoffset, float color[4]); float offset1, offset2, weight1, weight2, color1[4], color2[4]; if (fmaxf(right, left) > fmaxf(bottom, top)) { /* max(horizontal) > max(vertical) */ @@ -1083,7 +1083,7 @@ void SMAANeighborhoodBlendingOperation::update_memory_buffer_partial(MemoryBuffe } /* Calculate the blending offsets: */ - void (*sample_fn)(MemoryBuffer * reader, int x, int y, float xoffset, float color[4]); + void (*sample_fn)(MemoryBuffer *reader, int x, int y, float xoffset, float color[4]); float offset1, offset2, weight1, weight2, color1[4], color2[4]; if (fmaxf(right, left) > fmaxf(bottom, top)) { /* `max(horizontal) > max(vertical)` */ diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h index 2fbcbdb66044d35d7f681d84bc41e8c0c3aed6b7..e239a916afe06245ec5334e2eac424d198f2efba 100644 --- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h +++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h @@ -9,7 +9,7 @@ namespace blender::compositor { -//#define COM_DEFOCUS_SEARCH +// #define COM_DEFOCUS_SEARCH class VariableSizeBokehBlurOperation : public MultiThreadedOperation, public QualityStepHelper { private: diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.cc b/source/blender/compositor/operations/COM_VectorBlurOperation.cc index 07020f0d709075c33bc78232c525d6c5943f0d6d..e155629bc19607c1e63bd82da8d8a30074131c44 100644 --- a/source/blender/compositor/operations/COM_VectorBlurOperation.cc +++ b/source/blender/compositor/operations/COM_VectorBlurOperation.cc @@ -895,7 +895,8 @@ void zbuf_accumulate_vecblur(NodeBlurData *nbd, rw = rectweight; rm = rectmax; for (dr = rectdraw, dz2 = newrect, x = xsize * ysize - 1; x >= 0; - x--, dr++, dz2 += 4, rw++, rm++) { + x--, dr++, dz2 += 4, rw++, rm++) + { if (dr->colpoin) { float bfac = dr->alpha * blendfac; diff --git a/source/blender/compositor/realtime_compositor/intern/scheduler.cc b/source/blender/compositor/realtime_compositor/intern/scheduler.cc index 9312e917c0441d6c6ce3e7dabdfa9e65755f54c0..70d8c05ff2b4304daa42c5873ac807da35d25e1a 100644 --- a/source/blender/compositor/realtime_compositor/intern/scheduler.cc +++ b/source/blender/compositor/realtime_compositor/intern/scheduler.cc @@ -337,7 +337,8 @@ Schedule compute_schedule(const Context &context, const DerivedNodeTree &tree) int insertion_position = 0; for (int i = 0; i < sorted_dependency_nodes.size(); i++) { if (needed_buffers.lookup(doutput.node()) > - needed_buffers.lookup(sorted_dependency_nodes[i])) { + needed_buffers.lookup(sorted_dependency_nodes[i])) + { insertion_position++; } else { diff --git a/source/blender/compositor/tests/COM_ComputeSummedAreaTableOperation_test.cc b/source/blender/compositor/tests/COM_ComputeSummedAreaTableOperation_test.cc index 986a340e2400eb5ae2c9821a94f59ab939b6342c..e69738f335a893145107fa39d5b59bbfac8f12a4 100644 --- a/source/blender/compositor/tests/COM_ComputeSummedAreaTableOperation_test.cc +++ b/source/blender/compositor/tests/COM_ComputeSummedAreaTableOperation_test.cc @@ -19,8 +19,7 @@ struct SatParams { std::vector<std::vector<float>> values; }; -class SummedAreaTableTestP : public testing::TestWithParam<SatParams> { -}; +class SummedAreaTableTestP : public testing::TestWithParam<SatParams> {}; TEST_P(SummedAreaTableTestP, Values) { diff --git a/source/blender/depsgraph/intern/builder/deg_builder_cache.cc b/source/blender/depsgraph/intern/builder/deg_builder_cache.cc index 51fc299cf9a4d08c4cadcb5e0d1c702549a499c4..5601ed014089827391fa5e7f69f5096413a953db 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_cache.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_cache.cc @@ -81,7 +81,8 @@ void animated_property_cb(ID * /*id*/, FCurve *fcurve, void *data_v) PointerRNA pointer_rna; PropertyRNA *property_rna = nullptr; if (!RNA_path_resolve_property( - &data->pointer_rna, fcurve->rna_path, &pointer_rna, &property_rna)) { + &data->pointer_rna, fcurve->rna_path, &pointer_rna, &property_rna)) + { return; } /* Get storage for the ID. @@ -141,7 +142,8 @@ bool AnimatedPropertyStorage::isAnyPropertyAnimated(const PointerRNA *pointer_rn DepsgraphBuilderCache::~DepsgraphBuilderCache() { for (AnimatedPropertyStorage *animated_property_storage : - animated_property_storage_map_.values()) { + animated_property_storage_map_.values()) + { delete animated_property_storage; } } diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc index b5da7a1ccbaa15bc86d82484eed92b91e1a55019..55595657b08fff7b86654a87159e266b3ac45e18 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc @@ -63,7 +63,8 @@ bool DepsgraphRelationBuilder::build_layer_collection(LayerCollection *layer_col const ComponentKey collection_hierarchy_key{&collection->id, NodeType::HIERARCHY}; LISTBASE_FOREACH ( - LayerCollection *, child_layer_collection, &layer_collection->layer_collections) { + LayerCollection *, child_layer_collection, &layer_collection->layer_collections) + { if (build_layer_collection(child_layer_collection)) { Collection *child_collection = child_layer_collection->collection; const ComponentKey child_collection_hierarchy_key{&child_collection->id, diff --git a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc index 208f6fcfd066aa101f972765848168ba59ea78c8..fddf393ab8fdb16cab3f9dbbe621fae37b2b3c9b 100644 --- a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc +++ b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc @@ -286,11 +286,13 @@ static void deg_debug_graphviz_relation_arrowhead(const Relation *rel, dot::Dire const char *shape_no_cow = "box"; const char *shape = shape_default; if (rel->from->get_class() == NodeClass::OPERATION && - rel->to->get_class() == NodeClass::OPERATION) { + rel->to->get_class() == NodeClass::OPERATION) + { OperationNode *op_from = (OperationNode *)rel->from; OperationNode *op_to = (OperationNode *)rel->to; if (op_from->owner->type == NodeType::COPY_ON_WRITE && - !op_to->owner->need_tag_cow_before_update()) { + !op_to->owner->need_tag_cow_before_update()) + { shape = shape_no_cow; } } diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc index c1622ca1a3b872fc1652749d04cfef87f6b4c3e6..ff23d80be9e3294f8ba29301804f6e60c1b44e6a 100644 --- a/source/blender/depsgraph/intern/depsgraph_query.cc +++ b/source/blender/depsgraph/intern/depsgraph_query.cc @@ -307,7 +307,8 @@ bool DEG_is_original_id(const ID *id) * * NOTE: We consider ID evaluated if ANY of those flags is set. We do NOT require ALL of them. */ if (id->tag & - (LIB_TAG_COPIED_ON_WRITE | LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT | LIB_TAG_LOCALIZED)) { + (LIB_TAG_COPIED_ON_WRITE | LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT | LIB_TAG_LOCALIZED)) + { return false; } return true; diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.cc b/source/blender/draw/engines/eevee/eevee_lightcache.cc index 0631ea2efe204e4e367358ef432e66e33dc78a20..e3b3749f384c8fc3b5288d1ebf9f14d5eaa942b1 100644 --- a/source/blender/draw/engines/eevee/eevee_lightcache.cc +++ b/source/blender/draw/engines/eevee/eevee_lightcache.cc @@ -1473,7 +1473,8 @@ void EEVEE_lightbake_job(void *custom_data, wmJobWorkerStatus *worker_status) lbake->grid_sample_len = prb->grid_resolution_x * prb->grid_resolution_y * prb->grid_resolution_z; 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); } } diff --git a/source/blender/draw/engines/eevee/eevee_materials.cc b/source/blender/draw/engines/eevee/eevee_materials.cc index 9e5f7a61de594439f169b85cae64edfb278b7e1a..7bb6b4c948e649be853ce53cc2b1370f51ac49a3 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.cc +++ b/source/blender/draw/engines/eevee/eevee_materials.cc @@ -881,7 +881,8 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, /* Do not render surface if we are rendering a volume object * and do not have a surface closure. */ if (use_volume_material && - (gpumat_array[i] && !GPU_material_has_surface_output(gpumat_array[i]))) { + (gpumat_array[i] && !GPU_material_has_surface_output(gpumat_array[i]))) + { continue; } diff --git a/source/blender/draw/engines/eevee/eevee_renderpasses.cc b/source/blender/draw/engines/eevee/eevee_renderpasses.cc index dd87b77ce6e5548a8bf68848a5914bb6c1960f43..6f7b962cb69163580a7ed4e4b320a1e81932480d 100644 --- a/source/blender/draw/engines/eevee/eevee_renderpasses.cc +++ b/source/blender/draw/engines/eevee/eevee_renderpasses.cc @@ -82,7 +82,8 @@ void EEVEE_renderpasses_init(EEVEE_Data *vedata) g_data->aov_hash = 0; if (render_pass == EEVEE_RENDER_PASS_BLOOM && - ((scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED) == 0)) { + ((scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED) == 0)) + { render_pass = EEVEE_RENDER_PASS_COMBINED; } if (render_pass == EEVEE_RENDER_PASS_AOV) { @@ -409,7 +410,8 @@ void EEVEE_renderpasses_output_accumulate(EEVEE_ViewLayerData *sldata, } else { if ((render_pass & EEVEE_RENDER_PASS_BLOOM) != 0 && - (effects->enabled_effects & EFFECT_BLOOM) != 0) { + (effects->enabled_effects & EFFECT_BLOOM) != 0) + { EEVEE_bloom_output_accumulate(sldata, vedata); } } @@ -436,7 +438,8 @@ void EEVEE_renderpasses_draw(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) UNUSED_VARS(needs_color_transfer); if ((render_pass & EEVEE_RENDER_PASS_BLOOM) != 0 && - (effects->enabled_effects & EFFECT_BLOOM) == 0) { + (effects->enabled_effects & EFFECT_BLOOM) == 0) + { is_valid = false; } diff --git a/source/blender/draw/engines/eevee/eevee_shadows.cc b/source/blender/draw/engines/eevee/eevee_shadows.cc index d86c6f04865fb30f798036fa0ed2eb56ce9b34b8..10671adf4c3108dbe47dde9c920f14308d93b766 100644 --- a/source/blender/draw/engines/eevee/eevee_shadows.cc +++ b/source/blender/draw/engines/eevee/eevee_shadows.cc @@ -63,7 +63,8 @@ void EEVEE_shadows_init(EEVEE_ViewLayerData *sldata) EEVEE_LightsInfo *linfo = sldata->lights; if ((linfo->shadow_cube_size != sh_cube_size) || - (linfo->shadow_high_bitdepth != sh_high_bitdepth)) { + (linfo->shadow_high_bitdepth != sh_high_bitdepth)) + { BLI_assert((sh_cube_size > 0) && (sh_cube_size <= 4096)); DRW_TEXTURE_FREE_SAFE(sldata->shadow_cube_pool); CLAMP(sh_cube_size, 1, 4096); diff --git a/source/blender/draw/engines/eevee_next/eevee_cryptomatte.cc b/source/blender/draw/engines/eevee_next/eevee_cryptomatte.cc index 5a0cd49b30426c68ec66e290902674d4a62c2f0b..d488563933caa2d58e88e701678fb3c7be12e2d7 100644 --- a/source/blender/draw/engines/eevee_next/eevee_cryptomatte.cc +++ b/source/blender/draw/engines/eevee_next/eevee_cryptomatte.cc @@ -27,7 +27,8 @@ void Cryptomatte::begin_sync() session_.reset(BKE_cryptomatte_init_from_view_layer(inst_.view_layer)); for (const std::string &layer_name : - bke::cryptomatte::BKE_cryptomatte_layer_names_get(*session_)) { + bke::cryptomatte::BKE_cryptomatte_layer_names_get(*session_)) + { StringRef layer_name_ref = layer_name; bke::cryptomatte::CryptomatteLayer *layer = bke::cryptomatte::BKE_cryptomatte_layer_get( *session_, layer_name); diff --git a/source/blender/draw/engines/eevee_next/eevee_lightprobe.hh b/source/blender/draw/engines/eevee_next/eevee_lightprobe.hh index 12104f46e81dffb9c53fe21ab292ccc886e0fb82..0d047729d7daed042654108abb5dafd2cf40e11e 100644 --- a/source/blender/draw/engines/eevee_next/eevee_lightprobe.hh +++ b/source/blender/draw/engines/eevee_next/eevee_lightprobe.hh @@ -56,8 +56,7 @@ struct IrradianceGrid : public LightProbe, IrradianceGridData { float viewport_display_size; }; -struct ReflectionCube : public LightProbe { -}; +struct ReflectionCube : public LightProbe {}; class LightProbeModule { friend class IrradianceCache; diff --git a/source/blender/draw/engines/eevee_next/eevee_shader.cc b/source/blender/draw/engines/eevee_next/eevee_shader.cc index d8da4340f7f85bc055c2cce35a7df5dd858043dc..fa92c3ab0c201390298b4089cc8d5937040a4ac5 100644 --- a/source/blender/draw/engines/eevee_next/eevee_shader.cc +++ b/source/blender/draw/engines/eevee_next/eevee_shader.cc @@ -397,7 +397,8 @@ void ShaderModule::material_create_info_ammend(GPUMaterial *gpumat, GPUCodegenOu bool supports_render_passes = (pipeline_type == MAT_PIPE_DEFERRED); /* Opaque forward do support AOVs and render pass if not using transparency. */ if (!GPU_material_flag_get(gpumat, GPU_MATFLAG_TRANSPARENT) && - (pipeline_type == MAT_PIPE_FORWARD)) { + (pipeline_type == MAT_PIPE_FORWARD)) + { supports_render_passes = true; } diff --git a/source/blender/draw/engines/eevee_next/eevee_sync.cc b/source/blender/draw/engines/eevee_next/eevee_sync.cc index 0f8befb3923c9fb0b001964b20f5ae765369479f..ca70ff224dff9ae2c4d5182db4d1f68a97ec7b45 100644 --- a/source/blender/draw/engines/eevee_next/eevee_sync.cc +++ b/source/blender/draw/engines/eevee_next/eevee_sync.cc @@ -574,7 +574,8 @@ void foreach_hair_particle_handle(Object *ob, ObjectHandle ob_handle, HairHandle const int draw_as = (part_settings->draw_as == PART_DRAW_REND) ? part_settings->ren_as : part_settings->draw_as; if (draw_as != PART_DRAW_PATH || - !DRW_object_is_visible_psys_in_active_context(ob, particle_sys)) { + !DRW_object_is_visible_psys_in_active_context(ob, particle_sys)) + { continue; } diff --git a/source/blender/draw/engines/eevee_next/eevee_sync.hh b/source/blender/draw/engines/eevee_next/eevee_sync.hh index 409c127f991047294f4d6b68886e66bfcbed4a47..8aaff4a94065e9c3428b99ef1b00ae67253c3af1 100644 --- a/source/blender/draw/engines/eevee_next/eevee_sync.hh +++ b/source/blender/draw/engines/eevee_next/eevee_sync.hh @@ -145,11 +145,9 @@ struct ObjectHandle : BaseHandle { ObjectKey object_key; }; -struct WorldHandle : public BaseHandle { -}; +struct WorldHandle : public BaseHandle {}; -struct SceneHandle : public BaseHandle { -}; +struct SceneHandle : public BaseHandle {}; class SyncModule { private: diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl index c2ca5522e89fc108be1a9932035f43f5f0e26b19..d6c350a4f33b1553ae0510839958e3fedaaba026 100644 --- a/source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl +++ b/source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl @@ -669,7 +669,8 @@ void film_process_data(ivec2 texel_film, out vec4 out_color, out float out_depth else { out_depth = imageLoad(depth_img, texel_film).r; if (uniform_buf.film.display_id != -1 && - uniform_buf.film.display_id == uniform_buf.film.normal_id) { + uniform_buf.film.display_id == uniform_buf.film.normal_id) + { out_color = imageLoad(color_accum_img, ivec3(texel_film, uniform_buf.film.display_id)); } } diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_data.cc b/source/blender/draw/engines/gpencil/gpencil_draw_data.cc index 520c100425c0787e6ff64523a845d85dae7a6180..6fee87d1420cfa3434c4898b00265d62d5ac7bbc 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_data.cc +++ b/source/blender/draw/engines/gpencil/gpencil_draw_data.cc @@ -224,7 +224,8 @@ GPENCIL_MaterialPool *gpencil_material_pool_create(GPENCIL_PrivateData *pd, Obje } if ((gp_style->mode != GP_MATERIAL_MODE_LINE) || - (gp_style->flag & GP_MATERIAL_DISABLE_STENCIL)) { + (gp_style->flag & GP_MATERIAL_DISABLE_STENCIL)) + { mat_data->flag |= GP_STROKE_OVERLAP; } diff --git a/source/blender/draw/engines/gpencil/gpencil_material.hh b/source/blender/draw/engines/gpencil/gpencil_material.hh index 272a7ebc8d9255871553a5ecb2dd150445ca0ffc..edad5a1a85cb87a622a50c21e6d7d13539c6a08a 100644 --- a/source/blender/draw/engines/gpencil/gpencil_material.hh +++ b/source/blender/draw/engines/gpencil/gpencil_material.hh @@ -178,7 +178,8 @@ class MaterialModule { } if ((gp_style_override->fill_style == GP_MATERIAL_FILL_STYLE_TEXTURE) && - (gp_style_override->ima)) { + (gp_style_override->ima)) + { copy_v4_fl(gp_style_override->fill_rgba, 1.0f); gp_style_override->mix_factor = 0.0f; } @@ -243,7 +244,8 @@ class MaterialModule { /* Overlap. */ if ((gp_style->mode != GP_MATERIAL_MODE_LINE) || - (gp_style->flag & GP_MATERIAL_DISABLE_STENCIL)) { + (gp_style->flag & GP_MATERIAL_DISABLE_STENCIL)) + { material.flag |= GP_STROKE_OVERLAP; } diff --git a/source/blender/draw/engines/image/image_drawing_mode.hh b/source/blender/draw/engines/image/image_drawing_mode.hh index 901b68cffe32c63cf93d03d499cacacd1329fddc..6655fca05c7caf91743a1c839c527d054fa9af71 100644 --- a/source/blender/draw/engines/image/image_drawing_mode.hh +++ b/source/blender/draw/engines/image/image_drawing_mode.hh @@ -498,7 +498,8 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD float v = info.clipping_uv_bounds.ymax * yf + info.clipping_uv_bounds.ymin * (1.0 - yf) - tile_offset_y; for (int x = gpu_texture_region_to_update.xmin; x < gpu_texture_region_to_update.xmax; - x++) { + x++) + { float xf = x / (float)texture_width; float u = info.clipping_uv_bounds.xmax * xf + info.clipping_uv_bounds.xmin * (1.0 - xf) - tile_offset_x; diff --git a/source/blender/draw/engines/overlay/overlay_armature.cc b/source/blender/draw/engines/overlay/overlay_armature.cc index a5662bba3e6944e4e898162b8c34256c17220629..cb85541f413c49e21d8631365fcde02a7e8a9be5 100644 --- a/source/blender/draw/engines/overlay/overlay_armature.cc +++ b/source/blender/draw/engines/overlay/overlay_armature.cc @@ -1206,7 +1206,8 @@ static void get_pchan_color_constraint(const ThemeWireColor *bcolor, const ePchan_ConstFlag flags_to_color = PCHAN_HAS_NO_TARGET | PCHAN_HAS_IK | PCHAN_HAS_SPLINEIK | PCHAN_HAS_CONST; if ((constflag & flags_to_color) == 0 || - (bcolor && (bcolor->flag & TH_WIRECOLOR_CONSTCOLS) == 0)) { + (bcolor && (bcolor->flag & TH_WIRECOLOR_CONSTCOLS) == 0)) + { get_pchan_color_solid(bcolor, r_color); return; } diff --git a/source/blender/draw/engines/overlay/overlay_edit_uv.cc b/source/blender/draw/engines/overlay/overlay_edit_uv.cc index c788c1aeaea3120f373d5b86dd6422268e32d87f..d29478e0093c5d49e62da10ab80c7054e003d316 100644 --- a/source/blender/draw/engines/overlay/overlay_edit_uv.cc +++ b/source/blender/draw/engines/overlay/overlay_edit_uv.cc @@ -120,10 +120,10 @@ void OVERLAY_edit_uv_init(OVERLAY_Data *vedata) const bool show_modified_uvs = sima->flag & SI_DRAWSHADOW; const bool is_tiled_image = image && (image->source == IMA_SRC_TILED); const bool do_edges_only = (ts->uv_flag & UV_SYNC_SELECTION) ? - /* NOTE: Ignore #SCE_SELECT_EDGE because a single selected edge - * on the mesh may cause single UV vertices to be selected. */ - false : - (ts->uv_selectmode == UV_SELECT_EDGE); + /* NOTE: Ignore #SCE_SELECT_EDGE because a single selected edge + * on the mesh may cause single UV vertices to be selected. */ + false : + (ts->uv_selectmode == UV_SELECT_EDGE); const bool do_faces = ((sima->flag & SI_NO_DRAWFACES) == 0); const bool do_face_dots = (ts->uv_flag & UV_SYNC_SELECTION) ? (ts->selectmode & SCE_SELECT_FACE) != 0 : diff --git a/source/blender/draw/engines/overlay/overlay_grid.cc b/source/blender/draw/engines/overlay/overlay_grid.cc index 0bb2715941d84d82c81ab78e6ec1c01f1a5f4bbe..02a8915f4f23acc5fcf9708925ab706ab8d0a758 100644 --- a/source/blender/draw/engines/overlay/overlay_grid.cc +++ b/source/blender/draw/engines/overlay/overlay_grid.cc @@ -158,7 +158,8 @@ void OVERLAY_grid_init(OVERLAY_Data *vedata) /* Perspective: If camera is below floor plane, we switch clipping. * Orthographic: If eye vector is looking up, we switch clipping. */ if (((winmat[3][3] == 0.0f) && (campos[2] > 0.0f)) || - ((winmat[3][3] != 0.0f) && (zvec[2] < 0.0f))) { + ((winmat[3][3] != 0.0f) && (zvec[2] < 0.0f))) + { zpos_flag |= CLIP_ZPOS; zneg_flag |= CLIP_ZNEG; } diff --git a/source/blender/draw/engines/overlay/overlay_next_background.hh b/source/blender/draw/engines/overlay/overlay_next_background.hh index 0033b3b677db21a1a19421a4d873ce45ff788c5f..40cbbe52e86502d1433d55ecec7c7116d4c62ad7 100644 --- a/source/blender/draw/engines/overlay/overlay_next_background.hh +++ b/source/blender/draw/engines/overlay/overlay_next_background.hh @@ -38,7 +38,8 @@ class Background { background_type = BG_CHECKER; } else if (state.v3d->shading.background_type == V3D_SHADING_BACKGROUND_WORLD && - state.scene->world) { + state.scene->world) + { background_type = BG_SOLID; /* TODO(fclem): this is a scene referred linear color. we should convert * it to display linear here. */ diff --git a/source/blender/draw/engines/overlay/overlay_paint.cc b/source/blender/draw/engines/overlay/overlay_paint.cc index b92d0414bb64104a26eeb647225c7b375b220f34..d8589f99b5f3d4c2b37dc1b872c960b5e3f0fd0a 100644 --- a/source/blender/draw/engines/overlay/overlay_paint.cc +++ b/source/blender/draw/engines/overlay/overlay_paint.cc @@ -31,7 +31,8 @@ static bool paint_object_is_rendered_transparent(View3D *v3d, Object *ob) return ob->color[3] < 1.0f; } if (ob && ob->type == OB_MESH && ob->data && - v3d->shading.color_type == V3D_SHADING_MATERIAL_COLOR) { + v3d->shading.color_type == V3D_SHADING_MATERIAL_COLOR) + { Mesh *mesh = static_cast<Mesh *>(ob->data); for (int i = 0; i < mesh->totcol; i++) { Material *mat = BKE_object_material_get_eval(ob, i + 1); diff --git a/source/blender/draw/intern/DRW_gpu_wrapper.hh b/source/blender/draw/intern/DRW_gpu_wrapper.hh index 0afc203936579baef155240d8835f36e213fe9cc..859cbc1454486e6141004d833606537ec1f04515 100644 --- a/source/blender/draw/intern/DRW_gpu_wrapper.hh +++ b/source/blender/draw/intern/DRW_gpu_wrapper.hh @@ -1158,8 +1158,7 @@ class TextureRef : public Texture { * Dummy type to bind texture as image. * It is just a GPUTexture in disguise. */ -class Image { -}; +class Image {}; static inline Image *as_image(GPUTexture *tex) { diff --git a/source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc b/source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc index 721ab76ba704b059db4249920ec03b299aa11f06..ccb955c94fcb996753a9d8da906a51eae61b3468 100644 --- a/source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc +++ b/source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc @@ -477,7 +477,8 @@ static bool bm_loop_normals_required(BMesh *bm) } if (edge_mix == array_utils::BooleanMix::AllFalse && - face_mix == array_utils::BooleanMix::AllFalse) { + face_mix == array_utils::BooleanMix::AllFalse) + { return false; } diff --git a/source/blender/draw/intern/draw_cache_impl_lattice.cc b/source/blender/draw/intern/draw_cache_impl_lattice.cc index 3a709601fd96cf1684eecd422eadd6cdfc70a88d..75e70034e782f20b0d56ba3cada8e27eb2aa61aa 100644 --- a/source/blender/draw/intern/draw_cache_impl_lattice.cc +++ b/source/blender/draw/intern/draw_cache_impl_lattice.cc @@ -367,7 +367,7 @@ static GPUIndexBuf *lattice_batch_cache_get_edges(LatticeRenderData *rdata, GPUIndexBufBuilder elb; GPU_indexbuf_init(&elb, GPU_PRIM_LINES, edge_len, vert_len); -#define LATT_INDEX(u, v, w) ((((w)*rdata->dims.v_len + (v)) * rdata->dims.u_len) + (u)) +#define LATT_INDEX(u, v, w) ((((w) * rdata->dims.v_len + (v)) * rdata->dims.u_len) + (u)) for (int w = 0; w < rdata->dims.w_len; w++) { int wxt = ELEM(w, 0, rdata->dims.w_len - 1); diff --git a/source/blender/draw/intern/draw_cache_impl_particles.cc b/source/blender/draw/intern/draw_cache_impl_particles.cc index 894b8ee438acae9470f486518a7cecfaffa0c8d7..d383d6fcc11f6d4bdfddfbf7513c6e714ad631df 100644 --- a/source/blender/draw/intern/draw_cache_impl_particles.cc +++ b/source/blender/draw/intern/draw_cache_impl_particles.cc @@ -1005,7 +1005,8 @@ static void particle_batch_cache_ensure_procedural_strand_data(PTCacheEdit *edit else { int curr_point = 0; if ((psys->pathcache != nullptr) && - (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT))) { + (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT))) + { curr_point = particle_batch_cache_fill_strands_data(psys, psmd, psys->pathcache, @@ -1105,7 +1106,8 @@ static void particle_batch_cache_ensure_procedural_indices(PTCacheEdit *edit, else { int curr_point = 0; if ((psys->pathcache != nullptr) && - (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT))) { + (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT))) + { curr_point = particle_batch_cache_fill_segments_indices( psys->pathcache, 0, psys->totpart, verts_per_hair, &elb); } @@ -1155,7 +1157,8 @@ static void particle_batch_cache_ensure_procedural_pos(PTCacheEdit *edit, } else { if ((psys->pathcache != nullptr) && - (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT))) { + (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT))) + { particle_batch_cache_fill_segments_proc_pos( psys->pathcache, psys->totpart, &pos_step, &length_step); } @@ -1301,7 +1304,8 @@ static void particle_batch_cache_ensure_pos_and_seg(PTCacheEdit *edit, } else { if ((psys->pathcache != nullptr) && - (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT))) { + (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT))) + { curr_point = particle_batch_cache_fill_segments(psys, psmd, psys->pathcache, diff --git a/source/blender/draw/intern/draw_debug.cc b/source/blender/draw/intern/draw_debug.cc index 5a7bcfcc624f9e487126082d56db14ec136ef48d..0a3bbad000fd30e68808e80d8a48e761fef37988 100644 --- a/source/blender/draw/intern/draw_debug.cc +++ b/source/blender/draw/intern/draw_debug.cc @@ -28,7 +28,7 @@ # define DRAW_DEBUG #else /* Uncomment to forcibly enable debug draw in release mode. */ -//#define DRAW_DEBUG +// #define DRAW_DEBUG #endif namespace blender::draw { diff --git a/source/blender/draw/intern/draw_manager_data.cc b/source/blender/draw/intern/draw_manager_data.cc index 3f1f16dc479860e4267aa4c27d1cb2285fefb361..980ac5b3f112408d8bed9a539e9533a824cbe27c 100644 --- a/source/blender/draw/intern/draw_manager_data.cc +++ b/source/blender/draw/intern/draw_manager_data.cc @@ -714,7 +714,7 @@ static void drw_call_obinfos_init(DRWObjectInfos *ob_infos, const Object *ob) drw_call_calc_orco(ob, ob_infos->orcotexfac); /* Random float value. */ uint random = (DST.dupli_source) ? - DST.dupli_source->random_id : + DST.dupli_source->random_id : /* TODO(fclem): this is rather costly to do at runtime. Maybe we can * put it in ob->runtime and make depsgraph ensure it is up to date. */ BLI_hash_int_2d(BLI_hash_string(ob->id.name + 2), 0); @@ -1385,7 +1385,7 @@ static void drw_sculpt_generate_calls(DRWSculptCallbackData *scd) DRW_debug_modelmat(scd->ob->object_to_world); BKE_pbvh_draw_debug_cb( pbvh, - (void (*)(PBVHNode * n, void *d, const float min[3], const float max[3], PBVHNodeFlags f)) + (void (*)(PBVHNode *n, void *d, const float min[3], const float max[3], PBVHNodeFlags f)) DRW_sculpt_debug_cb, &debug_node_nr); } @@ -1426,7 +1426,8 @@ void DRW_shgroup_call_sculpt(DRWShadingGroup *shgroup, if (use_color) { if (const char *name = mesh->active_color_attribute) { if (const std::optional<bke::AttributeMetaData> meta_data = attributes.lookup_meta_data( - name)) { + name)) + { attrs.append(pbvh::GenericRequest{name, meta_data->data_type, meta_data->domain}); } } diff --git a/source/blender/draw/intern/draw_manager_exec.cc b/source/blender/draw/intern/draw_manager_exec.cc index ed28d4b08e2150b41f984247f0c712b0cf64299b..491a864a18c02814325043a0e5ccb052ac490b44 100644 --- a/source/blender/draw/intern/draw_manager_exec.cc +++ b/source/blender/draw/intern/draw_manager_exec.cc @@ -1078,7 +1078,8 @@ static void draw_shgroup(DRWShadingGroup *shgroup, DRWState pass_state) break; case DRW_CMD_DRAW: if (!USE_BATCHING || state.obmats_loc == -1 || (G.f & G_FLAG_PICKSEL) || - cmd->draw.batch->inst[0]) { + cmd->draw.batch->inst[0]) + { draw_call_single_do( shgroup, &state, cmd->draw.batch, cmd->draw.handle, 0, 0, 0, 0, true); } diff --git a/source/blender/draw/intern/draw_pbvh.cc b/source/blender/draw/intern/draw_pbvh.cc index f110c1a3c07b5550c9d8fcd6820b43eeb388e4c0..e3f14ea66933548c3565ee87637e29b489e37ffa 100644 --- a/source/blender/draw/intern/draw_pbvh.cc +++ b/source/blender/draw/intern/draw_pbvh.cc @@ -682,7 +682,8 @@ struct PBVHBatches { case CustomRequest::Mask: { float *data = static_cast<float *>(GPU_vertbuf_get_data(&vert_buf)); if (const VArray<float> mask = *attributes.lookup<float>(".sculpt_mask", - bke::AttrDomain::Point)) { + bke::AttrDomain::Point)) + { const VArraySpan<float> mask_span(mask); const Span<int> corner_verts = args.corner_verts; const Span<int3> corner_tris = args.corner_tris; diff --git a/source/blender/draw/intern/draw_sculpt.cc b/source/blender/draw/intern/draw_sculpt.cc index 19d20cb9bba29935d1264fa0c48c44ebfa706c33..0559879dab40396dc32548e5d2b75d76b5e89081 100644 --- a/source/blender/draw/intern/draw_sculpt.cc +++ b/source/blender/draw/intern/draw_sculpt.cc @@ -139,7 +139,8 @@ Vector<SculptBatch> sculpt_batches_get(const Object *ob, SculptBatchFeature feat if (features & SCULPT_BATCH_VERTEX_COLOR) { if (const char *name = mesh->active_color_attribute) { if (const std::optional<bke::AttributeMetaData> meta_data = attributes.lookup_meta_data( - name)) { + name)) + { attrs.append(pbvh::GenericRequest{name, meta_data->data_type, meta_data->domain}); } } diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc index d0110a0be27460f84f7192f18c60087b01cd0736..8d39b1e61703442ba16c2bb0293a99e97f9fe78c 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc @@ -97,7 +97,8 @@ static void extract_pos_nor_iter_face_mesh(const MeshRenderData &mr, vert->nor = data->normals[vert_i].low; /* Flag for paint mode overlay. */ if (poly_hidden || vert_hidden || - ((mr.v_origindex) && (mr.v_origindex[vert_i] == ORIGINDEX_NONE))) { + ((mr.v_origindex) && (mr.v_origindex[vert_i] == ORIGINDEX_NONE))) + { vert->nor.w = -1; } else if (!mr.select_vert.is_empty() && mr.select_vert[vert_i]) { @@ -469,7 +470,8 @@ static void extract_pos_nor_hq_iter_face_mesh(const MeshRenderData &mr, /* Flag for paint mode overlay. */ if (poly_hidden || vert_hidden || - ((mr.v_origindex) && (mr.v_origindex[vert_i] == ORIGINDEX_NONE))) { + ((mr.v_origindex) && (mr.v_origindex[vert_i] == ORIGINDEX_NONE))) + { vert->nor[3] = -1; } else if (!mr.select_vert.is_empty() && mr.select_vert[vert_i]) { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_tan.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_tan.cc index 073acbfebe2e014bb1b8fc49f61d08b11b6f87ab..b82d78341d3585e6e601b40826525052363f0400 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_tan.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_tan.cc @@ -52,7 +52,8 @@ static void extract_tan_init_common(const MeshRenderData &mr, /* FIXME(#91838): This is to avoid a crash when orco tangent was requested but there are valid * uv layers. It would be better to fix the root cause. */ if (tan_layers == 0 && use_orco_tan && - CustomData_get_layer_index(cd_ldata, CD_PROP_FLOAT2) != -1) { + CustomData_get_layer_index(cd_ldata, CD_PROP_FLOAT2) != -1) + { tan_layers = 1; use_orco_tan = false; } diff --git a/source/blender/draw/intern/shaders/common_subdiv_patch_evaluation_comp.glsl b/source/blender/draw/intern/shaders/common_subdiv_patch_evaluation_comp.glsl index ef66ed49de1254be4d388f2b1d4585370b391166..e8ebe40eb9c73096087366378aeebe080058dcb9 100644 --- a/source/blender/draw/intern/shaders/common_subdiv_patch_evaluation_comp.glsl +++ b/source/blender/draw/intern/shaders/common_subdiv_patch_evaluation_comp.glsl @@ -47,7 +47,7 @@ layout(std430, binding = 7) buffer patchParam_buffer OsdPatchParam patchParamBuffer[]; }; - /* Output buffer(s). */ +/* Output buffer(s). */ #if defined(FVAR_EVALUATION) layout(std430, binding = 8) writeonly buffer outputFVarData diff --git a/source/blender/editors/animation/anim_channels_edit.cc b/source/blender/editors/animation/anim_channels_edit.cc index 0b5a6d0165c5f4122ed2c0d68ed24ead4cab90ec..3e95da4fc4a26c45c5d73b01f64393ef36298a2a 100644 --- a/source/blender/editors/animation/anim_channels_edit.cc +++ b/source/blender/editors/animation/anim_channels_edit.cc @@ -3507,7 +3507,8 @@ static int click_select_channel_group(bAnimContext *ac, /* only select channels in group and group itself */ for (fcu = static_cast<FCurve *>(agrp->channels.first); fcu && fcu->grp == agrp; - fcu = fcu->next) { + fcu = fcu->next) + { fcu->flag |= FCURVE_SELECTED; } agrp->flag |= AGRP_SELECTED; diff --git a/source/blender/editors/animation/anim_filter.cc b/source/blender/editors/animation/anim_filter.cc index 434335f140a101babb545ba695a5361dd5fce4b4..f0e482afce4079771d9567be113e26a5ef39b3a8 100644 --- a/source/blender/editors/animation/anim_filter.cc +++ b/source/blender/editors/animation/anim_filter.cc @@ -1126,7 +1126,8 @@ static bool skip_fcurve_selected_data(bDopeSheet *ads, FCurve *fcu, ID *owner_id /* Check for selected nodes. */ if (fcu->rna_path && - BLI_str_quoted_substr(fcu->rna_path, "nodes[", node_name, sizeof(node_name))) { + BLI_str_quoted_substr(fcu->rna_path, "nodes[", node_name, sizeof(node_name))) + { /* Get strip name, and check if this strip is selected. */ node = nodeFindNodebyName(ntree, node_name); @@ -1276,7 +1277,8 @@ static FCurve *animfilter_fcurve_next(bDopeSheet *ads, if (ads && owner_id) { if ((filter_mode & ANIMFILTER_TMP_IGNORE_ONLYSEL) == 0) { if ((ads->filterflag & ADS_FILTER_ONLYSEL) || - (ads->filterflag & ADS_FILTER_INCL_HIDDEN) == 0) { + (ads->filterflag & ADS_FILTER_INCL_HIDDEN) == 0) + { if (skip_fcurve_selected_data(ads, fcu, owner_id, filter_mode)) { continue; } diff --git a/source/blender/editors/animation/anim_markers.cc b/source/blender/editors/animation/anim_markers.cc index 743ebcc0cff4bf01bbb764b698e28581e93c717f..e7cdeac8d4896a82dfdf539bf6fe5961f145c92a 100644 --- a/source/blender/editors/animation/anim_markers.cc +++ b/source/blender/editors/animation/anim_markers.cc @@ -991,7 +991,8 @@ static void ed_marker_move_apply(bContext *C, wmOperator *op) ofs = RNA_int_get(op->ptr, "frames"); for (a = 0, marker = static_cast<TimeMarker *>(mm->markers->first); marker; - marker = marker->next) { + marker = marker->next) + { if (marker->flag & SELECT) { marker->frame = mm->oldframe[a] + ofs; a++; diff --git a/source/blender/editors/animation/keyframes_draw.cc b/source/blender/editors/animation/keyframes_draw.cc index 6bdaf543e4ccc047154732f02fc7db7acbe84928..1f7e1c9af9d1773e2ca8e902bd38a3f00263b1fb 100644 --- a/source/blender/editors/animation/keyframes_draw.cc +++ b/source/blender/editors/animation/keyframes_draw.cc @@ -319,7 +319,8 @@ static void draw_keylist_block(const DrawKeylistUIData *ctx, const ActKeyColumn } } if (ctx->show_ipo && actkeyblock_is_valid(ab) && - (ab->block.flag & ACTKEYBLOCK_FLAG_NON_BEZIER)) { + (ab->block.flag & ACTKEYBLOCK_FLAG_NON_BEZIER)) + { /* draw an interpolation line */ draw_keylist_block_interpolation_line(ctx, ab, ypos); } diff --git a/source/blender/editors/armature/armature_add.cc b/source/blender/editors/armature/armature_add.cc index af060abe4bfe08b2dfb5db84d59fa5e9d4578a9a..014c79bebe6a43735eefe591e20fceae0b85c56a 100644 --- a/source/blender/editors/armature/armature_add.cc +++ b/source/blender/editors/armature/armature_add.cc @@ -533,7 +533,8 @@ static void updateDuplicateActionConstraintSettings( const size_t slength = strlen(new_curve->rna_path); bool flip = false; if (BLI_strn_endswith(new_curve->rna_path, "location", slength) && - new_curve->array_index == 0) { + new_curve->array_index == 0) + { flip = true; } else if (BLI_strn_endswith(new_curve->rna_path, "rotation_quaternion", slength) && diff --git a/source/blender/editors/armature/armature_edit.cc b/source/blender/editors/armature/armature_edit.cc index eef0c33d294db83229016854521a13846e9c7cbb..7f073a1990356098d2b9006f153fbe55b40305a4 100644 --- a/source/blender/editors/armature/armature_edit.cc +++ b/source/blender/editors/armature/armature_edit.cc @@ -181,7 +181,8 @@ float ED_armature_ebone_roll_to_vector(const EditBone *bone, /* If tail == head or the bone is aligned with the axis... */ if (normalize_v3(nor) <= FLT_EPSILON || - (fabsf(dot_v3v3(align_axis, nor)) >= (1.0f - FLT_EPSILON))) { + (fabsf(dot_v3v3(align_axis, nor)) >= (1.0f - FLT_EPSILON))) + { return roll; } diff --git a/source/blender/editors/armature/armature_naming.cc b/source/blender/editors/armature/armature_naming.cc index 4904e6597489164dd7635a14be8095cf55e06a8e..8251cba22850c9e29f101ede6364ad7c28936305 100644 --- a/source/blender/editors/armature/armature_naming.cc +++ b/source/blender/editors/armature/armature_naming.cc @@ -189,7 +189,8 @@ void ED_armature_bone_rename(Main *bmain, /* do entire dbase - objects */ for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { /* we have the object using the armature */ if (arm == ob->data) { diff --git a/source/blender/editors/armature/armature_relations.cc b/source/blender/editors/armature/armature_relations.cc index 6f780f2573e1010ec1464d188a65686846f9fa61..f5420802930876788a22203545e4955bf2583553 100644 --- a/source/blender/editors/armature/armature_relations.cc +++ b/source/blender/editors/armature/armature_relations.cc @@ -223,7 +223,8 @@ static void joined_armature_fix_links( /* let's go through all objects in database */ for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { /* do some object-type specific things */ if (ob->type == OB_ARMATURE) { pose = ob->pose; @@ -493,7 +494,8 @@ static void separated_armature_fix_links(Main *bmain, Object *origArm, Object *n /* let's go through all objects in database */ for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { /* do some object-type specific things */ if (ob->type == OB_ARMATURE) { LISTBASE_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) { diff --git a/source/blender/editors/armature/armature_select.cc b/source/blender/editors/armature/armature_select.cc index 803c3b76e6cef01d65838e5f3822c3b11ce87d06..c47cfde1815cfea6f2b394f1d8458912bd470f00 100644 --- a/source/blender/editors/armature/armature_select.cc +++ b/source/blender/editors/armature/armature_select.cc @@ -434,7 +434,8 @@ static bool armature_select_linked_impl(Object *ob, const bool select, const boo /* We have an un-touched link. */ for (EditBone *ebone = ebone_iter; ebone; - ebone = CHECK_PARENT(ebone) ? ebone->parent : nullptr) { + ebone = CHECK_PARENT(ebone) ? ebone->parent : nullptr) + { ED_armature_ebone_select_set(ebone, select); changed = true; @@ -464,7 +465,8 @@ static bool armature_select_linked_impl(Object *ob, const bool select, const boo /* First check if we're marked. */ EditBone *ebone_touched_parent = nullptr; for (EditBone *ebone = ebone_iter; ebone; - ebone = CHECK_PARENT(ebone) ? ebone->parent : nullptr) { + ebone = CHECK_PARENT(ebone) ? ebone->parent : nullptr) + { if (ebone->temp.i & TOUCH) { ebone_touched_parent = ebone; break; @@ -517,7 +519,8 @@ static int armature_select_linked_exec(bContext *C, wmOperator *op) bool found = false; LISTBASE_FOREACH (EditBone *, ebone, arm->edbo) { if (EBONE_VISIBLE(arm, ebone) && - (ebone->flag & (BONE_SELECTED | BONE_ROOTSEL | BONE_TIPSEL))) { + (ebone->flag & (BONE_SELECTED | BONE_ROOTSEL | BONE_TIPSEL))) + { ebone->flag |= BONE_DONE; found = true; } @@ -975,7 +978,8 @@ bool ED_armature_edit_select_pick_bone( if (params->sel_op == SEL_OP_SET) { if ((found && params->select_passthrough) && - (ED_armature_ebone_selectflag_get(ebone) & selmask)) { + (ED_armature_ebone_selectflag_get(ebone) & selmask)) + { found = false; } else if (found || params->deselect_all) { diff --git a/source/blender/editors/armature/armature_skinning.cc b/source/blender/editors/armature/armature_skinning.cc index 805edc29d178b65252d518ccaf099fd91bf2d065..57d2b8819eb806d15058c5f32a5c6765c63445ac 100644 --- a/source/blender/editors/armature/armature_skinning.cc +++ b/source/blender/editors/armature/armature_skinning.cc @@ -82,7 +82,8 @@ static int bone_skinnable_cb(Object * /*ob*/, Bone *bone, void *datap) if (!(data->is_weight_paint) || !(bone->flag & BONE_HIDDEN_P)) { if (!(bone->flag & BONE_NO_DEFORM)) { if (data->heat && data->armob->pose && - BKE_pose_channel_find_name(data->armob->pose, bone->name)) { + BKE_pose_channel_find_name(data->armob->pose, bone->name)) + { segments = bone->segments; } else { @@ -156,7 +157,8 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap) if (!data->is_weight_paint || !(bone->flag & BONE_HIDDEN_P)) { if (!(bone->flag & BONE_NO_DEFORM)) { if (data->heat && data->armob->pose && - BKE_pose_channel_find_name(data->armob->pose, bone->name)) { + BKE_pose_channel_find_name(data->armob->pose, bone->name)) + { segments = bone->segments; } else { diff --git a/source/blender/editors/armature/armature_utils.cc b/source/blender/editors/armature/armature_utils.cc index 6b25725e49f88be5a9c33b507a662dbe899a844d..b78be20b4f283c77f2cf788591bc4f10cdf0f765 100644 --- a/source/blender/editors/armature/armature_utils.cc +++ b/source/blender/editors/armature/armature_utils.cc @@ -179,7 +179,8 @@ EditBone *ED_armature_ebone_find_shared_parent(EditBone *ebone_child[], const ui /* accumulate */ for (uint i = 0; i < ebone_child_tot; i++) { for (EditBone *ebone_iter = ebone_child[i]->parent; ebone_iter; - ebone_iter = ebone_iter->parent) { + ebone_iter = ebone_iter->parent) + { EBONE_TEMP_UINT(ebone_iter) += 1; } } diff --git a/source/blender/editors/armature/meshlaplacian.h b/source/blender/editors/armature/meshlaplacian.h index 8b425fe99b21ec717aba816074f7b1a4dd6e616c..f7d510cbbdda16a0113e42b1ba2e08d861ed1f89 100644 --- a/source/blender/editors/armature/meshlaplacian.h +++ b/source/blender/editors/armature/meshlaplacian.h @@ -13,7 +13,7 @@ extern "C" { #endif -//#define RIGID_DEFORM +// #define RIGID_DEFORM struct Mesh; struct Object; diff --git a/source/blender/editors/armature/pose_select.cc b/source/blender/editors/armature/pose_select.cc index 67010e285ff93b82965121bfd23a7eae792dc9bc..c9f56fcab29df8c4e93054a91f0b5f66d3e46d17 100644 --- a/source/blender/editors/armature/pose_select.cc +++ b/source/blender/editors/armature/pose_select.cc @@ -298,7 +298,8 @@ void ED_armature_pose_select_in_wpaint_mode(const Scene *scene, if (ob_arm != nullptr) { Base *base_arm = BKE_view_layer_base_find(view_layer, ob_arm); if ((base_arm != nullptr) && (base_arm != base_select) && - (base_arm->flag & BASE_SELECTED)) { + (base_arm->flag & BASE_SELECTED)) + { ED_object_base_select(base_arm, BA_DESELECT); } } @@ -315,7 +316,8 @@ void ED_armature_pose_select_in_wpaint_mode(const Scene *scene, if (ob_arm != nullptr) { Base *base_arm = BKE_view_layer_base_find(view_layer, ob_arm); if ((base_arm != nullptr) && (base_arm != base_select) && - (base_arm->flag & BASE_SELECTED)) { + (base_arm->flag & BASE_SELECTED)) + { ED_object_base_select(base_arm, BA_DESELECT); } } diff --git a/source/blender/editors/armature/pose_transform.cc b/source/blender/editors/armature/pose_transform.cc index 1cd07c8dfccc7c540c2521830297a881edf31a03..9538635f74b5ad64884a95eac9be14e4a276f019 100644 --- a/source/blender/editors/armature/pose_transform.cc +++ b/source/blender/editors/armature/pose_transform.cc @@ -89,7 +89,8 @@ static void applyarmature_fix_boneparents(const bContext *C, Scene *scene, Objec /* go through all objects in database */ for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { /* if parent is bone in this armature, apply corrections */ if ((ob->parent == armob) && (ob->partype == PARBONE)) { /* apply current transform from parent (not yet destroyed), @@ -1049,7 +1050,8 @@ static void pchan_clear_rot(bPoseChannel *pchan) /* check validity of axis - axis should never be 0,0,0 * (if so, then we make it rotate about y). */ if (IS_EQF(pchan->rotAxis[0], pchan->rotAxis[1]) && - IS_EQF(pchan->rotAxis[1], pchan->rotAxis[2])) { + IS_EQF(pchan->rotAxis[1], pchan->rotAxis[2])) + { pchan->rotAxis[1] = 1.0f; } } @@ -1116,7 +1118,8 @@ static void pchan_clear_rot(bPoseChannel *pchan) /* quaternions flip w sign to accumulate rotations correctly */ if ((quat1[0] < 0.0f && pchan->quat[0] > 0.0f) || - (quat1[0] > 0.0f && pchan->quat[0] < 0.0f)) { + (quat1[0] > 0.0f && pchan->quat[0] < 0.0f)) + { mul_qt_fl(pchan->quat, -1.0f); } } diff --git a/source/blender/editors/curve/editcurve.cc b/source/blender/editors/curve/editcurve.cc index a253a00e68a1a64c34e0b1818112e78e7a60af50..4f81ed39c772daa9c5c287d99b551d256bc05cb5 100644 --- a/source/blender/editors/curve/editcurve.cc +++ b/source/blender/editors/curve/editcurve.cc @@ -3478,7 +3478,8 @@ static void subdividenurb(Object *obedit, View3D *v3d, int number_cuts) } if (BEZT_ISSEL_ANY_HIDDENHANDLES(v3d, bezt) && - BEZT_ISSEL_ANY_HIDDENHANDLES(v3d, nextbezt)) { + BEZT_ISSEL_ANY_HIDDENHANDLES(v3d, nextbezt)) + { float prevvec[3][3]; memcpy(prevvec, bezt->vec, sizeof(float[9])); @@ -4810,7 +4811,8 @@ bool ED_curve_editnurb_select_pick(bContext *C, if (params->sel_op == SEL_OP_SET) { if ((found && params->select_passthrough) && - (((bezt ? (&bezt->f1)[hand] : bp->f1) & SELECT) != 0)) { + (((bezt ? (&bezt->f1)[hand] : bp->f1) & SELECT) != 0)) + { found = false; } else if (found || params->deselect_all) { diff --git a/source/blender/editors/curve/editcurve_select.cc b/source/blender/editors/curve/editcurve_select.cc index 373ca3d55dcc2bc5eaf5099a388d23781cf119fa..2f16ceedc3a4b3a830a3ca65381013d7339ad08c 100644 --- a/source/blender/editors/curve/editcurve_select.cc +++ b/source/blender/editors/curve/editcurve_select.cc @@ -355,7 +355,8 @@ static void select_adjacent_cp(ListBase *editnurb, break; } if ((lastsel == false) && (bezt->hide == 0) && - ((bezt->f2 & SELECT) || (selstatus == false))) { + ((bezt->f2 & SELECT) || (selstatus == false))) + { bezt += next; if (!(bezt->f2 & SELECT) || (selstatus == false)) { bool sel = select_beztriple(bezt, selstatus, SELECT, VISIBLE); @@ -1086,7 +1087,8 @@ static void curve_select_less(Object *obedit) else { bp -= nu->pntsu; if (BLI_BITMAP_TEST(selbpoints, a + nu->pntsu) || - ((bp->hide == 0) && (bp->f1 & SELECT))) { + ((bp->hide == 0) && (bp->f1 & SELECT))) + { sel++; } bp += nu->pntsu; @@ -1645,7 +1647,8 @@ static bool curve_nurb_select_similar_type(Object *ob, case SIMCURHAND_RADIUS: { float radius_ref = bezt->radius; if (ED_select_similar_compare_float_tree( - tree_1d, radius_ref, thresh, eSimilarCmp(compare))) { + tree_1d, radius_ref, thresh, eSimilarCmp(compare))) + { select = true; } break; @@ -1653,7 +1656,8 @@ static bool curve_nurb_select_similar_type(Object *ob, case SIMCURHAND_WEIGHT: { float weight_ref = bezt->weight; if (ED_select_similar_compare_float_tree( - tree_1d, weight_ref, thresh, eSimilarCmp(compare))) { + tree_1d, weight_ref, thresh, eSimilarCmp(compare))) + { select = true; } break; @@ -1692,7 +1696,8 @@ static bool curve_nurb_select_similar_type(Object *ob, case SIMCURHAND_RADIUS: { float radius_ref = bp->radius; if (ED_select_similar_compare_float_tree( - tree_1d, radius_ref, thresh, eSimilarCmp(compare))) { + tree_1d, radius_ref, thresh, eSimilarCmp(compare))) + { select = true; } break; @@ -1700,7 +1705,8 @@ static bool curve_nurb_select_similar_type(Object *ob, case SIMCURHAND_WEIGHT: { float weight_ref = bp->weight; if (ED_select_similar_compare_float_tree( - tree_1d, weight_ref, thresh, eSimilarCmp(compare))) { + tree_1d, weight_ref, thresh, eSimilarCmp(compare))) + { select = true; } break; @@ -1922,7 +1928,8 @@ static void curve_select_shortest_path_curve(Nurb *nu, int vert_src, int vert_ds if (nu->flagu & CU_NURB_CYCLIC) { if (curve_calc_dist_span(nu, vert_src, vert_dst) > - curve_calc_dist_span(nu, vert_dst, vert_src)) { + curve_calc_dist_span(nu, vert_dst, vert_src)) + { SWAP(int, vert_src, vert_dst); } } @@ -1953,7 +1960,7 @@ static void curve_select_shortest_path_surf(Nurb *nu, int vert_src, int vert_dst struct PointAdj { int vert, vert_prev; float cost; - } * data; + } *data; /* init connectivity data */ data = static_cast<PointAdj *>(MEM_mallocN(sizeof(*data) * vert_num, __func__)); diff --git a/source/blender/editors/curves/intern/curves_selection.cc b/source/blender/editors/curves/intern/curves_selection.cc index d3f25e3a699ed28d67eb4df204d4b2df7149368c..6324741f0d139d40abb9a9ca10c6043c5bae63a5 100644 --- a/source/blender/editors/curves/intern/curves_selection.cc +++ b/source/blender/editors/curves/intern/curves_selection.cc @@ -292,7 +292,8 @@ void select_all(bke::CurvesGeometry &curves, if (action == SEL_SELECT) { std::optional<IndexRange> range = mask.to_range(); if (range.has_value() && - (*range == IndexRange(curves.attributes().domain_size(selection_domain)))) { + (*range == IndexRange(curves.attributes().domain_size(selection_domain)))) + { /* As an optimization, just remove the selection attributes when everything is selected. */ attributes.remove(".selection"); return; @@ -539,7 +540,8 @@ static std::optional<FindClosestData> find_closest_point_to_screen_co( const float distance_proj_sq = math::distance_squared(pos_proj, mouse_pos); if (distance_proj_sq > radius_sq || - distance_proj_sq > best_match.distance * best_match.distance) { + distance_proj_sq > best_match.distance * best_match.distance) + { /* Ignore the point because it's too far away or there is already a better point. */ continue; } @@ -598,7 +600,8 @@ static std::optional<FindClosestData> find_closest_curve_to_screen_co( const float distance_proj_sq = math::distance_squared(pos_proj, mouse_pos); if (distance_proj_sq > radius_sq || - distance_proj_sq > best_match.distance * best_match.distance) { + distance_proj_sq > best_match.distance * best_match.distance) + { /* Ignore the point because it's too far away or there is already a better point. */ continue; @@ -621,7 +624,8 @@ static std::optional<FindClosestData> find_closest_curve_to_screen_co( const float distance_proj_sq = dist_squared_to_line_segment_v2( mouse_pos, pos1_proj, pos2_proj); if (distance_proj_sq > radius_sq || - distance_proj_sq > best_match.distance * best_match.distance) { + distance_proj_sq > best_match.distance * best_match.distance) + { /* Ignore the segment because it's too far away or there is already a better point. */ continue; diff --git a/source/blender/editors/geometry/node_group_operator.cc b/source/blender/editors/geometry/node_group_operator.cc index abf882030b2d18314dcdf2326c1fcd1a908cd573..25cb8d4c131d0ce6b3ecdee63d87a6a901b4f977 100644 --- a/source/blender/editors/geometry/node_group_operator.cc +++ b/source/blender/editors/geometry/node_group_operator.cc @@ -948,7 +948,8 @@ static bool unassigned_local_poll(const bContext &C) continue; } if (!group->geometry_node_asset_traits || - (group->geometry_node_asset_traits->flag & flag) != flag) { + (group->geometry_node_asset_traits->flag & flag) != flag) + { continue; } return true; @@ -992,7 +993,8 @@ static void catalog_assets_draw_unassigned(const bContext *C, Menu *menu) continue; } if (!group->geometry_node_asset_traits || - (group->geometry_node_asset_traits->flag & flag) != flag) { + (group->geometry_node_asset_traits->flag & flag) != flag) + { continue; } diff --git a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.cc b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.cc index 818c6b62f54c2959dcec507be9ac7149ad18e66c..af562be8feef7efd44afe44b8afd487b9e7ca1d4 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.cc +++ b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.cc @@ -333,7 +333,8 @@ static void dial_ghostarc_get_angles(const wmGizmo *gz, }; if (!ED_view3d_win_to_3d_on_plane( - region, dial_plane, inter->init.mval, false, proj_mval_init_rel)) { + region, dial_plane, inter->init.mval, false, proj_mval_init_rel)) + { return fail(); } sub_v3_v3(proj_mval_init_rel, gz->matrix_basis[3]); diff --git a/source/blender/editors/gpencil_legacy/annotate_draw.cc b/source/blender/editors/gpencil_legacy/annotate_draw.cc index bd7d56f1471e5baea59b1b13172e54bcaf5b0716..51856d29779b018c823816fff88c00bed100ca43 100644 --- a/source/blender/editors/gpencil_legacy/annotate_draw.cc +++ b/source/blender/editors/gpencil_legacy/annotate_draw.cc @@ -211,7 +211,8 @@ static void annotation_draw_stroke_buffer(bGPdata *gps, if (totpoints > 1) { /* Draw ending arrow stroke. */ if ((sflag & GP_STROKE_USE_ARROW_END) && - (runtime.arrow_end_style != GP_STROKE_ARROWSTYLE_NONE)) { + (runtime.arrow_end_style != GP_STROKE_ARROWSTYLE_NONE)) + { float end[2]; copy_v2_v2(end, points[1].m_xy); annotation_draw_stroke_arrow_buffer(pos, end, runtime.arrow_end, runtime.arrow_end_style); @@ -703,7 +704,8 @@ static void annotation_draw_data_layers( * that is being edited. (Stroke buffer is currently stored in gp-data) */ if (ED_gpencil_session_active() && (gpl->flag & GP_LAYER_ACTIVE) && - (gpf->flag & GP_FRAME_PAINT)) { + (gpf->flag & GP_FRAME_PAINT)) + { /* Buffer stroke needs to be drawn with a different line-style * to help differentiate them from normal strokes. * diff --git a/source/blender/editors/gpencil_legacy/gpencil_armature.cc b/source/blender/editors/gpencil_legacy/gpencil_armature.cc index a4dc6c3caaea8ac4f14880e9eaaebe46cb9863a5..71b30b19e5c151c36944db0ffacb963a7ee9698e 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_armature.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_armature.cc @@ -127,7 +127,8 @@ static int gpencil_bone_skinnable_cb(Object * /*ob*/, Bone *bone, void *datap) if (!(bone->flag & BONE_HIDDEN_P)) { if (!(bone->flag & BONE_NO_DEFORM)) { if (data->heat && data->armob->pose && - BKE_pose_channel_find_name(data->armob->pose, bone->name)) { + BKE_pose_channel_find_name(data->armob->pose, bone->name)) + { segments = bone->segments; } else { @@ -200,7 +201,8 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap) if (!(bone->flag & BONE_HIDDEN_P)) { if (!(bone->flag & BONE_NO_DEFORM)) { if (data->heat && data->armob->pose && - BKE_pose_channel_find_name(data->armob->pose, bone->name)) { + BKE_pose_channel_find_name(data->armob->pose, bone->name)) + { segments = bone->segments; } else { diff --git a/source/blender/editors/gpencil_legacy/gpencil_convert.cc b/source/blender/editors/gpencil_legacy/gpencil_convert.cc index 9bd48342df484f01d69a91bb01857a5dfcaa6a4e..6005953b899d4149c39d82fd8b0aa53a24ab7dd4 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_convert.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_convert.cc @@ -1522,7 +1522,8 @@ static int gpencil_convert_layer_exec(bContext *C, wmOperator *op) gtd.mode = RNA_enum_get(op->ptr, "timing_mode"); /* Check for illegal timing mode! */ if (!valid_timing && - !ELEM(gtd.mode, GP_STROKECONVERT_TIMING_NONE, GP_STROKECONVERT_TIMING_LINEAR)) { + !ELEM(gtd.mode, GP_STROKECONVERT_TIMING_NONE, GP_STROKECONVERT_TIMING_LINEAR)) + { gtd.mode = GP_STROKECONVERT_TIMING_LINEAR; RNA_enum_set(op->ptr, "timing_mode", gtd.mode); } diff --git a/source/blender/editors/gpencil_legacy/gpencil_edit.cc b/source/blender/editors/gpencil_legacy/gpencil_edit.cc index f7a296e4a030cb94d5bb4e3a32f29f41a8e8d8be..da7df6fe7828867b431969afe3f5135ca989ec9e 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_edit.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_edit.cc @@ -1576,7 +1576,8 @@ static int gpencil_strokes_copy_exec(bContext *C, wmOperator *op) char **ma_name_val; if (!BLI_ghash_ensure_p( - gpencil_strokes_copypastebuf_colors, &gps->mat_nr, (void ***)&ma_name_val)) { + gpencil_strokes_copypastebuf_colors, &gps->mat_nr, (void ***)&ma_name_val)) + { char *ma_name = static_cast<char *>(BLI_ghash_lookup(ma_to_name, ma)); *ma_name_val = static_cast<char *>(MEM_dupallocN(ma_name)); } @@ -3303,7 +3304,8 @@ static int gpencil_stroke_cyclical_set_exec(bContext *C, wmOperator *op) } /* skip hidden or locked colors */ if (!gp_style || (gp_style->flag & GP_MATERIAL_HIDE) || - (gp_style->flag & GP_MATERIAL_LOCKED)) { + (gp_style->flag & GP_MATERIAL_LOCKED)) + { continue; } @@ -3449,12 +3451,14 @@ static int gpencil_stroke_caps_set_exec(bContext *C, wmOperator *op) /* skip strokes that are not selected or invalid for current view */ if (((gps->flag & GP_STROKE_SELECT) == 0) || - (ED_gpencil_stroke_can_use(C, gps) == false)) { + (ED_gpencil_stroke_can_use(C, gps) == false)) + { continue; } /* skip hidden or locked colors */ if (!gp_style || (gp_style->flag & GP_MATERIAL_HIDE) || - (gp_style->flag & GP_MATERIAL_LOCKED)) { + (gp_style->flag & GP_MATERIAL_LOCKED)) + { continue; } diff --git a/source/blender/editors/gpencil_legacy/gpencil_fill.cc b/source/blender/editors/gpencil_legacy/gpencil_fill.cc index d860c28d561f85afa15b95d55e8ecb20b042df27..4547e908d1eee009790d6eabb4263574ec663d22 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_fill.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_fill.cc @@ -248,7 +248,8 @@ static void gpencil_delete_temp_stroke_extension(tGPDfill *tgpf, const bool all_ LISTBASE_FOREACH_MUTABLE (bGPDstroke *, gps, &gpf->strokes) { /* free stroke */ if ((gps->flag & GP_STROKE_NOFILL) && - (gps->flag & GP_STROKE_TAG || gps->flag & GP_STROKE_HELP)) { + (gps->flag & GP_STROKE_TAG || gps->flag & GP_STROKE_HELP)) + { BLI_remlink(&gpf->strokes, gps); BKE_gpencil_free_stroke(gps); } @@ -2259,7 +2260,8 @@ static void gpencil_stroke_from_buffer(tGPDfill *tgpf) /* if axis locked, reproject to plane locked */ if ((tgpf->lock_axis > GP_LOCKAXIS_VIEW) && - ((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_VIEW) == 0)) { + ((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_VIEW) == 0)) + { float origin[3]; ED_gpencil_drawing_reference_get(tgpf->scene, tgpf->ob, ts->gpencil_v3d_align, origin); ED_gpencil_project_stroke_to_plane( diff --git a/source/blender/editors/gpencil_legacy/gpencil_paint.cc b/source/blender/editors/gpencil_legacy/gpencil_paint.cc index e9b4461e993494facf1d712235948f5c7fa03b70..4cf4c477492288cb1c9796465b50aa62d4320c44 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_paint.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_paint.cc @@ -1732,7 +1732,8 @@ static void gpencil_stroke_eraser_dostroke(tGPsdata *p, /* if invisible, delete point */ if ((pt0) && ((pt0->strength <= GPENCIL_ALPHA_OPACITY_THRESH) || - (pt0->pressure < cull_thresh))) { + (pt0->pressure < cull_thresh))) + { pt0->flag |= GP_SPOINT_TAG; do_cull = true; } @@ -1933,7 +1934,8 @@ static Brush *gpencil_get_default_eraser(Main *bmain, ToolSettings *ts) continue; } if ((brush->ob_mode == OB_MODE_PAINT_GPENCIL_LEGACY) && - (brush->gpencil_tool == GPAINT_TOOL_ERASE)) { + (brush->gpencil_tool == GPAINT_TOOL_ERASE)) + { /* save first eraser to use later if no default */ if (brush_dft == nullptr) { brush_dft = brush; diff --git a/source/blender/editors/gpencil_legacy/gpencil_select.cc b/source/blender/editors/gpencil_legacy/gpencil_select.cc index 94c96419cc30902d17c69f5b108e88a17879827c..2f13a9a08595e7954853ce7fead89c9e3f2ff62b 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_select.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_select.cc @@ -850,7 +850,8 @@ static bool gpencil_select_same_material(bContext *C) if (is_curve_edit) { CTX_DATA_BEGIN (C, bGPDstroke *, gps, editable_gpencil_strokes) { if (gps->editcurve != nullptr && - BLI_gset_haskey(selected_colors, POINTER_FROM_INT(gps->mat_nr))) { + BLI_gset_haskey(selected_colors, POINTER_FROM_INT(gps->mat_nr))) + { bGPDcurve *gpc = gps->editcurve; for (int i = 0; i < gpc->tot_curve_points; i++) { bGPDcurve_point *gpc_pt = &gpc->curve_points[i]; diff --git a/source/blender/editors/gpencil_legacy/gpencil_utils.cc b/source/blender/editors/gpencil_legacy/gpencil_utils.cc index 3d11fb7c0db3ecee25058b09daa3d6e8dd534c87..9228993ff1bee3dc35abe0c9aa7f7d8b1f1aa2e0 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_utils.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_utils.cc @@ -721,7 +721,8 @@ void gpencil_point_to_xy_fl(const GP_SpaceConversion *gsc, if (gps->flag & GP_STROKE_3DSPACE) { if (ED_view3d_project_float_global(region, &pt->x, xyval, V3D_PROJ_TEST_NOP) == - V3D_PROJ_RET_OK) { + V3D_PROJ_RET_OK) + { *r_x = xyval[0]; *r_y = xyval[1]; } @@ -877,7 +878,8 @@ void gpencil_stroke_convertcoords_tpoint(Scene *scene, rvec); if (ED_view3d_project_float_global(region, rvec, mval_prj, V3D_PROJ_TEST_NOP) == - V3D_PROJ_RET_OK) { + V3D_PROJ_RET_OK) + { float dvec[3]; float xy_delta[2]; sub_v2_v2v2(xy_delta, mval_prj, point2D->m_xy); diff --git a/source/blender/editors/gpencil_legacy/gpencil_vertex_ops.cc b/source/blender/editors/gpencil_legacy/gpencil_vertex_ops.cc index 19ab912780c9ac675cfba627ce49d5316166f0a1..b9a1996c1fc6f399190e54aa9bb8c4556f213aff 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_vertex_ops.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_vertex_ops.cc @@ -183,7 +183,8 @@ static int gpencil_vertexpaint_brightness_contrast_exec(bContext *C, wmOperator bGPDspoint *pt; for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) { if (((!any_selected) || (pt->flag & GP_SPOINT_SELECT)) && - (pt->vert_color[3] > 0.0f)) { + (pt->vert_color[3] > 0.0f)) + { for (int i2 = 0; i2 < 3; i2++) { pt->vert_color[i2] = gain * pt->vert_color[i2] + offset; } @@ -295,7 +296,8 @@ static int gpencil_vertexpaint_hsv_exec(bContext *C, wmOperator *op) bGPDspoint *pt; for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) { if (((!any_selected) || (pt->flag & GP_SPOINT_SELECT)) && - (pt->vert_color[3] > 0.0f)) { + (pt->vert_color[3] > 0.0f)) + { rgb_to_hsv_v(pt->vert_color, hsv); hsv[0] += (hue - 0.5f); @@ -400,7 +402,8 @@ static int gpencil_vertexpaint_invert_exec(bContext *C, wmOperator *op) for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) { if (((!any_selected) || (pt->flag & GP_SPOINT_SELECT)) && - (pt->vert_color[3] > 0.0f)) { + (pt->vert_color[3] > 0.0f)) + { for (int i2 = 0; i2 < 3; i2++) { pt->vert_color[i2] = 1.0f - pt->vert_color[i2]; } @@ -492,7 +495,8 @@ static int gpencil_vertexpaint_levels_exec(bContext *C, wmOperator *op) for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) { if (((!any_selected) || (pt->flag & GP_SPOINT_SELECT)) && - (pt->vert_color[3] > 0.0f)) { + (pt->vert_color[3] > 0.0f)) + { for (int i2 = 0; i2 < 3; i2++) { pt->vert_color[i2] = gain * (pt->vert_color[i2] + offset); } diff --git a/source/blender/editors/gpencil_legacy/gpencil_weight_paint.cc b/source/blender/editors/gpencil_legacy/gpencil_weight_paint.cc index 4147c451e1662c8bb4ad04aa69533fe1b1e8a2ac..a83d37adf74970c2f56d8bcbadf60e6e3ee36889 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_weight_paint.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_weight_paint.cc @@ -401,7 +401,8 @@ static bool do_weight_paint_normalize(MDeformVert *dvert, for (int i = dvert->totweight; i != 0; i--, dw++) { if (dw->def_nr < defbase_tot && vgroup_bone_deformed[dw->def_nr]) { if ((vgroup_locked[dw->def_nr] == false) && - !(lock_active_vgroup && active_vgroup == dw->def_nr)) { + !(lock_active_vgroup && active_vgroup == dw->def_nr)) + { dw->weight = 0.0f; } } @@ -417,7 +418,8 @@ static bool do_weight_paint_normalize(MDeformVert *dvert, if (dw->def_nr < defbase_tot && vgroup_bone_deformed[dw->def_nr] && dw->weight > FLT_EPSILON) { if ((vgroup_locked[dw->def_nr] == false) && - !(lock_active_vgroup && active_vgroup == dw->def_nr)) { + !(lock_active_vgroup && active_vgroup == dw->def_nr)) + { dw->weight *= fac; CLAMP(dw->weight, 0.0f, 1.0f); } @@ -433,7 +435,8 @@ static bool do_weight_paint_normalize(MDeformVert *dvert, if (dw->def_nr < defbase_tot && vgroup_bone_deformed[dw->def_nr] && dw->weight > FLT_EPSILON) { if ((vgroup_locked[dw->def_nr] == false) && - !(lock_active_vgroup && active_vgroup == dw->def_nr)) { + !(lock_active_vgroup && active_vgroup == dw->def_nr)) + { dw->weight = fac; } } diff --git a/source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc b/source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc index 6ff8a878550cf3e787cf9cd5b298893f72ff6bee..052163e655df4f9a039b28a74514114a64265ae5 100644 --- a/source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc +++ b/source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc @@ -246,7 +246,8 @@ void gaussian_blur_1D(const GSpan src, using T = decltype(dummy); /* Reduces unnecessary code generation. */ if constexpr (std::is_same_v<T, float> || std::is_same_v<T, float2> || - std::is_same_v<T, float3>) { + std::is_same_v<T, float3>) + { gaussian_blur_1D(src.typed<T>(), iterations, influence, diff --git a/source/blender/editors/grease_pencil/intern/grease_pencil_frames.cc b/source/blender/editors/grease_pencil/intern/grease_pencil_frames.cc index ccf5426bad8562ee8c48c5970589f03da526d2c1..60a67b48553d4e1ad9189e2e253b6083759ad717 100644 --- a/source/blender/editors/grease_pencil/intern/grease_pencil_frames.cc +++ b/source/blender/editors/grease_pencil/intern/grease_pencil_frames.cc @@ -264,7 +264,8 @@ void select_frames_region(KeyframeEditData *ked, } else if (tool == BEZT_OK_CHANNEL_CIRCLE) { if (keyframe_region_circle_test(static_cast<const KeyframeEdit_CircleData *>(ked->data), - pt)) { + pt)) + { select_frame(frame, select_mode); } } diff --git a/source/blender/editors/include/ED_transform_snap_object_context.hh b/source/blender/editors/include/ED_transform_snap_object_context.hh index e97e06a03ff9f584684ab8d6cd0e8a5a7c348562..30b46e1203141b78bd0932749c92ccdb2910f10e 100644 --- a/source/blender/editors/include/ED_transform_snap_object_context.hh +++ b/source/blender/editors/include/ED_transform_snap_object_context.hh @@ -10,7 +10,7 @@ #include "DNA_scene_types.h" -//#define DEBUG_SNAP_TIME +// #define DEBUG_SNAP_TIME struct BMEdge; struct BMFace; diff --git a/source/blender/editors/interface/interface.cc b/source/blender/editors/interface/interface.cc index 8c6be8ce0f0d76a3c3e111fe0680112729fcf4f0..e591d92e1d36e680dccacb4aad9c365e8336905f 100644 --- a/source/blender/editors/interface/interface.cc +++ b/source/blender/editors/interface/interface.cc @@ -2472,7 +2472,8 @@ bool ui_but_is_bool(const uiBut *but) } if ((but->rnaprop && RNA_property_type(but->rnaprop) == PROP_ENUM) && - (but->type == UI_BTYPE_ROW)) { + (but->type == UI_BTYPE_ROW)) + { return true; } diff --git a/source/blender/editors/interface/interface_context_menu.cc b/source/blender/editors/interface/interface_context_menu.cc index 3aa8185a6360fc793cee222ef93b4c91747f5259..7d3d2ef4c3c2eb9f1c7eecd5592172c3002d5d8c 100644 --- a/source/blender/editors/interface/interface_context_menu.cc +++ b/source/blender/editors/interface/interface_context_menu.cc @@ -978,7 +978,8 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev true); if (ptr->owner_id && !is_whole_array && - ELEM(type, PROP_BOOLEAN, PROP_INT, PROP_FLOAT, PROP_ENUM)) { + ELEM(type, PROP_BOOLEAN, PROP_INT, PROP_FLOAT, PROP_ENUM)) + { uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy as New Driver"), ICON_NONE, diff --git a/source/blender/editors/interface/interface_handlers.cc b/source/blender/editors/interface/interface_handlers.cc index 48596af36f1f0764ff24d383d76802ece3aebb4d..d5bbac775c125e3b3e6bd7720d967e22439403ef 100644 --- a/source/blender/editors/interface/interface_handlers.cc +++ b/source/blender/editors/interface/interface_handlers.cc @@ -657,7 +657,8 @@ static bool ui_but_dragedit_update_mval(uiHandleButtonData *data, int mx) #ifdef USE_DRAG_MULTINUM if (ELEM(data->multi_data.init, uiHandleButtonMulti::INIT_UNSET, - uiHandleButtonMulti::INIT_SETUP)) { + uiHandleButtonMulti::INIT_SETUP)) + { return false; } #endif @@ -959,7 +960,8 @@ static void ui_apply_but_undo(uiBut *but) else { ID *id = but->rnapoin.owner_id; if (!ED_undo_is_legacy_compatible_for_property(static_cast<bContext *>(but->block->evil_C), - id)) { + id)) + { skip_undo = true; } } @@ -4747,7 +4749,8 @@ static int ui_do_but_TEX( { if (data->state == BUTTON_STATE_HIGHLIGHT) { if (ELEM(event->type, LEFTMOUSE, EVT_BUT_OPEN, EVT_PADENTER, EVT_RETKEY) && - event->val == KM_PRESS) { + event->val == KM_PRESS) + { if (ELEM(event->type, EVT_PADENTER, EVT_RETKEY) && !UI_but_is_utf8(but)) { /* Pass, allow file-selector, enter to execute. */ } @@ -6016,7 +6019,8 @@ static int ui_do_but_SCROLL( else if (event->type == MOUSEMOVE) { const bool is_motion = (event->type == MOUSEMOVE); if (ui_numedit_but_SLI( - but, data, (horizontal) ? mx : my, horizontal, is_motion, false, false)) { + but, data, (horizontal) ? mx : my, horizontal, is_motion, false, false)) + { /* Scroll-bars in popups need UI layout refresh to update the right items to show. */ if (ui_block_is_popup_any(but->block)) { ED_region_tag_refresh_ui(data->region); @@ -9403,7 +9407,8 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but) if (data->hold_action_timer) { if (but->flag & UI_SELECT) { if (len_manhattan_v2v2_int(event->xy, event->prev_xy) <= - WM_EVENT_CURSOR_MOTION_THRESHOLD) { + WM_EVENT_CURSOR_MOTION_THRESHOLD) + { /* pass */ } else { @@ -10474,7 +10479,8 @@ static int ui_handle_menu_event(bContext *C, if (event->val == KM_PRESS && (block->flag & UI_BLOCK_LOOP)) { if (ui_menu_pass_event_to_parent_if_nonactive( - menu, but, level, is_parent_menu, retval)) { + menu, but, level, is_parent_menu, retval)) + { break; } @@ -10575,7 +10581,8 @@ static int ui_handle_menu_event(bContext *C, } if (ui_menu_pass_event_to_parent_if_nonactive( - menu, but, level, is_parent_menu, retval)) { + menu, but, level, is_parent_menu, retval)) + { break; } @@ -10687,7 +10694,8 @@ static int ui_handle_menu_event(bContext *C, int count; if (ui_menu_pass_event_to_parent_if_nonactive( - menu, but, level, is_parent_menu, retval)) { + menu, but, level, is_parent_menu, retval)) + { break; } @@ -10709,7 +10717,8 @@ static int ui_handle_menu_event(bContext *C, UI_BTYPE_LABEL, UI_BTYPE_SEPR, UI_BTYPE_SEPR_LINE, - UI_BTYPE_IMAGE)) { + UI_BTYPE_IMAGE)) + { count++; } @@ -10789,7 +10798,8 @@ static int ui_handle_menu_event(bContext *C, /* Menu search if space-bar or #MenuTypeFlag::SearchOnKeyPress. */ MenuType *mt = WM_menutype_find(menu->menu_idname, true); if ((mt && bool(mt->flag & MenuTypeFlag::SearchOnKeyPress)) || - event->type == EVT_SPACEKEY) { + event->type == EVT_SPACEKEY) + { if ((level != 0) && (but == nullptr || !menu->menu_idname[0])) { /* Search parent if the child is open but not activated or not searchable. */ menu->menuretval = UI_RETURN_OUT | UI_RETURN_OUT_PARENT; @@ -10801,7 +10811,8 @@ static int ui_handle_menu_event(bContext *C, } if (ui_menu_pass_event_to_parent_if_nonactive( - menu, but, level, is_parent_menu, retval)) { + menu, but, level, is_parent_menu, retval)) + { break; } @@ -10848,7 +10859,8 @@ static int ui_handle_menu_event(bContext *C, } } else if (saferct && !BLI_rctf_isect_pt( - &saferct->parent, float(event->xy[0]), float(event->xy[1]))) { + &saferct->parent, float(event->xy[0]), float(event->xy[1]))) + { if (block->flag & UI_BLOCK_OUT_1) { menu->menuretval = UI_RETURN_OK; } @@ -10874,7 +10886,8 @@ static int ui_handle_menu_event(bContext *C, } #ifdef USE_KEYNAV_LIMIT else if ((event->type == MOUSEMOVE) && - ui_mouse_motion_keynav_test(&menu->keynav_state, event)) { + ui_mouse_motion_keynav_test(&menu->keynav_state, event)) + { /* Don't handle the mouse-move if we're using key-navigation. */ retval = WM_UI_HANDLER_BREAK; } @@ -10929,12 +10942,14 @@ static int ui_handle_menu_event(bContext *C, /* Check for all parent rects, enables arrow-keys to be used. */ for (saferct = static_cast<uiSafetyRct *>(block->saferct.first); saferct; - saferct = saferct->next) { + saferct = saferct->next) + { /* for mouse move we only check our own rect, for other * events we check all preceding block rects too to make * arrow keys navigation work */ if (event->type != MOUSEMOVE || - saferct == static_cast<uiSafetyRct *>(block->saferct.first)) { + saferct == static_cast<uiSafetyRct *>(block->saferct.first)) + { if (BLI_rctf_isect_pt(&saferct->parent, float(event->xy[0]), float(event->xy[1]))) { break; } diff --git a/source/blender/editors/interface/interface_icons.cc b/source/blender/editors/interface/interface_icons.cc index 7e8a010ec7ae6845100ae0711d169ed085fb4f4e..b2285ebff4e3fded9f3c4a12a7bb06ece8397432 100644 --- a/source/blender/editors/interface/interface_icons.cc +++ b/source/blender/editors/interface/interface_icons.cc @@ -2144,7 +2144,8 @@ static int ui_id_brush_get_icon(const bContext *C, ID *id) /* reset the icon */ if ((ob != nullptr) && (ob->mode & OB_MODE_ALL_PAINT_GPENCIL) && - (br->gpencil_settings != nullptr)) { + (br->gpencil_settings != nullptr)) + { switch (br->gpencil_settings->icon_id) { case GP_BRUSH_ICON_PENCIL: br->id.icon_id = ICON_GPBRUSH_PENCIL; diff --git a/source/blender/editors/interface/interface_layout.cc b/source/blender/editors/interface/interface_layout.cc index cf2e9a58a22b003da072b1e01ae800acff410675..86b6206098dc0e1e05c76bfcf21faaf69f169569 100644 --- a/source/blender/editors/interface/interface_layout.cc +++ b/source/blender/editors/interface/interface_layout.cc @@ -693,7 +693,8 @@ static void ui_item_array(uiLayout *layout, /* Show check-boxes for rna on a non-emboss block (menu for eg). */ bool *boolarr = nullptr; if (type == PROP_BOOLEAN && - ELEM(layout->root->block->emboss, UI_EMBOSS_NONE, UI_EMBOSS_PULLDOWN)) { + ELEM(layout->root->block->emboss, UI_EMBOSS_NONE, UI_EMBOSS_PULLDOWN)) + { boolarr = static_cast<bool *>(MEM_callocN(sizeof(bool) * len, __func__)); RNA_property_boolean_get_array(ptr, prop, boolarr); } @@ -1176,7 +1177,8 @@ static void ui_but_tip_from_enum_item(uiBut *but, const EnumPropertyItem *item) { if (but->tip == nullptr || but->tip[0] == '\0') { if (item->description && item->description[0] && - !(but->optype && but->optype->get_description)) { + !(but->optype && but->optype->get_description)) + { but->tip = item->description; } } @@ -1703,7 +1705,7 @@ void uiItemEnumO_value(uiLayout *layout, int value) { wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */ - UI_OPERATOR_ERROR_RET(ot, opname, return ); + UI_OPERATOR_ERROR_RET(ot, opname, return); PointerRNA ptr; WM_operator_properties_create_ptr(&ptr, ot); @@ -1740,7 +1742,7 @@ void uiItemEnumO_string(uiLayout *layout, const char *value_str) { wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */ - UI_OPERATOR_ERROR_RET(ot, opname, return ); + UI_OPERATOR_ERROR_RET(ot, opname, return); PointerRNA ptr; WM_operator_properties_create_ptr(&ptr, ot); @@ -1796,7 +1798,7 @@ void uiItemBooleanO(uiLayout *layout, int value) { wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */ - UI_OPERATOR_ERROR_RET(ot, opname, return ); + UI_OPERATOR_ERROR_RET(ot, opname, return); PointerRNA ptr; WM_operator_properties_create_ptr(&ptr, ot); @@ -1820,7 +1822,7 @@ void uiItemIntO(uiLayout *layout, int value) { wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */ - UI_OPERATOR_ERROR_RET(ot, opname, return ); + UI_OPERATOR_ERROR_RET(ot, opname, return); PointerRNA ptr; WM_operator_properties_create_ptr(&ptr, ot); @@ -1845,7 +1847,7 @@ void uiItemFloatO(uiLayout *layout, { wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */ - UI_OPERATOR_ERROR_RET(ot, opname, return ); + UI_OPERATOR_ERROR_RET(ot, opname, return); PointerRNA ptr; WM_operator_properties_create_ptr(&ptr, ot); @@ -1870,7 +1872,7 @@ void uiItemStringO(uiLayout *layout, { wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */ - UI_OPERATOR_ERROR_RET(ot, opname, return ); + UI_OPERATOR_ERROR_RET(ot, opname, return); PointerRNA ptr; WM_operator_properties_create_ptr(&ptr, ot); @@ -3684,7 +3686,7 @@ void uiItemMenuEnumFullO(uiLayout *layout, { wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */ - UI_OPERATOR_ERROR_RET(ot, opname, return ); + UI_OPERATOR_ERROR_RET(ot, opname, return); if (!ot->srna) { ui_item_disabled(layout, opname); diff --git a/source/blender/editors/interface/interface_panel.cc b/source/blender/editors/interface/interface_panel.cc index f8faf7d8d0b07467a53e01aac66534b7190b24f6..d7cda1deb52747c49af89ae12ab77864aa4afeb3 100644 --- a/source/blender/editors/interface/interface_panel.cc +++ b/source/blender/editors/interface/interface_panel.cc @@ -621,7 +621,8 @@ static void panels_collapse_all(ARegion *region, const Panel *from_panel) if (pt && from_pt && !(pt->flag & PANEL_TYPE_NO_HEADER)) { if (!pt->context[0] || !from_pt->context[0] || STREQ(pt->context, from_pt->context)) { if ((panel->flag & PNL_PIN) || !category || !pt->category[0] || - STREQ(pt->category, category)) { + STREQ(pt->category, category)) + { panel->flag |= PNL_CLOSED; } } @@ -2267,7 +2268,8 @@ static void ui_panel_category_active_set(ARegion *region, const char *idname, bo while ((pc_act = pc_act_next)) { pc_act_next = pc_act->next; if (!BLI_findstring( - ®ion->type->paneltypes, pc_act->idname, offsetof(PanelType, category))) { + ®ion->type->paneltypes, pc_act->idname, offsetof(PanelType, category))) + { BLI_remlink(lb, pc_act); MEM_freeN(pc_act); } @@ -2471,7 +2473,8 @@ int ui_handler_panel_region(bContext *C, /* The panel collapse / expand key "A" is special as it takes priority over * active button handling. */ if (event->type == EVT_AKEY && - ((event->modifier & (KM_SHIFT | KM_CTRL | KM_ALT | KM_OSKEY)) == 0)) { + ((event->modifier & (KM_SHIFT | KM_CTRL | KM_ALT | KM_OSKEY)) == 0)) + { retval = WM_UI_HANDLER_BREAK; ui_handle_panel_header( C, block, mx, event->type, event->modifier & KM_CTRL, event->modifier & KM_SHIFT); diff --git a/source/blender/editors/interface/interface_region_popup.cc b/source/blender/editors/interface/interface_region_popup.cc index 3e117bb4688c71969592b6773ded39a727a1c04c..5ce3be7989ab0473f2094e50941e495114f5d62d 100644 --- a/source/blender/editors/interface/interface_region_popup.cc +++ b/source/blender/editors/interface/interface_region_popup.cc @@ -863,7 +863,8 @@ void ui_popup_block_free(bContext *C, uiPopupBlockHandle *handle) if (region != nullptr) { LISTBASE_FOREACH (uiBlock *, block, ®ion->uiblocks) { if (block->handle && (block->flag & UI_BLOCK_POPOVER) && - (block->flag & UI_BLOCK_KEEP_OPEN) == 0) { + (block->flag & UI_BLOCK_KEEP_OPEN) == 0) + { uiPopupBlockHandle *menu = block->handle; menu->menuretval = UI_RETURN_OK; } diff --git a/source/blender/editors/interface/interface_region_search.cc b/source/blender/editors/interface/interface_region_search.cc index aa0899af0e96ac9eb0272944db229f253edde6b2..d6dbf6eb852dccb067abc4cf9a8f9088fd274cbf 100644 --- a/source/blender/editors/interface/interface_region_search.cc +++ b/source/blender/editors/interface/interface_region_search.cc @@ -616,7 +616,8 @@ static void ui_searchbox_region_draw_fn(const bContext *C, ARegion *region) /* widget itself */ if ((search_sep_len == 0) || - !(name_sep_test = strstr(data->items.names[a], data->sep_string))) { + !(name_sep_test = strstr(data->items.names[a], data->sep_string))) + { if (!icon && data->items.has_icon) { /* If there is any icon item, make sure all items line up. */ icon = ICON_BLANK1; diff --git a/source/blender/editors/interface/interface_template_list.cc b/source/blender/editors/interface/interface_template_list.cc index 7184cfe73a305eadce92522653e55798bfb5fbde..f168a415190f9718f7ed59c952e04618f410b2b8 100644 --- a/source/blender/editors/interface/interface_template_list.cc +++ b/source/blender/editors/interface/interface_template_list.cc @@ -588,7 +588,8 @@ static void uilist_prepare(uiList *ui_list, /* If list length changes or list is tagged to check this, * and active is out of view, scroll to it. */ if ((ui_list->list_last_len != items->tot_items) || - (ui_list->flag & UILST_SCROLL_TO_ACTIVE_ITEM)) { + (ui_list->flag & UILST_SCROLL_TO_ACTIVE_ITEM)) + { if (activei_row < ui_list->list_scroll) { ui_list->list_scroll = activei_row; } @@ -782,7 +783,8 @@ static void ui_template_list_layout_draw(const bContext *C, 0, editable ? TIP_("Double click to rename") : ""); if ((dyntip_data = uilist_item_use_dynamic_tooltip(itemptr, - input_data->item_dyntip_propname))) { + input_data->item_dyntip_propname))) + { UI_but_func_tooltip_set(but, uilist_item_tooltip_func, dyntip_data, MEM_freeN); } diff --git a/source/blender/editors/interface/interface_templates.cc b/source/blender/editors/interface/interface_templates.cc index 1ad2072ce0222efa7945f6e33ce42eca8440b365..d80d020b6ab4ca8101dff295000b4275dcf68fe5 100644 --- a/source/blender/editors/interface/interface_templates.cc +++ b/source/blender/editors/interface/interface_templates.cc @@ -2772,7 +2772,8 @@ static eAutoPropButsReturn template_operator_property_buts_draw_single( (layout_flags & UI_TEMPLATE_OP_PROPS_COMPACT)); if ((return_info & UI_PROP_BUTS_NONE_ADDED) && - (layout_flags & UI_TEMPLATE_OP_PROPS_SHOW_EMPTY)) { + (layout_flags & UI_TEMPLATE_OP_PROPS_SHOW_EMPTY)) + { uiItemL(layout, IFACE_("No Properties"), ICON_NONE); } } @@ -2883,7 +2884,8 @@ static bool ui_layout_operator_properties_only_booleans(const bContext *C, continue; } if (op->type->poll_property && - !ui_layout_operator_buts_poll_property(&ptr, prop, &user_data)) { + !ui_layout_operator_buts_poll_property(&ptr, prop, &user_data)) + { continue; } if (RNA_property_type(prop) != PROP_BOOLEAN) { @@ -4819,7 +4821,8 @@ static void curvemap_buttons_layout(uiLayout *layout, TIP_("Auto Handle")); UI_but_func_set(bt, curvemap_tools_handle_auto, cumap, nullptr); if (((cmp->flag & CUMA_HANDLE_AUTO_ANIM) == false) && - ((cmp->flag & CUMA_HANDLE_VECTOR) == false)) { + ((cmp->flag & CUMA_HANDLE_VECTOR) == false)) + { bt->flag |= UI_SELECT_DRAW; } diff --git a/source/blender/editors/interface/interface_widgets.cc b/source/blender/editors/interface/interface_widgets.cc index 696827f197e72ea4d1549e1848b78327fe352296..bc885fb83989de3f49e3c09360a305adb3c93024 100644 --- a/source/blender/editors/interface/interface_widgets.cc +++ b/source/blender/editors/interface/interface_widgets.cc @@ -1998,7 +1998,8 @@ static void widget_draw_text(const uiFontStyle *fstyle, bool has_prev = false; if (pos > 0) { if (BLF_str_offset_to_glyph_bounds( - fstyle->uifont_id, drawstr + but->ofs, pos - 1, &bounds)) { + fstyle->uifont_id, drawstr + but->ofs, pos - 1, &bounds)) + { if (bounds.xmax > bounds.xmin) { prev_right_edge = bounds.xmax; } @@ -5097,7 +5098,8 @@ void ui_draw_but(const bContext *C, ARegion *region, uiStyle *style, uiBut *but, } if ((but->editstr) || - (UNLIKELY(but->flag & UI_BUT_DRAG_MULTI) && ui_but_drag_multi_edit_get(but))) { + (UNLIKELY(but->flag & UI_BUT_DRAG_MULTI) && ui_but_drag_multi_edit_get(but))) + { state.is_text_input = true; } @@ -5416,7 +5418,8 @@ void ui_draw_pie_center(uiBlock *block) immUnbindProgram(); if (U.pie_menu_confirm > 0 && - !(block->pie_data.flags & (UI_PIE_INVALID_DIR | UI_PIE_CLICK_STYLE))) { + !(block->pie_data.flags & (UI_PIE_INVALID_DIR | UI_PIE_CLICK_STYLE))) + { const float pie_confirm_radius = UI_SCALE_FAC * (pie_radius_internal + U.pie_menu_confirm); const float pie_confirm_external = UI_SCALE_FAC * (pie_radius_internal + U.pie_menu_confirm + 7.0f); diff --git a/source/blender/editors/interface/view2d.cc b/source/blender/editors/interface/view2d.cc index b95358ebb835b682d221cf6fc6e019d9268f60d1..6b55c5c91907ce4114dae6b1e1325b8b70f4e8df 100644 --- a/source/blender/editors/interface/view2d.cc +++ b/source/blender/editors/interface/view2d.cc @@ -651,7 +651,8 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize) /* width */ if ((curwidth > totwidth) && - !(v2d->keepzoom & (V2D_KEEPZOOM | V2D_LOCKZOOM_X | V2D_LIMITZOOM))) { + !(v2d->keepzoom & (V2D_KEEPZOOM | V2D_LOCKZOOM_X | V2D_LIMITZOOM))) + { /* if zoom doesn't have to be maintained, just clamp edges */ if (cur->xmin < tot->xmin) { cur->xmin = tot->xmin; @@ -740,7 +741,8 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize) /* height */ if ((curheight > totheight) && - !(v2d->keepzoom & (V2D_KEEPZOOM | V2D_LOCKZOOM_Y | V2D_LIMITZOOM))) { + !(v2d->keepzoom & (V2D_KEEPZOOM | V2D_LOCKZOOM_Y | V2D_LIMITZOOM))) + { /* if zoom doesn't have to be maintained, just clamp edges */ if (cur->ymin < tot->ymin) { cur->ymin = tot->ymin; diff --git a/source/blender/editors/interface/view2d_ops.cc b/source/blender/editors/interface/view2d_ops.cc index 77a23c32f567306668b6784d4549a0e7869a60b9..064458c751097afc441a3d89b4a7080cb3266f11 100644 --- a/source/blender/editors/interface/view2d_ops.cc +++ b/source/blender/editors/interface/view2d_ops.cc @@ -785,7 +785,8 @@ static void view_zoomstep_apply_ex(bContext *C, /* only move view to mouse if zoom fac is inside minzoom/maxzoom */ if (((v2d->keepzoom & V2D_LIMITZOOM) == 0) || - IN_RANGE_INCL(zoomx, v2d->minzoom, v2d->maxzoom)) { + IN_RANGE_INCL(zoomx, v2d->minzoom, v2d->maxzoom)) + { const float mval_fac = (vzd->mx_2d - cur_old.xmin) / BLI_rctf_size_x(&cur_old); const float mval_faci = 1.0f - mval_fac; const float ofs = (mval_fac * dx) - (mval_faci * dx); @@ -820,7 +821,8 @@ static void view_zoomstep_apply_ex(bContext *C, /* only move view to mouse if zoom fac is inside minzoom/maxzoom */ if (((v2d->keepzoom & V2D_LIMITZOOM) == 0) || - IN_RANGE_INCL(zoomy, v2d->minzoom, v2d->maxzoom)) { + IN_RANGE_INCL(zoomy, v2d->minzoom, v2d->maxzoom)) + { const float mval_fac = (vzd->my_2d - cur_old.ymin) / BLI_rctf_size_y(&cur_old); const float mval_faci = 1.0f - mval_fac; const float ofs = (mval_fac * dy) - (mval_faci * dy); @@ -1174,7 +1176,8 @@ static int view_zoomdrag_invoke(bContext *C, wmOperator *op, const wmEvent *even /* Only respect user setting zoom axis if the view does not have any zoom restrictions * any will be scaled uniformly. */ if (((v2d->keepzoom & (V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y)) == 0) && - (v2d->keepzoom & V2D_KEEPASPECT)) { + (v2d->keepzoom & V2D_KEEPASPECT)) + { if (U.uiflag & USER_ZOOM_HORIZ) { facy = 0.0f; } diff --git a/source/blender/editors/mask/mask_add.cc b/source/blender/editors/mask/mask_add.cc index 4d70222c4987339e1ccdbfcc871efbd4d3fe800f..a62e46c486cc108a2fb9be4c284a5e882f7e921c 100644 --- a/source/blender/editors/mask/mask_add.cc +++ b/source/blender/editors/mask/mask_add.cc @@ -183,7 +183,8 @@ static void finSelectedSplinePoint(MaskLayer *mask_layer, if (check_active) { /* TODO: having an active point but no active spline is possible, why? */ if (mask_layer->act_spline && mask_layer->act_point && - MASKPOINT_ISSEL_ANY(mask_layer->act_point)) { + MASKPOINT_ISSEL_ANY(mask_layer->act_point)) + { *spline = mask_layer->act_spline; *point = mask_layer->act_point; return; diff --git a/source/blender/editors/mesh/editface.cc b/source/blender/editors/mesh/editface.cc index 01588560bbb5264189c0d22fec7b3d00e3a9f5ee..2110b1099d852adb1c533d8fc4069d5403ccc9f8 100644 --- a/source/blender/editors/mesh/editface.cc +++ b/source/blender/editors/mesh/editface.cc @@ -256,7 +256,8 @@ static void build_poly_connections(blender::AtomicDisjointSet &islands, } for (const int inner_edge : - face_edges.slice(poly_loop_index, face_edges.size() - poly_loop_index)) { + face_edges.slice(poly_loop_index, face_edges.size() - poly_loop_index)) + { if (outer_edge == inner_edge) { continue; } diff --git a/source/blender/editors/mesh/editmesh_automerge.cc b/source/blender/editors/mesh/editmesh_automerge.cc index b1660b531aa30769d51c9c981d3096a0b7923ca0..0853837205e23bd5a80f31b92d560cb4597e1c02 100644 --- a/source/blender/editors/mesh/editmesh_automerge.cc +++ b/source/blender/editors/mesh/editmesh_automerge.cc @@ -19,7 +19,7 @@ #include "tools/bmesh_intersect_edges.hh" -//#define DEBUG_TIME +// #define DEBUG_TIME #ifdef DEBUG_TIME # include "PIL_time.h" #endif diff --git a/source/blender/editors/mesh/editmesh_bisect.cc b/source/blender/editors/mesh/editmesh_bisect.cc index d03ac2d195d464b190350c48ebbdcc625f3da9bf..07d48b7c4ca8e693697939cdc41403475bf555c1 100644 --- a/source/blender/editors/mesh/editmesh_bisect.cc +++ b/source/blender/editors/mesh/editmesh_bisect.cc @@ -58,7 +58,7 @@ struct BisectData { BMBackup mesh_backup; bool is_valid; bool is_dirty; - } * backup; + } *backup; int backup_len; }; diff --git a/source/blender/editors/mesh/editmesh_intersect.cc b/source/blender/editors/mesh/editmesh_intersect.cc index 3b6ea24c778397fe08eb6dec95c4374d6c454d24..60e85fade9bcbc0bc3c2281b06f5a6faeeabc368 100644 --- a/source/blender/editors/mesh/editmesh_intersect.cc +++ b/source/blender/editors/mesh/editmesh_intersect.cc @@ -770,7 +770,8 @@ static BMEdge *bm_face_split_edge_find(BMEdge *e_a, bool ok = true; if (UNLIKELY(BM_edge_exists(v_pivot, l_iter->e->v1) || - BM_edge_exists(v_pivot, l_iter->e->v2))) { + BM_edge_exists(v_pivot, l_iter->e->v2))) + { /* very unlikely but will cause complications splicing the verts together, * so just skip this case */ ok = false; diff --git a/source/blender/editors/mesh/editmesh_knife.cc b/source/blender/editors/mesh/editmesh_knife.cc index a648ee102fcd3b8e1ce91ed43adb157f4b0ef2c4..5357ffaf9c5ad0f593c21b8f24d722298ca4a9cf 100644 --- a/source/blender/editors/mesh/editmesh_knife.cc +++ b/source/blender/editors/mesh/editmesh_knife.cc @@ -2058,7 +2058,8 @@ static bool knife_add_single_cut__is_linehit_outside_face(BMFace *f, if (lh->v && lh->v->v) { BMLoop *l; /* side-of-loop */ if ((l = BM_face_vert_share_loop(f, lh->v->v)) && - (BM_loop_point_side_of_loop_test(l, co) < 0.0f)) { + (BM_loop_point_side_of_loop_test(l, co) < 0.0f)) + { return true; } } @@ -3492,7 +3493,8 @@ static KnifeVert *knife_find_closest_vert_of_edge(KnifeTool_OpData *kcd, * or we ignore. */ if ((kcd->is_angle_snapping || kcd->axis_constrained) && (kcd->mode == MODE_DRAGGING)) { if (dist_squared_to_line_segment_v2(kfv_sco, kcd->prev.mval, kcd->curr.mval) > - KNIFE_FLT_EPSBIG) { + KNIFE_FLT_EPSBIG) + { continue; } } diff --git a/source/blender/editors/mesh/editmesh_select_similar.cc b/source/blender/editors/mesh/editmesh_select_similar.cc index b694ed1633615f7c606c2e247bf1f075cddd53bb..3eba7dbc186a5eaa7ad3c6b432c86c7b0ca94add 100644 --- a/source/blender/editors/mesh/editmesh_select_similar.cc +++ b/source/blender/editors/mesh/editmesh_select_similar.cc @@ -385,7 +385,8 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) case SIMFACE_PERIMETER: { float perimeter = BM_face_calc_perimeter_with_mat3(face, ob_m3); if (ED_select_similar_compare_float_tree( - tree_1d, perimeter, thresh, eSimilarCmp(compare))) { + tree_1d, perimeter, thresh, eSimilarCmp(compare))) + { select = true; } break; @@ -424,7 +425,8 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) } case SIMFACE_SMOOTH: if ((BM_elem_flag_test(face, BM_ELEM_SMOOTH) != 0) == - ((face_data_value & SIMFACE_DATA_TRUE) != 0)) { + ((face_data_value & SIMFACE_DATA_TRUE) != 0)) + { select = true; } break; @@ -829,7 +831,8 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) case SIMEDGE_LENGTH: { float length = edge_length_squared_worldspace_get(ob, edge); if (ED_select_similar_compare_float_tree( - tree_1d, length, thresh, eSimilarCmp(compare))) { + tree_1d, length, thresh, eSimilarCmp(compare))) + { select = true; } break; @@ -845,13 +848,15 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) } case SIMEDGE_SEAM: if ((BM_elem_flag_test(edge, BM_ELEM_SEAM) != 0) == - ((edge_data_value & SIMEDGE_DATA_TRUE) != 0)) { + ((edge_data_value & SIMEDGE_DATA_TRUE) != 0)) + { select = true; } break; case SIMEDGE_SHARP: if ((BM_elem_flag_test(edge, BM_ELEM_SMOOTH) != 0) == - ((edge_data_value & SIMEDGE_DATA_TRUE) != 0)) { + ((edge_data_value & SIMEDGE_DATA_TRUE) != 0)) + { select = true; } break; @@ -882,7 +887,8 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) const float *value = BM_ELEM_CD_GET_FLOAT_P(edge, custom_data_offset); if (ED_select_similar_compare_float_tree( - tree_1d, *value, thresh, eSimilarCmp(compare))) { + tree_1d, *value, thresh, eSimilarCmp(compare))) + { select = true; } break; @@ -1238,7 +1244,8 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op) } const float *value = BM_ELEM_CD_GET_FLOAT_P(vert, cd_crease_offset); if (ED_select_similar_compare_float_tree( - tree_1d, *value, thresh, eSimilarCmp(compare))) { + tree_1d, *value, thresh, eSimilarCmp(compare))) + { select = true; } break; diff --git a/source/blender/editors/mesh/editmesh_tools.cc b/source/blender/editors/mesh/editmesh_tools.cc index 7a7fe0fa623c1cbc62a3b7a4e575092c3d880fbf..d00510dbe677cd8197fa850ba6fc1ef86feda64d 100644 --- a/source/blender/editors/mesh/editmesh_tools.cc +++ b/source/blender/editors/mesh/editmesh_tools.cc @@ -1156,7 +1156,8 @@ static int edbm_mark_sharp_exec(bContext *C, wmOperator *op) BM_ITER_MESH (eed, &iter, bm, BM_EDGES_OF_MESH) { if (use_verts) { if (!(BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) || - BM_elem_flag_test(eed->v2, BM_ELEM_SELECT))) { + BM_elem_flag_test(eed->v2, BM_ELEM_SELECT))) + { continue; } } @@ -1862,7 +1863,8 @@ static bool edbm_edge_split_selected_edges(wmOperator *op, Object *obedit, BMEdi BM_custom_loop_normals_to_vector_layer(em->bm); if (!EDBM_op_call_and_selectf( - em, op, "edges.out", false, "split_edges edges=%he", BM_ELEM_SELECT)) { + em, op, "edges.out", false, "split_edges edges=%he", BM_ELEM_SELECT)) + { return false; } @@ -3526,11 +3528,13 @@ static const EnumPropertyItem *merge_type_itemf(bContext *C, RNA_enum_items_add_value(&item, &totitem, merge_type_items, MESH_MERGE_LAST); } else if (em->bm->selected.first && - ((BMEditSelection *)em->bm->selected.first)->htype == BM_VERT) { + ((BMEditSelection *)em->bm->selected.first)->htype == BM_VERT) + { RNA_enum_items_add_value(&item, &totitem, merge_type_items, MESH_MERGE_FIRST); } else if (em->bm->selected.last && - ((BMEditSelection *)em->bm->selected.last)->htype == BM_VERT) { + ((BMEditSelection *)em->bm->selected.last)->htype == BM_VERT) + { RNA_enum_items_add_value(&item, &totitem, merge_type_items, MESH_MERGE_LAST); } } @@ -3721,7 +3725,8 @@ static bool shape_propagate(BMEditMesh *em, bool use_symmetry) BMVert *mirr = use_symmetry ? EDBM_verts_mirror_get(em, eve) : nullptr; if (!mirr || !BM_elem_flag_test(mirr, BM_ELEM_SELECT) || - BM_elem_flag_test(mirr, BM_ELEM_HIDDEN)) { + BM_elem_flag_test(mirr, BM_ELEM_HIDDEN)) + { continue; } } @@ -5108,7 +5113,8 @@ static bool edbm_fill_grid_prepare(BMesh *bm, int offset, int *span_p, const boo MEM_mallocN(sizeof(*ele_sort) * verts_len, __func__)); LinkData *v_link; for (v_link = static_cast<LinkData *>(verts->first), i = 0; v_link; - v_link = v_link->next, i++) { + v_link = v_link->next, i++) + { BMVert *v = static_cast<BMVert *>(v_link->data); const float angle = edbm_fill_grid_vert_tag_angle(v); ele_sort[i].sort_value = angle; @@ -7811,7 +7817,8 @@ static int edbm_convex_hull_exec(bContext *C, wmOperator *op) /* Delete unused vertices, edges, and faces */ if (delete_unused) { if (!EDBM_op_callf( - em, op, "delete geom=%S context=%i", &bmop, "geom_unused.out", DEL_ONLYTAGGED)) { + em, op, "delete geom=%S context=%i", &bmop, "geom_unused.out", DEL_ONLYTAGGED)) + { EDBM_op_finish(em, &bmop, op, true); continue; } @@ -7820,7 +7827,8 @@ static int edbm_convex_hull_exec(bContext *C, wmOperator *op) /* Delete hole edges/faces */ if (make_holes) { if (!EDBM_op_callf( - em, op, "delete geom=%S context=%i", &bmop, "geom_holes.out", DEL_ONLYTAGGED)) { + em, op, "delete geom=%S context=%i", &bmop, "geom_holes.out", DEL_ONLYTAGGED)) + { EDBM_op_finish(em, &bmop, op, true); continue; } @@ -9009,7 +9017,8 @@ static void normals_split(BMesh *bm) (!BM_elem_flag_test(l_curr, BM_ELEM_TAG) && BM_loop_check_cyclic_smooth_fan(l_curr)))) { if (!BM_elem_flag_test(l_curr->e, BM_ELEM_TAG) && - !BM_elem_flag_test(l_curr->prev->e, BM_ELEM_TAG)) { + !BM_elem_flag_test(l_curr->prev->e, BM_ELEM_TAG)) + { const int loop_index = BM_elem_index_get(l_curr); short *clnors = static_cast<short *>(BM_ELEM_CD_GET_VOID_P(l_curr, cd_clnors_offset)); BKE_lnor_space_custom_normal_to_data( @@ -9238,7 +9247,8 @@ static int edbm_average_normals_exec(bContext *C, wmOperator *op) (!BM_elem_flag_test(l_curr, BM_ELEM_TAG) && BM_loop_check_cyclic_smooth_fan(l_curr)))) { if (!BM_elem_flag_test(l_curr->e, BM_ELEM_TAG) && - !BM_elem_flag_test(l_curr->prev->e, BM_ELEM_TAG)) { + !BM_elem_flag_test(l_curr->prev->e, BM_ELEM_TAG)) + { const int loop_index = BM_elem_index_get(l_curr); short *clnors = static_cast<short *>(BM_ELEM_CD_GET_VOID_P(l_curr, cd_clnors_offset)); BKE_lnor_space_custom_normal_to_data( @@ -9475,7 +9485,8 @@ static int edbm_normals_tools_exec(bContext *C, wmOperator *op) } if (done_copy || - (bm->totfacesel != 1 && lnors_ed_arr->totloop != 1 && bm->totvertsel != 1)) { + (bm->totfacesel != 1 && lnors_ed_arr->totloop != 1 && bm->totvertsel != 1)) + { BKE_report(op->reports, RPT_ERROR, "Can only copy one custom normal, vertex normal or face normal"); @@ -9703,7 +9714,8 @@ static int edbm_set_normals_from_faces_exec(bContext *C, wmOperator *op) BM_ITER_MESH (f, &fiter, bm, BM_FACES_OF_MESH) { BM_ITER_ELEM (e, &eiter, f, BM_EDGES_OF_FACE) { if (!keep_sharp || - (BM_elem_flag_test(e, BM_ELEM_SMOOTH) && BM_elem_flag_test(e, BM_ELEM_SELECT))) { + (BM_elem_flag_test(e, BM_ELEM_SMOOTH) && BM_elem_flag_test(e, BM_ELEM_SELECT))) + { BM_ITER_ELEM (v, &viter, e, BM_VERTS_OF_EDGE) { l = BM_face_vert_share_loop(f, v); const int l_index = BM_elem_index_get(l); diff --git a/source/blender/editors/mesh/editmesh_utils.cc b/source/blender/editors/mesh/editmesh_utils.cc index 3735fb85a5feb48d9f4a533d4904fe3429e369cf..e5ce19d3412bc0960046db9f2aa5795d8673ae7e 100644 --- a/source/blender/editors/mesh/editmesh_utils.cc +++ b/source/blender/editors/mesh/editmesh_utils.cc @@ -1942,7 +1942,8 @@ void EDBM_project_snap_verts( if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) { float mval[2], co_proj[3]; if (ED_view3d_project_float_object(region, eve->co, mval, V3D_PROJ_TEST_NOP) == - V3D_PROJ_RET_OK) { + V3D_PROJ_RET_OK) + { SnapObjectParams params{}; params.snap_target_select = target_op; params.edit_mode_type = SNAP_GEOM_FINAL; diff --git a/source/blender/editors/metaball/mball_edit.cc b/source/blender/editors/metaball/mball_edit.cc index cb201b01c902bc7b4e6460a7c60882b28b372bbf..de0ecf8e3ae271a1e1047ebb02ce3e9e9af69605 100644 --- a/source/blender/editors/metaball/mball_edit.cc +++ b/source/blender/editors/metaball/mball_edit.cc @@ -814,7 +814,8 @@ static bool ed_mball_findnearest_metaelem(bContext *C, } if (((select_id & 0xFFFF) == base_index) && - ((select_id & ~MBALLSEL_ANY) >> 16 == ml_index)) { + ((select_id & ~MBALLSEL_ANY) >> 16 == ml_index)) + { hit_cycle_offset = a + 1; break; } diff --git a/source/blender/editors/object/object_bake_api.cc b/source/blender/editors/object/object_bake_api.cc index 04a217ff3d6079bef4d500cef86e70ca9df64123..4625d3993cb15696b60350a0871646a2c380e116 100644 --- a/source/blender/editors/object/object_bake_api.cc +++ b/source/blender/editors/object/object_bake_api.cc @@ -687,7 +687,8 @@ static bool bake_objects_check(Main *bmain, LISTBASE_FOREACH (CollectionPointerLink *, link, selected_objects) { 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; } } @@ -1739,7 +1740,8 @@ static int bake(const BakeAPIRender *bkr, else { /* save the results */ 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; } else { diff --git a/source/blender/editors/object/object_constraint.cc b/source/blender/editors/object/object_constraint.cc index 774342791c8c400ae3d8641da4e70e5963d4c567..660f9b3d824706a0d5b4c83731482cfe8e0003fa 100644 --- a/source/blender/editors/object/object_constraint.cc +++ b/source/blender/editors/object/object_constraint.cc @@ -500,7 +500,8 @@ static void test_constraint( if (ELEM(con->type, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_CLAMPTO, - CONSTRAINT_TYPE_SPLINEIK)) { + CONSTRAINT_TYPE_SPLINEIK)) + { if (ct->tar) { /* The object type check is only needed here in case we have a placeholder * object assigned (because the library containing the curve is missing). @@ -2292,7 +2293,8 @@ static bool get_new_constraint_target( break; } if (((!only_curve) || (ob->type == OB_CURVES_LEGACY)) && - ((!only_mesh) || (ob->type == OB_MESH))) { + ((!only_mesh) || (ob->type == OB_MESH))) + { /* set target */ *tar_ob = ob; found = true; diff --git a/source/blender/editors/object/object_edit.cc b/source/blender/editors/object/object_edit.cc index 3aeac1ff02fec30d468f86af33580946b1a0f8cf..e7320ba78d861243949428a2d46f1045ffa211e3 100644 --- a/source/blender/editors/object/object_edit.cc +++ b/source/blender/editors/object/object_edit.cc @@ -1967,7 +1967,8 @@ static int move_to_collection_exec(bContext *C, wmOperator *op) nullptr; if ((single_object != nullptr) && is_link && - BKE_collection_has_object(collection, single_object)) { + BKE_collection_has_object(collection, single_object)) + { BKE_reportf(op->reports, RPT_ERROR, "%s already in %s", diff --git a/source/blender/editors/object/object_modifier.cc b/source/blender/editors/object/object_modifier.cc index aa04f82c00b768d65acede305154f976a5072f39..c1aad69163b7ea0a38134e098c5394fdf6e7c983 100644 --- a/source/blender/editors/object/object_modifier.cc +++ b/source/blender/editors/object/object_modifier.cc @@ -186,7 +186,8 @@ ModifierData *ED_object_modifier_add( md = static_cast<ModifierData *>(ob->modifiers.first); while (md && - BKE_modifier_get_info((ModifierType)md->type)->type == ModifierTypeType::OnlyDeform) { + BKE_modifier_get_info((ModifierType)md->type)->type == ModifierTypeType::OnlyDeform) + { md = md->next; } @@ -775,7 +776,8 @@ static Mesh *create_applied_mesh_for_modifier(Depsgraph *depsgraph, if (build_shapekey_layers && mesh->key) { if (KeyBlock *kb = static_cast<KeyBlock *>( - BLI_findlink(&mesh->key->block, ob_eval->shapenr - 1))) { + BLI_findlink(&mesh->key->block, ob_eval->shapenr - 1))) + { BKE_keyblock_convert_to_mesh( kb, reinterpret_cast<float(*)[3]>(mesh->vert_positions_for_write().data()), diff --git a/source/blender/editors/object/object_relations.cc b/source/blender/editors/object/object_relations.cc index bf809fe3a95792d70dd989676038efb82ce41650..69c8e6776c2d3c853e12f41967206b93d93f5bf8 100644 --- a/source/blender/editors/object/object_relations.cc +++ b/source/blender/editors/object/object_relations.cc @@ -654,7 +654,8 @@ bool ED_object_parent_set(ReportList *reports, ((CurveModifierData *)md)->object = par; } if (par->runtime->curve_cache && - par->runtime->curve_cache->anim_path_accum_length == nullptr) { + par->runtime->curve_cache->anim_path_accum_length == nullptr) + { DEG_id_tag_update(&par->id, ID_RECALC_GEOMETRY); } } @@ -1200,7 +1201,8 @@ static int object_track_clear_exec(bContext *C, wmOperator *op) if (ELEM(con->type, CONSTRAINT_TYPE_TRACKTO, CONSTRAINT_TYPE_LOCKTRACK, - CONSTRAINT_TYPE_DAMPTRACK)) { + CONSTRAINT_TYPE_DAMPTRACK)) + { BKE_constraint_remove(&ob->constraints, con); } } @@ -1557,7 +1559,8 @@ static int make_links_data_exec(bContext *C, wmOperator *op) /* now add in the collections from the link nodes */ for (collection_node = ob_collections; collection_node; - collection_node = collection_node->next) { + collection_node = collection_node->next) + { if (ob_dst->instance_collection != collection_node->link) { BKE_collection_object_add( bmain, static_cast<Collection *>(collection_node->link), ob_dst); @@ -2158,7 +2161,8 @@ static bool make_local_all__instance_indirect_unused(Main *bmain, bool changed = false; for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { if (ID_IS_LINKED(ob) && (ob->id.us == 0)) { Base *base; @@ -2280,7 +2284,8 @@ static int make_local_exec(bContext *C, wmOperator *op) } if (ELEM(mode, MAKE_LOCAL_SELECT_OBDATA, MAKE_LOCAL_SELECT_OBDATA_MATERIAL) && - ob->data != nullptr) { + ob->data != nullptr) + { ID *ob_data = static_cast<ID *>(ob->data); ob_data->tag &= ~LIB_TAG_PRE_EXISTING; make_local_animdata_tag(BKE_animdata_from_id(ob_data)); @@ -2514,7 +2519,8 @@ static int make_override_library_exec(bContext *C, wmOperator *op) case ID_GR: { Collection *collection_root = (Collection *)id_root; LISTBASE_FOREACH_MUTABLE ( - CollectionParent *, collection_parent, &collection_root->runtime.parents) { + CollectionParent *, collection_parent, &collection_root->runtime.parents) + { if (ID_IS_LINKED(collection_parent->collection) || !BKE_view_layer_has_collection(view_layer, collection_parent->collection)) { diff --git a/source/blender/editors/object/object_select.cc b/source/blender/editors/object/object_select.cc index 4a558f73ddf082c19617ae3ee1601db55045d57f..1c5f5871d0358486be60b2859e2d896dffc22ff5 100644 --- a/source/blender/editors/object/object_select.cc +++ b/source/blender/editors/object/object_select.cc @@ -953,7 +953,8 @@ static bool select_grouped_color(bContext *C, Object *ob) CTX_DATA_BEGIN (C, Base *, base, selectable_bases) { if (((base->flag & BASE_SELECTED) == 0) && - compare_v3v3(base->object->color, ob->color, 0.005f)) { + compare_v3v3(base->object->color, ob->color, 0.005f)) + { ED_object_base_select(base, BA_SELECT); changed = true; } diff --git a/source/blender/editors/physics/particle_edit.cc b/source/blender/editors/physics/particle_edit.cc index ead3d77c38e5d9a881196fd7bed767129a5c565c..6d60d69c4f558b74fb7560ac0a66f8044ef90b88 100644 --- a/source/blender/editors/physics/particle_edit.cc +++ b/source/blender/editors/physics/particle_edit.cc @@ -2896,7 +2896,8 @@ static void rekey_particle_to_time( /* update edit pointers */ for (k = 0, key = pa->hair, ekey = edit->points[pa_index].keys; k < pa->totkey; - k++, key++, ekey++) { + k++, key++, ekey++) + { ekey->co = key->co; ekey->time = &key->time; } diff --git a/source/blender/editors/physics/particle_object.cc b/source/blender/editors/physics/particle_object.cc index 4e534a9339c2a4807433dc46abf6fbed8e22f31f..8cf70f525423b81f53e808b5cd08166786bd3940 100644 --- a/source/blender/editors/physics/particle_object.cc +++ b/source/blender/editors/physics/particle_object.cc @@ -1067,7 +1067,8 @@ static void remove_particle_systems_from_object(Object *ob_to) if (ELEM(md->type, eModifierType_ParticleSystem, eModifierType_DynamicPaint, - eModifierType_Fluid)) { + eModifierType_Fluid)) + { BLI_remlink(&ob_to->modifiers, md); BKE_modifier_free(md); } diff --git a/source/blender/editors/render/render_opengl.cc b/source/blender/editors/render/render_opengl.cc index fbc1ef13dcbec5e5eb878453b338dfa835a9a85f..c843aa914af1cf679b1902816dc9a39c4e3bbc68 100644 --- a/source/blender/editors/render/render_opengl.cc +++ b/source/blender/editors/render/render_opengl.cc @@ -1169,7 +1169,8 @@ static bool screen_opengl_render_anim_step(bContext *C, wmOperator *op) if (view_context) { if (oglrender->rv3d->persp == RV3D_CAMOB && oglrender->v3d->camera && - oglrender->v3d->scenelock) { + oglrender->v3d->scenelock) + { /* since BKE_scene_graph_update_for_newframe() is used rather * then ED_update_for_newframe() the camera needs to be set */ if (BKE_scene_camera_switch_update(scene)) { diff --git a/source/blender/editors/render/render_preview.cc b/source/blender/editors/render/render_preview.cc index 88841f453a0441a465496917ed2ab328a9ba2ccb..d76a12f6e1da5e7e2ce005d9d7f630bebdb61b39 100644 --- a/source/blender/editors/render/render_preview.cc +++ b/source/blender/editors/render/render_preview.cc @@ -427,7 +427,8 @@ static const char *preview_world_name(const Scene *sce, * this approximation. */ 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 "World"; @@ -1451,7 +1452,8 @@ static void icon_preview_startjob(void *customdata, bool *stop, bool *do_update) * only get existing `ibuf`. */ ibuf = BKE_image_acquire_ibuf(ima, &iuser, 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); return; } diff --git a/source/blender/editors/render/render_update.cc b/source/blender/editors/render/render_update.cc index dd37d6bccfd6702c8ff3cd10b3f349657746326c..fd8916ec56b5fd2cb66c56190aee9efb0dd8cb9e 100644 --- a/source/blender/editors/render/render_update.cc +++ b/source/blender/editors/render/render_update.cc @@ -286,7 +286,8 @@ static void image_changed(Main *bmain, Image *ima) /* textures */ for (tex = static_cast<Tex *>(bmain->textures.first); tex; - tex = static_cast<Tex *>(tex->id.next)) { + tex = static_cast<Tex *>(tex->id.next)) + { if (tex->type == TEX_IMAGE && tex->ima == ima) { texture_changed(bmain, tex); } @@ -299,7 +300,8 @@ static void scene_changed(Main *bmain, Scene *scene) /* glsl */ for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { if (ob->mode & OB_MODE_TEXTURE_PAINT) { BKE_texpaint_slots_refresh_object(scene, ob); ED_paint_proj_mesh_data_check(scene, ob, nullptr, nullptr, nullptr, nullptr); diff --git a/source/blender/editors/screen/area.cc b/source/blender/editors/screen/area.cc index c780e30e6495ee1a2dd86a59e288b200be8bbf2d..1b48c64d25c0ea2c5bda992bf9b91d75aa0029dc 100644 --- a/source/blender/editors/screen/area.cc +++ b/source/blender/editors/screen/area.cc @@ -1157,7 +1157,8 @@ static void region_azones_scrollbars_init(ScrArea *area, ARegion *region) region_azone_scrollbar_init(area, region, AZ_SCROLL_VERT); } if ((v2d->scroll & V2D_SCROLL_HORIZONTAL) && - ((v2d->scroll & V2D_SCROLL_HORIZONTAL_HANDLES) == 0)) { + ((v2d->scroll & V2D_SCROLL_HORIZONTAL_HANDLES) == 0)) + { region_azone_scrollbar_init(area, region, AZ_SCROLL_HOR); } } diff --git a/source/blender/editors/screen/glutil.cc b/source/blender/editors/screen/glutil.cc index f5fe22b134efc947e9afe7f180662939ddb4db2f..fd06d9144e4b0b44aef878020985056a260aa87a 100644 --- a/source/blender/editors/screen/glutil.cc +++ b/source/blender/editors/screen/glutil.cc @@ -232,7 +232,8 @@ void immDrawPixelsTexTiled_scaling_clipping(IMMDrawPixelsTexState *state, if (use_clipping) { if (rast_x + right * xzoom * scaleX < clip_min_x || - rast_y + top * yzoom * scaleY < clip_min_y) { + rast_y + top * yzoom * scaleY < clip_min_y) + { continue; } if (rast_x + left * xzoom > clip_max_x || rast_y + bottom * yzoom > clip_max_y) { diff --git a/source/blender/editors/screen/screen_edit.cc b/source/blender/editors/screen/screen_edit.cc index dae1a2fc7145039f3838d16685c9045e705a56a6..b890055042960355f747027f78d6fd4f79492976 100644 --- a/source/blender/editors/screen/screen_edit.cc +++ b/source/blender/editors/screen/screen_edit.cc @@ -224,7 +224,8 @@ void screen_data_copy(bScreen *to, bScreen *from) ScrVert *s2 = static_cast<ScrVert *>(to->vertbase.first); for (ScrVert *s1 = static_cast<ScrVert *>(from->vertbase.first); s1; - s1 = s1->next, s2 = s2->next) { + s1 = s1->next, s2 = s2->next) + { s1->newv = s2; } @@ -1838,7 +1839,8 @@ bool ED_screen_stereo3d_required(const bScreen *screen, const Scene *scene) * the file doesn't have views enabled */ sima = static_cast<SpaceImage *>(area->spacedata.first); if (sima->image && BKE_image_is_stereo(sima->image) && - (sima->iuser.flag & IMA_SHOW_STEREO)) { + (sima->iuser.flag & IMA_SHOW_STEREO)) + { return true; } break; diff --git a/source/blender/editors/screen/screen_ops.cc b/source/blender/editors/screen/screen_ops.cc index 5730fc22f9d1dd67b9e8e69ab4c574a8eaabc1ef..088599ee7c76a8a00c3ccee9b7c528f5180b3657 100644 --- a/source/blender/editors/screen/screen_ops.cc +++ b/source/blender/editors/screen/screen_ops.cc @@ -4702,7 +4702,7 @@ static void screen_animation_region_tag_redraw( ED_region_tag_redraw(region); } -//#define PROFILE_AUDIO_SYNCH +// #define PROFILE_AUDIO_SYNCH static int screen_animation_step_invoke(bContext *C, wmOperator * /*op*/, const wmEvent *event) { diff --git a/source/blender/editors/screen/screen_user_menu.cc b/source/blender/editors/screen/screen_user_menu.cc index c639ca153e07d5470e30913b634d00f969c6abff..6d09a327cdb7dbed7905a90fa505feda436b1f27 100644 --- a/source/blender/editors/screen/screen_user_menu.cc +++ b/source/blender/editors/screen/screen_user_menu.cc @@ -294,7 +294,8 @@ static void screen_user_menu_draw(const bContext *C, Menu *menu) PropertyRNA *prop = nullptr; PointerRNA prop_ptr = ptr; if ((data_path == nullptr) || - RNA_path_resolve_full(&ptr, data_path, &prop_ptr, nullptr, nullptr)) { + RNA_path_resolve_full(&ptr, data_path, &prop_ptr, nullptr, nullptr)) + { prop = RNA_struct_find_property(&prop_ptr, umi_pr->prop_id); if (prop) { ok = true; diff --git a/source/blender/editors/sculpt_paint/paint_hide.cc b/source/blender/editors/sculpt_paint/paint_hide.cc index 6cd2d7b2d1c8912b2e09e1a0eec01384e6f01fe2..3f267b8181acc362d212c0bda7cb1fd5e7e0520a 100644 --- a/source/blender/editors/sculpt_paint/paint_hide.cc +++ b/source/blender/editors/sculpt_paint/paint_hide.cc @@ -157,7 +157,8 @@ void mesh_show_all(Object &object, const Span<PBVHNode *> nodes) Mesh &mesh = *static_cast<Mesh *>(object.data); bke::MutableAttributeAccessor attributes = mesh.attributes_for_write(); if (const VArray<bool> attribute = *attributes.lookup<bool>(".hide_vert", - bke::AttrDomain::Point)) { + bke::AttrDomain::Point)) + { const VArraySpan hide_vert(attribute); threading::parallel_for(nodes.index_range(), 1, [&](const IndexRange range) { for (PBVHNode *node : nodes.slice(range)) { @@ -382,7 +383,8 @@ static void partialvis_update_grids(Depsgraph &depsgraph, for (const int x : IndexRange(key.grid_size)) { CCGElem *elem = CCG_grid_elem(&key, grid, x, y); if (isect_point_planes_v3(planes, 4, CCG_elem_co(&key, elem)) == - (area == VisArea::Inside)) { + (area == VisArea::Inside)) + { hide[y * key.grid_size + x].set(value); } } diff --git a/source/blender/editors/sculpt_paint/paint_image.cc b/source/blender/editors/sculpt_paint/paint_image.cc index c071ed71e0caea9dd54bea02e8ed3cb74d9d54e6..6d409132778061e06ba5c27eec74d1cdf4d1b65e 100644 --- a/source/blender/editors/sculpt_paint/paint_image.cc +++ b/source/blender/editors/sculpt_paint/paint_image.cc @@ -297,7 +297,8 @@ static bool image_paint_poll_ex(bContext *C, bool check_tool) if (sima) { if (sima->image != nullptr && - (ID_IS_LINKED(sima->image) || ID_IS_OVERRIDE_LIBRARY(sima->image))) { + (ID_IS_LINKED(sima->image) || ID_IS_OVERRIDE_LIBRARY(sima->image))) + { return false; } if (sima->mode == SI_MODE_PAINT) { diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.cc b/source/blender/editors/sculpt_paint/paint_image_proj.cc index f55603608db5d437f8ecdcd8dc130f34bb72e921..69044c792f6bbd54da7d420e2182a8de344fb0d7 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.cc +++ b/source/blender/editors/sculpt_paint/paint_image_proj.cc @@ -105,7 +105,7 @@ #include "IMB_colormanagement.h" -//#include "bmesh_tools.hh" +// #include "bmesh_tools.hh" #include "paint_intern.hh" @@ -136,15 +136,15 @@ BLI_INLINE uchar f_to_char(const float val) #define PROJ_BOUNDBOX_DIV 8 #define PROJ_BOUNDBOX_SQUARED (PROJ_BOUNDBOX_DIV * PROJ_BOUNDBOX_DIV) -//#define PROJ_DEBUG_PAINT 1 -//#define PROJ_DEBUG_NOSEAMBLEED 1 -//#define PROJ_DEBUG_PRINT_CLIP 1 +// #define PROJ_DEBUG_PAINT 1 +// #define PROJ_DEBUG_NOSEAMBLEED 1 +// #define PROJ_DEBUG_PRINT_CLIP 1 #define PROJ_DEBUG_WINCLIP 1 #ifndef PROJ_DEBUG_NOSEAMBLEED /* projectFaceSeamFlags options */ -//#define PROJ_FACE_IGNORE (1<<0) /* When the face is hidden, back-facing or occluded. */ -//#define PROJ_FACE_INIT (1<<1) /* When we have initialized the faces data */ +// #define PROJ_FACE_IGNORE (1<<0) /* When the face is hidden, back-facing or occluded. */ +// #define PROJ_FACE_INIT (1<<1) /* When we have initialized the faces data */ /* If this face has a seam on any of its edges. */ # define PROJ_FACE_SEAM0 (1 << 0) @@ -2032,14 +2032,16 @@ static ProjPixel *project_paint_uvpixel_init(const ProjPaintState *ps, * the faces are already initialized in project_paint_delayed_face_init(...) */ if (ibuf->float_buffer.data) { if (!project_paint_PickColor( - ps, co, ((ProjPixelClone *)projPixel)->clonepx.f, nullptr, true)) { + ps, co, ((ProjPixelClone *)projPixel)->clonepx.f, nullptr, true)) + { /* zero alpha - ignore */ ((ProjPixelClone *)projPixel)->clonepx.f[3] = 0; } } else { if (!project_paint_PickColor( - ps, co, nullptr, ((ProjPixelClone *)projPixel)->clonepx.ch, true)) { + ps, co, nullptr, ((ProjPixelClone *)projPixel)->clonepx.ch, true)) + { /* zero alpha - ignore */ ((ProjPixelClone *)projPixel)->clonepx.ch[3] = 0; } @@ -2577,7 +2579,8 @@ static void project_bucket_clip_face(const bool is_ortho, flag = inside_bucket_flag & (ISECT_1 | ISECT_2); if (flag && flag != (ISECT_1 | ISECT_2)) { if (line_rect_clip( - bucket_bounds, v1coSS, v2coSS, uv1co, uv2co, bucket_bounds_uv[*tot], is_ortho)) { + bucket_bounds, v1coSS, v2coSS, uv1co, uv2co, bucket_bounds_uv[*tot], is_ortho)) + { (*tot)++; } } @@ -2590,7 +2593,8 @@ static void project_bucket_clip_face(const bool is_ortho, flag = inside_bucket_flag & (ISECT_2 | ISECT_3); if (flag && flag != (ISECT_2 | ISECT_3)) { if (line_rect_clip( - bucket_bounds, v2coSS, v3coSS, uv2co, uv3co, bucket_bounds_uv[*tot], is_ortho)) { + bucket_bounds, v2coSS, v3coSS, uv2co, uv3co, bucket_bounds_uv[*tot], is_ortho)) + { (*tot)++; } } @@ -2603,7 +2607,8 @@ static void project_bucket_clip_face(const bool is_ortho, flag = inside_bucket_flag & (ISECT_3 | ISECT_1); if (flag && flag != (ISECT_3 | ISECT_1)) { if (line_rect_clip( - bucket_bounds, v3coSS, v1coSS, uv3co, uv1co, bucket_bounds_uv[*tot], is_ortho)) { + bucket_bounds, v3coSS, v1coSS, uv3co, uv1co, bucket_bounds_uv[*tot], is_ortho)) + { (*tot)++; } } @@ -3182,12 +3187,12 @@ static void project_paint_face_init(const ProjPaintState *ps, } } } - //#if 0 + // #if 0 else if (has_x_isect) { /* assuming the face is not a bow-tie - we know we can't intersect again on the X */ break; } - //#endif + // #endif } #if 0 /* TODO: investigate why this doesn't work sometimes! it should! */ diff --git a/source/blender/editors/sculpt_paint/paint_ops.cc b/source/blender/editors/sculpt_paint/paint_ops.cc index 8a7da1867e5e907eb86a6783bc99dbba3bd7df56..9d15d213e66ed15e14d459cce72bb4016e129aa0 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.cc +++ b/source/blender/editors/sculpt_paint/paint_ops.cc @@ -391,7 +391,8 @@ static int palette_color_add_exec(bContext *C, wmOperator * /*op*/) PAINT_MODE_TEXTURE_3D, PAINT_MODE_TEXTURE_2D, PAINT_MODE_VERTEX, - PAINT_MODE_SCULPT)) { + PAINT_MODE_SCULPT)) + { copy_v3_v3(color->rgb, BKE_brush_color_get(scene, brush)); color->value = 0.0; } diff --git a/source/blender/editors/sculpt_paint/paint_stroke.cc b/source/blender/editors/sculpt_paint/paint_stroke.cc index 1fd84646b6f705a1f2cc95b037978bff777b85c8..5df016edae5a65c77cf38e751403cc08c5c20d10 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.cc +++ b/source/blender/editors/sculpt_paint/paint_stroke.cc @@ -46,7 +46,7 @@ #include "paint_intern.hh" #include "sculpt_intern.hh" -//#define DEBUG_TIME +// #define DEBUG_TIME #ifdef DEBUG_TIME # include "PIL_time_utildefines.h" @@ -359,7 +359,8 @@ static bool paint_brush_update(bContext *C, if (ELEM(brush->mtex.brush_map_mode, MTEX_MAP_MODE_VIEW, MTEX_MAP_MODE_AREA, - MTEX_MAP_MODE_RANDOM)) { + MTEX_MAP_MODE_RANDOM)) + { do_random = true; } diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.cc b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.cc index db8669dd0c1dca64bee2114899de341f10f2a44e..5c5a6cc0a2a26c965047720af0089464b873c4ec 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.cc +++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.cc @@ -187,7 +187,8 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, const wmEvent *even if (use_vert_sel) { if (ED_mesh_pick_vert( - C, vc.obact, event->mval, ED_MESH_PICK_DEFAULT_VERT_DIST, true, &index)) { + C, vc.obact, event->mval, ED_MESH_PICK_DEFAULT_VERT_DIST, true, &index)) + { v_idx_best = index; } } @@ -444,7 +445,8 @@ static bool weight_paint_set(Object *ob, float paintweight) for (const int vert : corner_verts.slice(faces[i])) { if (!dvert[vert].flag) { if ((paint_selmode == SCE_SELECT_VERTEX) && - !(!select_vert.is_empty() && select_vert[vert])) { + !(!select_vert.is_empty() && select_vert[vert])) + { continue; } diff --git a/source/blender/editors/sculpt_paint/paint_weight.cc b/source/blender/editors/sculpt_paint/paint_weight.cc index 003bef145af6fe4da9e600c1d6f166337717c614..4cf7ddb84a2d5adbaf3521aa10172eebb77bf86e 100644 --- a/source/blender/editors/sculpt_paint/paint_weight.cc +++ b/source/blender/editors/sculpt_paint/paint_weight.cc @@ -949,7 +949,8 @@ static bool wpaint_stroke_test_start(bContext *C, wmOperator *op, const float mo * vgroups affect deform bones */ wpd->lock_flags = BKE_object_defgroup_lock_flags_get(ob, wpd->defbase_tot); if (ts->auto_normalize || ts->multipaint || wpd->lock_flags != nullptr || - ts->wpaint_lock_relative) { + ts->wpaint_lock_relative) + { wpd->vgroup_validmap = BKE_object_defgroup_validmap_get(ob, wpd->defbase_tot); } @@ -1399,7 +1400,8 @@ static WPaintAverageAccum do_wpaint_brush_calc_average_weight(Object *ob, const float angle_cos = (use_normal && vd.no) ? dot_v3v3(sculpt_normal_frontface, vd.no) : 1.0f; if (angle_cos <= 0.0f || - BKE_brush_curve_strength(brush, sqrtf(test.dist), cache->radius) <= 0.0f) { + BKE_brush_curve_strength(brush, sqrtf(test.dist), cache->radius) <= 0.0f) + { continue; } diff --git a/source/blender/editors/sculpt_paint/sculpt.cc b/source/blender/editors/sculpt_paint/sculpt.cc index 3a251a18b42db57ea8d03eda4dd04ad0ca806767..ec91b0ff46a066d0fc5433071acacd56b893d0ed 100644 --- a/source/blender/editors/sculpt_paint/sculpt.cc +++ b/source/blender/editors/sculpt_paint/sculpt.cc @@ -4387,7 +4387,8 @@ static bool sculpt_needs_delta_from_anchored_origin(Brush *brush) return true; } if (brush->sculpt_tool == SCULPT_TOOL_CLOTH && - brush->cloth_deform_type == BRUSH_CLOTH_DEFORM_GRAB) { + brush->cloth_deform_type == BRUSH_CLOTH_DEFORM_GRAB) + { return true; } return false; @@ -5855,7 +5856,8 @@ static void do_fake_neighbor_search_task(SculptSession *ss, { float distance_squared = len_squared_v3v3(vd.co, nearest_vertex_search_co); if (distance_squared < nvtd->nearest_vertex_distance_sq && - distance_squared < max_distance_sq) { + distance_squared < max_distance_sq) + { nvtd->nearest_vertex = vd.vertex; nvtd->nearest_vertex_distance_sq = distance_squared; } @@ -5957,7 +5959,8 @@ void SCULPT_fake_neighbors_ensure(Sculpt *sd, Object *ob, const float max_dist) * recalculated. */ if (ss->fake_neighbors.fake_neighbor_index && - ss->fake_neighbors.current_max_distance == max_dist) { + ss->fake_neighbors.current_max_distance == max_dist) + { return; } diff --git a/source/blender/editors/sculpt_paint/sculpt_boundary.cc b/source/blender/editors/sculpt_paint/sculpt_boundary.cc index 50b8c44a552ea65890dbb1e0cf423f402160f0fd..84e9684b80f4a94b9d4269b172878b5816851464 100644 --- a/source/blender/editors/sculpt_paint/sculpt_boundary.cc +++ b/source/blender/editors/sculpt_paint/sculpt_boundary.cc @@ -353,7 +353,8 @@ static void sculpt_boundary_edit_data_init(SculptSession *ss, SCULPT_VERTEX_DUPLICATES_AND_NEIGHBORS_ITER_BEGIN (ss, from_v, ni) { const bool is_visible = hide::vert_visible_get(ss, ni.vertex); if (!is_visible || - boundary->edit_info[ni.index].propagation_steps_num != BOUNDARY_STEPS_NONE) { + boundary->edit_info[ni.index].propagation_steps_num != BOUNDARY_STEPS_NONE) + { continue; } boundary->edit_info[ni.index].original_vertex_i = diff --git a/source/blender/editors/sculpt_paint/sculpt_geodesic.cc b/source/blender/editors/sculpt_paint/sculpt_geodesic.cc index 940d0eaa65a302b902eaf38e808a6c68a7fa4510..27de17ccc53e53dc6a315a0ea8ecaef810935a7b 100644 --- a/source/blender/editors/sculpt_paint/sculpt_geodesic.cc +++ b/source/blender/editors/sculpt_paint/sculpt_geodesic.cc @@ -185,9 +185,11 @@ static float *geodesic_mesh_create(Object *ob, GSet *initial_verts, const float continue; } if (sculpt_geodesic_mesh_test_dist_add( - vert_positions, v_other, v1, v2, dists, initial_verts)) { + vert_positions, v_other, v1, v2, dists, initial_verts)) + { for (int edge_map_index = 0; edge_map_index < ss->vemap[v_other].size(); - edge_map_index++) { + edge_map_index++) + { const int e_other = ss->vemap[v_other][edge_map_index]; int ev_other; if (edges[e_other][0] == v_other) { diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.hh b/source/blender/editors/sculpt_paint/sculpt_intern.hh index 10e2ab6be52149a568e4c77810297947d9b85349..6f262ee5cb94fb6f8330d19374d11667c7cf8776 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.hh +++ b/source/blender/editors/sculpt_paint/sculpt_intern.hh @@ -919,7 +919,8 @@ void SCULPT_vertex_neighbors_get(SculptSession *ss, #define SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN(ss, v_index, neighbor_iterator) \ SCULPT_vertex_neighbors_get(ss, v_index, false, &neighbor_iterator); \ for (neighbor_iterator.i = 0; neighbor_iterator.i < neighbor_iterator.size; \ - neighbor_iterator.i++) { \ + neighbor_iterator.i++) \ + { \ neighbor_iterator.vertex = neighbor_iterator.neighbors[neighbor_iterator.i]; \ neighbor_iterator.index = neighbor_iterator.neighbor_indices[neighbor_iterator.i]; diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc index 7de4915bd38f7ef9502f99c340bc7bbac9c79ab5..eaa635a80d7b439373399924b23ec996a602ca10 100644 --- a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc +++ b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc @@ -3,7 +3,7 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ /* Paint a color made from hash of node pointer. */ -//#define DEBUG_PIXEL_NODES +// #define DEBUG_PIXEL_NODES #include "DNA_brush_types.h" #include "DNA_image_types.h" diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.cc b/source/blender/editors/sculpt_paint/sculpt_undo.cc index 3254f48ba2a767f562919e1d2fcd7ffe04213ce2..493ba042af58b8ea1c5e6f51b2908616bd71fa1e 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.cc +++ b/source/blender/editors/sculpt_paint/sculpt_undo.cc @@ -82,7 +82,7 @@ namespace blender::ed::sculpt_paint::undo { /* Uncomment to print the undo stack in the console on push/undo/redo. */ -//#define SCULPT_UNDO_DEBUG +// #define SCULPT_UNDO_DEBUG /* Implementation of undo system for objects in sculpt mode. * @@ -935,7 +935,8 @@ static void restore_list(bContext *C, Depsgraph *depsgraph, UndoSculpt &usculpt) } else if (unode->maxgrid && subdiv_ccg != nullptr) { if ((subdiv_ccg->grids.size() != unode->maxgrid) || - (subdiv_ccg->grid_size != unode->gridsize)) { + (subdiv_ccg->grid_size != unode->gridsize)) + { continue; } diff --git a/source/blender/editors/space_action/action_draw.cc b/source/blender/editors/space_action/action_draw.cc index f5d11117b7ffab3ec79071eb087ae17769fc7f8e..6645396e780cf76688c0ba471551c05c0eb3c223 100644 --- a/source/blender/editors/space_action/action_draw.cc +++ b/source/blender/editors/space_action/action_draw.cc @@ -88,7 +88,8 @@ void draw_channel_names(bContext *C, bAnimContext *ac, ARegion *region) /* check if visible */ if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) || - IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) { + IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) + { /* draw all channels using standard channel-drawing API */ ANIM_channel_draw(ac, ale, ymin, ymax, channel_index); } @@ -106,7 +107,8 @@ void draw_channel_names(bContext *C, bAnimContext *ac, ARegion *region) /* check if visible */ if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) || - IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) { + IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) + { /* draw all channels using standard channel-drawing API */ rctf channel_rect; BLI_rctf_init(&channel_rect, 0, v2d->cur.xmax, ymin, ymax); @@ -152,7 +154,8 @@ static void draw_channel_action_ranges(ListBase *anim_data, View2D *v2d) /* check if visible */ if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) || - IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) { + IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) + { /* check if anything to show for this channel */ if (ale->datatype != ALE_NONE) { action = ANIM_channel_action_get(ale); diff --git a/source/blender/editors/space_action/action_select.cc b/source/blender/editors/space_action/action_select.cc index d59419d319b64c249e37fbec886f6dc1a7843658..7770dedf39b97cccf23a39f26143861005a03c63 100644 --- a/source/blender/editors/space_action/action_select.cc +++ b/source/blender/editors/space_action/action_select.cc @@ -468,7 +468,8 @@ static void box_select_elem( Mask *mask = static_cast<Mask *>(ale->data); MaskLayer *masklay; for (masklay = static_cast<MaskLayer *>(mask->masklayers.first); masklay; - masklay = masklay->next) { + masklay = masklay->next) + { ED_masklayer_frames_select_box(masklay, xmin, xmax, sel_data->selectmode); } break; @@ -751,7 +752,8 @@ static void region_select_elem(RegionSelectData *sel_data, bAnimListElem *ale, b Mask *mask = static_cast<Mask *>(ale->data); MaskLayer *masklay; for (masklay = static_cast<MaskLayer *>(mask->masklayers.first); masklay; - masklay = masklay->next) { + masklay = masklay->next) + { ED_masklayer_frames_select_region( &sel_data->ked, masklay, sel_data->mode, sel_data->selectmode); } diff --git a/source/blender/editors/space_clip/clip_dopesheet_draw.cc b/source/blender/editors/space_clip/clip_dopesheet_draw.cc index 88ee492ab480f78dfb5e57ebba9e7b67203c5a77..76f1bb2bc80825c3540c087716f6f459079ba2db 100644 --- a/source/blender/editors/space_clip/clip_dopesheet_draw.cc +++ b/source/blender/editors/space_clip/clip_dopesheet_draw.cc @@ -136,7 +136,8 @@ void clip_draw_dopesheet_main(SpaceClip *sc, ARegion *region, Scene *scene) /* check if visible */ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) || - IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax)) { + IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax)) + { MovieTrackingTrack *track = channel->track; int i; bool sel = (track->flag & TRACK_DOPE_SEL) != 0; @@ -226,7 +227,8 @@ void clip_draw_dopesheet_main(SpaceClip *sc, ARegion *region, Scene *scene) /* check if visible */ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) || - IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax)) { + IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax)) + { MovieTrackingTrack *track = channel->track; int i; bool sel = (track->flag & TRACK_DOPE_SEL) != 0; @@ -320,7 +322,8 @@ void clip_draw_dopesheet_channels(const bContext *C, ARegion *region) /* check if visible */ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) || - IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax)) { + IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax)) + { MovieTrackingTrack *track = channel->track; float color[3]; track_channel_color(track, nullptr, color); @@ -349,7 +352,8 @@ void clip_draw_dopesheet_channels(const bContext *C, ARegion *region) /* check if visible */ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) || - IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax)) { + IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax)) + { MovieTrackingTrack *track = channel->track; bool sel = (track->flag & TRACK_DOPE_SEL) != 0; @@ -379,7 +383,8 @@ void clip_draw_dopesheet_channels(const bContext *C, ARegion *region) /* check if visible */ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) || - IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax)) { + IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax)) + { MovieTrackingTrack *track = channel->track; const int icon = (track->flag & TRACK_LOCKED) ? ICON_LOCKED : ICON_UNLOCKED; PointerRNA ptr = RNA_pointer_create(&clip->id, &RNA_MovieTrackingTrack, track); diff --git a/source/blender/editors/space_file/file_draw.cc b/source/blender/editors/space_file/file_draw.cc index 3e83e4fa830df570994aa6adc73000da41f94082..76883ef8ca4dbf575948cd74f5ba4c9b333f6ba2 100644 --- a/source/blender/editors/space_file/file_draw.cc +++ b/source/blender/editors/space_file/file_draw.cc @@ -377,7 +377,8 @@ static void file_but_enable_drag(uiBut *but, } } else if (sfile->browse_mode == FILE_BROWSE_MODE_ASSETS && - (file->typeflag & FILE_TYPE_ASSET) != 0) { + (file->typeflag & FILE_TYPE_ASSET) != 0) + { const int import_method = ED_fileselect_asset_import_method_get(sfile, file); BLI_assert(import_method > -1); diff --git a/source/blender/editors/space_file/filelist.cc b/source/blender/editors/space_file/filelist.cc index d03896f3732667a9267ae0e77958c51015a1384b..79947e37768e6168c4d91c0ba1197c5057458067 100644 --- a/source/blender/editors/space_file/filelist.cc +++ b/source/blender/editors/space_file/filelist.cc @@ -1640,7 +1640,8 @@ 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 * reload, we'd reopen the .blend to look for the preview. */ if ((entry->typeflag & FILE_TYPE_BLENDERLIB) && - (entry->flags & FILE_ENTRY_BLENDERLIB_NO_PREVIEW)) { + (entry->flags & FILE_ENTRY_BLENDERLIB_NO_PREVIEW)) + { return; } @@ -3747,7 +3748,8 @@ static void filelist_readjob_recursive_dir_add_items(const bool do_lib, entry->free_name = true; 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! * Using #BLI_path_join works but isn't needed as `root` has a trailing slash. */ BLI_string_join(dir, sizeof(dir), root, entry->relpath); diff --git a/source/blender/editors/space_file/fsmenu_system.cc b/source/blender/editors/space_file/fsmenu_system.cc index 0706aaaf5b859fed6f7a411fa81a8344f8656ab5..5500dc07c581be29b2f6e45a52719f1fb0cacdbf 100644 --- a/source/blender/editors/space_file/fsmenu_system.cc +++ b/source/blender/editors/space_file/fsmenu_system.cc @@ -168,7 +168,8 @@ static void fsmenu_add_windows_quick_access(FSMenu *fsmenu, { Microsoft::WRL::ComPtr<IShellDispatch> shell; if (CoCreateInstance(CLSID_Shell, nullptr, CLSCTX_ALL, IID_PPV_ARGS(shell.GetAddressOf())) != - S_OK) { + S_OK) + { return; } @@ -267,7 +268,8 @@ void fsmenu_read_system(FSMenu *fsmenu, int read_bookmarks) if (SHGetDesktopFolder(&desktop) == S_OK) { PIDLIST_RELATIVE volume; if (desktop->ParseDisplayName(nullptr, nullptr, wline, nullptr, &volume, nullptr) == - S_OK) { + S_OK) + { STRRET volume_name; volume_name.uType = STRRET_WSTR; if (desktop->GetDisplayNameOf(volume, SHGDN_FORADDRESSBAR, &volume_name) == S_OK) { diff --git a/source/blender/editors/space_graph/graph_draw.cc b/source/blender/editors/space_graph/graph_draw.cc index 862a8ba71b16265135d5a6b31a6d606e4fae03e9..146790a6b6e060df77c23f05cec268469f1c72d6 100644 --- a/source/blender/editors/space_graph/graph_draw.cc +++ b/source/blender/editors/space_graph/graph_draw.cc @@ -309,7 +309,8 @@ static void draw_fcurve_selected_handle_vertices( */ if (!sel_handle_only || BEZT_ISSEL_ANY(bezt)) { if ((!prevbezt && (bezt->ipo == BEZT_IPO_BEZ)) || - (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ))) { + (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ))) + { if ((bezt->f1 & SELECT) == sel /* && v2d->cur.xmin < bezt->vec[0][0] < v2d->cur.xmax) */) { @@ -482,7 +483,8 @@ static void draw_fcurve_handles(SpaceGraph *sipo, ARegion *region, FCurve *fcu) if ((bezt->f2 & SELECT) == sel) { /* only draw first handle if previous segment had handles */ if ((!prevbezt && (bezt->ipo == BEZT_IPO_BEZ)) || - (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ))) { + (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ))) + { UI_GetThemeColor3ubv(basecol + bezt->h1, col); col[3] = fcurve_display_alpha(fcu) * 255; immAttr4ubv(color, col); @@ -1252,7 +1254,8 @@ static void draw_fcurve(bAnimContext *ac, SpaceGraph *sipo, ARegion *region, bAn * we must obey this. */ if (!(U.animation_flag & USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS) || - (fcu->flag & FCURVE_SELECTED)) { + (fcu->flag & FCURVE_SELECTED)) + { if (!BKE_fcurve_are_keyframes_usable(fcu) && !(fcu->fpt && fcu->totvert)) { /* only draw controls if this is the active modifier */ if ((fcu->flag & FCURVE_ACTIVE) && (fcm)) { @@ -1553,7 +1556,8 @@ void graph_draw_channel_names(bContext *C, bAnimContext *ac, ARegion *region) /* check if visible */ if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) || - IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) { + IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) + { /* draw all channels using standard channel-drawing API */ ANIM_channel_draw(ac, ale, ymin, ymax, channel_index); } @@ -1574,7 +1578,8 @@ void graph_draw_channel_names(bContext *C, bAnimContext *ac, ARegion *region) /* check if visible */ if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) || - IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) { + IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) + { /* draw all channels using standard channel-drawing API */ rctf channel_rect; BLI_rctf_init(&channel_rect, 0, v2d->cur.xmax - V2D_SCROLL_WIDTH, ymin, ymax); diff --git a/source/blender/editors/space_graph/graph_edit.cc b/source/blender/editors/space_graph/graph_edit.cc index a7204c7b686b39172c99df5cdcf3234d3d0a0f40..6966cd3ad4f1ac5b6f99594526e66de8cfc6e82b 100644 --- a/source/blender/editors/space_graph/graph_edit.cc +++ b/source/blender/editors/space_graph/graph_edit.cc @@ -2279,7 +2279,8 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op) continue; } if ((next && closest_fcu_frame < closest_frame) || - (!next && closest_fcu_frame > closest_frame)) { + (!next && closest_fcu_frame > closest_frame)) + { closest_frame = closest_fcu_frame; found = true; } diff --git a/source/blender/editors/space_graph/graph_select.cc b/source/blender/editors/space_graph/graph_select.cc index 938f43b02032fb76498268b726ab78e882a9d5a2..c8ec51e750be912b32f1f302e48d5bf3305ecf40 100644 --- a/source/blender/editors/space_graph/graph_select.cc +++ b/source/blender/editors/space_graph/graph_select.cc @@ -218,7 +218,8 @@ static void get_nearest_fcurve_verts_list(bAnimContext *ac, const int mval[2], L if (fcurve_handle_sel_check(sipo, bezt1)) { /* first handle only visible if previous segment had handles */ if ((!prevbezt && (bezt1->ipo == BEZT_IPO_BEZ)) || - (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ))) { + (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ))) + { nearest_fcurve_vert_store(matches, v2d, fcu, diff --git a/source/blender/editors/space_graph/graph_slider_ops.cc b/source/blender/editors/space_graph/graph_slider_ops.cc index b9324bd45226623b04ec6ecac2ad19977569f2f0..e13bf32d38159a011ddcd833e51d3d9d9090bef7 100644 --- a/source/blender/editors/space_graph/graph_slider_ops.cc +++ b/source/blender/editors/space_graph/graph_slider_ops.cc @@ -267,7 +267,8 @@ static void graph_slider_exit(bContext *C, wmOperator *op) ED_slider_destroy(C, gso->slider); for (link = static_cast<LinkData *>(gso->bezt_arr_list.first); link != nullptr; - link = link->next) { + link = link->next) + { tBeztCopyData *copy = static_cast<tBeztCopyData *>(link->data); MEM_freeN(copy->bezt); MEM_freeN(link->data); diff --git a/source/blender/editors/space_image/space_image.cc b/source/blender/editors/space_image/space_image.cc index a25e93056dc2a6a4616fbb26fd565fb9f0d9c02f..e47a5b1ec2eab1dc51af6edfd9ad24a1ba854049 100644 --- a/source/blender/editors/space_image/space_image.cc +++ b/source/blender/editors/space_image/space_image.cc @@ -1012,7 +1012,8 @@ static void image_id_remap(ScrArea * /*area*/, SpaceLink *slink, const IDRemappe SpaceImage *simg = (SpaceImage *)slink; if (!BKE_id_remapper_has_mapping_for(mappings, - FILTER_ID_IM | FILTER_ID_GD_LEGACY | FILTER_ID_MSK)) { + FILTER_ID_IM | FILTER_ID_GD_LEGACY | FILTER_ID_MSK)) + { return; } diff --git a/source/blender/editors/space_nla/nla_draw.cc b/source/blender/editors/space_nla/nla_draw.cc index f3dad2d0f7651c06d9dee2de386df7f24ebfb9a6..8281742077f91db3d34bf23dee4d513a796a57cf 100644 --- a/source/blender/editors/space_nla/nla_draw.cc +++ b/source/blender/editors/space_nla/nla_draw.cc @@ -810,7 +810,8 @@ void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *region) /* check if visible */ if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) || - IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) { + IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) + { /* data to draw depends on the type of track */ switch (ale->type) { case ANIMTYPE_NLATRACK: { @@ -947,7 +948,8 @@ void draw_nla_track_list(const bContext *C, bAnimContext *ac, ARegion *region) /* check if visible */ if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) || - IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) { + IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) + { /* draw all tracks using standard channel-drawing API */ ANIM_channel_draw(ac, ale, ymin, ymax, track_index); } @@ -969,7 +971,8 @@ void draw_nla_track_list(const bContext *C, bAnimContext *ac, ARegion *region) /* check if visible */ if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) || - IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) { + IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) + { /* draw all tracks using standard channel-drawing API */ rctf track_rect; BLI_rctf_init(&track_rect, 0, v2d->cur.xmax, ymin, ymax); diff --git a/source/blender/editors/space_nla/nla_edit.cc b/source/blender/editors/space_nla/nla_edit.cc index b080d8aef740a74a24e9186367e363bf39340df6..b0d718c208c5cef9ec2de1609f1cd4d4ee1816b8 100644 --- a/source/blender/editors/space_nla/nla_edit.cc +++ b/source/blender/editors/space_nla/nla_edit.cc @@ -2164,7 +2164,8 @@ static int nlaedit_apply_scale_exec(bContext *C, wmOperator * /*op*/) * (transitions don't have scale) */ if ((strip->flag & NLASTRIP_FLAG_SELECT) && (strip->type == NLASTRIP_TYPE_CLIP)) { if (strip->act == nullptr || ID_IS_OVERRIDE_LIBRARY(strip->act) || - ID_IS_LINKED(strip->act)) { + ID_IS_LINKED(strip->act)) + { continue; } /* if the referenced action is used by other strips, diff --git a/source/blender/editors/space_nla/nla_select.cc b/source/blender/editors/space_nla/nla_select.cc index 76141ac0fdac21e37e14ac15914a0ace0781c2af..892c9282c316c0475812745b9fb9d3f5ce37bc8b 100644 --- a/source/blender/editors/space_nla/nla_select.cc +++ b/source/blender/editors/space_nla/nla_select.cc @@ -241,7 +241,8 @@ static void box_select_nla_strips(bAnimContext *ac, rcti rect, short mode, short /* only select strips if they fall within the required ranges (if applicable) */ LISTBASE_FOREACH (NlaStrip *, strip, &nlt->strips) { if ((mode == NLA_BOXSEL_CHANNELS) || - BKE_nlastrip_within_bounds(strip, rectf.xmin, rectf.xmax)) { + BKE_nlastrip_within_bounds(strip, rectf.xmin, rectf.xmax)) + { /* set selection */ ACHANNEL_SET_FLAG(strip, selectmode, NLASTRIP_FLAG_SELECT); diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc index 0080f7b73a26a15afce28f4b9b00105570c756ee..afc830b45989e32249f818bb686d235ec0c8f4f9 100644 --- a/source/blender/editors/space_node/node_draw.cc +++ b/source/blender/editors/space_node/node_draw.cc @@ -2620,7 +2620,8 @@ static Vector<NodeExtraInfoRow> node_get_extra_info(const bContext &C, if (snode.overlay.flag & SN_OVERLAY_SHOW_NAMED_ATTRIBUTES) { if (std::optional<NodeExtraInfoRow> row = node_get_accessed_attributes_row(tree_draw_ctx, - node)) { + node)) + { rows.append(std::move(*row)); } } diff --git a/source/blender/editors/space_node/node_group.cc b/source/blender/editors/space_node/node_group.cc index a27645a6c39fc48b100ebb19b736fc3fbac4999f..f1018f7a46dd461482913669821a8fe3cd57c5ab 100644 --- a/source/blender/editors/space_node/node_group.cc +++ b/source/blender/editors/space_node/node_group.cc @@ -415,7 +415,8 @@ static void node_group_ungroup(Main *bmain, bNodeTree *ntree, bNode *gnode) /* find internal links to this output */ for (bNodeLink *tlink = glinks_first->next; tlink != glinks_last->next; - tlink = tlink->next) { + tlink = tlink->next) + { /* only use active output node */ if (tlink->tonode->type == NODE_GROUP_OUTPUT && (tlink->tonode->flag & NODE_DO_OUTPUT)) { if (STREQ(tlink->tosock->identifier, identifier)) { @@ -736,7 +737,8 @@ static bool node_group_make_test_selected(bNodeTree &ntree, for (bNode *node : nodes_to_group) { const char *disabled_hint = nullptr; if (node->typeinfo->poll_instance && - !node->typeinfo->poll_instance(node, ngroup, &disabled_hint)) { + !node->typeinfo->poll_instance(node, ngroup, &disabled_hint)) + { if (disabled_hint) { BKE_reportf(&reports, RPT_WARNING, diff --git a/source/blender/editors/space_node/node_templates.cc b/source/blender/editors/space_node/node_templates.cc index a6d6d2ad29f9ff2c7e5096374c1460fa0a530a67..5f6831c030cd3671a5ec73447d3a1ea0d21ed20a 100644 --- a/source/blender/editors/space_node/node_templates.cc +++ b/source/blender/editors/space_node/node_templates.cc @@ -259,7 +259,8 @@ static void node_socket_add_replace(const bContext *C, } if (STREQ(sock_prev->identifier, sock_from->identifier) && - sock_prev->type == sock_from->type) { + sock_prev->type == sock_from->type) + { bNodeLink *link = sock_prev->link; if (link && link->fromnode) { @@ -922,7 +923,8 @@ static void ui_node_draw_input(uiLayout &layout, UI_block_emboss_set(block, UI_EMBOSS_NONE); if (lnode && - (lnode->inputs.first || (lnode->typeinfo->draw_buttons && lnode->type != NODE_GROUP))) { + (lnode->inputs.first || (lnode->typeinfo->draw_buttons && lnode->type != NODE_GROUP))) + { int icon = (input.flag & SOCK_COLLAPSED) ? ICON_DISCLOSURE_TRI_RIGHT : ICON_DISCLOSURE_TRI_DOWN; uiItemR(sub, &inputptr, "show_expanded", UI_ITEM_R_ICON_ONLY, "", icon); diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.cc b/source/blender/editors/space_outliner/outliner_dragdrop.cc index e075ad17bbb0196dea4a94f65fe238ff437b8885..fe60ae3bafe6130d0aa538e2809334008694b5f8 100644 --- a/source/blender/editors/space_outliner/outliner_dragdrop.cc +++ b/source/blender/editors/space_outliner/outliner_dragdrop.cc @@ -978,7 +978,8 @@ static void datastack_drop_copy(bContext *C, StackDropData *drop_data) ob_dst, static_cast<GpencilModifierData *>(drop_data->drag_directdata)); } else if (drop_data->ob_parent->type != OB_GPENCIL_LEGACY && - ob_dst->type != OB_GPENCIL_LEGACY) { + ob_dst->type != OB_GPENCIL_LEGACY) + { ED_object_modifier_copy_to_object(C, ob_dst, drop_data->ob_parent, @@ -1184,7 +1185,8 @@ static bool collection_drop_init(bContext *C, wmDrag *drag, const int xy[2], Col /* Currently this should not be allowed, cannot edit items in an override of a Collection. */ if (ID_IS_OVERRIDE_LIBRARY(to_collection) && - !ELEM(insert_type, TE_INSERT_AFTER, TE_INSERT_BEFORE)) { + !ELEM(insert_type, TE_INSERT_AFTER, TE_INSERT_BEFORE)) + { return false; } @@ -1511,7 +1513,8 @@ static int outliner_item_drag_drop_invoke(bContext *C, wmOperator * /*op*/, cons /* Keep collection hierarchies intact when dragging. */ bool parent_selected = false; for (TreeElement *te_parent = te_selected->parent; te_parent; - te_parent = te_parent->parent) { + te_parent = te_parent->parent) + { if (outliner_is_collection_tree_element(te_parent)) { if (TREESTORE(te_parent)->flag & TSE_SELECTED) { parent_selected = true; @@ -1532,7 +1535,8 @@ static int outliner_item_drag_drop_invoke(bContext *C, wmOperator * /*op*/, cons if (te_selected->parent) { for (TreeElement *te_parent = te_selected->parent; te_parent; - te_parent = te_parent->parent) { + te_parent = te_parent->parent) + { if (outliner_is_collection_tree_element(te_parent)) { parent = outliner_collection_from_tree_element(te_parent); break; diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc index 1ac6cefa798d06ac9a4a04e3052cbefb2281d790..71e0e0f3595954792ce4a666230bcb7c316cb611 100644 --- a/source/blender/editors/space_outliner/outliner_draw.cc +++ b/source/blender/editors/space_outliner/outliner_draw.cc @@ -1135,7 +1135,8 @@ static void outliner_draw_restrictbuts(uiBlock *block, if (te->ys + 2 * UI_UNIT_Y >= region->v2d.cur.ymin && te->ys <= region->v2d.cur.ymax) { if (tselem->type == TSE_R_LAYER && - ELEM(space_outliner->outlinevis, SO_SCENES, SO_VIEW_LAYER)) { + ELEM(space_outliner->outlinevis, SO_SCENES, SO_VIEW_LAYER)) + { if (space_outliner->show_restrict_flags & SO_RESTRICT_RENDER) { /* View layer render toggle. */ ViewLayer *layer = static_cast<ViewLayer *>(te->directdata); @@ -1659,7 +1660,8 @@ static void outliner_draw_restrictbuts(uiBlock *block, (char *)"indirect_only"); UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK); if (props_active.layer_collection_holdout || - !props_active.layer_collection_indirect_only) { + !props_active.layer_collection_indirect_only) + { UI_but_flag_enable(bt, UI_BUT_INACTIVE); } } diff --git a/source/blender/editors/space_outliner/outliner_select.cc b/source/blender/editors/space_outliner/outliner_select.cc index 9eda64c7c1e147add478d6684b4edecbb76177c7..16b2245e91695b17c1a8d691ab37fed8876c39ed 100644 --- a/source/blender/editors/space_outliner/outliner_select.cc +++ b/source/blender/editors/space_outliner/outliner_select.cc @@ -412,7 +412,8 @@ static void tree_element_material_activate(bContext *C, /* NOTE: `ob->matbits` can be nullptr when a local object points to a library mesh. */ BKE_view_layer_synced_ensure(scene, view_layer); if (ob == nullptr || ob != BKE_view_layer_active_object_get(view_layer) || - ob->matbits == nullptr) { + ob->matbits == nullptr) + { return; /* just paranoia */ } @@ -1075,7 +1076,8 @@ static eOLDrawState tree_element_active_material_get(const Scene *scene, /* NOTE: `ob->matbits` can be nullptr when a local object points to a library mesh. */ BKE_view_layer_synced_ensure(scene, view_layer); if (ob == nullptr || ob != BKE_view_layer_active_object_get(view_layer) || - ob->matbits == nullptr) { + ob->matbits == nullptr) + { return OL_DRAWSEL_NONE; /* just paranoia */ } diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc index b679cebd3125ec8a96c0897bfc24aa00ac8144f9..dd163bded9ad27716be478e851cc43e90ac83efe 100644 --- a/source/blender/editors/space_outliner/outliner_tools.cc +++ b/source/blender/editors/space_outliner/outliner_tools.cc @@ -530,7 +530,8 @@ static void outliner_do_libdata_operation(bContext *C, TreeStoreElem *tselem = TREESTORE(te); if (tselem->flag & TSE_SELECTED) { if (((tselem->type == TSE_SOME_ID) && (te->idcode != 0)) || - tselem->type == TSE_LAYER_COLLECTION) { + tselem->type == TSE_LAYER_COLLECTION) + { TreeStoreElem *tsep = te->parent ? TREESTORE(te->parent) : nullptr; operation_fn(C, reports, scene, te, tsep, tselem, user_data); } diff --git a/source/blender/editors/space_outliner/outliner_utils.cc b/source/blender/editors/space_outliner/outliner_utils.cc index 4529122e673d6f8596abd6571f0e47540fadeff9..aec0803baccd3f080ba74820023f700242e1b40e 100644 --- a/source/blender/editors/space_outliner/outliner_utils.cc +++ b/source/blender/editors/space_outliner/outliner_utils.cc @@ -74,7 +74,8 @@ TreeElement *outliner_find_item_at_y(const SpaceOutliner *space_outliner, } if (BLI_listbase_is_empty(&te_iter->subtree) || - !TSELEM_OPEN(TREESTORE(te_iter), space_outliner)) { + !TSELEM_OPEN(TREESTORE(te_iter), space_outliner)) + { /* No need for recursion. */ continue; } diff --git a/source/blender/editors/space_sequencer/sequencer_add.cc b/source/blender/editors/space_sequencer/sequencer_add.cc index 6e1d27eb80acd032b1ffec37e8d5fe6400b872db..991af06f7172dc3ff1cc6d369b7f53386286ee66 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.cc +++ b/source/blender/editors/space_sequencer/sequencer_add.cc @@ -293,12 +293,14 @@ static void load_data_init_from_operator(SeqLoadData *load_data, bContext *C, wm } if ((prop = RNA_struct_find_property(op->ptr, "cache")) && - RNA_property_boolean_get(op->ptr, prop)) { + RNA_property_boolean_get(op->ptr, prop)) + { load_data->flags |= SEQ_LOAD_SOUND_CACHE; } if ((prop = RNA_struct_find_property(op->ptr, "mono")) && - RNA_property_boolean_get(op->ptr, prop)) { + RNA_property_boolean_get(op->ptr, prop)) + { load_data->flags |= SEQ_LOAD_SOUND_MONO; } diff --git a/source/blender/editors/space_sequencer/sequencer_edit.cc b/source/blender/editors/space_sequencer/sequencer_edit.cc index c80b268303e9ede3f7787fcc4010bdd829d252a8..edd0732380faaaa4456365bdf3fc48c74be5a4c7 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.cc +++ b/source/blender/editors/space_sequencer/sequencer_edit.cc @@ -1410,14 +1410,16 @@ static int sequencer_split_exec(bContext *C, wmOperator *op) if (use_cursor_position) { LISTBASE_FOREACH (Sequence *, seq, SEQ_active_seqbase_get(ed)) { if (SEQ_time_right_handle_frame_get(scene, seq) == split_frame && - seq->machine == split_channel) { + seq->machine == split_channel) + { seq_selected = seq->flag & SEQ_ALLSEL; } } if (!seq_selected) { LISTBASE_FOREACH (Sequence *, seq, SEQ_active_seqbase_get(ed)) { if (SEQ_time_left_handle_frame_get(scene, seq) == split_frame && - seq->machine == split_channel) { + seq->machine == split_channel) + { seq->flag &= ~SEQ_ALLSEL; } } @@ -2205,14 +2207,16 @@ static Sequence *find_next_prev_sequence(Scene *scene, Sequence *test, int lr, i switch (lr) { case SEQ_SIDE_LEFT: if (SEQ_time_right_handle_frame_get(scene, seq) <= - SEQ_time_left_handle_frame_get(scene, test)) { + SEQ_time_left_handle_frame_get(scene, test)) + { dist = SEQ_time_right_handle_frame_get(scene, test) - SEQ_time_left_handle_frame_get(scene, seq); } break; case SEQ_SIDE_RIGHT: if (SEQ_time_left_handle_frame_get(scene, seq) >= - SEQ_time_right_handle_frame_get(scene, test)) { + SEQ_time_right_handle_frame_get(scene, test)) + { dist = SEQ_time_left_handle_frame_get(scene, seq) - SEQ_time_right_handle_frame_get(scene, test); } diff --git a/source/blender/editors/space_sequencer/sequencer_select.cc b/source/blender/editors/space_sequencer/sequencer_select.cc index d479cff94b0ec6df09be78cfc897ef5d13dfa46b..8de4940fc6c25f5574fc4a33e98857d222cf6aef 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.cc +++ b/source/blender/editors/space_sequencer/sequencer_select.cc @@ -276,13 +276,15 @@ Sequence *find_neighboring_sequence(Scene *scene, Sequence *test, int lr, int se switch (lr) { case SEQ_SIDE_LEFT: if (SEQ_time_left_handle_frame_get(scene, test) == - SEQ_time_right_handle_frame_get(scene, seq)) { + SEQ_time_right_handle_frame_get(scene, seq)) + { return seq; } break; case SEQ_SIDE_RIGHT: if (SEQ_time_right_handle_frame_get(scene, test) == - SEQ_time_left_handle_frame_get(scene, seq)) { + SEQ_time_left_handle_frame_get(scene, seq)) + { return seq; } break; diff --git a/source/blender/editors/space_sequencer/sequencer_timeline_draw.cc b/source/blender/editors/space_sequencer/sequencer_timeline_draw.cc index 9a42773652874aeb64ad13333f618b5fb7be3299..623f285ff3765c11dc2c40016dd4f3ee3e6a2af3 100644 --- a/source/blender/editors/space_sequencer/sequencer_timeline_draw.cc +++ b/source/blender/editors/space_sequencer/sequencer_timeline_draw.cc @@ -777,7 +777,8 @@ static void draw_seq_outline(TimelineDrawContext *timeline_ctx, const StripDrawC */ const eSeqOverlapMode overlap_mode = SEQ_tool_settings_overlap_mode_get(timeline_ctx->scene); if ((G.moving & G_TRANSFORM_SEQ) && (seq->flag & SELECT) && - overlap_mode != SEQ_OVERLAP_OVERWRITE) { + overlap_mode != SEQ_OVERLAP_OVERWRITE) + { if (seq->flag & SEQ_OVERLAP) { col[0] = 255; col[1] = col[2] = 33; @@ -1624,7 +1625,8 @@ static bool draw_cache_view_iter_fn(void *userdata, size_t *vert_count; if ((cache_type & SEQ_CACHE_STORE_FINAL_OUT) && - (drawdata->cache_flag & SEQ_CACHE_VIEW_FINAL_OUT)) { + (drawdata->cache_flag & SEQ_CACHE_VIEW_FINAL_OUT)) + { stripe_bot = UI_view2d_region_to_view_y(v2d, V2D_SCROLL_HANDLE_HEIGHT); vbo = drawdata->final_out_vbo; vert_count = &drawdata->final_out_vert_count; diff --git a/source/blender/editors/space_text/text_draw.cc b/source/blender/editors/space_text/text_draw.cc index 05646e5238265f908bad51bf87364b74fff9afd4..4d03be9187eb8df27e238890963a6f93389442e0 100644 --- a/source/blender/editors/space_text/text_draw.cc +++ b/source/blender/editors/space_text/text_draw.cc @@ -937,7 +937,8 @@ static void calc_text_rcts(SpaceText *st, ARegion *region, rcti *scroll, rcti *b if (pix_bardiff > 0) { /* the start of the highlight is in the current viewport */ if (st->runtime.viewlines && lhlstart >= st->top && - lhlstart <= st->top + st->runtime.viewlines) { + lhlstart <= st->top + st->runtime.viewlines) + { /* Speed the progression of the start of the highlight through the scroll-bar. */ hlstart = (((pix_available - pix_bardiff) * lhlstart) / ltexth) + (pix_bardiff * (lhlstart - st->top) / st->runtime.viewlines); @@ -1362,7 +1363,8 @@ static void draw_brackets(const SpaceText *st, const TextDrawContext *tdc, ARegi while (linep) { while (c < linep->len) { if (linep->format && linep->format[fc] != FMT_TYPE_STRING && - linep->format[fc] != FMT_TYPE_COMMENT) { + linep->format[fc] != FMT_TYPE_COMMENT) + { b = text_check_bracket(linep->line[c]); if (b == find) { if (stack == 0) { @@ -1396,7 +1398,8 @@ static void draw_brackets(const SpaceText *st, const TextDrawContext *tdc, ARegi while (linep) { while (fc >= 0) { if (linep->format && linep->format[fc] != FMT_TYPE_STRING && - linep->format[fc] != FMT_TYPE_COMMENT) { + linep->format[fc] != FMT_TYPE_COMMENT) + { b = text_check_bracket(linep->line[c]); if (b == find) { if (stack == 0) { diff --git a/source/blender/editors/space_text/text_ops.cc b/source/blender/editors/space_text/text_ops.cc index 4c6ce1442e41c7dc929559e9e9117d1b9ccad236..d14a20c78364c27eb836228c35c1c1c31957da11 100644 --- a/source/blender/editors/space_text/text_ops.cc +++ b/source/blender/editors/space_text/text_ops.cc @@ -1481,7 +1481,8 @@ static int text_convert_whitespace_exec(bContext *C, wmOperator *op) /* a + 0 we already know to be ' ' char... */ for (j = 1; (j < tab_len) && (a + j < text_check_line_len) && (text_check_line[a + j] == ' '); - j++) { + j++) + { /* pass */ } diff --git a/source/blender/editors/space_view3d/view3d_buttons.cc b/source/blender/editors/space_view3d/view3d_buttons.cc index 6c816e6bd917c42638509779803e9c2e73915b01..3bc0c2e282fc07f9d4c7450ffd68a9fa44dc1c95 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.cc +++ b/source/blender/editors/space_view3d/view3d_buttons.cc @@ -1008,7 +1008,8 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float /* Vertices */ if (apply_vcos || median->bv_weight || median->v_crease || median->skin[0] || - median->skin[1]) { + median->skin[1]) + { if (median->bv_weight) { if (!CustomData_has_layer_named(&bm->vdata, CD_PROP_FLOAT, "bevel_weight_vert")) { BM_data_layer_add_named(bm, &bm->vdata, CD_PROP_FLOAT, "bevel_weight_vert"); diff --git a/source/blender/editors/space_view3d/view3d_context.cc b/source/blender/editors/space_view3d/view3d_context.cc index cacaabaf842b7fc7ae13c651658bc03f6c8e92aa..06e2d24216d944cf653151d110902896b16ffdf6 100644 --- a/source/blender/editors/space_view3d/view3d_context.cc +++ b/source/blender/editors/space_view3d/view3d_context.cc @@ -63,7 +63,8 @@ int view3d_context(const bContext *C, const char *member, bContextDataResult *re Object *ob = base->object; /* if hidden but in edit mode, we still display, can happen with animation */ if ((base->flag & BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT) != 0 || - (ob->mode != OB_MODE_OBJECT)) { + (ob->mode != OB_MODE_OBJECT)) + { CTX_data_id_pointer_set(result, &ob->id); } } diff --git a/source/blender/editors/space_view3d/view3d_draw.cc b/source/blender/editors/space_view3d/view3d_draw.cc index 53a15ef3993de0a2f2fc5deebdf73c9c241fb048..1c9a9c9dbb9dd7983e6268ac0dae0bf2cbb45004 100644 --- a/source/blender/editors/space_view3d/view3d_draw.cc +++ b/source/blender/editors/space_view3d/view3d_draw.cc @@ -2227,7 +2227,8 @@ static void validate_object_select_id(Depsgraph *depsgraph, } /* texture paint mode sampling */ else if (obact_eval && (obact_eval->mode & OB_MODE_TEXTURE_PAINT) && - (v3d->shading.type > OB_WIRE)) { + (v3d->shading.type > OB_WIRE)) + { /* do nothing */ } else if ((obact_eval && (obact_eval->mode & OB_MODE_PARTICLE_EDIT)) && !XRAY_ENABLED(v3d)) { diff --git a/source/blender/editors/space_view3d/view3d_edit.cc b/source/blender/editors/space_view3d/view3d_edit.cc index ea5887c5aa63de5435df3935d30b88214d647e81..ded997921efbf806e06b38b3d4a7677e8a7abb25 100644 --- a/source/blender/editors/space_view3d/view3d_edit.cc +++ b/source/blender/editors/space_view3d/view3d_edit.cc @@ -638,7 +638,8 @@ static int background_image_remove_exec(bContext *C, wmOperator *op) if (bgpic_rem) { if (ID_IS_OVERRIDE_LIBRARY(cam) && - (bgpic_rem->flag & CAM_BGIMG_FLAG_OVERRIDE_LIBRARY_LOCAL) == 0) { + (bgpic_rem->flag & CAM_BGIMG_FLAG_OVERRIDE_LIBRARY_LOCAL) == 0) + { BKE_reportf(op->reports, RPT_WARNING, "Cannot remove background image %d from camera '%s', as it is from the linked " diff --git a/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc b/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc index c141b2fa14e859811220c78b41ded642998d537e..55c2884f75bbce83bde5e4be88c01eb48e0c1d90 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc +++ b/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc @@ -135,7 +135,8 @@ static int gizmo_preselect_elem_test_select(bContext *C, wmGizmo *gz, const int View3D *v3d = CTX_wm_view3d(C); BKE_view_layer_synced_ensure(scene, view_layer); if ((gz_ele->bases) == nullptr || - (gz_ele->bases[0] != BKE_view_layer_active_base_get(view_layer))) { + (gz_ele->bases[0] != BKE_view_layer_active_base_get(view_layer))) + { MEM_SAFE_FREE(gz_ele->bases); gz_ele->bases = BKE_view_layer_array_from_bases_in_edit_mode( scene, view_layer, v3d, &gz_ele->bases_len); diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc b/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc index dd874b28d45e0f61082e7df223bfeda27488c93b..49f3f66831fcd99a601d1ce7180e2823ac4c16ea 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc +++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc @@ -434,7 +434,8 @@ static bool view3d_ruler_item_mousemove(const bContext *C, #ifdef USE_AXIS_CONSTRAINTS if (!(ruler_item->flag & RULERITEM_USE_ANGLE) && - ruler_info->constrain_mode != CONSTRAIN_MODE_OFF) { + ruler_info->constrain_mode != CONSTRAIN_MODE_OFF) + { Scene *scene = DEG_get_input_scene(depsgraph); ViewLayer *view_layer = DEG_get_input_view_layer(depsgraph); @@ -1409,7 +1410,8 @@ static int view3d_ruler_remove_invoke(bContext *C, wmOperator *op, const wmEvent if (ruler_info->item_active) { RulerItem *ruler_item = ruler_info->item_active; if ((ruler_item->flag & RULERITEM_USE_ANGLE) && - (ruler_item->flag & RULERITEM_USE_ANGLE_ACTIVE)) { + (ruler_item->flag & RULERITEM_USE_ANGLE_ACTIVE)) + { ruler_item->flag &= ~(RULERITEM_USE_ANGLE | RULERITEM_USE_ANGLE_ACTIVE); } else { diff --git a/source/blender/editors/space_view3d/view3d_iterators.cc b/source/blender/editors/space_view3d/view3d_iterators.cc index 74815a64fe07ede987615332bdff7153179d157c..23a2bcab21281aeac32b0b6cdbafe20adcad31a1 100644 --- a/source/blender/editors/space_view3d/view3d_iterators.cc +++ b/source/blender/editors/space_view3d/view3d_iterators.cc @@ -718,7 +718,8 @@ void mball_foreachScreenElem(ViewContext *vc, LISTBASE_FOREACH (MetaElem *, ml, mb->editelems) { float screen_co[2]; if (ED_view3d_project_float_object(vc->region, &ml->x, screen_co, clip_flag) == - V3D_PROJ_RET_OK) { + V3D_PROJ_RET_OK) + { func(user_data, ml, screen_co); } } diff --git a/source/blender/editors/space_view3d/view3d_navigate_fly.cc b/source/blender/editors/space_view3d/view3d_navigate_fly.cc index 7fa1123203e9332da58e2040e8e4f0a061247456..753fa9f48e3460055fe9a10d0a340cd63e00e1c6 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_fly.cc +++ b/source/blender/editors/space_view3d/view3d_navigate_fly.cc @@ -13,9 +13,9 @@ */ #ifdef WITH_INPUT_NDOF -//# define NDOF_FLY_DEBUG +// # define NDOF_FLY_DEBUG /* NOTE(@ideasman42): is this needed for NDOF? commented so redraw doesn't thrash. */ -//# define NDOF_FLY_DRAW_TOOMUCH +// # define NDOF_FLY_DRAW_TOOMUCH #endif /* WITH_INPUT_NDOF */ #include "DNA_object_types.h" @@ -327,7 +327,8 @@ static bool initFlyInfo(bContext *C, FlyInfo *fly, wmOperator *op, const wmEvent } if (fly->rv3d->persp == RV3D_CAMOB && - !BKE_id_is_editable(CTX_data_main(C), &fly->v3d->camera->id)) { + !BKE_id_is_editable(CTX_data_main(C), &fly->v3d->camera->id)) + { BKE_report(op->reports, RPT_ERROR, "Cannot navigate a camera from an external library or non-editable override"); @@ -1115,10 +1116,9 @@ static int fly_modal(bContext *C, wmOperator *op, const wmEvent *event) } else #endif /* WITH_INPUT_NDOF */ - if (event->type == TIMER && event->customdata == fly->timer) - { - flyApply(C, fly, false); - } + if (event->type == TIMER && event->customdata == fly->timer) { + flyApply(C, fly, false); + } do_draw |= fly->redraw; diff --git a/source/blender/editors/space_view3d/view3d_navigate_walk.cc b/source/blender/editors/space_view3d/view3d_navigate_walk.cc index da9b9e4eef8e3e9808939ef6104660e2f5108183..e8fc763ed6c63735fd6bcbf3b1ff4824fdd5d3a9 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_walk.cc +++ b/source/blender/editors/space_view3d/view3d_navigate_walk.cc @@ -53,9 +53,9 @@ #include "BLI_strict_flags.h" #ifdef WITH_INPUT_NDOF -//# define NDOF_WALK_DEBUG +// # define NDOF_WALK_DEBUG /* NOTE(@ideasman42): Is this needed for NDOF? commented so redraw doesn't thrash. */ -//# define NDOF_WALK_DRAW_TOOMUCH +// # define NDOF_WALK_DRAW_TOOMUCH #endif #define USE_TABLET_SUPPORT @@ -1518,10 +1518,9 @@ static int walk_modal(bContext *C, wmOperator *op, const wmEvent *event) } else #endif /* WITH_INPUT_NDOF */ - if (event->type == TIMER && event->customdata == walk->timer) - { - walkApply(C, walk, false); - } + if (event->type == TIMER && event->customdata == walk->timer) { + walkApply(C, walk, false); + } do_draw |= walk->redraw; diff --git a/source/blender/editors/space_view3d/view3d_select.cc b/source/blender/editors/space_view3d/view3d_select.cc index 8415e8a75ccf495c41fd8abd5ad20c0bfa82f70a..44b26181a1a8e79ab454ce6e627e5cf4eb5c231a 100644 --- a/source/blender/editors/space_view3d/view3d_select.cc +++ b/source/blender/editors/space_view3d/view3d_select.cc @@ -1379,7 +1379,8 @@ static bool view3d_lasso_select(bContext *C, changed_multi |= do_lasso_select_paintvert(vc, wm_userdata, mcoords, mcoords_len, sel_op); } else if (ob && - (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT))) { + (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT))) + { /* pass */ } else if (ob && (ob->mode & OB_MODE_PARTICLE_EDIT)) { @@ -2751,7 +2752,8 @@ static bool ed_object_select_pick(bContext *C, MovieClip *clip = BKE_object_movieclip_get(scene, basact->object, false); if (clip != nullptr) { if (ed_object_select_pick_camera_track( - C, scene, basact, clip, gpu->buffer, gpu->hits, params)) { + C, scene, basact, clip, gpu->buffer, gpu->hits, params)) + { ED_object_base_select(basact, BA_SELECT); /* Don't set `handled` here as the object activation may be necessary. */ changed_object = true; @@ -3931,7 +3933,8 @@ static bool do_meta_box_select(ViewContext *vc, const rcti *rect, const eSelectO int metaelem_id = 0; for (ml = static_cast<MetaElem *>(mb->editelems->first); ml; - ml = ml->next, metaelem_id += 0x10000) { + ml = ml->next, metaelem_id += 0x10000) + { bool is_inside_radius = false; bool is_inside_stiff = false; @@ -5283,7 +5286,8 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op) } FOREACH_OBJECT_IN_MODE_BEGIN ( - vc.scene, vc.view_layer, vc.v3d, obact->type, obact->mode, ob_iter) { + vc.scene, vc.view_layer, vc.v3d, obact->type, obact->mode, ob_iter) + { ED_view3d_viewcontext_init_object(&vc, ob_iter); obact = vc.obact; diff --git a/source/blender/editors/space_view3d/view3d_utils.cc b/source/blender/editors/space_view3d/view3d_utils.cc index 17102724dee6bdee9cdb18a7c79b8c2075d64750..8a10d32e452046455681ad71e5b9dfdcda7b8731 100644 --- a/source/blender/editors/space_view3d/view3d_utils.cc +++ b/source/blender/editors/space_view3d/view3d_utils.cc @@ -1625,7 +1625,8 @@ static bool view3d_camera_to_view_selected_impl(Main *bmain, bool is_ortho_camera = false; if ((camera_ob_eval->type == OB_CAMERA) && - (((Camera *)camera_ob_eval->data)->type == CAM_ORTHO)) { + (((Camera *)camera_ob_eval->data)->type == CAM_ORTHO)) + { ((Camera *)camera_ob->data)->ortho_scale = scale; is_ortho_camera = true; } diff --git a/source/blender/editors/transform/transform.cc b/source/blender/editors/transform/transform.cc index f2f40e6cec6f504d020f3200ef659ac678a735ac..3874ed24de27571bb35075ab6a7dcb870054a530 100644 --- a/source/blender/editors/transform/transform.cc +++ b/source/blender/editors/transform/transform.cc @@ -539,7 +539,8 @@ static void viewRedrawPost(bContext *C, TransInfo *t) UVCALC_TRANSFORM_CORRECT; if ((t->data_type == &TransConvertType_Mesh) && - (t->settings->uvcalc_flag & uvcalc_correct_flag)) { + (t->settings->uvcalc_flag & uvcalc_correct_flag)) + { WM_event_add_notifier(C, NC_GEOM | ND_DATA, nullptr); } diff --git a/source/blender/editors/transform/transform_convert.cc b/source/blender/editors/transform/transform_convert.cc index 7e59cb272b4cafa1368c564d8453e24ee3ffba5b..c5b46ba5ea16c6b0355017c862dd4460a2a062c3 100644 --- a/source/blender/editors/transform/transform_convert.cc +++ b/source/blender/editors/transform/transform_convert.cc @@ -575,7 +575,8 @@ bool constraints_list_needinv(TransInfo *t, ListBase *list) bChildOfConstraint *data = (bChildOfConstraint *)con->data; if ((data->flag & CHILDOF_LOCX) && (data->flag & CHILDOF_LOCY) && - (data->flag & CHILDOF_LOCZ)) { + (data->flag & CHILDOF_LOCZ)) + { return true; } } @@ -584,7 +585,8 @@ bool constraints_list_needinv(TransInfo *t, ListBase *list) bRotateLikeConstraint *data = (bRotateLikeConstraint *)con->data; if (ELEM(data->mix_mode, ROTLIKE_MIX_OFFSET, ROTLIKE_MIX_BEFORE) && - ELEM(t->mode, TFM_ROTATION)) { + ELEM(t->mode, TFM_ROTATION)) + { return true; } } diff --git a/source/blender/editors/transform/transform_convert_action.cc b/source/blender/editors/transform/transform_convert_action.cc index 87693a0ffb35af2c647efc77fae7cd26a7b2823c..c2f390693eb5719661e9257adaf9d02fd80055b7 100644 --- a/source/blender/editors/transform/transform_convert_action.cc +++ b/source/blender/editors/transform/transform_convert_action.cc @@ -795,7 +795,8 @@ static void createTransActionData(bContext *C, TransInfo *t) if (use_duplicated) { /* Also count for duplicated frames. */ for (const auto [frame_number, frame] : - layer->runtime->trans_data_.temp_frames_buffer.items()) { + layer->runtime->trans_data_.temp_frames_buffer.items()) + { grease_pencil_closest_selected_frame(frame_number, frame.is_selected()); } } diff --git a/source/blender/editors/transform/transform_convert_armature.cc b/source/blender/editors/transform/transform_convert_armature.cc index 4d51932bce171bf4df0bca678146ecf4460149a3..64264d82018e6d8d0a69f50fbdb4774e73c9507c 100644 --- a/source/blender/editors/transform/transform_convert_armature.cc +++ b/source/blender/editors/transform/transform_convert_armature.cc @@ -632,7 +632,8 @@ static void createTransPose(bContext * /*C*/, TransInfo *t) pchan->bone->flag &= ~BONE_TRANSFORM_MIRROR; if ((pchan->bone->flag & BONE_TRANSFORM) && - BKE_pose_channel_get_mirrored(ob->pose, pchan->name)) { + BKE_pose_channel_get_mirrored(ob->pose, pchan->name)) + { total_mirrored++; } } diff --git a/source/blender/editors/transform/transform_convert_curve.cc b/source/blender/editors/transform/transform_convert_curve.cc index 9676be064d79805207a5b32b07daf657e96c7274..096ae8560cbe02a04f647ca89dfa18ef25ecdb96 100644 --- a/source/blender/editors/transform/transform_convert_curve.cc +++ b/source/blender/editors/transform/transform_convert_curve.cc @@ -400,7 +400,8 @@ static void createTransCurveVerts(bContext * /*C*/, TransInfo *t) /* TODO: in the case of tilt and radius we can also avoid allocating the * initTransDataCurveHandles but for now just don't change handle types */ if ((nu->type == CU_BEZIER) && - ELEM(t->mode, TFM_CURVE_SHRINKFATTEN, TFM_TILT, TFM_DUMMY) == 0) { + ELEM(t->mode, TFM_CURVE_SHRINKFATTEN, TFM_TILT, TFM_DUMMY) == 0) + { /* sets the handles based on their selection, * do this after the data is copied to the TransData */ BKE_nurb_handles_test(nu, handle_mode, use_around_origins_for_handles_test); diff --git a/source/blender/editors/transform/transform_convert_gpencil_legacy.cc b/source/blender/editors/transform/transform_convert_gpencil_legacy.cc index 4af1707ab3ea564d2ddda257164b6c698f0941c0..fbdba9124ecfa6293fbf138bb1ffe7bdef4e85ea 100644 --- a/source/blender/editors/transform/transform_convert_gpencil_legacy.cc +++ b/source/blender/editors/transform/transform_convert_gpencil_legacy.cc @@ -609,7 +609,8 @@ static void createTransGPencil_strokes(bContext *C, * This allows get interesting effects also when move * using proportional editing. */ if ((gps->flag & GP_STROKE_SELECT) && - (ts->transform_pivot_point == V3D_AROUND_LOCAL_ORIGINS)) { + (ts->transform_pivot_point == V3D_AROUND_LOCAL_ORIGINS)) + { copy_v3_v3(td->center, center); } else { @@ -642,7 +643,8 @@ static void createTransGPencil_strokes(bContext *C, /* Screen-space needs special matrices. */ if ((gps->flag & (GP_STROKE_3DSPACE | GP_STROKE_2DSPACE | GP_STROKE_2DIMAGE)) == - 0) { + 0) + { /* Screen-space. */ td->protectflag = OB_LOCK_LOCZ | OB_LOCK_ROTZ | OB_LOCK_SCALEZ; } diff --git a/source/blender/editors/transform/transform_convert_node.cc b/source/blender/editors/transform/transform_convert_node.cc index 4e7656bbfdde1ec2e1452a0df4914adab2fbb4e7..9caf9b0450545c03c73b3defa858c44631d367b7 100644 --- a/source/blender/editors/transform/transform_convert_node.cc +++ b/source/blender/editors/transform/transform_convert_node.cc @@ -155,7 +155,8 @@ static void node_snap_grid_apply(TransInfo *t) using namespace blender; if (!(transform_snap_is_active(t) && - (t->tsnap.mode & (SCE_SNAP_TO_INCREMENT | SCE_SNAP_TO_GRID)))) { + (t->tsnap.mode & (SCE_SNAP_TO_INCREMENT | SCE_SNAP_TO_GRID)))) + { return; } diff --git a/source/blender/editors/transform/transform_convert_object.cc b/source/blender/editors/transform/transform_convert_object.cc index 9761d7a3334cff03610456b8be309c8fbdb05517..0935c311f1f863354638875c7a19f07d15e46338 100644 --- a/source/blender/editors/transform/transform_convert_object.cc +++ b/source/blender/editors/transform/transform_convert_object.cc @@ -705,7 +705,8 @@ static void createTransObject(bContext *C, TransInfo *t) Base *base_parent = BKE_view_layer_base_find(view_layer, ob->parent); if (base_parent) { if (BASE_XFORM_INDIRECT(base_parent) || - BLI_gset_haskey(objects_in_transdata, ob->parent)) { + BLI_gset_haskey(objects_in_transdata, ob->parent)) + { ED_object_xform_skip_child_container_item_ensure( tdo->xcs, ob, nullptr, XFORM_OB_SKIP_CHILD_PARENT_IS_XFORM); base->flag_legacy |= BA_TRANSFORM_LOCKED_IN_PLACE; diff --git a/source/blender/editors/transform/transform_mode_translate.cc b/source/blender/editors/transform/transform_mode_translate.cc index b18e04805b0c13fd4d4885079b6b179e24756352..2316c33fb33cd471c7da20e9c791c4213a6278f9 100644 --- a/source/blender/editors/transform/transform_mode_translate.cc +++ b/source/blender/editors/transform/transform_mode_translate.cc @@ -459,7 +459,8 @@ static void ApplySnapTranslation(TransInfo *t, float vec[3]) if (t->spacetype == SPACE_VIEW3D) { if (t->options & CTX_PAINT_CURVE) { if (ED_view3d_project_float_global(t->region, point, point, V3D_PROJ_TEST_NOP) != - V3D_PROJ_RET_OK) { + V3D_PROJ_RET_OK) + { zero_v3(point); /* no good answer here... */ } } diff --git a/source/blender/editors/transform/transform_ops.cc b/source/blender/editors/transform/transform_ops.cc index a9ddc2ed4bf2988274a2ebce7e06f6efb0bc721c..84f48eeec2be9bce604f75c8c97e01dc76c93572 100644 --- a/source/blender/editors/transform/transform_ops.cc +++ b/source/blender/editors/transform/transform_ops.cc @@ -568,7 +568,8 @@ static bool transform_poll_property(const bContext *C, wmOperator *op, const Pro /* Special case: show constraint axis if we don't have values, * needed for mirror operator. */ if (STREQ(prop_id, "constraint_axis") && - (RNA_struct_find_property(op->ptr, "value") == nullptr)) { + (RNA_struct_find_property(op->ptr, "value") == nullptr)) + { return true; } diff --git a/source/blender/editors/transform/transform_orientations.cc b/source/blender/editors/transform/transform_orientations.cc index fbdc257dff9afc5485dfc3b02b23bab4ad9d66b9..f25474205a620f4653bd567b7819000b42fa4656 100644 --- a/source/blender/editors/transform/transform_orientations.cc +++ b/source/blender/editors/transform/transform_orientations.cc @@ -1094,7 +1094,8 @@ int getTransformOrientation_ex(const Scene *scene, } else { if (BM_edge_calc_length_squared(e_pair[0]) < - BM_edge_calc_length_squared(e_pair[1])) { + BM_edge_calc_length_squared(e_pair[1])) + { v_pair_swap = true; } } diff --git a/source/blender/editors/transform/transform_snap.cc b/source/blender/editors/transform/transform_snap.cc index 01464b3a9331a6c556514b0de1e1c5718558c012..fd64b11cd437f1551d5f4e784a58926ca57500da 100644 --- a/source/blender/editors/transform/transform_snap.cc +++ b/source/blender/editors/transform/transform_snap.cc @@ -396,7 +396,8 @@ static bool applyFaceProject(TransInfo *t, TransDataContainer *tc, TransData *td } if (ED_view3d_project_float_global(t->region, iloc, mval_fl, V3D_PROJ_TEST_NOP) != - V3D_PROJ_RET_OK) { + V3D_PROJ_RET_OK) + { return false; } @@ -836,7 +837,8 @@ void initSnapping(TransInfo *t, wmOperator *op) /* if snap property exists */ PropertyRNA *prop; if (op && (prop = RNA_struct_find_property(op->ptr, "snap")) && - RNA_property_is_set(op->ptr, prop)) { + RNA_property_is_set(op->ptr, prop)) + { if (RNA_property_boolean_get(op->ptr, prop)) { t->modifiers |= MOD_SNAP; @@ -856,7 +858,8 @@ void initSnapping(TransInfo *t, wmOperator *op) } if ((prop = RNA_struct_find_property(op->ptr, "snap_point")) && - RNA_property_is_set(op->ptr, prop)) { + RNA_property_is_set(op->ptr, prop)) + { RNA_property_float_get_array(op->ptr, prop, t->tsnap.snap_target); t->modifiers |= MOD_SNAP_FORCED; t->tsnap.status |= SNAP_TARGET_FOUND; @@ -864,7 +867,8 @@ void initSnapping(TransInfo *t, wmOperator *op) /* snap align only defined in specific cases */ if ((prop = RNA_struct_find_property(op->ptr, "snap_align")) && - RNA_property_is_set(op->ptr, prop)) { + RNA_property_is_set(op->ptr, prop)) + { SET_FLAG_FROM_TEST( t->tsnap.flag, RNA_property_boolean_get(op->ptr, prop), SCE_SNAP_ROTATE); @@ -1373,7 +1377,8 @@ static void snap_source_closest_fn(TransInfo *t) dist = t->mode_info->snap_distance_fn(t, loc, t->tsnap.snap_target); if ((dist != TRANSFORM_DIST_INVALID) && - (closest == nullptr || fabsf(dist) < fabsf(dist_closest))) { + (closest == nullptr || fabsf(dist) < fabsf(dist_closest))) + { copy_v3_v3(t->tsnap.snap_source, loc); closest = td; dist_closest = dist; @@ -1390,7 +1395,8 @@ static void snap_source_closest_fn(TransInfo *t) dist = t->mode_info->snap_distance_fn(t, loc, t->tsnap.snap_target); if ((dist != TRANSFORM_DIST_INVALID) && - (closest == nullptr || fabsf(dist) < fabsf(dist_closest))) { + (closest == nullptr || fabsf(dist) < fabsf(dist_closest))) + { copy_v3_v3(t->tsnap.snap_source, loc); closest = td; } @@ -1415,7 +1421,8 @@ static void snap_source_closest_fn(TransInfo *t) dist = t->mode_info->snap_distance_fn(t, loc, t->tsnap.snap_target); if ((dist != TRANSFORM_DIST_INVALID) && - (closest == nullptr || fabsf(dist) < fabsf(dist_closest))) { + (closest == nullptr || fabsf(dist) < fabsf(dist_closest))) + { copy_v3_v3(t->tsnap.snap_source, loc); closest = td; dist_closest = dist; diff --git a/source/blender/editors/transform/transform_snap_object.cc b/source/blender/editors/transform/transform_snap_object.cc index 6844f22875007dc2cf13941a47bc1c5086000cc0..1e663807ebdf2ba09e721451d1362235cf0df148 100644 --- a/source/blender/editors/transform/transform_snap_object.cc +++ b/source/blender/editors/transform/transform_snap_object.cc @@ -497,7 +497,8 @@ static eSnapMode iter_snap_objects(SnapObjectContext *sctx, IterSnapObjsCallback const bool is_object_active = (base == base_act); Object *obj_eval = DEG_get_evaluated_object(sctx->runtime.depsgraph, base->object); if (obj_eval->transflag & OB_DUPLI || - blender::bke::object_has_geometry_set_instances(*obj_eval)) { + blender::bke::object_has_geometry_set_instances(*obj_eval)) + { ListBase *lb = object_duplilist(sctx->runtime.depsgraph, sctx->scene, obj_eval); LISTBASE_FOREACH (DupliObject *, dupli_ob, lb) { BLI_assert(DEG_is_evaluated_object(dupli_ob->ob)); diff --git a/source/blender/editors/transform/transform_snap_object_mesh.cc b/source/blender/editors/transform/transform_snap_object_mesh.cc index 8e6cad9b8f2fd7aea49bab93308cc6fb575e7c30..f5d7e59d98dbcda7c6faf900be3bac92c0d0b0e2 100644 --- a/source/blender/editors/transform/transform_snap_object_mesh.cc +++ b/source/blender/editors/transform/transform_snap_object_mesh.cc @@ -207,7 +207,8 @@ static bool nearest_world_mesh(SnapObjectContext *sctx, BVHTreeNearest nearest{}; nearest.dist_sq = sctx->ret.dist_nearest_sq; if (nearest_world_tree( - sctx, treedata.tree, treedata.nearest_callback, obmat, &treedata, &nearest)) { + sctx, treedata.tree, treedata.nearest_callback, obmat, &treedata, &nearest)) + { SnapData::register_result(sctx, ob_eval, &me_eval->id, obmat, &nearest); return true; } diff --git a/source/blender/editors/undo/ed_undo.cc b/source/blender/editors/undo/ed_undo.cc index 2b760d9b89ce74dc884363e3ab0ceda240ca2777..5006ef7d4ef62d4464426ce56d7defe694682e92 100644 --- a/source/blender/editors/undo/ed_undo.cc +++ b/source/blender/editors/undo/ed_undo.cc @@ -462,7 +462,8 @@ bool ED_undo_is_legacy_compatible_for_property(bContext *C, ID *id) } if (obact->mode & OB_MODE_EDIT) { if ((id == nullptr) || (obact->data == nullptr) || - (GS(id->name) != GS(((ID *)obact->data)->name))) { + (GS(id->name) != GS(((ID *)obact->data)->name))) + { /* No undo push on id type mismatch in edit-mode. */ CLOG_INFO(&LOG, 1, "skipping undo for edit-mode"); return false; diff --git a/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc b/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc index 93f6bb35152a169a9b5744d9eb4bf2ec55784bba..a2227a7c73de89c8dbc2dfb8c6dd7129ab7f46a7 100644 --- a/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc +++ b/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc @@ -346,7 +346,8 @@ static void maximum_common_subgraph_internal(int incumbent[][2], } bd = &domains[bd_pos - 1][L]; if (calc_bound(domains, bd_pos, bd[P]) + bd[P] <= *inc_pos || - (bd[LL] == 0 && bd[RL] == bd[IRL])) { + (bd[LL] == 0 && bd[RL] == bd[IRL])) + { bd_pos--; } else { diff --git a/source/blender/editors/uvedit/uvedit_rip.cc b/source/blender/editors/uvedit/uvedit_rip.cc index 200cd52fe74f9eb5d36ca951acfe3a905928123b..ba686a577a9b9785084a907ea4cafb8b3ad9aec0 100644 --- a/source/blender/editors/uvedit/uvedit_rip.cc +++ b/source/blender/editors/uvedit/uvedit_rip.cc @@ -641,7 +641,8 @@ static UVRipPairs *uv_rip_pairs_from_loop(BMLoop *l_init, do { /* Not a boundary and visible. */ if (!UL(l_radial_iter)->is_select_edge && - BM_elem_flag_test(l_radial_iter->f, BM_ELEM_TAG)) { + BM_elem_flag_test(l_radial_iter->f, BM_ELEM_TAG)) + { BMLoop *l_other = (l_radial_iter->v == l_step->v) ? l_radial_iter : l_radial_iter->next; BLI_assert(l_other->v == l_step->v); diff --git a/source/blender/editors/uvedit/uvedit_select.cc b/source/blender/editors/uvedit/uvedit_select.cc index 94af21b03a061ad05004c40bce124fa2142a33d4..fae17734c22647ce20fdde9d634005edbd90703e 100644 --- a/source/blender/editors/uvedit/uvedit_select.cc +++ b/source/blender/editors/uvedit/uvedit_select.cc @@ -3162,11 +3162,13 @@ static int uv_select_split_exec(bContext *C, wmOperator *op) BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) { if (BM_ELEM_CD_GET_BOOL(l, offsets.select_vert) || - BM_ELEM_CD_GET_BOOL(l, offsets.select_edge)) { + BM_ELEM_CD_GET_BOOL(l, offsets.select_edge)) + { is_sel = true; } if (!BM_ELEM_CD_GET_BOOL(l, offsets.select_vert) || - !BM_ELEM_CD_GET_BOOL(l, offsets.select_edge)) { + !BM_ELEM_CD_GET_BOOL(l, offsets.select_edge)) + { is_unsel = true; } @@ -3314,7 +3316,8 @@ static void uv_select_flush_from_tag_face(const Scene *scene, Object *obedit, co const BMUVOffsets offsets = BM_uv_map_get_offsets(em->bm); if ((ts->uv_flag & UV_SYNC_SELECTION) == 0 && - ELEM(ts->uv_sticky, SI_STICKY_VERTEX, SI_STICKY_LOC)) { + ELEM(ts->uv_sticky, SI_STICKY_VERTEX, SI_STICKY_LOC)) + { uint efa_index; @@ -3457,7 +3460,8 @@ static void uv_select_flush_from_loop_edge_flag(const Scene *scene, BMEditMesh * const BMUVOffsets offsets = BM_uv_map_get_offsets(em->bm); if ((ts->uv_flag & UV_SYNC_SELECTION) == 0 && - ELEM(ts->uv_sticky, SI_STICKY_LOC, SI_STICKY_VERTEX)) { + ELEM(ts->uv_sticky, SI_STICKY_LOC, SI_STICKY_VERTEX)) + { /* Use UV edge selection to identify which verts must to be selected */ uint efa_index; /* Clear UV vert flags */ @@ -4077,7 +4081,8 @@ static bool do_lasso_select_mesh_uv(bContext *C, BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) { float *luv = BM_ELEM_CD_GET_FLOAT_P(l, offsets.uv); if (do_lasso_select_mesh_uv_is_edge_inside( - region, &rect, mcoords, mcoords_len, luv, luv_prev)) { + region, &rect, mcoords, mcoords_len, luv, luv_prev)) + { uvedit_edge_select_set_with_sticky(scene, em, l_prev, select, false, offsets); changed = true; } diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.cc b/source/blender/editors/uvedit/uvedit_smart_stitch.cc index 28b16e103b331fe7d7a6aa8f9272d4e4b82428a9..0a0772c3514c08560f9e0450055e86ea993d1820 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.cc +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.cc @@ -830,7 +830,8 @@ static void stitch_validate_uv_stitchability(const int cd_loop_uv_offset, } if (stitch_check_uvs_state_stitchable(cd_loop_uv_offset, element, element_iter, ssc)) { if ((element_iter->island == ssc->static_island) || - (element->island == ssc->static_island)) { + (element->island == ssc->static_island)) + { element->flag |= STITCH_STITCHABLE; preview->num_stitchable++; stitch_setup_face_preview_for_uv_group( @@ -931,7 +932,8 @@ static void stitch_propagate_uv_final_position(Scene *scene, /* end of calculations, keep only the selection flag */ if ((!ssc->snap_islands) || - ((!ssc->midpoints) && (element_iter->island == ssc->static_island))) { + ((!ssc->midpoints) && (element_iter->island == ssc->static_island))) + { element_iter->flag &= STITCH_SELECTED; } diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.cc b/source/blender/editors/uvedit/uvedit_unwrap_ops.cc index a2b3046e2dcfc4b2a0989d232657079fb92f4a32..20665109e1304f85f7c55c463735e030a2f8b998 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.cc +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.cc @@ -2675,7 +2675,8 @@ static int smart_uv_project_thickface_area_cmp_fn(const void *tf_a_p, const void /* Ignore the area of small faces. * Also, order checks so `!isfinite(...)` values are counted as zero area. */ 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; } diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp index e156437f98ae1f7bc8e456ec4c7c04c4d41c83f0..7b71d720e98222b5d4c3d4b57fbd53482d41eead 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp @@ -84,7 +84,8 @@ NodeGroup *BlenderFileLoader::Load() } if ((ob->base_flag & (BASE_HOLDOUT | BASE_INDIRECT_ONLY)) || - (ob->visibility_flag & OB_HOLDOUT)) { + (ob->visibility_flag & OB_HOLDOUT)) + { continue; } diff --git a/source/blender/freestyle/intern/geometry/Grid.cpp b/source/blender/freestyle/intern/geometry/Grid.cpp index cac8553005ed0069f033796d670666e47dc09e41..d7f7a091c15538aa6b637c4d7455f1b6380a17ae 100644 --- a/source/blender/freestyle/intern/geometry/Grid.cpp +++ b/source/blender/freestyle/intern/geometry/Grid.cpp @@ -58,17 +58,17 @@ void firstIntersectionGridVisitor::examineOccluder(Polygon3r *occ) #else if (tmp_t < t_) { #endif - occluder_ = occ; - u_ = tmp_u; - v_ = tmp_v; - t_ = tmp_t; + occluder_ = occ; + u_ = tmp_u; + v_ = tmp_v; + t_ = tmp_t; + } + } + else { + occ->userdata2 = nullptr; } - } - else { - occ->userdata2 = nullptr; } } -} } // namespace Freestyle bool firstIntersectionGridVisitor::stop() diff --git a/source/blender/freestyle/intern/geometry/Noise.cpp b/source/blender/freestyle/intern/geometry/Noise.cpp index 6a4683bb7fa361a9779d4a90e9760cacb0090d47..1d5f56ac5d0968562afec91a421aa2dd854afff2 100644 --- a/source/blender/freestyle/intern/geometry/Noise.cpp +++ b/source/blender/freestyle/intern/geometry/Noise.cpp @@ -26,8 +26,9 @@ namespace Freestyle { # define REALSCALE (2.0 / 65536.0) # define NREALSCALE (2.0 / 4096.0) -# define HASH3D(a, b, c) hashTable[hashTable[hashTable[(a)&0xfff] ^ ((b)&0xfff)] ^ ((c)&0xfff)] -# define HASH(a, b, c) (xtab[(xtab[(xtab[(a)&0xff] ^ (b)) & 0xff] ^ (c)) & 0xff] & 0xff) +# define HASH3D(a, b, c) \ + hashTable[hashTable[hashTable[(a) & 0xfff] ^ ((b) & 0xfff)] ^ ((c) & 0xfff)] +# define HASH(a, b, c) (xtab[(xtab[(xtab[(a) & 0xff] ^ (b)) & 0xff] ^ (c)) & 0xff] & 0xff) # define INCRSUM(m, s, x, y, z) \ ((s) * (RTable[m] * 0.5 + RTable[m + 1] * (x) + RTable[m + 2] * (y) + RTable[m + 3] * (z))) @@ -148,7 +149,7 @@ float Noise::smoothNoise2(Vec2f &vec) sx = SCURVE(rx0); sy = SCURVE(ry0); -#define AT2(rx, ry) ((rx)*q[0] + (ry)*q[1]) +#define AT2(rx, ry) ((rx) * q[0] + (ry) * q[1]) q = g2[b00]; u = AT2(rx0, ry0); @@ -189,7 +190,7 @@ float Noise::smoothNoise3(Vec3f &vec) sy = SCURVE(ry0); sz = SCURVE(rz0); -#define AT3(rx, ry, rz) ((rx)*q[0] + (ry)*q[1] + (rz)*q[2]) +#define AT3(rx, ry, rz) ((rx) * q[0] + (ry) * q[1] + (rz) * q[2]) q = g3[b00 + bz0]; u = AT3(rx0, ry0, rz0); diff --git a/source/blender/freestyle/intern/geometry/VecMat.h b/source/blender/freestyle/intern/geometry/VecMat.h index bb7f104b11af0f2177917759c50ac8ead2e45f63..ba5ad84a156279a41defd06943114fc0b9fbdb4f 100644 --- a/source/blender/freestyle/intern/geometry/VecMat.h +++ b/source/blender/freestyle/intern/geometry/VecMat.h @@ -22,8 +22,7 @@ namespace Freestyle { namespace VecMat { namespace Internal { -template<bool B> struct is_false { -}; +template<bool B> struct is_false {}; template<> struct is_false<false> { static inline void ensure() {} diff --git a/source/blender/freestyle/intern/image/ImagePyramid.cpp b/source/blender/freestyle/intern/image/ImagePyramid.cpp index 7933dbff37f1d97d070303da87edeff75b9bb53a..079c8df1f79c804295cb439474ded0d21d3d2af5 100644 --- a/source/blender/freestyle/intern/image/ImagePyramid.cpp +++ b/source/blender/freestyle/intern/image/ImagePyramid.cpp @@ -30,7 +30,8 @@ ImagePyramid::ImagePyramid(const ImagePyramid & /*iBrother*/) { if (!_levels.empty()) { for (vector<GrayImage *>::iterator im = _levels.begin(), imend = _levels.end(); im != imend; - ++im) { + ++im) + { _levels.push_back(new GrayImage(**im)); } } @@ -40,7 +41,8 @@ ImagePyramid::~ImagePyramid() { if (!_levels.empty()) { for (vector<GrayImage *>::iterator im = _levels.begin(), imend = _levels.end(); im != imend; - ++im) { + ++im) + { delete (*im); } _levels.clear(); diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp index 783d5345aef3a079d8dd3aa4e0d5c1c218e4d9bf..60e19313db95313ea517fa7c24ee640f735db7f9 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp @@ -80,7 +80,8 @@ static int FrsMaterial_init(BPy_FrsMaterial *self, PyObject *args, PyObject *kwd int priority; if (PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist_1, &FrsMaterial_Type, &brother)) { + args, kwds, "|O!", (char **)kwlist_1, &FrsMaterial_Type, &brother)) + { if (!brother) { self->m = new FrsMaterial(); } diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp index b017b4cfac4bf945429d64b0dc0df3c2dda78ac9..41f9354dc919adbc885d25558f438d580e31b976 100644 --- a/source/blender/freestyle/intern/python/BPy_Operators.cpp +++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp @@ -74,7 +74,8 @@ static PyObject *Operators_select(BPy_Operators * /*self*/, PyObject *args, PyOb PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "O!", (char **)kwlist, &UnaryPredicate1D_Type, &obj)) { + args, kwds, "O!", (char **)kwlist, &UnaryPredicate1D_Type, &obj)) + { return nullptr; } if (!((BPy_UnaryPredicate1D *)obj)->up1D) { @@ -484,7 +485,8 @@ static PyObject *Operators_sort(BPy_Operators * /*self*/, PyObject *args, PyObje PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "O!", (char **)kwlist, &BinaryPredicate1D_Type, &obj)) { + args, kwds, "O!", (char **)kwlist, &BinaryPredicate1D_Type, &obj)) + { return nullptr; } if (!((BPy_BinaryPredicate1D *)obj)->bp1D) { diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp index fec45267fd62036cc7c18dc1447301f2e1fb268e..521ee70805e6bbf986f606e1ea283bc9590bd159 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp @@ -144,7 +144,8 @@ static PyObject *Stroke_resample(BPy_Stroke *self, PyObject *args, PyObject *kwd } } else if ((void)PyErr_Clear(), - PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist_2, &f)) { + PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist_2, &f)) + { if (self->s->Resample(f) < 0) { PyErr_SetString(PyExc_RuntimeError, "Stroke resampling (by vertex interval) failed"); return nullptr; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp index 2113cf3bd3a48b7d3fd6e939f99ddb96a3c3ffc2..772afa61e1c9f81d0bcf1433d7b38f578d2e46a5 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp @@ -166,7 +166,8 @@ static int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble *self, PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp index de60876626e34245d5659ebbd71520aac3dc0ed2..045f13b6ad23bbb85039a89a611936228716a96f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp @@ -71,7 +71,8 @@ static int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature *sel PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp index f4bc322edf8ab125f66ef6959f3c11b2eb78e872..5340b3c04d5efcc7d013751ad4b6b53b6b01c16e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp @@ -62,7 +62,8 @@ static int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat *self, PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp index b2a5981ddded8beaf231f3a6cdaacd0dc57254b4..fd06d27197596e4780022cf6f8ca34cdd97ca5e0 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp @@ -73,7 +73,8 @@ static int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned *self, PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp index 133d2589ecfc80ceb3a90d8147084e1a59885b40..c7ece4e91809ba99b84d9f2f5599cc3efcc590ac 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp @@ -77,7 +77,8 @@ static int UnaryFunction1DVec2f___init__(BPy_UnaryFunction1DVec2f *self, PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp index 1095b008d1331104c8f1cc2708d518b74ab658cd..6f0d1aa3604587beb11d3a1645cef0f9b18eddbe 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp @@ -70,7 +70,8 @@ static int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f *self, PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp index b885d0bcf6b0176156f5a9524f13aad7d872f872..dc2268f4d3a503939846fa0b90c1f8af6d0ed776 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp @@ -88,7 +88,8 @@ static int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorView PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp index 08acc54519f297b6edf0556df11fd1bde883c76b..776acbc724fd21b7511d123b69a9e699bd0612c1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp @@ -85,7 +85,8 @@ static int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid *self, PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp index d21691b7c9b84d9eb1dc3b42d3e35140189ed3c6..fb294861a0a2fd07e4f80ccb3b41af30b5333318 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp @@ -55,7 +55,8 @@ static int CurveNatureF1D___init__(BPy_CurveNatureF1D *self, PyObject *args, PyO PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp index ddf9070d80fc3483ca0d18fe81d671f7d8492acf..f0ccc22623d9f95197569dd5c39338cfc04f832c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp @@ -49,7 +49,8 @@ static int Normal2DF1D___init__(BPy_Normal2DF1D *self, PyObject *args, PyObject PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp index fa3123c2609b3612f0a6893142a99e0fde6842d8..762f8b96dd90c109d32152dbd062f9e1f5e3d30d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp @@ -49,7 +49,8 @@ static int Orientation2DF1D___init__(BPy_Orientation2DF1D *self, PyObject *args, PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp index ff75751d8a4c1d9c2cb68d7961a0aa5a9adce792..8d4f974fbf7a8706bfa034947168e9e8bd2c503f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp @@ -49,7 +49,8 @@ static int Orientation3DF1D___init__(BPy_Orientation3DF1D *self, PyObject *args, PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp index 004bd6ee1aa2326e3f18e956641e6d767473f8be..56113c83dc073b2f0ed5e823334715664fec9c5f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp @@ -51,7 +51,8 @@ static int Curvature2DAngleF1D___init__(BPy_Curvature2DAngleF1D *self, PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp index 7842e721c514e5c69d7b81086120d5a3a186e869..8209a3cb7949454e91664ee547f9ea2aac629b5a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp @@ -49,7 +49,8 @@ static int GetProjectedXF1D___init__(BPy_GetProjectedXF1D *self, PyObject *args, PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp index 2cd80e05914872d1dbfdbdb1f700adfb441d9962..3c199448ee470ffd12e9d4c9bf2b51987c2c20c3 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp @@ -49,7 +49,8 @@ static int GetProjectedYF1D___init__(BPy_GetProjectedYF1D *self, PyObject *args, PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp index 7473e10e0db2222cee7262c4d8e36fc0f5ad601a..d6ab5c80867b92a97422776a36dae8ecd40bf921 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp @@ -49,7 +49,8 @@ static int GetProjectedZF1D___init__(BPy_GetProjectedZF1D *self, PyObject *args, PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp index d700ba185429cd37844cea49c66a024f0daf7686..ff215d0829ecdf55bbf83cdb8976ab8cecf809be 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp @@ -49,7 +49,8 @@ static int GetXF1D___init__(BPy_GetXF1D *self, PyObject *args, PyObject *kwds) PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp index 1d3233e41d3f97f895e6b37f99a213952764af71..dba0dc924ebe0b352ad952696007cc5cb853ea00 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp @@ -49,7 +49,8 @@ static int GetYF1D___init__(BPy_GetYF1D *self, PyObject *args, PyObject *kwds) PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp index 2005f6a08bec175a53c01f8b11adb094c2870581..8eb424315bf4ecbc496484cf446cbc9764c23970 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp @@ -49,7 +49,8 @@ static int GetZF1D___init__(BPy_GetZF1D *self, PyObject *args, PyObject *kwds) PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp index 83b9f5724e18598b804af5a30d722ff00a8b3e90..b8164504a1e96ff87fa694e8afe9758b69c45f5d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp @@ -53,7 +53,8 @@ static int ZDiscontinuityF1D___init__(BPy_ZDiscontinuityF1D *self, PyObject *arg PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp index ca18511a26ab9022f749063c61abc914794d7e33..aa4a8231dc292be0f9c7aa2afb6eea7e1c4d9cce 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp @@ -55,7 +55,8 @@ static int QuantitativeInvisibilityF1D___init__(BPy_QuantitativeInvisibilityF1D PyObject *obj = nullptr; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + { return -1; } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp index e200f43a74a648a7e7fd39a7f23225e5d97fb987..27e54f8d2d107920d6d65db28663c58d7d42d7e6 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp @@ -47,7 +47,8 @@ static int WithinImageBoundaryUP1D___init__(BPy_WithinImageBoundaryUP1D *self, double xmin, ymin, xmax, ymax; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "dddd", (char **)kwlist, &xmin, &ymin, &xmax, &ymax)) { + args, kwds, "dddd", (char **)kwlist, &xmin, &ymin, &xmax, &ymax)) + { return -1; } self->py_up1D.up1D = new Predicates1D::WithinImageBoundaryUP1D(xmin, ymin, xmax, ymax); diff --git a/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.cpp b/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.cpp index ec65d1bdc2dde287bd9770359b2cd4d82064cd9b..35f52495a17217a632be0696c91ff4f1b647032d 100644 --- a/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.cpp +++ b/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.cpp @@ -19,7 +19,8 @@ void NodeDrawingStyle::accept(SceneVisitor &v) v.visitNodeDrawingStyleBefore(*this); v.visitDrawingStyle(_DrawingStyle); for (vector<Node *>::iterator node = _Children.begin(), end = _Children.end(); node != end; - ++node) { + ++node) + { (*node)->accept(v); } v.visitNodeDrawingStyleAfter(*this); diff --git a/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp b/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp index ec5a896416e4bc597f7fe016382a7c0224ee6b02..fe3a04da57ecbb2ddf86914a3053ccf54157f905 100644 --- a/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp +++ b/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp @@ -59,7 +59,8 @@ void NodeGroup::accept(SceneVisitor &v) v.visitNodeGroupBefore(*this); for (vector<Node *>::iterator node = _Children.begin(), end = _Children.end(); node != end; - ++node) { + ++node) + { (*node)->accept(v); } v.visitNodeGroupAfter(*this); diff --git a/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp b/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp index aa6d8043faf925f103081fe1206a5a4a70e08bd6..c87a35411d69e0a791ed9d55468de484fec9542b 100644 --- a/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp +++ b/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp @@ -101,7 +101,8 @@ void NodeTransform::accept(SceneVisitor &v) v.visitNodeTransformBefore(*this); for (vector<Node *>::iterator node = _Children.begin(), end = _Children.end(); node != end; - ++node) { + ++node) + { (*node)->accept(v); } v.visitNodeTransformAfter(*this); diff --git a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp index 2d573977061d0d85a5156a0afd63ec395fc8ca5c..1c86f097d07c6e204c35919f1f7cce9ca1c65386 100644 --- a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp +++ b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp @@ -198,7 +198,8 @@ Smoother::Smoother(Stroke &ioStroke) StrokeInternal::StrokeVertexIterator v, vend; int i = 0; for (v = ioStroke.strokeVerticesBegin(), vend = ioStroke.strokeVerticesEnd(); v != vend; - ++v, ++i) { + ++v, ++i) + { _vertex[i] = (v)->getPoint(); } Vec2r vec_tmp(_vertex[0] - _vertex[_nbVertices - 1]); diff --git a/source/blender/freestyle/intern/stroke/Canvas.cpp b/source/blender/freestyle/intern/stroke/Canvas.cpp index 8a4d86b917cf5f29dc16c39cb1a9b65a2b0c1d6e..f2954528a50ad42378368cb3de41505a6469322d 100644 --- a/source/blender/freestyle/intern/stroke/Canvas.cpp +++ b/source/blender/freestyle/intern/stroke/Canvas.cpp @@ -121,7 +121,8 @@ void Canvas::Clear() { if (!_Layers.empty()) { for (deque<StrokeLayer *>::iterator sl = _Layers.begin(), slend = _Layers.end(); sl != slend; - ++sl) { + ++sl) + { if (*sl) { delete (*sl); } @@ -151,7 +152,8 @@ void Canvas::Erase() { if (!_Layers.empty()) { for (deque<StrokeLayer *>::iterator sl = _Layers.begin(), slend = _Layers.end(); sl != slend; - ++sl) { + ++sl) + { if (*sl) { (*sl)->clear(); } diff --git a/source/blender/freestyle/intern/stroke/Curve.cpp b/source/blender/freestyle/intern/stroke/Curve.cpp index bd7a0073229a50af820b4718325980c84fd0daae..1d7c6cc741729dfac4d011a5644d6943ca4fa274 100644 --- a/source/blender/freestyle/intern/stroke/Curve.cpp +++ b/source/blender/freestyle/intern/stroke/Curve.cpp @@ -559,7 +559,8 @@ Curve::~Curve() { if (!_Vertices.empty()) { for (vertex_container::iterator it = _Vertices.begin(), itend = _Vertices.end(); it != itend; - ++it) { + ++it) + { delete (*it); } _Vertices.clear(); diff --git a/source/blender/freestyle/intern/stroke/Curve.h b/source/blender/freestyle/intern/stroke/Curve.h index c10934adb68b89cc0a2f5160671f2df8723564b7..ab691e02fbaff524723348e51afc1442ffdf21ff 100644 --- a/source/blender/freestyle/intern/stroke/Curve.h +++ b/source/blender/freestyle/intern/stroke/Curve.h @@ -13,7 +13,7 @@ #include "../geometry/Geom.h" -//#include "../scene_graph/FrsMaterial.h" +// #include "../scene_graph/FrsMaterial.h" #include "../view_map/Interface0D.h" #include "../view_map/Interface1D.h" diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp index b71125112fbb344e32e6f605ca047b630a498b00..5d6ddc2b19fd9e084357bca8152360bc5f078432 100644 --- a/source/blender/freestyle/intern/stroke/Operators.cpp +++ b/source/blender/freestyle/intern/stroke/Operators.cpp @@ -1277,7 +1277,8 @@ int Operators::create(UnaryPredicate1D &pred, vector<StrokeShader *> shaders) } StrokesContainer new_strokes_set; for (Operators::I1DContainer::iterator it = _current_set->begin(); it != _current_set->end(); - ++it) { + ++it) + { if (pred(**it) < 0) { goto error; } diff --git a/source/blender/freestyle/intern/stroke/Predicates1D.h b/source/blender/freestyle/intern/stroke/Predicates1D.h index 18bff0c60c54e525e0678956c4ca64e0f5d29287..99e7e8ed70248f519e0316bf00bc6baa2cd665b5 100644 --- a/source/blender/freestyle/intern/stroke/Predicates1D.h +++ b/source/blender/freestyle/intern/stroke/Predicates1D.h @@ -254,7 +254,8 @@ class ExternalContourUP1D : public UnaryPredicate1D { set<ViewShape *> occluded; Functions1D::getOccludeeF1D(inter, occluded); for (set<ViewShape *>::iterator os = occluded.begin(), osend = occluded.end(); os != osend; - ++os) { + ++os) + { if ((*os) == 0) { result = true; return 0; @@ -507,7 +508,8 @@ class SameShapeIdBP1D : public BinaryPredicate1D { for (set<ViewShape *>::iterator s = shapes1.begin(), send = shapes1.end(); s != send; ++s) { Id current = (*s)->getId(); for (set<ViewShape *>::iterator s2 = shapes2.begin(), s2end = shapes2.end(); s2 != s2end; - ++s2) { + ++s2) + { if ((*s2)->getId() == current) { result = true; return 0; diff --git a/source/blender/freestyle/intern/stroke/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp index 9293b8a72fdc575cebd31c758b30873327907ebb..ca628f5888f798a1cffd2c66fa2b2c833873613f 100644 --- a/source/blender/freestyle/intern/stroke/Stroke.cpp +++ b/source/blender/freestyle/intern/stroke/Stroke.cpp @@ -795,7 +795,8 @@ Interface0DIterator Stroke::pointsEnd(float /*t*/) void Stroke::ScaleThickness(float iFactor) { for (vertex_container::iterator it = _Vertices.begin(), itend = _Vertices.end(); it != itend; - ++it) { + ++it) + { StrokeAttribute &attr = (*it)->attribute(); attr.setThickness(iFactor * attr.getThicknessR(), iFactor * attr.getThicknessL()); } diff --git a/source/blender/freestyle/intern/view_map/BoxGrid.h b/source/blender/freestyle/intern/view_map/BoxGrid.h index 221a97cb830fa6a54b252e0d418a61b65b5edf92..69a57861522205f0d70ac262a7c21a3e6f3539d9 100644 --- a/source/blender/freestyle/intern/view_map/BoxGrid.h +++ b/source/blender/freestyle/intern/view_map/BoxGrid.h @@ -14,8 +14,8 @@ // I would like to avoid using deque because including ViewMap.h and <deque> or <vector> // separately results in redefinitions of identifiers. ViewMap.h already includes <vector> // so it should be a safe fall-back. -//#include <vector> -//#include <deque> +// #include <vector> +// #include <deque> #include "GridDensityProvider.h" #include "OccluderSource.h" diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp index 7c9ddb44d9c50f5d3cd0d5fdac8d3863a3fdce69..9426815e39611a9fab49e54a02df8a6a3b3637e3 100644 --- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp +++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp @@ -651,7 +651,8 @@ void FEdgeXDetector::postProcessSuggestiveContourFace(WXFace *iFace) // For each vertex, iterate on its adjacent faces. for (WVertex::face_iterator fit = v->faces_begin(), fitend = v->faces_end(); fit != fitend; - ++fit) { + ++fit) + { wxf = dynamic_cast<WXFace *>(*fit); if (!wxf->getOppositeEdge(v, opposite_edge)) { continue; diff --git a/source/blender/freestyle/intern/view_map/Functions0D.cpp b/source/blender/freestyle/intern/view_map/Functions0D.cpp index 1c3f4447caad9303e813b97b0df63915982534b6..f89edd0c4a3ae74df117d3fea738cbf404ecd472 100644 --- a/source/blender/freestyle/intern/view_map/Functions0D.cpp +++ b/source/blender/freestyle/intern/view_map/Functions0D.cpp @@ -358,7 +358,8 @@ int GetOccludersF0D::operator()(Interface0DIterator &iter) result.clear(); // vsOccluders.insert(vsOccluders.begin(), occluders.begin(), occluders.end()); for (set<ViewShape *>::iterator it = occluders.begin(), itend = occluders.end(); it != itend; - ++it) { + ++it) + { result.push_back(*it); } return 0; diff --git a/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h b/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h index 3fe51d437c9110915b8e61c4d72787622ad859c5..78e8fb822396e1e50138826801038ece0d0c76c2 100644 --- a/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h +++ b/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h @@ -9,10 +9,10 @@ * \brief Class to define a cell grid surrounding the projected image of a scene */ -//#include <memory> // provided by GridDensityProvider.h +// #include <memory> // provided by GridDensityProvider.h #include "AverageAreaGridDensityProvider.h" -//#include "GridDensityProvider.h" // provided by *GridDensityProvider.h below +// #include "GridDensityProvider.h" // provided by *GridDensityProvider.h below #include "Pow23GridDensityProvider.h" namespace Freestyle { diff --git a/source/blender/freestyle/intern/view_map/SphericalGrid.h b/source/blender/freestyle/intern/view_map/SphericalGrid.h index 07b164891fa4a6fc12bb6c07c92610d374d60eba..5ab4dd85f8047bd4e40eae39dcef1e61e862f311 100644 --- a/source/blender/freestyle/intern/view_map/SphericalGrid.h +++ b/source/blender/freestyle/intern/view_map/SphericalGrid.h @@ -14,8 +14,8 @@ // I would like to avoid using deque because including ViewMap.h and <deque> or <vector> separately // results in redefinitions of identifiers. ViewMap.h already includes <vector> so it should be a // safe fall-back. -//#include <vector> -//#include <deque> +// #include <vector> +// #include <deque> #include "GridDensityProvider.h" #include "OccluderSource.h" diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp index 29c3bdda1a755d62995e22c9bf53b48a8de5ef28..97573da77cb5c52211debdb2a7b2c64855ad672d 100644 --- a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp +++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp @@ -83,7 +83,7 @@ void SteerableViewMap::Clear() if (!_mapping.empty()) { for (map<uint, double *>::iterator m = _mapping.begin(), mend = _mapping.end(); m != mend; ++m) { - delete[](*m).second; + delete[] (*m).second; } _mapping.clear(); } diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp index 580e17c67ba65cbec1d520ab86e1d050b7824d1d..74169e5077faa805efd12833a00768df1eb31ee7 100644 --- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp @@ -259,7 +259,8 @@ ViewEdge *ViewEdgeXBuilder::BuildSharpViewEdge(const OWXEdge &iWEdge) FEdge *fefirst = nullptr; FEdge *fe = nullptr; for (list<OWXEdge>::iterator we = edgesChain.begin(), weend = edgesChain.end(); we != weend; - ++we) { + ++we) + { fe = BuildSharpFEdge(feprevious, (*we)); fe->setViewEdge(newVEdge); if (!fefirst) { diff --git a/source/blender/freestyle/intern/view_map/ViewMap.cpp b/source/blender/freestyle/intern/view_map/ViewMap.cpp index 204aa7063359c03128ff9cb9cd90ed38d439e192..8bca2cf63098b57ec24b55a6a52320ee0ead32b3 100644 --- a/source/blender/freestyle/intern/view_map/ViewMap.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMap.cpp @@ -194,7 +194,8 @@ ViewVertex *ViewMap::InsertViewVertex(SVertex *iVertex, vector<ViewEdge *> &newV } FEdge *fend(nullptr), *fbegin(nullptr); for (vector<FEdge *>::const_iterator fe = fedges.begin(), feend = fedges.end(); fe != feend; - ++fe) { + ++fe) + { if ((*fe)->vertexB() == iVertex) { fend = (*fe); } diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h index d6c108007a704b8238695a1e2750d9cf869eb8b1..d492073b95eb74f10ca25cbcc34633288a99ea64 100644 --- a/source/blender/freestyle/intern/view_map/ViewMap.h +++ b/source/blender/freestyle/intern/view_map/ViewMap.h @@ -821,7 +821,8 @@ class NonTVertex : public ViewVertex { { edges_container::iterator insertedve; for (edges_container::iterator ve = _ViewEdges.begin(), vend = _ViewEdges.end(); ve != vend; - ve++) { + ve++) + { if ((ve)->first == iOld) { insertedve = _ViewEdges.insert( ve, directedViewEdge(iNew, ve->second)); // inserts e2 before ve. diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp index c83ef2cd43ea0b9014537120c3d90cc8cf7f8dc9..1b09fe95a3d368652edaba18ed4034ad14f819af 100644 --- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp @@ -1125,7 +1125,8 @@ void ViewMapBuilder::CullViewEdges(ViewMap *ioViewMap, ViewMap::viewedges_container::iterator ve, veend; for (ve = ioViewMap->ViewEdges().begin(), veend = ioViewMap->ViewEdges().end(); ve != veend; - ve++) { + ve++) + { // Overview: // Search for a visible feature edge // If none: mark view edge as non-displayable @@ -1229,7 +1230,8 @@ void ViewMapBuilder::CullViewEdges(ViewMap *ioViewMap, if (extensiveFEdgeSearch) { // For each view edge, for (ve = ioViewMap->ViewEdges().begin(), veend = ioViewMap->ViewEdges().end(); ve != veend; - ve++) { + ve++) + { if (!(*ve)->isInImage()) { continue; } @@ -1974,7 +1976,8 @@ void ViewMapBuilder::FindOccludee(FEdge *fe, } else { if (GeomUtils::COINCIDENT == - GeomUtils::intersectRayPlane(origin, edgeDir, normal, d, t, epsilon)) { + GeomUtils::intersectRayPlane(origin, edgeDir, normal, d, t, epsilon)) + { continue; } } @@ -2201,7 +2204,8 @@ int ViewMapBuilder::ComputeRayCastingVisibility(FEdge *fe, // first let us compute the plane equation. if (GeomUtils::COINCIDENT == - GeomUtils::intersectRayPlane(origin, edgeDir, normal, d, t, epsilon)) { + GeomUtils::intersectRayPlane(origin, edgeDir, normal, d, t, epsilon)) + { #if LOGGING if (_global.debug & G_DEBUG_FREESTYLE) { cout << "\t\tRejecting occluder for target coincidence." << endl; diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h index 9f4449cbe18009b423b2da6e863f6ec4bb8be8e8..9b15e3cd4abadf07d90e9221a58e12e0ba7d6844 100644 --- a/source/blender/freestyle/intern/winged_edge/WEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WEdge.h @@ -1209,7 +1209,8 @@ class WShape { inline void ResetUserData() { for (vector<WVertex *>::iterator v = _VertexList.begin(), vend = _VertexList.end(); v != vend; - v++) { + v++) + { (*v)->ResetUserData(); } diff --git a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h index 5b6c4b620138166ba050e064d118968a8a197c3b..75901c41ac0895404e97dc6056f674fc1a711340 100644 --- a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h +++ b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h @@ -35,7 +35,8 @@ class WingedEdgeBuilder : public SceneVisitor { virtual ~WingedEdgeBuilder() { for (vector<Matrix44r *>::iterator it = _matrices_stack.begin(); it != _matrices_stack.end(); - ++it) { + ++it) + { delete *it; } _matrices_stack.clear(); diff --git a/source/blender/functions/FN_field.hh b/source/blender/functions/FN_field.hh index 0748213b5df078fcd26f3fcb1b419450d5faaeb5..813fe26e6ef0390c176d0b18e4686a669a506127 100644 --- a/source/blender/functions/FN_field.hh +++ b/source/blender/functions/FN_field.hh @@ -179,8 +179,7 @@ class GFieldRef : public GFieldBase<const FieldNode *> { namespace detail { /* Utility class to make #is_field_v work. */ -struct TypedFieldBase { -}; +struct TypedFieldBase {}; } // namespace detail /** diff --git a/source/blender/functions/FN_multi_function_builder.hh b/source/blender/functions/FN_multi_function_builder.hh index 3b3183394f9d930510c97a7a60fca19a5b15fb23..e94e5ca09aad0adeea5db562a770cdff133dfa3f 100644 --- a/source/blender/functions/FN_multi_function_builder.hh +++ b/source/blender/functions/FN_multi_function_builder.hh @@ -334,7 +334,8 @@ inline void execute_materialized(TypeSequence<ParamTags...> /*param_tags*/, typedef typename ParamTag::base_type T; if constexpr (ELEM(ParamTag::category, ParamCategory::SingleOutput, - ParamCategory::SingleMutable)) { + ParamCategory::SingleMutable)) + { T *tmp_buffer = std::get<I>(temporary_buffers).ptr(); T *param_buffer = std::get<I>(loaded_params); for (int64_t i = 0; i < chunk_size; i++) { diff --git a/source/blender/functions/FN_multi_function_context.hh b/source/blender/functions/FN_multi_function_context.hh index f311e32ddf4dc5da859ff4f6706393b94a8362df..a726b2a514a948873df7de3f25002852046a080f 100644 --- a/source/blender/functions/FN_multi_function_context.hh +++ b/source/blender/functions/FN_multi_function_context.hh @@ -22,8 +22,7 @@ namespace blender::fn::multi_function { class Context; -class ContextBuilder { -}; +class ContextBuilder {}; class Context { public: diff --git a/source/blender/functions/FN_multi_function_procedure.hh b/source/blender/functions/FN_multi_function_procedure.hh index ea410aae83a61208bd2c32b19bbdde97ae488323..68a3b8e19b13644d0577fdb4c45975a7557b74af 100644 --- a/source/blender/functions/FN_multi_function_procedure.hh +++ b/source/blender/functions/FN_multi_function_procedure.hh @@ -213,8 +213,7 @@ class DummyInstruction : public Instruction { /** * This instruction ends the procedure. */ -class ReturnInstruction : public Instruction { -}; +class ReturnInstruction : public Instruction {}; /** * Inputs and outputs of the entire procedure network. diff --git a/source/blender/geometry/intern/add_curves_on_mesh.cc b/source/blender/geometry/intern/add_curves_on_mesh.cc index 10aa63c4812ee7e9f07329fc5eb1a789212f7153..35c711a9c73b29df6380d8a6279cb04963f6db84 100644 --- a/source/blender/geometry/intern/add_curves_on_mesh.cc +++ b/source/blender/geometry/intern/add_curves_on_mesh.cc @@ -383,7 +383,8 @@ AddCurvesOnMeshOutputs add_curves_on_mesh(CurvesGeometry &curves, bke::MutableAttributeAccessor attributes = curves.attributes_for_write(); if (bke::SpanAttributeWriter<int> resolution = attributes.lookup_for_write_span<int>( - "resolution")) { + "resolution")) + { if (inputs.interpolate_resolution) { interpolate_from_neighbors( neighbors_per_curve, diff --git a/source/blender/geometry/intern/mesh_merge_by_distance.cc b/source/blender/geometry/intern/mesh_merge_by_distance.cc index 87e72c05837012f7de1bb498e0490ed1c528ee50..bb581b50f04d5ef9d6c79edef9b08c7c6e0c55c2 100644 --- a/source/blender/geometry/intern/mesh_merge_by_distance.cc +++ b/source/blender/geometry/intern/mesh_merge_by_distance.cc @@ -260,7 +260,8 @@ static void weld_assert_poly_no_vert_repetition(const WeldPoly *wp, Array<int, 64> verts(wp->loop_len); WeldLoopOfPolyIter iter; if (!weld_iter_loop_of_poly_begin( - iter, *wp, wloop, corner_verts, corner_edges, loop_map, nullptr)) { + iter, *wp, wloop, corner_verts, corner_edges, loop_map, nullptr)) + { return; } else { @@ -1169,7 +1170,8 @@ static void weld_poly_find_doubles(const Span<int> corner_verts, WeldLoopOfPolyIter iter; if (!weld_iter_loop_of_poly_begin( - iter, wp, wloop, corner_verts, corner_edges, loop_map, nullptr)) { + iter, wp, wloop, corner_verts, corner_edges, loop_map, nullptr)) + { continue; } diff --git a/source/blender/geometry/intern/uv_parametrizer.cc b/source/blender/geometry/intern/uv_parametrizer.cc index 70efafdd14523608cd94ef306bd1857357993546..dd2af9f9e53ed43c951b8394017fd8494735c5f2 100644 --- a/source/blender/geometry/intern/uv_parametrizer.cc +++ b/source/blender/geometry/intern/uv_parametrizer.cc @@ -164,7 +164,7 @@ static int PHashSizes[] = { }; #define PHASH_hash(ph, item) (uintptr_t(item) % uint((ph)->cursize)) -#define PHASH_edge(v1, v2) (((v1) < (v2)) ? ((v1)*39) ^ ((v2)*31) : ((v1)*31) ^ ((v2)*39)) +#define PHASH_edge(v1, v2) (((v1) < (v2)) ? ((v1) * 39) ^ ((v2) * 31) : ((v1) * 31) ^ ((v2) * 39)) static PHash *phash_new(PHashLink **list, int sizehint) { @@ -789,11 +789,13 @@ static bool p_edge_has_pair(ParamHandle *handle, PEdge *e, bool topology_from_uv v2 = pe->next->vert; if (((v1->u.key == key1) && (v2->u.key == key2)) || - ((v1->u.key == key2) && (v2->u.key == key1))) { + ((v1->u.key == key2) && (v2->u.key == key1))) + { /* don't connect seams and t-junctions */ if ((pe->flag & PEDGE_SEAM) || *r_pair || - (topology_from_uvs && p_edge_implicit_seam(e, pe))) { + (topology_from_uvs && p_edge_implicit_seam(e, pe))) + { *r_pair = nullptr; return false; } diff --git a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_build.cc b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_build.cc index 17fd852e93830806a43ae9dddf479ae20e0e11e3..6b50cd2249b223cb58e949565374427025348f2b 100644 --- a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_build.cc +++ b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_build.cc @@ -538,7 +538,8 @@ static void build_sequential(Object *ob, } else { if (fade_start != fade_end && int(cell->start_idx) < fade_end && - int(cell->end_idx) > fade_start) { + int(cell->end_idx) > fade_start) + { int start_index = fade_start - cell->start_idx; int end_index = cell->totpoints + fade_end - cell->end_idx - 1; CLAMP(start_index, 0, cell->totpoints - 1); diff --git a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_color.cc b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_color.cc index 8c58ea959fb89d1bf529acbc50cf3c0077345f3c..2bcde94615970295ec4924ad8dbd357df11f8340 100644 --- a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_color.cc +++ b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_color.cc @@ -105,7 +105,8 @@ static void deform_stroke(GpencilModifierData *md, if (mmd->modify_color != GP_MODIFY_COLOR_STROKE) { /* If not using Vertex Color, use the material color. */ if ((gp_style != nullptr) && (gps->vert_color_fill[3] == 0.0f) && - (gp_style->fill_rgba[3] > 0.0f)) { + (gp_style->fill_rgba[3] > 0.0f)) + { copy_v4_v4(gps->vert_color_fill, gp_style->fill_rgba); gps->vert_color_fill[3] = 1.0f; } @@ -124,7 +125,8 @@ static void deform_stroke(GpencilModifierData *md, bGPDspoint *pt = &gps->points[i]; /* If not using Vertex Color, use the material color. */ if ((gp_style != nullptr) && (pt->vert_color[3] == 0.0f) && - (gp_style->stroke_rgba[3] > 0.0f)) { + (gp_style->stroke_rgba[3] > 0.0f)) + { copy_v4_v4(pt->vert_color, gp_style->stroke_rgba); pt->vert_color[3] = 1.0f; } diff --git a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_shrinkwrap.cc b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_shrinkwrap.cc index d98e88dfc5ef7167cd9f01c8ba3380db3a1fa880..e6a674c4f9580e8ba0f728bcb2865691af55976f 100644 --- a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_shrinkwrap.cc +++ b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_shrinkwrap.cc @@ -151,7 +151,8 @@ static void bake_modifier(Main * /*bmain*/, mmd->cache_data = static_cast<ShrinkwrapTreeData *>( MEM_callocN(sizeof(ShrinkwrapTreeData), __func__)); if (BKE_shrinkwrap_init_tree( - mmd->cache_data, target, mmd->shrink_type, mmd->shrink_mode, false)) { + mmd->cache_data, target, mmd->shrink_type, mmd->shrink_mode, false)) + { /* Compute shrinkwrap effects on this frame. */ LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) { diff --git a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_tint.cc b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_tint.cc index 508d9e3ffd6356f301a09fde642746e3eec5d619..df5f84f0d41c465a93f5ddb5798a8b83f342d6ec 100644 --- a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_tint.cc +++ b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_tint.cc @@ -173,7 +173,8 @@ static void deform_stroke(GpencilModifierData *md, /* If not using Vertex Color, use the material color. */ if ((gp_style != nullptr) && (gps->vert_color_fill[3] == 0.0f) && - (gp_style->fill_rgba[3] > 0.0f)) { + (gp_style->fill_rgba[3] > 0.0f)) + { copy_v4_v4(gps->vert_color_fill, gp_style->fill_rgba); gps->vert_color_fill[3] = 1.0f; } @@ -223,7 +224,8 @@ static void deform_stroke(GpencilModifierData *md, /* If not using Vertex Color, use the material color. */ if ((gp_style != nullptr) && (pt->vert_color[3] == 0.0f) && - (gp_style->stroke_rgba[3] > 0.0f)) { + (gp_style->stroke_rgba[3] > 0.0f)) + { copy_v4_v4(pt->vert_color, gp_style->stroke_rgba); pt->vert_color[3] = 1.0f; } diff --git a/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_chain.cc b/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_chain.cc index a631e2b03f516ea8f60e2b8de152d516b0436852..3e1e72aa9da4af5a9db69ec90c8ede6e19682169 100644 --- a/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_chain.cc +++ b/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_chain.cc @@ -834,7 +834,8 @@ static LineartChainRegisterEntry *lineart_chain_get_closest_cre(LineartData *ld, if (ld->conf.fuzzy_intersections) { /* If none of those are intersection lines... */ if (!(cre->ec->type & LRT_EDGE_FLAG_INTERSECTION) && - !(ec->type & LRT_EDGE_FLAG_INTERSECTION)) { + !(ec->type & LRT_EDGE_FLAG_INTERSECTION)) + { continue; /* We don't want to chain along different objects at the moment. */ } } @@ -856,7 +857,8 @@ static LineartChainRegisterEntry *lineart_chain_get_closest_cre(LineartData *ld, if (cre->ec->type != ec->type) { if (ld->conf.fuzzy_intersections) { if (!(cre->ec->type == LRT_EDGE_FLAG_INTERSECTION || - ec->type == LRT_EDGE_FLAG_INTERSECTION)) { + ec->type == LRT_EDGE_FLAG_INTERSECTION)) + { continue; /* Fuzzy intersections but no intersection line found. */ } } @@ -1157,7 +1159,8 @@ void MOD_lineart_smooth_chains(LineartData *ld, float tolerance) if (ratio < len2 && ratio > -len2 * 10) { /* We only remove p3 if p4 is on the extension of p1->p2. */ if ((eci4 = eci3->next) && - (dist_to_line_v2(eci4->pos, eci->pos, eci2->pos) < tolerance)) { + (dist_to_line_v2(eci4->pos, eci->pos, eci2->pos) < tolerance)) + { BLI_remlink(&ec->chain, eci3); next_eci = eci; continue; @@ -1392,7 +1395,8 @@ void MOD_lineart_chain_find_silhouette_backdrop_objects(LineartData *ld) { LISTBASE_FOREACH (LineartEdgeChain *, ec, &ld->chains) { if (ec->type == LRT_EDGE_FLAG_CONTOUR && - ec->shadow_mask_bits & LRT_SHADOW_SILHOUETTE_ERASED_GROUP) { + ec->shadow_mask_bits & LRT_SHADOW_SILHOUETTE_ERASED_GROUP) + { uint32_t target = ec->shadow_mask_bits & LRT_OBINDEX_HIGHER; LineartElementLinkNode *eln = lineart_find_matching_eln(&ld->geom.line_buffer_pointers, target); diff --git a/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_cpu.cc b/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_cpu.cc index a820a8a242c2f4367204cf5b972ca7dbc5b23cc9..82fc409085785efdb9889158f3d5caaacd783340 100644 --- a/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_cpu.cc +++ b/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_cpu.cc @@ -316,7 +316,8 @@ void lineart_edge_cut(LineartData *ld, * flags. See LineartEdgeSegment::shadow_mask_bits for details. */ if (shadow_bits == LRT_SHADOW_MASK_ENCLOSED_SHAPE) { if (seg->shadow_mask_bits & LRT_SHADOW_MASK_ILLUMINATED || - e->flags & LRT_EDGE_FLAG_LIGHT_CONTOUR) { + e->flags & LRT_EDGE_FLAG_LIGHT_CONTOUR) + { seg->shadow_mask_bits |= LRT_SHADOW_MASK_INHIBITED; } else if (seg->shadow_mask_bits & LRT_SHADOW_MASK_SHADED) { @@ -1691,7 +1692,8 @@ static void lineart_identify_corner_tri_feature_edges(void *__restrict userdata, if (real_edges[i % 3] >= 0) { if (ld->conf.use_crease && ld->conf.sharp_as_crease && - e_feat_data->sharp_edges[real_edges[i % 3]]) { + e_feat_data->sharp_edges[real_edges[i % 3]]) + { edge_flag_result |= LRT_EDGE_FLAG_CREASE; } @@ -2878,7 +2880,8 @@ static bool lineart_triangle_edge_image_space_occlusion(const LineartTriangle *t dot_f = dot_v3v3_db(dir_cam, tri->gn); if ((e->flags & LRT_EDGE_FLAG_PROJECTED_SHADOW) && - (e->target_reference == tri->target_reference)) { + (e->target_reference == tri->target_reference)) + { if (((dot_f > 0) && (e->flags & LRT_EDGE_FLAG_SHADOW_FACING_LIGHT)) || ((dot_f < 0) && !(e->flags & LRT_EDGE_FLAG_SHADOW_FACING_LIGHT))) { @@ -4277,19 +4280,23 @@ static void lineart_bounding_area_link_edge(LineartData *ld, } else { if (lineart_bounding_area_edge_intersect( - ld, e->v1->fbcoord, e->v2->fbcoord, &root_ba->child[0])) { + ld, e->v1->fbcoord, e->v2->fbcoord, &root_ba->child[0])) + { lineart_bounding_area_link_edge(ld, &root_ba->child[0], e); } if (lineart_bounding_area_edge_intersect( - ld, e->v1->fbcoord, e->v2->fbcoord, &root_ba->child[1])) { + ld, e->v1->fbcoord, e->v2->fbcoord, &root_ba->child[1])) + { lineart_bounding_area_link_edge(ld, &root_ba->child[1], e); } if (lineart_bounding_area_edge_intersect( - ld, e->v1->fbcoord, e->v2->fbcoord, &root_ba->child[2])) { + ld, e->v1->fbcoord, e->v2->fbcoord, &root_ba->child[2])) + { lineart_bounding_area_link_edge(ld, &root_ba->child[2], e); } if (lineart_bounding_area_edge_intersect( - ld, e->v1->fbcoord, e->v2->fbcoord, &root_ba->child[3])) { + ld, e->v1->fbcoord, e->v2->fbcoord, &root_ba->child[3])) + { lineart_bounding_area_link_edge(ld, &root_ba->child[3], e); } } @@ -4562,7 +4569,8 @@ static void lineart_add_triangles_worker(TaskPool *__restrict /*pool*/, LineartI // int _dir_control = 0; /* UNUSED */ while (lineart_schedule_new_triangle_task(th)) { for (LineartElementLinkNode *eln = th->pending_from; eln != th->pending_to->next; - eln = eln->next) { + eln = eln->next) + { int index_start = eln == th->pending_from ? th->index_from : 0; int index_end = eln == th->pending_to ? th->index_to : eln->element_count; LineartTriangle *tri = static_cast<LineartTriangle *>( diff --git a/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_shadow.cc b/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_shadow.cc index 6473afd6690a8f2c01abc1814d947bf56c3f4fa5..85fd7a32daae582131ff2168e257f1e60c965eec 100644 --- a/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_shadow.cc +++ b/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_shadow.cc @@ -759,7 +759,8 @@ static bool lineart_shadow_cast_onto_triangle(LineartData *ld, * the edge */ if (!(pi && LRT_DOUBLE_CLOSE_ENOUGH(ratio[0], 1.0f) && - LRT_DOUBLE_CLOSE_ENOUGH(ratio[1], 0.0f))) { + LRT_DOUBLE_CLOSE_ENOUGH(ratio[1], 0.0f))) + { trie[pi] = 1; pi++; } diff --git a/source/blender/gpu/GPU_common.h b/source/blender/gpu/GPU_common.h index e96cf794807d7cf5ec0595e7333c08989a1dafc8..0b1591d8debcc112591b78cf0b812c343bdfb3d7 100644 --- a/source/blender/gpu/GPU_common.h +++ b/source/blender/gpu/GPU_common.h @@ -9,7 +9,7 @@ #pragma once #define PROGRAM_NO_OPTI 0 -//#define GPU_NO_USE_PY_REFERENCES +// #define GPU_NO_USE_PY_REFERENCES #if defined(NDEBUG) # define TRUST_NO_ONE 0 diff --git a/source/blender/gpu/GPU_matrix.h b/source/blender/gpu/GPU_matrix.h index 6245b02fed3e7c0ebfa25c04400f4c6b036b7913..005d17b7d2afc0bd15fbef6c7ba7589e4de32eeb 100644 --- a/source/blender/gpu/GPU_matrix.h +++ b/source/blender/gpu/GPU_matrix.h @@ -173,13 +173,31 @@ int GPU_matrix_stack_level_get_projection(void); # if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) # define _GPU_MAT3_CONST_CAST(x) \ - (_Generic((x), void * : (const float(*)[3])(x), float * : (const float(*)[3])(x), float(*)[4] : (const float(*)[3])(x), const void * : (const float(*)[3])(x), const float * : (const float(*)[3])(x), const float(*)[3] : (const float(*)[3])(x))) + (_Generic((x), \ + void *: (const float(*)[3])(x), \ + float *: (const float(*)[3])(x), \ + float(*)[4]: (const float(*)[3])(x), \ + const void *: (const float(*)[3])(x), \ + const float *: (const float(*)[3])(x), \ + const float(*)[3]: (const float(*)[3])(x))) # define _GPU_MAT3_CAST(x) \ - (_Generic((x), void * : (float(*)[3])(x), float * : (float(*)[3])(x), float(*)[3] : (float(*)[3])(x))) + (_Generic((x), \ + void *: (float(*)[3])(x), \ + float *: (float(*)[3])(x), \ + float(*)[3]: (float(*)[3])(x))) # define _GPU_MAT4_CONST_CAST(x) \ - (_Generic((x), void * : (const float(*)[4])(x), float * : (const float(*)[4])(x), float(*)[4] : (const float(*)[4])(x), const void * : (const float(*)[4])(x), const float * : (const float(*)[4])(x), const float(*)[4] : (const float(*)[4])(x))) + (_Generic((x), \ + void *: (const float(*)[4])(x), \ + float *: (const float(*)[4])(x), \ + float(*)[4]: (const float(*)[4])(x), \ + const void *: (const float(*)[4])(x), \ + const float *: (const float(*)[4])(x), \ + const float(*)[4]: (const float(*)[4])(x))) # define _GPU_MAT4_CAST(x) \ - (_Generic((x), void * : (float(*)[4])(x), float * : (float(*)[4])(x), float(*)[4] : (float(*)[4])(x))) + (_Generic((x), \ + void *: (float(*)[4])(x), \ + float *: (float(*)[4])(x), \ + float(*)[4]: (float(*)[4])(x))) # else # define _GPU_MAT3_CONST_CAST(x) (const float(*)[3])(x) # define _GPU_MAT3_CAST(x) (float(*)[3])(x) diff --git a/source/blender/gpu/dummy/dummy_framebuffer.hh b/source/blender/gpu/dummy/dummy_framebuffer.hh index a9d7dbeccd3b9174e63a10a4d09b3530037a7665..eb07f20d1885c55d5bd7d60ca6bbcb88adaf638e 100644 --- a/source/blender/gpu/dummy/dummy_framebuffer.hh +++ b/source/blender/gpu/dummy/dummy_framebuffer.hh @@ -26,7 +26,7 @@ class DummyFrameBuffer : public FrameBuffer { uint /*clear_stencil*/) override { } - void clear_multi(const float (*/*clear_color*/)[4]) override {} + void clear_multi(const float (* /*clear_color*/)[4]) override {} void clear_attachment(GPUAttachmentType /*type*/, eGPUDataFormat /*data_format*/, const void * /*clear_value*/) override diff --git a/source/blender/gpu/intern/gpu_codegen.cc b/source/blender/gpu/intern/gpu_codegen.cc index 2793611d4db7f42218be09f676fe25a7bc3e195c..2e813fc31748b2ed7c2d9fe73861e1622782ae12 100644 --- a/source/blender/gpu/intern/gpu_codegen.cc +++ b/source/blender/gpu/intern/gpu_codegen.cc @@ -228,8 +228,7 @@ static std::ostream &operator<<(std::ostream &stream, const GPUOutput *output) } /* Trick type to change overload and keep a somewhat nice syntax. */ -struct GPUConstant : public GPUInput { -}; +struct GPUConstant : public GPUInput {}; /* Print data constructor (i.e: vec2(1.0f, 1.0f)). */ static std::ostream &operator<<(std::ostream &stream, const GPUConstant *input) diff --git a/source/blender/gpu/intern/gpu_immediate_util.cc b/source/blender/gpu/intern/gpu_immediate_util.cc index 0458ebc9278f54739675d36f2f6002078ecb4a6e..11851d287285b46f85030389c17788617c6cf7d9 100644 --- a/source/blender/gpu/intern/gpu_immediate_util.cc +++ b/source/blender/gpu/intern/gpu_immediate_util.cc @@ -132,7 +132,7 @@ void immRecti_complete(int x1, int y1, int x2, int y2, const float color[4]) void imm_cpack(uint x) { - immUniformColor3ub(((x)&0xFF), (((x) >> 8) & 0xFF), (((x) >> 16) & 0xFF)); + immUniformColor3ub(((x) & 0xFF), (((x) >> 8) & 0xFF), (((x) >> 16) & 0xFF)); } static void imm_draw_circle(GPUPrimType prim_type, diff --git a/source/blender/gpu/intern/gpu_shader_log.cc b/source/blender/gpu/intern/gpu_shader_log.cc index 5f78fb33251b80bbe574e4dc645b978828a83842..2ae385c108f8730b5978f39ccb49054fbcc9cd8d 100644 --- a/source/blender/gpu/intern/gpu_shader_log.cc +++ b/source/blender/gpu/intern/gpu_shader_log.cc @@ -251,7 +251,8 @@ void Shader::print_log(Span<const char *> sources, CLG_Severity severity = error ? CLG_SEVERITY_ERROR : CLG_SEVERITY_WARN; if (((LOG.type->flag & CLG_FLAG_USE) && (LOG.type->level >= 0)) || - (severity >= CLG_SEVERITY_WARN)) { + (severity >= CLG_SEVERITY_WARN)) + { const char *_str = BLI_dynstr_get_cstring(dynstr); CLG_log_str(LOG.type, severity, this->name, stage, _str); MEM_freeN((void *)_str); diff --git a/source/blender/gpu/metal/kernels/depth_2d_update_int24_frag.glsl b/source/blender/gpu/metal/kernels/depth_2d_update_int24_frag.glsl index af1ee08584c0dbf970a07c3c5f113a0e62bf82fd..1674b90c5e82b2e07ba468cae013d25df4659e72 100644 --- a/source/blender/gpu/metal/kernels/depth_2d_update_int24_frag.glsl +++ b/source/blender/gpu/metal/kernels/depth_2d_update_int24_frag.glsl @@ -6,6 +6,6 @@ void main() { uint val = textureLod(source_data, texCoord_interp, mip).r; uint stencil = (val >> 24) & 0xFFu; - uint depth = (val)&0xFFFFFFu; + uint depth = (val) & 0xFFFFFFu; gl_FragDepth = float(depth) / float(0xFFFFFFu); } diff --git a/source/blender/gpu/metal/mtl_backend.mm b/source/blender/gpu/metal/mtl_backend.mm index 6263b2f1237c2f13808b9fbd2ce6d84b40ec590e..93783095721a2ab59c339741aea349a6f3b74eb1 100644 --- a/source/blender/gpu/metal/mtl_backend.mm +++ b/source/blender/gpu/metal/mtl_backend.mm @@ -510,4 +510,4 @@ void MTLBackend::compute_dispatch_indirect(StorageBuf *indirect_buf) /** \} */ -} // blender::gpu +} // namespace blender::gpu diff --git a/source/blender/gpu/metal/mtl_command_buffer.mm b/source/blender/gpu/metal/mtl_command_buffer.mm index 1755793aa2b1b407e515d80d802e8cc7530ecfb6..752f1f02abbe74f5f969073aecfd4be00c42f478 100644 --- a/source/blender/gpu/metal/mtl_command_buffer.mm +++ b/source/blender/gpu/metal/mtl_command_buffer.mm @@ -629,7 +629,8 @@ bool MTLCommandBufferManager::insert_memory_barrier(eGPUBarrier barrier_bits, MTLRenderStages before_stage_flags = 0; MTLRenderStages after_stage_flags = 0; if (before_stages & GPU_BARRIER_STAGE_VERTEX && - !(before_stages & GPU_BARRIER_STAGE_FRAGMENT)) { + !(before_stages & GPU_BARRIER_STAGE_FRAGMENT)) + { before_stage_flags = before_stage_flags | MTLRenderStageVertex; } if (before_stages & GPU_BARRIER_STAGE_FRAGMENT) { @@ -1093,4 +1094,4 @@ void MTLComputeState::bind_pso(id<MTLComputePipelineState> pso) /** \} */ -} // blender::gpu +} // namespace blender::gpu diff --git a/source/blender/gpu/metal/mtl_context.mm b/source/blender/gpu/metal/mtl_context.mm index 6d31941534ff6035944ca939c2412ed99c07177d..e2a3b79fa12558b2a71fe8b1500061682427a574 100644 --- a/source/blender/gpu/metal/mtl_context.mm +++ b/source/blender/gpu/metal/mtl_context.mm @@ -2612,7 +2612,8 @@ id<MTLComputePipelineState> MTLContextComputeUtils::get_buffer_clear_pso() if (error) { /* Only exit out if genuine error and not warning. */ if ([[error localizedDescription] rangeOfString:@"Compilation succeeded"].location == - NSNotFound) { + NSNotFound) + { NSLog(@"Compile Error - Metal Shader Library error %@ ", error); BLI_assert(false); return nil; diff --git a/source/blender/gpu/metal/mtl_immediate.mm b/source/blender/gpu/metal/mtl_immediate.mm index cddab532469a3d4ca28128d78a80674b316308e0..c6558920e0af500bc15ea60368b9bfea9f914d21 100644 --- a/source/blender/gpu/metal/mtl_immediate.mm +++ b/source/blender/gpu/metal/mtl_immediate.mm @@ -384,7 +384,8 @@ void MTLImmediate::end() /* SSBO vertex fetch - Nullify elements buffer. */ if (rps.cached_vertex_buffer_bindings[MTL_SSBO_VERTEX_FETCH_IBO_INDEX].metal_buffer == - nil) { + nil) + { rps.bind_vertex_buffer(null_buffer, 0, MTL_SSBO_VERTEX_FETCH_IBO_INDEX); } diff --git a/source/blender/gpu/metal/mtl_memory.mm b/source/blender/gpu/metal/mtl_memory.mm index c95c6a6f113dd7e225b8a18e86362a4c17b3572f..6bd5d57a9cd57947c6f5470de17b724d222e4433 100644 --- a/source/blender/gpu/metal/mtl_memory.mm +++ b/source/blender/gpu/metal/mtl_memory.mm @@ -329,19 +329,18 @@ void MTLBufferPool::update_memory_pools() deletion_time_threshold_s = 2; } else - /* Spare pool memory >= 1GB. */ - if (allocations_in_pool_ >= MEMORY_SIZE_1GB) - { - deletion_time_threshold_s = 4; - } - /* Spare pool memory >= 512MB. */ - else if (allocations_in_pool_ >= MEMORY_SIZE_512MB) { - deletion_time_threshold_s = 15; - } - /* Spare pool memory >= 256MB. */ - else if (allocations_in_pool_ >= MEMORY_SIZE_256MB) { - deletion_time_threshold_s = 60; - } + /* Spare pool memory >= 1GB. */ + if (allocations_in_pool_ >= MEMORY_SIZE_1GB) { + deletion_time_threshold_s = 4; + } + /* Spare pool memory >= 512MB. */ + else if (allocations_in_pool_ >= MEMORY_SIZE_512MB) { + deletion_time_threshold_s = 15; + } + /* Spare pool memory >= 256MB. */ + else if (allocations_in_pool_ >= MEMORY_SIZE_256MB) { + deletion_time_threshold_s = 60; + } if (time_passed > deletion_time_threshold_s) { diff --git a/source/blender/gpu/metal/mtl_shader.mm b/source/blender/gpu/metal/mtl_shader.mm index f77d119f5090497c43d72b6f38a0712e1fe54254..e8fe73315f25fae65e66e27f9de7c361a74cfb57 100644 --- a/source/blender/gpu/metal/mtl_shader.mm +++ b/source/blender/gpu/metal/mtl_shader.mm @@ -371,7 +371,8 @@ bool MTLShader::finalize(const shader::ShaderCreateInfo *info) if (error) { /* Only exit out if genuine error and not warning. */ if ([[error localizedDescription] rangeOfString:@"Compilation succeeded"].location == - NSNotFound) { + NSNotFound) + { const char *errors_c_str = [[error localizedDescription] UTF8String]; const char *sources_c_str = shd_builder_->glsl_fragment_source_.c_str(); @@ -957,7 +958,8 @@ MTLRenderPipelineStateInstance *MTLShader::bake_pipeline_state( } else { for (const uint i : - IndexRange(pipeline_descriptor.vertex_descriptor.max_attribute_value + 1)) { + IndexRange(pipeline_descriptor.vertex_descriptor.max_attribute_value + 1)) + { /* Metal back-end attribute descriptor state. */ const MTLVertexAttributeDescriptorPSO &attribute_desc = @@ -1150,7 +1152,8 @@ MTLRenderPipelineStateInstance *MTLShader::bake_pipeline_state( bool null_pointsize = true; float MTL_pointsize = pipeline_descriptor.point_size; if (pipeline_descriptor.vertex_descriptor.prim_topology_class == - MTLPrimitiveTopologyClassPoint) { + MTLPrimitiveTopologyClassPoint) + { /* `if pointsize is > 0.0`, PROGRAM_POINT_SIZE is enabled, and `gl_PointSize` shader keyword * overrides the value. Otherwise, if < 0.0, use global constant point size. */ if (MTL_pointsize < 0.0) { @@ -1222,7 +1225,8 @@ MTLRenderPipelineStateInstance *MTLShader::bake_pipeline_state( /* Setup pixel format state */ for (int color_attachment = 0; color_attachment < GPU_FB_MAX_COLOR_ATTACHMENT; - color_attachment++) { + color_attachment++) + { /* Fetch color attachment pixel format in back-end pipeline state. */ MTLPixelFormat pixel_format = pipeline_descriptor.color_attachment_format[color_attachment]; /* Populate MTL API PSO attachment descriptor. */ @@ -1488,7 +1492,8 @@ MTLComputePipelineStateInstance *MTLShader::bake_compute_pipeline_state(MTLConte /* Only exit out if genuine error and not warning */ if ([[error localizedDescription] rangeOfString:@"Compilation succeeded"].location == - NSNotFound) { + NSNotFound) + { BLI_assert(false); return nullptr; } diff --git a/source/blender/gpu/metal/mtl_texture.mm b/source/blender/gpu/metal/mtl_texture.mm index fe20598412af8ce6044467403626622e77d1aedc..f9e69b69f30b96d6f954003ce2fb4e5e61325472 100644 --- a/source/blender/gpu/metal/mtl_texture.mm +++ b/source/blender/gpu/metal/mtl_texture.mm @@ -620,7 +620,8 @@ void gpu::MTLTexture::update_sub( /* Safety Checks. */ if (type == GPU_DATA_UINT_24_8 || type == GPU_DATA_10_11_11_REV || - type == GPU_DATA_2_10_10_10_REV) { + type == GPU_DATA_2_10_10_10_REV) + { BLI_assert(can_use_direct_blit && "Special input data type must be a 1-1 mapping with destination texture as it " "cannot easily be split"); diff --git a/source/blender/gpu/metal/mtl_texture_util.mm b/source/blender/gpu/metal/mtl_texture_util.mm index 858a46b98a6561677ad6f29718447be875512f7b..bcdbb6d99147a4b6b1fdd6781389093d31ef023b 100644 --- a/source/blender/gpu/metal/mtl_texture_util.mm +++ b/source/blender/gpu/metal/mtl_texture_util.mm @@ -426,7 +426,8 @@ id<MTLComputePipelineState> gpu::MTLTexture::mtl_texture_update_impl( if (error) { /* Only exit out if genuine error and not warning. */ if ([[error localizedDescription] rangeOfString:@"Compilation succeeded"].location == - NSNotFound) { + NSNotFound) + { NSLog(@"Compile Error - Metal Shader Library error %@ ", error); BLI_assert(false); return nil; @@ -746,7 +747,8 @@ id<MTLComputePipelineState> gpu::MTLTexture::mtl_texture_read_impl( if (error) { /* Only exit out if genuine error and not warning. */ if ([[error localizedDescription] rangeOfString:@"Compilation succeeded"].location == - NSNotFound) { + NSNotFound) + { NSLog(@"Compile Error - Metal Shader Library error %@ ", error); BLI_assert(false); return nil; diff --git a/source/blender/gpu/opengl/gl_backend.cc b/source/blender/gpu/opengl/gl_backend.cc index 3e621fd82c071fe34f39d1e061b243ca32cb4821..3da2d234346a6613633778cbedd131cb400e4721 100644 --- a/source/blender/gpu/opengl/gl_backend.cc +++ b/source/blender/gpu/opengl/gl_backend.cc @@ -453,7 +453,8 @@ static void detect_workarounds() /* There is a bug on older Nvidia GPU where GL_ARB_texture_gather * is reported to be supported but yield a compile error (see #55802). */ if (GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_ANY, GPU_DRIVER_ANY) && - !(epoxy_gl_version() >= 40)) { + !(epoxy_gl_version() >= 40)) + { GLContext::texture_gather_support = false; } diff --git a/source/blender/gpu/opengl/gl_texture.cc b/source/blender/gpu/opengl/gl_texture.cc index f067606f06c8595a02bc8a44f8db78ac1ef16c96..aef1e0405802c0e22008b1ba8a552b90493144e6 100644 --- a/source/blender/gpu/opengl/gl_texture.cc +++ b/source/blender/gpu/opengl/gl_texture.cc @@ -648,7 +648,8 @@ void GLTexture::samplers_update() const GPUSamplerFiltering filtering = GPUSamplerFiltering(filtering_i); if ((filtering & GPU_SAMPLER_FILTERING_ANISOTROPIC) && - (filtering & GPU_SAMPLER_FILTERING_MIPMAP)) { + (filtering & GPU_SAMPLER_FILTERING_MIPMAP)) + { glSamplerParameterf(samplers_state_cache_[extend_yz_i][extend_x_i][filtering_i], GL_TEXTURE_MAX_ANISOTROPY_EXT, anisotropic_filter); @@ -801,7 +802,8 @@ void GLTexture::check_feedback_loop() /* Check for when texture is used with texture barrier. */ GPUAttachment attachment_read = fb->tmp_detached_[type]; if (attachment.mip <= mip_max_ && attachment.mip >= mip_min_ && - attachment_read.tex == nullptr) { + attachment_read.tex == nullptr) + { char msg[256]; SNPRINTF(msg, "Feedback loop: Trying to bind a texture (%s) with mip range %d-%d but mip %d is " diff --git a/source/blender/gpu/shaders/gpu_shader_text_frag.glsl b/source/blender/gpu/shaders/gpu_shader_text_frag.glsl index f8d7a3ac4900aab1642ec15bc3b095d7872b5849..216abbcad93294c60bb1d93a7509c93ae9f35059 100644 --- a/source/blender/gpu/shaders/gpu_shader_text_frag.glsl +++ b/source/blender/gpu/shaders/gpu_shader_text_frag.glsl @@ -4,7 +4,7 @@ #pragma BLENDER_REQUIRE(gpu_shader_colorspace_lib.glsl) -//#define GPU_NEAREST +// #define GPU_NEAREST #define sample_glyph_offset(texel, ofs) \ texture_1D_custom_bilinear_filter(texCoord_interp + ofs * texel) diff --git a/source/blender/gpu/vulkan/vk_data_conversion.cc b/source/blender/gpu/vulkan/vk_data_conversion.cc index fdc2d57e9675871f4f06d6895720a8789456af6c..cde2400636c32c93c7a62b6733e7505f6fff371b 100644 --- a/source/blender/gpu/vulkan/vk_data_conversion.cc +++ b/source/blender/gpu/vulkan/vk_data_conversion.cc @@ -621,8 +621,7 @@ using SRGBA8 = PixelValue<ColorSceneLinearByteEncoded4b<eAlpha::Premultiplied>>; using FLOAT3 = PixelValue<float3>; using FLOAT4 = PixelValue<ColorSceneLinear4f<eAlpha::Premultiplied>>; /* NOTE: Vulkan stores R11_G11_B10 in reverse component order. */ -class B10F_G11G_R11F : public PixelValue<uint32_t> { -}; +class B10F_G11G_R11F : public PixelValue<uint32_t> {}; class HALF4 : public PixelValue<uint64_t> { public: diff --git a/source/blender/gpu/vulkan/vk_shader.cc b/source/blender/gpu/vulkan/vk_shader.cc index 773c222ac8b72cf8c54602583114e79158b26684..e2fea688c7f9a241042000079ce82f05026438a1 100644 --- a/source/blender/gpu/vulkan/vk_shader.cc +++ b/source/blender/gpu/vulkan/vk_shader.cc @@ -1086,7 +1086,8 @@ std::string VKShader::vertex_interface_declare(const shader::ShaderCreateInfo &i ss << "layout(location=" << (location++) << ") out int gpu_Layer;\n "; } if (workarounds.shader_output_viewport_index && - bool(info.builtins_ & BuiltinBits::VIEWPORT_INDEX)) { + bool(info.builtins_ & BuiltinBits::VIEWPORT_INDEX)) + { ss << "layout(location=" << (location++) << ") out int gpu_ViewportIndex;\n"; } if (bool(info.builtins_ & BuiltinBits::BARYCENTRIC_COORD)) { @@ -1132,7 +1133,8 @@ std::string VKShader::fragment_interface_declare(const shader::ShaderCreateInfo ss << "#define gpu_Layer gl_Layer\n"; } if (workarounds.shader_output_viewport_index && - bool(info.builtins_ & BuiltinBits::VIEWPORT_INDEX)) { + bool(info.builtins_ & BuiltinBits::VIEWPORT_INDEX)) + { ss << "#define gpu_ViewportIndex gl_ViewportIndex\n"; } diff --git a/source/blender/ikplugin/intern/iksolver_plugin.cc b/source/blender/ikplugin/intern/iksolver_plugin.cc index 3f612170c443cec10180e4cc39c199597402677b..c8fc7823e6db89854f4fb9ba0ab64fc1f89b463c 100644 --- a/source/blender/ikplugin/intern/iksolver_plugin.cc +++ b/source/blender/ikplugin/intern/iksolver_plugin.cc @@ -158,7 +158,8 @@ static void initialize_posetree(Object * /*ob*/, bPoseChannel *pchan_tip) break; } for (; a < size && t < tree->totchannel && tree->pchan[t] == chanlist[segcount - a - 1]; - a++, t++) { + a++, t++) + { /* pass */ } } diff --git a/source/blender/ikplugin/intern/itasc_plugin.cc b/source/blender/ikplugin/intern/itasc_plugin.cc index 6055a073fca9b3a020ffefc713fb251c39ba88d5..5ec04ac7fd447ac342eccaadc9a253e293521d92 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cc +++ b/source/blender/ikplugin/intern/itasc_plugin.cc @@ -314,7 +314,8 @@ static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *co break; } for (; a < size && t < tree->totchannel && tree->pchan[t] == chanlist[segcount - a - 1]; - a++, t++) { + a++, t++) + { /* pass */ } } diff --git a/source/blender/imbuf/intern/colormanagement.cc b/source/blender/imbuf/intern/colormanagement.cc index 11a09ed944dd342aff24c957ef8abd14dd069c12..6a2c552742547b097fcd565a80977452906288ea 100644 --- a/source/blender/imbuf/intern/colormanagement.cc +++ b/source/blender/imbuf/intern/colormanagement.cc @@ -1572,7 +1572,8 @@ static void display_buffer_apply_get_linear_buffer(DisplayBufferThread *handle, /* first convert byte buffer to float, keep in image space */ for (i = 0, fp = linear_buffer, cp = byte_buffer; i != i_last; - i++, fp += channels, cp += channels) { + i++, fp += channels, cp += channels) + { if (channels == 3) { rgb_uchar_to_float(fp, cp); } diff --git a/source/blender/imbuf/intern/imbuf.h b/source/blender/imbuf/intern/imbuf.h index c5fe353c1183725489f0225a59c9644e014b714e..ea81c9743dbd433afa3729a7e117e299498a9c42 100644 --- a/source/blender/imbuf/intern/imbuf.h +++ b/source/blender/imbuf/intern/imbuf.h @@ -28,7 +28,7 @@ #define SWAP_SHORT(x) (((x & 0xff) << 8) | ((x >> 8) & 0xff)) #define SWAP_LONG(x) \ - (((x) << 24) | (((x)&0xff00) << 8) | (((x) >> 8) & 0xff00) | (((x) >> 24) & 0xff)) + (((x) << 24) | (((x) & 0xff00) << 8) | (((x) >> 8) & 0xff00) | (((x) >> 24) & 0xff)) #define ENDIAN_NOP(x) (x) diff --git a/source/blender/imbuf/intern/iris.cc b/source/blender/imbuf/intern/iris.cc index 1f16947db8861739cab2e99a66d3789b54d2beaa..620dc62bb65fa6269d9ccfb893b98e2bf6948c5e 100644 --- a/source/blender/imbuf/intern/iris.cc +++ b/source/blender/imbuf/intern/iris.cc @@ -59,9 +59,9 @@ BLI_STATIC_ASSERT(sizeof(IMAGE) == HEADER_SIZE, "Invalid header size"); #define BPPMASK 0x00ff // #define ITYPE_VERBATIM 0x0000 /* UNUSED */ #define ITYPE_RLE 0x0100 -#define ISRLE(type) (((type)&0xff00) == ITYPE_RLE) +#define ISRLE(type) (((type) & 0xff00) == ITYPE_RLE) // #define ISVERBATIM(type) (((type) & 0xff00) == ITYPE_VERBATIM) -#define BPP(type) ((type)&BPPMASK) +#define BPP(type) ((type) & BPPMASK) #define RLE(bpp) (ITYPE_RLE | (bpp)) // #define VERBATIM(bpp) (ITYPE_VERBATIM | (bpp)) /* UNUSED */ // #define IBUFSIZE(pixels) ((pixels + (pixels >> 6)) << 2) /* UNUSED */ diff --git a/source/blender/imbuf/intern/openexr/openexr_stub.cpp b/source/blender/imbuf/intern/openexr/openexr_stub.cpp index 412f796f9aae0f57c23d782747ef8be58bb3e5b7..b5d14a19f6ffd4ee25d33b7bead90741a7d0b319 100644 --- a/source/blender/imbuf/intern/openexr/openexr_stub.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_stub.cpp @@ -87,15 +87,15 @@ void IMB_exr_clear_channels(void * /*handle*/) {} void IMB_exr_multilayer_convert(void * /*handle*/, void * /*base*/, - void *(*/*addview*/)(void *base, const char *str), - void *(*/*addlayer*/)(void *base, const char *str), - void (*/*addpass*/)(void *base, - void *lay, - const char *str, - float *rect, - int totchan, - const char *chan_id, - const char *view)) + void *(* /*addview*/)(void *base, const char *str), + void *(* /*addlayer*/)(void *base, const char *str), + void (* /*addpass*/)(void *base, + void *lay, + const char *str, + float *rect, + int totchan, + const char *chan_id, + const char *view)) { } diff --git a/source/blender/io/alembic/intern/abc_util.cc b/source/blender/io/alembic/intern/abc_util.cc index 74c557972fbff2ab201a6361bf50407125325687..e3a16df29d844b3929ad14f81c55f05da73ada32 100644 --- a/source/blender/io/alembic/intern/abc_util.cc +++ b/source/blender/io/alembic/intern/abc_util.cc @@ -147,7 +147,7 @@ std::optional<SampleInterpolationSettings> get_sample_interpolation_settings( return SampleInterpolationSettings{i0, i1, bias}; } -//#define USE_NURBS +// #define USE_NURBS AbcObjectReader *create_reader(const Alembic::AbcGeom::IObject &object, ImportSettings &settings) { diff --git a/source/blender/io/avi/intern/avi.cc b/source/blender/io/avi/intern/avi.cc index 94c00e1cab07d15039d5a0bcc84e273b9550d4c5..a4f4d21cd91ec957f6747fe0bbc617e247fc1902 100644 --- a/source/blender/io/avi/intern/avi.cc +++ b/source/blender/io/avi/intern/avi.cc @@ -70,7 +70,7 @@ uint GET_TCC(FILE *fp) char *fcc_to_char(uint fcc) { - DEBUG_FCC[0] = (fcc)&127; + DEBUG_FCC[0] = (fcc) & 127; DEBUG_FCC[1] = (fcc >> 8) & 127; DEBUG_FCC[2] = (fcc >> 16) & 127; DEBUG_FCC[3] = (fcc >> 24) & 127; @@ -80,7 +80,7 @@ char *fcc_to_char(uint fcc) char *tcc_to_char(uint tcc) { - DEBUG_FCC[0] = (tcc)&127; + DEBUG_FCC[0] = (tcc) & 127; DEBUG_FCC[1] = (tcc >> 8) & 127; DEBUG_FCC[2] = 0; DEBUG_FCC[3] = 0; @@ -643,7 +643,8 @@ void *AVI_read_frame(AviMovie *movie, AviFormat format, int frame, int stream) while (cur_frame < frame && i < movie->index_entries) { if (fcc_is_data(movie->entries[i].ChunkId) && - fcc_get_stream(movie->entries[i].ChunkId) == stream) { + fcc_get_stream(movie->entries[i].ChunkId) == stream) + { if ((cur_frame == frame - 1) && (movie->entries[i].Size == 0)) { rewind = 1; frame = frame - 1; diff --git a/source/blender/io/avi/intern/avi_rgb.cc b/source/blender/io/avi/intern/avi_rgb.cc index 118f3618c5cf76c6a8051169028af6b0a7bd8d07..c9dbf48e83035bef90425d50e0fd039bdfd658c6 100644 --- a/source/blender/io/avi/intern/avi_rgb.cc +++ b/source/blender/io/avi/intern/avi_rgb.cc @@ -96,7 +96,8 @@ void *avi_converter_from_avi_rgb(AviMovie *movie, int stream, uchar *buffer, con } for (size_t y = 0; y < size_t(movie->header->Height) * size_t(movie->header->Width) * 3; - y += 3) { + y += 3) + { int i = buf[y]; buf[y] = buf[y + 2]; buf[y + 2] = i; diff --git a/source/blender/io/collada/AnimationImporter.h b/source/blender/io/collada/AnimationImporter.h index 5d2eb536cd7cb67873c79a9cb3520eafc3cb8448..1959bf9a5eaba9b6c230e9ef835e1d59b353ff53 100644 --- a/source/blender/io/collada/AnimationImporter.h +++ b/source/blender/io/collada/AnimationImporter.h @@ -31,7 +31,7 @@ #include "DNA_object_types.h" #include "DNA_scene_types.h" -//#include "ArmatureImporter.h" +// #include "ArmatureImporter.h" #include "TransformReader.h" #include "collada_internal.h" diff --git a/source/blender/io/collada/ArmatureImporter.cpp b/source/blender/io/collada/ArmatureImporter.cpp index 3972c888081f569d8dec57fb1714550b124b3817..51c2f4bb934e111938a9b2d462cb9a1f2c33cb01 100644 --- a/source/blender/io/collada/ArmatureImporter.cpp +++ b/source/blender/io/collada/ArmatureImporter.cpp @@ -641,7 +641,8 @@ Object *ArmatureImporter::create_armature_bones(Main *bmain, SkinInfo &skin) &skin, node, nullptr, node->getChildNodes().getCount(), nullptr, armature, layer_labels); if (joint_parent_map.find(node->getUniqueId()) != joint_parent_map.end() && - !skin.get_parent()) { + !skin.get_parent()) + { skin.set_parent(joint_parent_map[node->getUniqueId()]); } } @@ -799,7 +800,8 @@ void ArmatureImporter::make_armatures(bContext *C, std::vector<Object *> &object } if (std::find(objects_to_scale.begin(), objects_to_scale.end(), ob_arm) == - objects_to_scale.end()) { + objects_to_scale.end()) + { objects_to_scale.push_back(ob_arm); } diff --git a/source/blender/io/collada/ControllerExporter.h b/source/blender/io/collada/ControllerExporter.h index c4e7e0ff0e412d7a1bbfb3d8a054f03db1849336..1ae12c356025c8cd082225e4c6e4dcc36dc34a17 100644 --- a/source/blender/io/collada/ControllerExporter.h +++ b/source/blender/io/collada/ControllerExporter.h @@ -10,7 +10,7 @@ #include <list> #include <string> -//#include <vector> +// #include <vector> #include "COLLADASWExtraTechnique.h" #include "COLLADASWInputList.h" diff --git a/source/blender/io/collada/ErrorHandler.cpp b/source/blender/io/collada/ErrorHandler.cpp index e716c12bd49c16ddfc7ea60af9cb124fafb05f3a..536d1429fbfba854c73bd6dd6f389d47d86d0e1b 100644 --- a/source/blender/io/collada/ErrorHandler.cpp +++ b/source/blender/io/collada/ErrorHandler.cpp @@ -58,7 +58,8 @@ bool ErrorHandler::handleError(const COLLADASaxFWL::IError *error) } else if (parserError.getErrorType() == - GeneratedSaxParser::ParserError::ERROR_COULD_NOT_OPEN_FILE) { + GeneratedSaxParser::ParserError::ERROR_COULD_NOT_OPEN_FILE) + { isError = true; error_context = "File access"; } diff --git a/source/blender/io/collada/MeshImporter.cpp b/source/blender/io/collada/MeshImporter.cpp index ce230fa409fde54bb29fa8fa829fc5e0993089d9..bf97197f85565f1b7119f2ad9d81dc6a790efe15 100644 --- a/source/blender/io/collada/MeshImporter.cpp +++ b/source/blender/io/collada/MeshImporter.cpp @@ -328,7 +328,8 @@ bool MeshImporter::is_nice_mesh(COLLADAFW::Mesh *mesh) else if (!ELEM(type, COLLADAFW::MeshPrimitive::TRIANGLES, - COLLADAFW::MeshPrimitive::TRIANGLE_FANS)) { + COLLADAFW::MeshPrimitive::TRIANGLE_FANS)) + { fprintf(stderr, "ERROR: Primitive type %s is not supported.\n", type_str); return false; } @@ -721,7 +722,8 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh, } for (uint uvset_index = 0; uvset_index < index_list_array_uvcoord.getCount(); - uvset_index++) { + uvset_index++) + { COLLADAFW::IndexList &index_list = *index_list_array_uvcoord[uvset_index]; blender::float2 *mloopuv = static_cast<blender::float2 *>( CustomData_get_layer_named_for_write(&mesh->corner_data, diff --git a/source/blender/io/common/intern/hierarchy_context_order_test.cc b/source/blender/io/common/intern/hierarchy_context_order_test.cc index 53ba43c6ef29cdc78636f2a18e25e8260ed6480e..2c781a15a170fba406e2efdb80b75f4734a18030 100644 --- a/source/blender/io/common/intern/hierarchy_context_order_test.cc +++ b/source/blender/io/common/intern/hierarchy_context_order_test.cc @@ -18,8 +18,7 @@ Object *fake_pointer(int value) } // namespace -class HierarchyContextOrderTest : public testing::Test { -}; +class HierarchyContextOrderTest : public testing::Test {}; TEST_F(HierarchyContextOrderTest, ObjectPointerTest) { diff --git a/source/blender/io/common/intern/object_identifier_test.cc b/source/blender/io/common/intern/object_identifier_test.cc index 22e8f2ef570312f3c9cc4c2d6090d309deb5d80b..01910ce943b91b4572eadde3023559f4e755b6ad 100644 --- a/source/blender/io/common/intern/object_identifier_test.cc +++ b/source/blender/io/common/intern/object_identifier_test.cc @@ -60,8 +60,7 @@ class TestObjectIdentifier : public ObjectIdentifier { } // namespace -class ObjectIdentifierOrderTest : public testing::Test { -}; +class ObjectIdentifierOrderTest : public testing::Test {}; TEST_F(ObjectIdentifierOrderTest, graph_root) { @@ -171,8 +170,7 @@ TEST_F(ObjectIdentifierOrderTest, map_copy_and_update) EXPECT_EQ(5, graph.size()); } -class PersistentIDTest : public testing::Test { -}; +class PersistentIDTest : public testing::Test {}; TEST_F(PersistentIDTest, is_from_same_instancer) { diff --git a/source/blender/io/gpencil/intern/gpencil_io_base.cc b/source/blender/io/gpencil/intern/gpencil_io_base.cc index 3e49dd935351a184c2358df1afcc610dab8575e7..77437c7372e218960262ad386733f32c20738083 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_base.cc +++ b/source/blender/io/gpencil/intern/gpencil_io_base.cc @@ -189,7 +189,8 @@ bool GpencilIO::gpencil_3D_point_to_screen_space(const float3 co, float2 &r_co) float2 screen_co; eV3DProjTest test = (eV3DProjTest)(V3D_PROJ_RET_OK); if (ED_view3d_project_float_global(params_.region, parent_co, screen_co, test) == - V3D_PROJ_RET_OK) { + V3D_PROJ_RET_OK) + { if (!ELEM(V2D_IS_CLIPPED, screen_co[0], screen_co[1])) { r_co = screen_co; /* Invert X axis. */ diff --git a/source/blender/io/gpencil/intern/gpencil_io_capi.cc b/source/blender/io/gpencil/intern/gpencil_io_capi.cc index 0997aac03be660922d61de0594660dd3e5194d71..fe73a5ba1655c3b43d0c086421d2133b0ab3e795 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_capi.cc +++ b/source/blender/io/gpencil/intern/gpencil_io_capi.cc @@ -109,7 +109,8 @@ static bool gpencil_io_export_pdf(Depsgraph *depsgraph, case GP_EXPORT_FRAME_SCENE: { for (int32_t i = iparams->frame_start; i < iparams->frame_end + 1; i++) { if ((iparams->frame_mode == GP_EXPORT_FRAME_SELECTED) && - !is_keyframe_included(gpd_eval, i, true)) { + !is_keyframe_included(gpd_eval, i, true)) + { continue; } diff --git a/source/blender/io/ply/importer/ply_import.cc b/source/blender/io/ply/importer/ply_import.cc index bbb8c5380b7da30743f21736be62868a84e42eda..1514eac0666e70b9995449b28773893e9005a582 100644 --- a/source/blender/io/ply/importer/ply_import.cc +++ b/source/blender/io/ply/importer/ply_import.cc @@ -147,7 +147,8 @@ const char *read_header(PlyReadBuffer &file, PlyHeader &r_header) break; } else if (line.is_empty() || (line.first() >= '0' && line.first() <= '9') || - line.first() == '-') { + line.first() == '-') + { /* A value was found before we broke out of the loop. No end_header. */ return "No end_header."; } diff --git a/source/blender/io/usd/intern/usd_hierarchy_iterator.cc b/source/blender/io/usd/intern/usd_hierarchy_iterator.cc index ac44414eead0e811f08c351a9b949811ce89ea53..e85adbacafd5d3cad35f8a6b4c2fe582279dcb70 100644 --- a/source/blender/io/usd/intern/usd_hierarchy_iterator.cc +++ b/source/blender/io/usd/intern/usd_hierarchy_iterator.cc @@ -197,7 +197,8 @@ void USDHierarchyIterator::add_usd_skel_export_mapping(const Object *obj, const } if (params_.export_armatures && obj->type == OB_MESH && - can_export_skinned_mesh(*obj, depsgraph_)) { + can_export_skinned_mesh(*obj, depsgraph_)) + { skinned_mesh_export_map_.add(obj, path); } } diff --git a/source/blender/io/usd/intern/usd_reader_light.cc b/source/blender/io/usd/intern/usd_reader_light.cc index 7559f7eff3e1ea4b650bfc1ead03fa607abca460..1f51392fe9af6aeb4cab48ec0c923ed6536e426a 100644 --- a/source/blender/io/usd/intern/usd_reader_light.cc +++ b/source/blender/io/usd/intern/usd_reader_light.cc @@ -104,7 +104,8 @@ void USDLightReader::read_object_data(Main *bmain, const double motionSampleTime pxr::UsdAttribute treatAsPoint_attr = sphere_light.GetTreatAsPointAttr(); bool treatAsPoint; if (treatAsPoint_attr && treatAsPoint_attr.Get(&treatAsPoint, motionSampleTime) && - treatAsPoint) { + treatAsPoint) + { blight->radius = 0.0f; } else if (pxr::UsdAttribute radius_attr = sphere_light.GetRadiusAttr()) { diff --git a/source/blender/io/usd/intern/usd_reader_material.cc b/source/blender/io/usd/intern/usd_reader_material.cc index 207e4cc71bedf55a2246c5161e44e61ff3893adc..42412f2c7d6f2643033d60fbf391603acad805b2 100644 --- a/source/blender/io/usd/intern/usd_reader_material.cc +++ b/source/blender/io/usd/intern/usd_reader_material.cc @@ -556,7 +556,8 @@ void USDMaterialReader::set_principled_node_inputs(bNode *principled, float emission_strength = 0.0f; if (pxr::UsdShadeInput emissive_input = usd_shader.GetInput(usdtokens::emissiveColor)) { if (set_node_input( - emissive_input, principled, "Emission Color", ntree, column, &context, true)) { + emissive_input, principled, "Emission Color", ntree, column, &context, true)) + { emission_strength = 1.0f; } } @@ -1058,7 +1059,8 @@ void USDMaterialReader::convert_usd_primvar_reader_float2(const pxr::UsdShadeSha * and use that instead if so. */ if (varname_input) { for (const pxr::UsdShadeConnectionSourceInfo &source_info : - varname_input.GetConnectedSources()) { + varname_input.GetConnectedSources()) + { pxr::UsdShadeShader shader = pxr::UsdShadeShader(source_info.source.GetPrim()); pxr::UsdShadeInput secondary_varname_input = shader.GetInput(source_info.sourceName); if (secondary_varname_input) { diff --git a/source/blender/io/usd/intern/usd_reader_stage.cc b/source/blender/io/usd/intern/usd_reader_stage.cc index 7f0d3dc431840f4e8f5a84cf5e4973754082f42e..fc66c9de87133fe38de84a6085f7fc99e3eb0839 100644 --- a/source/blender/io/usd/intern/usd_reader_stage.cc +++ b/source/blender/io/usd/intern/usd_reader_stage.cc @@ -286,7 +286,8 @@ static bool merge_with_parent(USDPrimReader *reader) /* Don't merge Xform and Scope prims. */ if (xform_reader->prim().IsA<pxr::UsdGeomXform>() || - xform_reader->prim().IsA<pxr::UsdGeomScope>()) { + xform_reader->prim().IsA<pxr::UsdGeomScope>()) + { return false; } diff --git a/source/blender/io/usd/intern/usd_writer_mesh.cc b/source/blender/io/usd/intern/usd_writer_mesh.cc index 727fa50c9a58d3f8a832ea16b365e18672b53e36..c6657f0d0baf1f6d91b126ac034b256598fb6b4d 100644 --- a/source/blender/io/usd/intern/usd_writer_mesh.cc +++ b/source/blender/io/usd/intern/usd_writer_mesh.cc @@ -551,7 +551,8 @@ void USDGenericMeshWriter::write_mesh(HierarchyContext &context, * unless a subdiv modifier is used, in which case normals are computed, * not stored with the mesh. */ if (usd_export_context_.export_params.export_normals && - subdiv_scheme == pxr::UsdGeomTokens->none) { + subdiv_scheme == pxr::UsdGeomTokens->none) + { write_normals(mesh, usd_mesh); } diff --git a/source/blender/io/usd/tests/usd_imaging_test.cc b/source/blender/io/usd/tests/usd_imaging_test.cc index c7d79f3f268ecf4b2837aaf6afd36200c063b61f..28f9e7056f2cb8797d6c9c030af681ba1836e1b5 100644 --- a/source/blender/io/usd/tests/usd_imaging_test.cc +++ b/source/blender/io/usd/tests/usd_imaging_test.cc @@ -9,8 +9,7 @@ namespace blender::io::usd { -class USDImagingTest : public testing::Test { -}; +class USDImagingTest : public testing::Test {}; TEST_F(USDImagingTest, CapsuleAdapterTest) { diff --git a/source/blender/io/usd/tests/usd_stage_creation_test.cc b/source/blender/io/usd/tests/usd_stage_creation_test.cc index a029c4c01ddcf16f5052e35be58f974e4267cd71..531f2130d4d7f627367988facc258709b4b0a52f 100644 --- a/source/blender/io/usd/tests/usd_stage_creation_test.cc +++ b/source/blender/io/usd/tests/usd_stage_creation_test.cc @@ -15,8 +15,7 @@ namespace blender::io::usd { -class USDStageCreationTest : public testing::Test { -}; +class USDStageCreationTest : public testing::Test {}; TEST_F(USDStageCreationTest, JSONFileLoadingTest) { diff --git a/source/blender/makesdna/DNA_boid_types.h b/source/blender/makesdna/DNA_boid_types.h index a0b646674e0beaee215dc42876caa73d2c4d3577..a2f0388e064379d05ca30365030583078b7f1162 100644 --- a/source/blender/makesdna/DNA_boid_types.h +++ b/source/blender/makesdna/DNA_boid_types.h @@ -210,9 +210,9 @@ enum { }; /* boidrule->options */ -//#define BOID_RULE_FOLLOW_LINE (1 << 0) /* follow leader */ -//#define BOID_RULE_PREDICT (1 << 1) /* goal/avoid */ -//#define BOID_RULE_ARRIVAL (1 << 2) /* goal */ -//#define BOID_RULE_LAND (1 << 3) /* goal */ -//#define BOID_RULE_WITH_BOIDS (1 << 4) /* avoid collision */ -//#define BOID_RULE_WITH_DEFLECTORS (1 << 5) /* avoid collision */ +// #define BOID_RULE_FOLLOW_LINE (1 << 0) /* follow leader */ +// #define BOID_RULE_PREDICT (1 << 1) /* goal/avoid */ +// #define BOID_RULE_ARRIVAL (1 << 2) /* goal */ +// #define BOID_RULE_LAND (1 << 3) /* goal */ +// #define BOID_RULE_WITH_BOIDS (1 << 4) /* avoid collision */ +// #define BOID_RULE_WITH_DEFLECTORS (1 << 5) /* avoid collision */ diff --git a/source/blender/makesdna/DNA_defs.h b/source/blender/makesdna/DNA_defs.h index 1217f055e1eb92d20a73d710a130f680937f89fe..3d808c4e79d44fe0e511163b32da1f7fe94c63d0 100644 --- a/source/blender/makesdna/DNA_defs.h +++ b/source/blender/makesdna/DNA_defs.h @@ -87,8 +87,7 @@ template<class T> class ShallowDataConstRef { const T &ref_; }; -class ShallowZeroInitializeTag { -}; +class ShallowZeroInitializeTag {}; } // namespace blender::dna::internal diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 6439ccb884e7af14d52d5a58325feeba56795b64..e55911bd0bf235b66477c6ee1f376ef25a541917 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -119,7 +119,7 @@ typedef struct ReportTimerInfo { float flash_progress; } ReportTimerInfo; -//#ifdef WITH_XR_OPENXR +// #ifdef WITH_XR_OPENXR typedef struct wmXrData { /** Runtime information for managing Blender specific behaviors. */ struct wmXrRuntimeData *runtime; @@ -127,7 +127,7 @@ typedef struct wmXrData { * even before the session runs. */ XrSessionSettings session_settings; } wmXrData; -//#endif +// #endif /* reports need to be before wmWindowManager */ @@ -213,9 +213,9 @@ typedef struct wmWindowManager { struct wmMsgBus *message_bus; - //#ifdef WITH_XR_OPENXR + // #ifdef WITH_XR_OPENXR wmXrData xr; - //#endif + // #endif } wmWindowManager; #define WM_KEYCONFIG_ARRAY_P(wm) &(wm)->defaultconf, &(wm)->addonconf, &(wm)->userconf diff --git a/source/blender/makesdna/intern/dna_defaults.c b/source/blender/makesdna/intern/dna_defaults.c index 65a9230e238a6577eec9b5caaecd74e5d7a52533..82dfa47d76dc8699cc9a85029fe170748cc6d556 100644 --- a/source/blender/makesdna/intern/dna_defaults.c +++ b/source/blender/makesdna/intern/dna_defaults.c @@ -336,7 +336,7 @@ extern const bTheme U_theme_default; * Prevent assigning the wrong struct types since all elements in #DNA_default_table are `void *`. */ #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) -# define SDNA_TYPE_CHECKED(v, t) (&(v) + (_Generic((v), t : 0))) +# define SDNA_TYPE_CHECKED(v, t) (&(v) + (_Generic((v), t: 0))) #else # define SDNA_TYPE_CHECKED(v, t) (&(v)) #endif diff --git a/source/blender/makesdna/intern/makesdna.cc b/source/blender/makesdna/intern/makesdna.cc index 6058dc98299525e417fda4d829d006d0859dd6c5..23abbed0c44aaf1b08708e3992699c6ce779efab 100644 --- a/source/blender/makesdna/intern/makesdna.cc +++ b/source/blender/makesdna/intern/makesdna.cc @@ -188,7 +188,8 @@ static bool match_identifier_with_len(const char *str, if (strncmp(str, identifier, identifier_len) == 0) { /* Check `str` isn't a prefix to a longer identifier. */ if (isdigit(str[identifier_len]) || isalpha(str[identifier_len]) || - (str[identifier_len] == '_')) { + (str[identifier_len] == '_')) + { return false; } return true; diff --git a/source/blender/makesrna/RNA_types.hh b/source/blender/makesrna/RNA_types.hh index 16d82e6cba0e021cdf59ad9c98cd661eaf28e7df..2e4ad9da3fdce92f42764c9dea1cd433de5e2454 100644 --- a/source/blender/makesrna/RNA_types.hh +++ b/source/blender/makesrna/RNA_types.hh @@ -108,7 +108,7 @@ enum PropertyScaleType { PROP_SCALE_CUBIC = 2, }; -#define RNA_SUBTYPE_UNIT(subtype) ((subtype)&0x00FF0000) +#define RNA_SUBTYPE_UNIT(subtype) ((subtype) & 0x00FF0000) #define RNA_SUBTYPE_VALUE(subtype) ((subtype) & ~0x00FF0000) #define RNA_SUBTYPE_UNIT_VALUE(subtype) ((subtype) >> 16) diff --git a/source/blender/makesrna/intern/makesrna.cc b/source/blender/makesrna/intern/makesrna.cc index 1c6e13dd7f3504ced4678489df2144b4f13aa609..5949b907cc2b8789739495e6481b1c2ea7fcc099 100644 --- a/source/blender/makesrna/intern/makesrna.cc +++ b/source/blender/makesrna/intern/makesrna.cc @@ -1538,7 +1538,8 @@ static char *rna_def_property_length_func( else if (prop->type == PROP_COLLECTION) { if (!manualfunc) { if (prop->type == PROP_COLLECTION && - (!(dp->dnalengthname || dp->dnalengthfixed) || !dp->dnaname)) { + (!(dp->dnalengthname || dp->dnalengthfixed) || !dp->dnaname)) + { CLOG_ERROR(&LOG, "%s.%s has no valid dna info.", srna->identifier, prop->identifier); DefRNA.error = true; return nullptr; @@ -4229,7 +4230,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr * we'll probably have to revisit. :/ */ StructRNA *type = rna_find_struct((const char *)pprop->type); if (type && (type->flag & STRUCT_ID) && - !(prop->flag_internal & PROP_INTERN_PTR_OWNERSHIP_FORCED)) { + !(prop->flag_internal & PROP_INTERN_PTR_OWNERSHIP_FORCED)) + { RNA_def_property_flag(prop, PROP_PTR_NO_OWNERSHIP); } break; @@ -4241,7 +4243,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr * we'll probably have to revisit. :/ */ StructRNA *type = rna_find_struct((const char *)cprop->item_type); if (type && (type->flag & STRUCT_ID) && - !(prop->flag_internal & PROP_INTERN_PTR_OWNERSHIP_FORCED)) { + !(prop->flag_internal & PROP_INTERN_PTR_OWNERSHIP_FORCED)) + { RNA_def_property_flag(prop, PROP_PTR_NO_OWNERSHIP); } break; diff --git a/source/blender/makesrna/intern/rna_access_compare_override.cc b/source/blender/makesrna/intern/rna_access_compare_override.cc index 57d6c0519325fa62c80c5c8f51d04e7cd632fe80..3c601a2cfd79923d28be241c67913192431261c2 100644 --- a/source/blender/makesrna/intern/rna_access_compare_override.cc +++ b/source/blender/makesrna/intern/rna_access_compare_override.cc @@ -26,7 +26,7 @@ #include "BLI_string.h" #include "BLI_utildefines.h" -//#define DEBUG_OVERRIDE_TIMEIT +// #define DEBUG_OVERRIDE_TIMEIT #ifdef DEBUG_OVERRIDE_TIMEIT # include "PIL_time_utildefines.h" @@ -709,7 +709,8 @@ bool RNA_struct_override_matches(Main *bmain, } if (!prop_local.is_idprop && - RNA_property_override_flag(prop_local.rnaprop) & PROPOVERRIDE_IGNORE) { + RNA_property_override_flag(prop_local.rnaprop) & PROPOVERRIDE_IGNORE) + { continue; } @@ -835,7 +836,8 @@ bool RNA_struct_override_matches(Main *bmain, } if ((do_restore || do_tag_for_restore) && - (report_flags & RNA_OVERRIDE_MATCH_RESULT_CREATED) == 0) { + (report_flags & RNA_OVERRIDE_MATCH_RESULT_CREATED) == 0) + { /* We are allowed to restore to reference's values. */ if (ELEM(nullptr, op, opop) || opop->operation == LIBOVERRIDE_OP_NOOP) { if (RNA_property_editable(ptr_local, rawprop)) { @@ -1600,7 +1602,8 @@ void RNA_struct_override_apply(Main *bmain, } else if (op->rna_prop_type == PROP_COLLECTION) { if (RNA_struct_is_ID( - RNA_property_pointer_type(&rnaapply_ctx.ptr_src, rnaapply_ctx.prop_src))) { + RNA_property_pointer_type(&rnaapply_ctx.ptr_src, rnaapply_ctx.prop_src))) + { BLI_assert(id_ptr_src->owner_id == rna_property_override_property_real_id_owner( bmain, &rnaapply_ctx.ptr_src, nullptr, nullptr)); diff --git a/source/blender/makesrna/intern/rna_animation.cc b/source/blender/makesrna/intern/rna_animation.cc index 2f3394986ada11750d145aa9d669112b18e33a6f..8fb25ae3e074abcbb41a80b846ce9a5474e9556f 100644 --- a/source/blender/makesrna/intern/rna_animation.cc +++ b/source/blender/makesrna/intern/rna_animation.cc @@ -452,7 +452,8 @@ static void rna_KeyingSet_name_set(PointerRNA *ptr, const char *value) * conflicts */ for (agrp = static_cast<bActionGroup *>(adt->action->groups.first); agrp; - agrp = agrp->next) { + agrp = agrp->next) + { if (STREQ(ks->name, agrp->name)) { /* there should only be one of these in the action, so can stop... */ STRNCPY(agrp->name, value); diff --git a/source/blender/makesrna/intern/rna_attribute.cc b/source/blender/makesrna/intern/rna_attribute.cc index 64cfeeb4075a12e7af0c538d45d4bd5e4b27862c..3901a121fb2a8775194b674792273ffa38677a15 100644 --- a/source/blender/makesrna/intern/rna_attribute.cc +++ b/source/blender/makesrna/intern/rna_attribute.cc @@ -258,7 +258,8 @@ const EnumPropertyItem *rna_enum_attribute_domain_itemf(ID *id, continue; } if (id_type == ID_CV && - !ELEM(domain_item->value, int(AttrDomain::Point), int(AttrDomain::Curve))) { + !ELEM(domain_item->value, int(AttrDomain::Point), int(AttrDomain::Curve))) + { continue; } if (id_type == ID_ME && ELEM(domain_item->value, int(AttrDomain::Curve))) { diff --git a/source/blender/makesrna/intern/rna_curve.cc b/source/blender/makesrna/intern/rna_curve.cc index fd8f337fc024323b14a3674e9b644e2cec365fc6..370da7f6d96189afbaaf7b46c1553679f40864c5 100644 --- a/source/blender/makesrna/intern/rna_curve.cc +++ b/source/blender/makesrna/intern/rna_curve.cc @@ -176,7 +176,8 @@ static Nurb *curve_nurb_from_point(Curve *cu, const void *point, int *nu_index, for (nu = static_cast<Nurb *>(nurbs->first); nu; nu = nu->next, i++) { if (nu->type == CU_BEZIER) { if (point >= static_cast<void *>(nu->bezt) && - point < static_cast<void *>(nu->bezt + nu->pntsu)) { + point < static_cast<void *>(nu->bezt + nu->pntsu)) + { break; } } diff --git a/source/blender/makesrna/intern/rna_fluid.cc b/source/blender/makesrna/intern/rna_fluid.cc index 3c1bb27347401a9687804247a5cf0e0cab15041b..4d080d486a43cdcea84781ff97cc647fdf4b13e4 100644 --- a/source/blender/makesrna/intern/rna_fluid.cc +++ b/source/blender/makesrna/intern/rna_fluid.cc @@ -464,7 +464,8 @@ static void rna_Fluid_combined_export_update(Main *bmain, Scene *scene, PointerR } } else if (fmd->domain->sndparticle_combined_export == - SNDPARTICLE_COMBINED_EXPORT_SPRAY_FOAM_BUBBLE) { + SNDPARTICLE_COMBINED_EXPORT_SPRAY_FOAM_BUBBLE) + { if (ob->type == OB_MESH && !rna_Fluid_parts_exists(ptr, PART_FLUID_SPRAYFOAMBUBBLE)) { rna_Fluid_parts_create(bmain, diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index cd6a1667f0112039a1e19654f41feb498d74bc20..a711aab3c3f5bd8135114f57b46b25171d9a992f 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -657,25 +657,30 @@ void rna_RenderPass_rect_set(PointerRNA *ptr, const float *values); #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) # define USE_RNA_RANGE_CHECK # define TYPEOF_MAX(x) \ - _Generic((x), bool : 1, char \ - : CHAR_MAX, signed char \ - : SCHAR_MAX, unsigned char \ - : UCHAR_MAX, signed short \ - : SHRT_MAX, unsigned short \ - : USHRT_MAX, signed int \ - : INT_MAX, unsigned int \ - : UINT_MAX, float \ - : FLT_MAX, double \ - : DBL_MAX) + _Generic((x), \ + bool: 1, \ + char: CHAR_MAX, \ + signed char: SCHAR_MAX, \ + unsigned char: UCHAR_MAX, \ + signed short: SHRT_MAX, \ + unsigned short: USHRT_MAX, \ + signed int: INT_MAX, \ + unsigned int: UINT_MAX, \ + float: FLT_MAX, \ + double: DBL_MAX) # define TYPEOF_MIN(x) \ - _Generic((x), bool : 0, char \ - : CHAR_MIN, signed char \ - : SCHAR_MIN, unsigned char : 0, signed short \ - : SHRT_MIN, unsigned short : 0, signed int \ - : INT_MIN, unsigned int : 0, float \ - : -FLT_MAX, double \ - : -DBL_MAX) + _Generic((x), \ + bool: 0, \ + char: CHAR_MIN, \ + signed char: SCHAR_MIN, \ + unsigned char: 0, \ + signed short: SHRT_MIN, \ + unsigned short: 0, \ + signed int: INT_MIN, \ + unsigned int: 0, \ + float: -FLT_MAX, \ + double: -DBL_MAX) #endif #ifdef __cplusplus diff --git a/source/blender/makesrna/intern/rna_key.cc b/source/blender/makesrna/intern/rna_key.cc index d482931ee95e16502409b0ba6d5d5bc093e36579..32cec593c60bc74ea85103367e4f4681fd71af8e 100644 --- a/source/blender/makesrna/intern/rna_key.cc +++ b/source/blender/makesrna/intern/rna_key.cc @@ -689,7 +689,8 @@ static void rna_Key_update_data(Main *bmain, Scene * /*scene*/, PointerRNA *ptr) Object *ob; for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { if (BKE_key_from_object(ob) == key) { DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); diff --git a/source/blender/makesrna/intern/rna_lattice.cc b/source/blender/makesrna/intern/rna_lattice.cc index 20ebfc0eb20191ff8125746fe3e4a97e9c714abd..7b85a040d4a8ccb4f48d9025c5e88853d1848649 100644 --- a/source/blender/makesrna/intern/rna_lattice.cc +++ b/source/blender/makesrna/intern/rna_lattice.cc @@ -126,7 +126,8 @@ static void rna_Lattice_update_size(Main *bmain, Scene *scene, PointerRNA *ptr) /* #BKE_lattice_resize needs an object, any object will have the same result */ for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { if (ob->data == lt) { BKE_lattice_resize(lt, newu, newv, neww, ob); if (lt->editlatt) { diff --git a/source/blender/makesrna/intern/rna_mask.cc b/source/blender/makesrna/intern/rna_mask.cc index 070e9c92d5d76a0a0004155faa8672df3ff35392..3eb0ac8c73cbda7be0c9381d905ebfdbf0651107 100644 --- a/source/blender/makesrna/intern/rna_mask.cc +++ b/source/blender/makesrna/intern/rna_mask.cc @@ -317,7 +317,8 @@ static MaskSpline *mask_spline_from_point(Mask *mask, MaskSplinePoint *point) { MaskSpline *spline; for (spline = static_cast<MaskSpline *>(mask_layer->splines.first); spline; - spline = spline->next) { + spline = spline->next) + { if (point >= spline->points && point < spline->points + spline->tot_point) { return spline; } diff --git a/source/blender/makesrna/intern/rna_mesh_utils.hh b/source/blender/makesrna/intern/rna_mesh_utils.hh index 00329d2aa5d9b1d8d14f2f139b538650c865fcd1..e2b867d0035775268e2062c5daf211b547a2f90d 100644 --- a/source/blender/makesrna/intern/rna_mesh_utils.hh +++ b/source/blender/makesrna/intern/rna_mesh_utils.hh @@ -86,7 +86,8 @@ CustomDataLayer *layer; \ int layer_index = CustomData_get_layer_index(data, layer_type); \ for (layer = data->layers + layer_index, a = 0; layer_index + a < data->totlayer; \ - layer++, a++) { \ + layer++, a++) \ + { \ if (value.data == layer) { \ CustomData_set_layer_##active_type(data, layer_type, a); \ BKE_mesh_tessface_clear(mesh); \ diff --git a/source/blender/makesrna/intern/rna_node_socket.cc b/source/blender/makesrna/intern/rna_node_socket.cc index f30d5b045f2f2865515ef3a575f36792ade778b2..cbe25a863f2c1d87782e331e123bb4db749b3d1d 100644 --- a/source/blender/makesrna/intern/rna_node_socket.cc +++ b/source/blender/makesrna/intern/rna_node_socket.cc @@ -178,7 +178,7 @@ static StructRNA *rna_NodeSocket_register(Main * /*bmain*/, nodeRegisterSocketType(st); } - st->free_self = (void (*)(bNodeSocketType * stype)) MEM_freeN; + st->free_self = (void (*)(bNodeSocketType *stype))MEM_freeN; /* if RNA type is already registered, unregister first */ if (st->ext_socket.srna) { diff --git a/source/blender/makesrna/intern/rna_node_tree_interface.cc b/source/blender/makesrna/intern/rna_node_tree_interface.cc index a8eeccda92f3a11c3b41d1134b1d0be3096088ad..4ac8edfe4bc02be12c0c189aeeac439e392c2435 100644 --- a/source/blender/makesrna/intern/rna_node_tree_interface.cc +++ b/source/blender/makesrna/intern/rna_node_tree_interface.cc @@ -275,7 +275,7 @@ static StructRNA *rna_NodeTreeInterfaceSocket_register(Main * /*bmain*/, nodeRegisterSocketType(st); } - st->free_self = (void (*)(bNodeSocketType * stype)) MEM_freeN; + st->free_self = (void (*)(bNodeSocketType *stype))MEM_freeN; /* if RNA type is already registered, unregister first */ if (st->ext_interface.srna) { @@ -689,7 +689,8 @@ static const EnumPropertyItem *rna_subtype_filter_itemf(const blender::Set<int> EnumPropertyItem *items = nullptr; int items_count = 0; for (const EnumPropertyItem *item = rna_enum_property_subtype_items; item->name != nullptr; - item++) { + item++) + { if (subtypes.contains(item->value)) { RNA_enum_item_add(&items, &items_count, item); } diff --git a/source/blender/makesrna/intern/rna_rna.cc b/source/blender/makesrna/intern/rna_rna.cc index 4cc560904ab496c252aa2ccc6fedbcd4d9dc19d8..46ccfeb4d08861d34e2d0e3aef30618bdb7b8935 100644 --- a/source/blender/makesrna/intern/rna_rna.cc +++ b/source/blender/makesrna/intern/rna_rna.cc @@ -305,7 +305,8 @@ static int rna_idproperty_known(CollectionPropertyIterator *iter, void *data) for (prop = static_cast<PropertyRNA *>(ptype->cont.properties.first); prop; prop = prop->next) { if ((prop->flag_internal & PROP_INTERN_BUILTIN) == 0 && - STREQ(prop->identifier, idprop->name)) { + STREQ(prop->identifier, idprop->name)) + { return 1; } } @@ -1545,11 +1546,13 @@ static void rna_property_override_diff_propptr(Main *bmain, id_a->name); } else if (id_a->override_library != nullptr && - id_a->override_library->reference == id_b) { + id_a->override_library->reference == id_b) + { opop->flag |= LIBOVERRIDE_OP_FLAG_IDPOINTER_MATCH_REFERENCE; } else if (id_b->override_library != nullptr && - id_b->override_library->reference == id_a) { + id_b->override_library->reference == id_a) + { opop->flag |= LIBOVERRIDE_OP_FLAG_IDPOINTER_MATCH_REFERENCE; } else { @@ -1573,7 +1576,8 @@ static void rna_property_override_diff_propptr(Main *bmain, * Note that we do not need the RNA path for insertion operations. */ if (rna_path) { if ((rna_itemname_a && !rna_itemname_a->empty()) && - (rna_itemname_b && !rna_itemname_b->empty())) { + (rna_itemname_b && !rna_itemname_b->empty())) + { BLI_assert(*rna_itemname_a == *rna_itemname_b); char esc_item_name[RNA_PATH_BUFFSIZE]; diff --git a/source/blender/makesrna/intern/rna_space.cc b/source/blender/makesrna/intern/rna_space.cc index e1171e281a8e1a7e1bf635ddf7979470172c884d..0c02def86040bca592ab18bb314159d22e835d57 100644 --- a/source/blender/makesrna/intern/rna_space.cc +++ b/source/blender/makesrna/intern/rna_space.cc @@ -1527,7 +1527,8 @@ static void rna_3DViewShading_render_pass_set(PointerRNA *ptr, int value) STRNCPY(shading->aov_name, aov->name); } else if (value == EEVEE_RENDER_PASS_BLOOM && - ((scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED) == 0)) { + ((scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED) == 0)) + { shading->render_pass = EEVEE_RENDER_PASS_COMBINED; } else { diff --git a/source/blender/makesrna/intern/rna_userdef.cc b/source/blender/makesrna/intern/rna_userdef.cc index 21274e5be61b9fcd0c21c9ef8a3e6a0cbda1bd92..5daa118e21fd576a0e7c352caef75cab318061f9 100644 --- a/source/blender/makesrna/intern/rna_userdef.cc +++ b/source/blender/makesrna/intern/rna_userdef.cc @@ -697,7 +697,8 @@ static void rna_UserDef_subdivision_update(Main *bmain, Scene *scene, PointerRNA Object *ob; for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { if (BKE_object_get_last_subsurf_modifier(ob) != nullptr) { DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } @@ -736,7 +737,8 @@ static void rna_UserDef_weight_color_update(Main *bmain, Scene *scene, PointerRN Object *ob; for (ob = static_cast<Object *>(bmain->objects.first); ob; - ob = static_cast<Object *>(ob->id.next)) { + ob = static_cast<Object *>(ob->id.next)) + { if (ob->mode & OB_MODE_WEIGHT_PAINT) { DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } diff --git a/source/blender/modifiers/intern/MOD_array.cc b/source/blender/modifiers/intern/MOD_array.cc index 558287f129e8cab2bd24bb5bf2dd027b20503448..11acf3a911090eb19fa3887d4114d1189c9c1c4c 100644 --- a/source/blender/modifiers/intern/MOD_array.cc +++ b/source/blender/modifiers/intern/MOD_array.cc @@ -249,7 +249,8 @@ static void dm_mvert_map_doubles(int *doubles_map, * But if other potential targets are farther, * then there will be no mapping at all for this source. */ while (best_target_vertex != -1 && - !ELEM(doubles_map[best_target_vertex], -1, best_target_vertex)) { + !ELEM(doubles_map[best_target_vertex], -1, best_target_vertex)) + { if (compare_len_v3v3(vert_positions[sve_source->vertex_num], vert_positions[doubles_map[best_target_vertex]], dist)) diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.cc b/source/blender/modifiers/intern/MOD_correctivesmooth.cc index 71f9980e19691a51e7d795b82000d3b85974352e..bb1de16434565dcfb2218d6a81b11a96077feb73 100644 --- a/source/blender/modifiers/intern/MOD_correctivesmooth.cc +++ b/source/blender/modifiers/intern/MOD_correctivesmooth.cc @@ -610,7 +610,8 @@ static void correctivesmooth_modifier_do(ModifierData *md, } if ((csmd->rest_source == MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND) && - (csmd->bind_coords == nullptr)) { + (csmd->bind_coords == nullptr)) + { BKE_modifier_set_error(ob, md, "Bind data required"); goto error; } diff --git a/source/blender/modifiers/intern/MOD_laplaciansmooth.cc b/source/blender/modifiers/intern/MOD_laplaciansmooth.cc index dcbdd1e826867646ccb5f32e8b66bae09d9714a5..e9aae4da3dc976cf8dab67a789b18372e76201b8 100644 --- a/source/blender/modifiers/intern/MOD_laplaciansmooth.cc +++ b/source/blender/modifiers/intern/MOD_laplaciansmooth.cc @@ -234,7 +234,8 @@ static void init_laplacian_matrix(LaplacianSystem *sys) idv2 = sys->edges[i][1]; /* if is boundary, apply scale-dependent umbrella operator only with neighbors in boundary */ if (sys->ne_ed_num[idv1] != sys->ne_fa_num[idv1] && - sys->ne_ed_num[idv2] != sys->ne_fa_num[idv2]) { + sys->ne_ed_num[idv2] != sys->ne_fa_num[idv2]) + { sys->vlengths[idv1] += sys->eweights[i]; sys->vlengths[idv2] += sys->eweights[i]; } diff --git a/source/blender/modifiers/intern/MOD_mask.cc b/source/blender/modifiers/intern/MOD_mask.cc index 6a80ce0e62b7f17222e654130a9c86787b6823bd..f607f86c642c161b45e8c6ab6060a3bf3dd0140c 100644 --- a/source/blender/modifiers/intern/MOD_mask.cc +++ b/source/blender/modifiers/intern/MOD_mask.cc @@ -498,7 +498,8 @@ static void add_interpolated_faces_to_new_mesh(const Mesh &src_mesh, int sub_face_index = 0; int last_i_src = -1; for (const int i_dst : - IndexRange(faces_masked_num, masked_face_indices.size() - faces_masked_num)) { + IndexRange(faces_masked_num, masked_face_indices.size() - faces_masked_num)) + { const int i_src = masked_face_indices[i_dst]; if (i_src == last_i_src) { sub_face_index++; diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc index 2fbf121f71ada6f4d32a0d834d86116172c2c749..ddbbf0b4e95e4d8e9b69d56bd3e8be803cb84b29 100644 --- a/source/blender/modifiers/intern/MOD_nodes.cc +++ b/source/blender/modifiers/intern/MOD_nodes.cc @@ -1018,7 +1018,8 @@ class NodesModifierSimulationParams : public nodes::GeoNodesSimulationParams { node_cache.reset(); } if (!node_cache.bake.frames.is_empty() && - current_frame_ < node_cache.bake.frames.first()->frame) { + current_frame_ < node_cache.bake.frames.first()->frame) + { node_cache.reset(); } } diff --git a/source/blender/modifiers/intern/MOD_solidify_nonmanifold.cc b/source/blender/modifiers/intern/MOD_solidify_nonmanifold.cc index 1ced78688eda6201788f69c08d27e8344e3696cd..d1feced3176decffd15d501dcff5462f658fff28 100644 --- a/source/blender/modifiers/intern/MOD_solidify_nonmanifold.cc +++ b/source/blender/modifiers/intern/MOD_solidify_nonmanifold.cc @@ -668,7 +668,8 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md, /* Find index of e in #adj_faces. */ for (face_index = 0; face_index < faces_len && e_adj_faces_faces[face_index] != face; - face_index++) { + face_index++) + { /* Pass. */ } /* If not found. */ @@ -1017,7 +1018,8 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md, else if (eg_index >= 0) { NewEdgeRef **edge_ptr = unassigned_edges; for (found_edge_index = 0; found_edge_index < unassigned_edges_len; - found_edge_index++, edge_ptr++) { + found_edge_index++, edge_ptr++) + { if (*edge_ptr) { NewEdgeRef *edge = *edge_ptr; if (edge->faces[0] == eg_track_faces[1]) { @@ -1087,7 +1089,8 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md, found_edge; edge_groups[eg_index].edges_len++; if (edge_groups[eg_index].edges[edge_groups[eg_index].edges_len - 1]->faces[1] != - nullptr) { + nullptr) + { last_open_edge_track = nullptr; } if (edge_groups[eg_index].edges_len > 3) { @@ -1688,14 +1691,16 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md, } if (smd->nonmanifold_offset_mode == - MOD_SOLIDIFY_NONMANIFOLD_OFFSET_MODE_EVEN) { + MOD_SOLIDIFY_NONMANIFOLD_OFFSET_MODE_EVEN) + { int corner_next = face->face.start(); int corner = corner_next + (face->face.size() - 1); int corner_prev = corner - 1; for (int m = 0; m < face->face.size() && vm[orig_corner_verts[corner]] != i; - m++, corner_next++) { + m++, corner_next++) + { corner_prev = corner; corner = corner_next; } @@ -1953,7 +1958,8 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md, if (*new_edges && (do_shell || edge_adj_faces_len[i] == 1) && (**new_edges)->old_edge == i) { for (NewEdgeRef **l = *new_edges; *l; l++) { if ((*l)->link_edge_groups[0]->is_singularity && - (*l)->link_edge_groups[1]->is_singularity) { + (*l)->link_edge_groups[1]->is_singularity) + { const uint v1 = (*l)->link_edge_groups[0]->new_vert; const uint v2 = (*l)->link_edge_groups[1]->new_vert; bool exists_already = false; @@ -2302,7 +2308,8 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md, /* Check both far ends in terms of faces of an edge group. */ if ((!src_material_index.is_empty() ? src_material_index[g3->edges[0]->faces[0]->index] : - 0) == l) { + 0) == l) + { face = g3->edges[0]->faces[0]->index; count++; } @@ -2395,7 +2402,8 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md, if (do_rim) { for (uint i = 0; i < edges_num; i++) { if (edge_adj_faces_len[i] == 1 && orig_edge_data_arr[i] && - (*orig_edge_data_arr[i])->old_edge == i) { + (*orig_edge_data_arr[i])->old_edge == i) + { NewEdgeRef **new_edges = orig_edge_data_arr[i]; NewEdgeRef *edge1 = new_edges[0]; diff --git a/source/blender/modifiers/intern/MOD_volume_displace.cc b/source/blender/modifiers/intern/MOD_volume_displace.cc index dc4e9f814aa000ed61bf0552cd01dbea0031fae4..d1b98215bd5d13a48f6af2861875a4b58504b882 100644 --- a/source/blender/modifiers/intern/MOD_volume_displace.cc +++ b/source/blender/modifiers/intern/MOD_volume_displace.cc @@ -192,7 +192,8 @@ struct DisplaceGridOp { template<typename GridType> void operator()() { if constexpr (blender:: - is_same_any_v<GridType, openvdb::points::PointDataGrid, openvdb::MaskGrid>) { + is_same_any_v<GridType, openvdb::points::PointDataGrid, openvdb::MaskGrid>) + { /* We don't support displacing these grid types yet. */ return; } diff --git a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc index 0a81e15f067069a3c93d2c97d5e4c40495c80da2..1a1ee94965bca11d36a737c73aa3b4b98ba12132 100644 --- a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc +++ b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc @@ -139,7 +139,8 @@ static Mesh *modify_mesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh return create_empty_mesh(input_mesh); } if (vmmd->resolution_mode == VOLUME_TO_MESH_RESOLUTION_MODE_VOXEL_SIZE && - vmmd->voxel_size == 0.0f) { + vmmd->voxel_size == 0.0f) + { return create_empty_mesh(input_mesh); } if (vmmd->resolution_mode == VOLUME_TO_MESH_RESOLUTION_MODE_VOXEL_AMOUNT && diff --git a/source/blender/modifiers/intern/MOD_weighted_normal.cc b/source/blender/modifiers/intern/MOD_weighted_normal.cc index 4be2e906b20c2f7c008b9f798b45c06d0257d431..535ddc134cf5dd713bc2049e5858eb0632744094 100644 --- a/source/blender/modifiers/intern/MOD_weighted_normal.cc +++ b/source/blender/modifiers/intern/MOD_weighted_normal.cc @@ -149,7 +149,8 @@ static void aggregate_item_normal(WeightedNormalModifierData *wnmd, BKE_defvert_find_index(&dvert[mv_index], defgrp_index) != nullptr; if (has_vgroup && - ((vert_of_group && use_invert_vgroup) || (!vert_of_group && !use_invert_vgroup))) { + ((vert_of_group && use_invert_vgroup) || (!vert_of_group && !use_invert_vgroup))) + { return; } diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.cc b/source/blender/modifiers/intern/MOD_weightvgproximity.cc index e15cee767e449409389079a5a529343899e9635c..bc78da65d32d1f1ac5817e1f79df9d5d4adfc039 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.cc +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.cc @@ -57,7 +57,7 @@ #include "MOD_util.hh" #include "MOD_weightvg_util.hh" -//#define USE_TIMEIT +// #define USE_TIMEIT #ifdef USE_TIMEIT # include "PIL_time.h" @@ -386,7 +386,8 @@ static void update_depsgraph(ModifierData *md, const ModifierUpdateDepsgraphCont DEG_add_object_relation( ctx->node, wmd->proximity_ob_target, DEG_OB_COMP_TRANSFORM, "WeightVGProximity Modifier"); if (wmd->proximity_ob_target->data != nullptr && - wmd->proximity_mode == MOD_WVG_PROXIMITY_GEOMETRY) { + wmd->proximity_mode == MOD_WVG_PROXIMITY_GEOMETRY) + { DEG_add_object_relation( ctx->node, wmd->proximity_ob_target, DEG_OB_COMP_GEOMETRY, "WeightVGProximity Modifier"); } diff --git a/source/blender/nodes/NOD_geometry_nodes_lazy_function.hh b/source/blender/nodes/NOD_geometry_nodes_lazy_function.hh index e8c1eff5239ced0d1311cfc14e7d661a3c351a3a..1a11cda6d970c38bb2fdf88ac91f9cce4fd29c9a 100644 --- a/source/blender/nodes/NOD_geometry_nodes_lazy_function.hh +++ b/source/blender/nodes/NOD_geometry_nodes_lazy_function.hh @@ -49,8 +49,7 @@ namespace sim_input { * The data is just passed through the node. Data that is incompatible with simulations (like * anonymous attributes), is removed though. */ -struct PassThrough { -}; +struct PassThrough {}; /** * The input is not evaluated, instead the values provided here are output by the node. @@ -80,8 +79,7 @@ namespace sim_output { * Output the data that comes from the corresponding simulation input node, ignoring the nodes in * the zone. */ -struct PassThrough { -}; +struct PassThrough {}; /** * Computes the simulation step and calls the given function to cache the new simulation state. diff --git a/source/blender/nodes/NOD_socket_declarations.hh b/source/blender/nodes/NOD_socket_declarations.hh index d618f8534d17c85506fe683e14b157ec1d02bd0d..2ceeded54b885d9c330d4398041b2e9f0222eb2c 100644 --- a/source/blender/nodes/NOD_socket_declarations.hh +++ b/source/blender/nodes/NOD_socket_declarations.hh @@ -246,8 +246,7 @@ class Shader : public SocketDeclaration { bool can_connect(const bNodeSocket &socket) const override; }; -class ShaderBuilder : public SocketDeclarationBuilder<Shader> { -}; +class ShaderBuilder : public SocketDeclarationBuilder<Shader> {}; class ExtendBuilder; @@ -264,8 +263,7 @@ class Extend : public SocketDeclaration { bool can_connect(const bNodeSocket &socket) const override; }; -class ExtendBuilder : public SocketDeclarationBuilder<Extend> { -}; +class ExtendBuilder : public SocketDeclarationBuilder<Extend> {}; class Custom : public SocketDeclaration { public: diff --git a/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc b/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc index db5342d239a1179a59d940c355aa761c6a3b271e..92b74f1edd9d3597f534368cb4ba95c3eae414fe 100644 --- a/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc +++ b/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc @@ -528,7 +528,8 @@ class CryptoMatteOperation : public NodeOperation { * unnamed, that is, in the case of mono rendering, in which case we just return the first * view. */ if (!context().get_view_name().is_empty() && - context().get_view_name() != render_pass->view) { + context().get_view_name() != render_pass->view) + { continue; } diff --git a/source/blender/nodes/composite/nodes/node_composite_displace.cc b/source/blender/nodes/composite/nodes/node_composite_displace.cc index 61a94f47b08f5682f3ee9972f81d3f171b1c3876..008d247f2ca51ac72c1d3b7b01ad9768ca8e271c 100644 --- a/source/blender/nodes/composite/nodes/node_composite_displace.cc +++ b/source/blender/nodes/composite/nodes/node_composite_displace.cc @@ -97,7 +97,8 @@ class DisplaceOperation : public NodeOperation { const Result &input_displacement = get_input("Vector"); if (input_displacement.is_single_value() && - math::is_zero(input_displacement.get_vector_value())) { + math::is_zero(input_displacement.get_vector_value())) + { return true; } diff --git a/source/blender/nodes/composite/nodes/node_composite_image.cc b/source/blender/nodes/composite/nodes/node_composite_image.cc index 9a2bbabbda544c8c2abf8bd063c858ffa91aa9e1..44b2d97f8b2133a0db6f1518d007a632d062946b 100644 --- a/source/blender/nodes/composite/nodes/node_composite_image.cc +++ b/source/blender/nodes/composite/nodes/node_composite_image.cc @@ -565,7 +565,8 @@ static void node_composit_init_rlayers(const bContext *C, PointerRNA *ptr) id_us_plus(node->id); for (bNodeSocket *sock = (bNodeSocket *)node->outputs.first; sock; - sock = sock->next, sock_index++) { + sock = sock->next, sock_index++) + { NodeImageLayer *sockdata = MEM_cnew<NodeImageLayer>(__func__); sock->storage = sockdata; diff --git a/source/blender/nodes/composite/nodes/node_composite_math.cc b/source/blender/nodes/composite/nodes/node_composite_math.cc index c2ac7a3bcb0e855c826c5e6f165b3f3399c92d87..7b9a0b805a60dbefd47be55adf83720c8c699189 100644 --- a/source/blender/nodes/composite/nodes/node_composite_math.cc +++ b/source/blender/nodes/composite/nodes/node_composite_math.cc @@ -58,7 +58,8 @@ static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms) const int weight = ELEM(params.other_socket().type, SOCK_FLOAT) ? 0 : -1; for (const EnumPropertyItem *item = rna_enum_node_math_items; item->identifier != nullptr; - item++) { + item++) + { if (item->name != nullptr && item->identifier[0] != '\0') { params.add_item(CTX_IFACE_(BLT_I18NCONTEXT_ID_NODETREE, item->name), SocketSearchOp{"Value", (NodeMathOperation)item->value}, diff --git a/source/blender/nodes/composite/nodes/node_composite_mixrgb.cc b/source/blender/nodes/composite/nodes/node_composite_mixrgb.cc index 7bca008c950f6b53da212f195a0eed5af658a72c..71280f20735c1a7f0b03affa7d77589d933f7988 100644 --- a/source/blender/nodes/composite/nodes/node_composite_mixrgb.cc +++ b/source/blender/nodes/composite/nodes/node_composite_mixrgb.cc @@ -58,7 +58,8 @@ static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms) const int weight = ELEM(params.other_socket().type, SOCK_RGBA) ? 0 : -1; for (const EnumPropertyItem *item = rna_enum_ramp_blend_items; item->identifier != nullptr; - item++) { + item++) + { if (item->name != nullptr && item->identifier[0] != '\0') { params.add_item(IFACE_(item->name), SocketSearchOp{"Image", item->value}, weight); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc index fcce7f433bb212c0c89f17026c6f21988ba950cf..b1937a436631808b3c27df835fc1d306ac81f9c7 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc @@ -132,7 +132,8 @@ static void node_geo_exec(GeoNodeExecParams params) } case GeometryComponent::Type::GreasePencil: { if (const GreasePencilComponent *component = - geometry_set.get_component<GreasePencilComponent>()) { + geometry_set.get_component<GreasePencilComponent>()) + { const AttributeAccessor attributes = *component->attributes(); params.set_output("Layer Count", attributes.domain_size(AttrDomain::Layer)); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_bake.cc b/source/blender/nodes/geometry/nodes/node_geo_bake.cc index 48a06dbddebc4dc746d7520a4e52b45603ad42b0..d3cb87c5bbe6592b151d93201b322735aa387676 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_bake.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_bake.cc @@ -210,7 +210,8 @@ class LazyFunctionForBakeNode final : public LazyFunction { } else if (auto *info = std::get_if<sim_output::ReadError>(behavior)) { if (geo_eval_log::GeoTreeLogger *tree_logger = local_user_data.try_get_tree_logger( - user_data)) { + user_data)) + { tree_logger->node_warnings.append( {node_.identifier, {NodeWarningType::Error, info->message}}); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc index f3121eb85e4987c4cd53d22b72c8a59dae29ee69..f177167f2c6309b3d1ed956188baeed5270c7b76 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc @@ -95,7 +95,8 @@ class EndpointFieldInput final : public bke::CurvesFieldInput { bool is_equal_to(const fn::FieldNode &other) const override { if (const EndpointFieldInput *other_endpoint = dynamic_cast<const EndpointFieldInput *>( - &other)) { + &other)) + { return start_size_ == other_endpoint->start_size_ && end_size_ == other_endpoint->end_size_; } return false; diff --git a/source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc b/source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc index 3896ccca9861b1de3ba7d4aa9f3f508fd4f0ae96..a186cbf6baf6278870577c62b004d345684d225c 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc @@ -167,7 +167,8 @@ static void add_instances_from_component( if (!dst_attributes.contains(id)) { if (src.varray.size() == dst_component.instances_num() && src.sharing_info && - src.varray.is_span()) { + src.varray.is_span()) + { const bke::AttributeInitShared init(src.varray.get_internal_span().data(), *src.sharing_info); dst_attributes.add(id, AttrDomain::Instance, data_type, init); diff --git a/source/blender/nodes/geometry/nodes/node_geo_interpolate_curves.cc b/source/blender/nodes/geometry/nodes/node_geo_interpolate_curves.cc index 1b2269e1841a25ed7ee2037ee652206570200569..0db334ca56e8f99610b505bfa2748e2edf1e7dab 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_interpolate_curves.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_interpolate_curves.cc @@ -867,7 +867,8 @@ static void node_geo_exec(GeoNodeExecParams params) GeometryComponentEditData::remember_deformed_positions_if_necessary(guide_curves_geometry); if (const auto *curve_edit_data = - guide_curves_geometry.get_component<GeometryComponentEditData>()) { + guide_curves_geometry.get_component<GeometryComponentEditData>()) + { new_curves.add(*curve_edit_data); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_face_group_boundaries.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_face_group_boundaries.cc index c69d3c29569a667d9dfc082901ba254f63efc026..c20cdfbd0a45eb617bb19fc543153c06b247e2a8 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_face_group_boundaries.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_face_group_boundaries.cc @@ -87,7 +87,8 @@ class BoundaryFieldInput final : public bke::MeshFieldInput { break; } if (edge_state.compare_exchange_weak( - edge_state_value, is_boundary, std::memory_order_release)) { + edge_state_value, is_boundary, std::memory_order_release)) + { boundary[edge_i] = true; break; } diff --git a/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc b/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc index e085bfd53241fc714883b7412f17aed23a12e98d..9457a591b204c5afabd0c1f023495ea3087fcc1d 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc @@ -798,7 +798,8 @@ static void node_layout_ex(uiLayout *layout, bContext *C, PointerRNA *ptr) { const bke::bake::SimulationNodeCache &node_cache = **node_cache_ptr; if (node_cache.cache_status == bke::bake::CacheStatus::Baked && - !node_cache.bake.frames.is_empty()) { + !node_cache.bake.frames.is_empty()) + { const int first_frame = node_cache.bake.frames.first()->frame.frame(); const int last_frame = node_cache.bake.frames.last()->frame.frame(); baked_range = IndexRange(first_frame, last_frame - first_frame + 1); diff --git a/source/blender/nodes/geometry/nodes/node_geo_split_to_instances.cc b/source/blender/nodes/geometry/nodes/node_geo_split_to_instances.cc index 7a4f6f389facff26033233f6dff0de865004d52d..ff060f6b8f56bdca7dd86d2a6c51bf8812373557 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_split_to_instances.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_split_to_instances.cc @@ -295,7 +295,8 @@ static void node_geo_exec(GeoNodeExecParams params) Map<int, std::unique_ptr<GeometrySet>> geometry_by_group_id; if (src_geometry.has_mesh() && - ELEM(domain, AttrDomain::Point, AttrDomain::Edge, AttrDomain::Face)) { + ELEM(domain, AttrDomain::Point, AttrDomain::Edge, AttrDomain::Face)) + { const auto &component = *src_geometry.get_component<MeshComponent>(); split_mesh_groups(component, domain, diff --git a/source/blender/nodes/geometry/nodes/node_geo_transform_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_transform_geometry.cc index 33871ccf88f334e5f69e5ebde4d9a0bc9aa63192..7a9d353f600ff696846d34f9dfc808e219fa16d7 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_transform_geometry.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_transform_geometry.cc @@ -103,7 +103,8 @@ static void translate_greasepencil(GreasePencil &grease_pencil, const float3 tra using namespace blender::bke::greasepencil; for (const int layer_index : grease_pencil.layers().index_range()) { if (Drawing *drawing = get_eval_grease_pencil_layer_drawing_for_write(grease_pencil, - layer_index)) { + layer_index)) + { drawing->strokes_for_write().translate(translation); } } @@ -114,7 +115,8 @@ static void transform_greasepencil(GreasePencil &grease_pencil, const float4x4 & using namespace blender::bke::greasepencil; for (const int layer_index : grease_pencil.layers().index_range()) { if (Drawing *drawing = get_eval_grease_pencil_layer_drawing_for_write(grease_pencil, - layer_index)) { + layer_index)) + { drawing->strokes_for_write().transform(transform); } } diff --git a/source/blender/nodes/intern/geometry_nodes_lazy_function.cc b/source/blender/nodes/intern/geometry_nodes_lazy_function.cc index bbc803e8c84429f000b5b87a16f48b5221b72584..32a93b92b1eff3f70b884b362dee4ff353a6ce3f 100644 --- a/source/blender/nodes/intern/geometry_nodes_lazy_function.cc +++ b/source/blender/nodes/intern/geometry_nodes_lazy_function.cc @@ -775,7 +775,8 @@ class LazyFunctionForViewerNode : public LazyFunction { } const Span<const bNodeLink *> links = bsocket->directly_linked_links(); if (links.is_empty() || - bke::nodeIsDanglingReroute(&bnode.owner_tree(), links.first()->fromnode)) { + bke::nodeIsDanglingReroute(&bnode.owner_tree(), links.first()->fromnode)) + { use_field_input_ = false; inputs_.pop_last(); r_lf_index_by_bsocket[bsocket->index_in_tree()] = -1; @@ -1605,7 +1606,8 @@ class LazyFunctionForRepeatZone : public LazyFunction { zone_info.indices.outputs.main = outputs_.index_range(); for ([[maybe_unused]] const bNodeSocket *socket : - zone.input_node->input_sockets().drop_back(1)) { + zone.input_node->input_sockets().drop_back(1)) + { outputs_.append_as("Usage", CPPType::get<bool>()); } zone_info.indices.outputs.input_usages = outputs_.index_range().take_back( @@ -1700,7 +1702,8 @@ class LazyFunctionForRepeatZone : public LazyFunction { if (node_storage.inspection_index > 0) { if (node_storage.inspection_index >= iterations) { if (geo_eval_log::GeoTreeLogger *tree_logger = local_user_data.try_get_tree_logger( - user_data)) { + user_data)) + { tree_logger->node_warnings.append( {repeat_output_bnode_.identifier, {NodeWarningType::Info, N_("Inspection index is out of range")}}); @@ -1757,7 +1760,8 @@ class LazyFunctionForRepeatZone : public LazyFunction { lf_node.input(item.value)); } for (const auto item : - body_fn_.indices.inputs.attributes_by_caller_propagation_index.items()) { + body_fn_.indices.inputs.attributes_by_caller_propagation_index.items()) + { lf_graph.add_link( *lf_inputs[zone_info_.indices.inputs.attributes_by_caller_propagation_index.lookup( item.key)], @@ -2796,7 +2800,8 @@ struct GeometryNodesLazyFunctionBuilder { bits::foreach_1_index(required_fields, [&](const int field_source_index) { const auto &field_source = attribute_inferencing_.all_field_sources[field_source_index]; if (const auto *socket_field_source = std::get_if<aai::SocketFieldSource>( - &field_source.data)) { + &field_source.data)) + { if (&socket_field_source->socket->owner_node() == &geometry_output_bsocket.owner_node()) { return; @@ -2989,7 +2994,8 @@ struct GeometryNodesLazyFunctionBuilder { graph_params.lf_output_by_bsocket.add(&bsocket, &lf_output_socket); graph_params.socket_usage_inputs.add(&lf_usage_input); if (lf::OutputSocket *lf_usage = graph_params.usage_by_bsocket.lookup_default(&bsocket, - nullptr)) { + nullptr)) + { graph_params.lf_graph.add_link(*lf_usage, lf_usage_input); } else { @@ -3397,7 +3403,8 @@ struct GeometryNodesLazyFunctionBuilder { if (lf_input_index != -1) { lf::InputSocket &lf_input_socket = lf_node.input(lf_input_index); if (lf::OutputSocket *lf_usage = graph_params.usage_by_bsocket.lookup_default(bsocket, - nullptr)) { + nullptr)) + { graph_params.lf_graph.add_link(*lf_usage, lf_input_socket); } else { @@ -4129,7 +4136,8 @@ struct GeometryNodesLazyFunctionBuilder { bool broke_cycle = false; for (lf::Socket *lf_cycle_socket : cycle) { if (lf_cycle_socket->is_input() && - socket_usage_inputs.contains(&lf_cycle_socket->as_input())) { + socket_usage_inputs.contains(&lf_cycle_socket->as_input())) + { lf::InputSocket &lf_cycle_input_socket = lf_cycle_socket->as_input(); lf_graph.clear_origin(lf_cycle_input_socket); static const bool static_true = true; diff --git a/source/blender/nodes/intern/node_common.cc b/source/blender/nodes/intern/node_common.cc index 0652f8b8ba0991bfbccc2f3ffff9ba7b5fcdc5d6..ed2db5c111f12f4ca3275517ce49718052362a65 100644 --- a/source/blender/nodes/intern/node_common.cc +++ b/source/blender/nodes/intern/node_common.cc @@ -624,7 +624,8 @@ bool blender::bke::node_is_connected_to_output(const bNodeTree *ntree, const bNo for (const bNodeSocket *socket : next_node->output_sockets()) { for (const bNodeLink *link : socket->directly_linked_links()) { if (link->tonode->typeinfo->nclass == NODE_CLASS_OUTPUT && - link->tonode->flag & NODE_DO_OUTPUT) { + link->tonode->flag & NODE_DO_OUTPUT) + { return true; } nodes_to_check.push(link->tonode); diff --git a/source/blender/nodes/intern/node_socket.cc b/source/blender/nodes/intern/node_socket.cc index 1608b9999c4edca889cb6150c86f2a4047cb2cb8..996710a327d744e3a5f98c8cfd80c457a28952ba 100644 --- a/source/blender/nodes/intern/node_socket.cc +++ b/source/blender/nodes/intern/node_socket.cc @@ -856,7 +856,7 @@ static bNodeSocketType *make_standard_socket_type(int type, int subtype) StructRNA *srna; stype = MEM_cnew<bNodeSocketType>("node socket C type"); - stype->free_self = (void (*)(bNodeSocketType * stype)) MEM_freeN; + stype->free_self = (void (*)(bNodeSocketType *stype))MEM_freeN; STRNCPY(stype->idname, socket_idname); STRNCPY(stype->label, socket_label); STRNCPY(stype->subtype_label, socket_subtype_label); @@ -900,7 +900,7 @@ static bNodeSocketType *make_socket_type_virtual() StructRNA *srna; stype = MEM_cnew<bNodeSocketType>("node socket C type"); - stype->free_self = (void (*)(bNodeSocketType * stype)) MEM_freeN; + stype->free_self = (void (*)(bNodeSocketType *stype))MEM_freeN; STRNCPY(stype->idname, socket_idname); /* set the RNA type diff --git a/source/blender/nodes/shader/materialx/group_nodes.h b/source/blender/nodes/shader/materialx/group_nodes.h index 56e747464b3024236c61036c59c9a5b53e011fdc..1277436a94acd9bd6f2cfb35bf06486659f99ae6 100644 --- a/source/blender/nodes/shader/materialx/group_nodes.h +++ b/source/blender/nodes/shader/materialx/group_nodes.h @@ -8,7 +8,7 @@ /* TODO: #pxr::UsdMtlxRead() doesn't perform node-graphs. * Uncomment USE_MATERIALX_NODEGRAPH after fixing it. */ -//#define USE_MATERIALX_NODEGRAPH +// #define USE_MATERIALX_NODEGRAPH namespace blender::nodes::materialx { diff --git a/source/blender/nodes/shader/node_shader_tree.cc b/source/blender/nodes/shader/node_shader_tree.cc index 1c2c525169eb7880f52b4928a432f3a7ce13dab7..0205b0ce7dfb164108f5d52d3e4aa9b997fbe74b 100644 --- a/source/blender/nodes/shader/node_shader_tree.cc +++ b/source/blender/nodes/shader/node_shader_tree.cc @@ -567,7 +567,8 @@ static bool ntree_branch_count_and_tag_nodes(bNode *fromnode, bNode *tonode, voi iter->node_count++; } if (tonode->runtime->tmp_flag == -1 && - (iter->node_filter == nullptr || iter->node_filter(tonode))) { + (iter->node_filter == nullptr || iter->node_filter(tonode))) + { tonode->runtime->tmp_flag = iter->node_count; iter->node_count++; } diff --git a/source/blender/nodes/shader/nodes/node_shader_math.cc b/source/blender/nodes/shader/nodes/node_shader_math.cc index 437b830d6a3944ddd738873f8d1a936c31c8d42e..832304ace26bc64180062f30de45e64704210b8e 100644 --- a/source/blender/nodes/shader/nodes/node_shader_math.cc +++ b/source/blender/nodes/shader/nodes/node_shader_math.cc @@ -52,7 +52,8 @@ static void sh_node_math_gather_link_searches(GatherLinkSearchOpParams ¶ms) const int weight = ELEM(params.other_socket().type, SOCK_FLOAT, SOCK_BOOLEAN, SOCK_INT) ? 0 : -1; for (const EnumPropertyItem *item = rna_enum_node_math_items; item->identifier != nullptr; - item++) { + item++) + { if (item->name != nullptr && item->identifier[0] != '\0') { const int gn_weight = (is_geometry_node_tree && diff --git a/source/blender/nodes/shader/nodes/node_shader_mix.cc b/source/blender/nodes/shader/nodes/node_shader_mix.cc index 37d2a445302295f1a26fefdc8ccbaa4fc78ade70..6c56a82826e794fa2422090d5425da41efa7457e 100644 --- a/source/blender/nodes/shader/nodes/node_shader_mix.cc +++ b/source/blender/nodes/shader/nodes/node_shader_mix.cc @@ -258,7 +258,8 @@ static void node_mix_gather_link_searches(GatherLinkSearchOpParams ¶ms) } const std::string socket_name = params.in_out() == SOCK_IN ? "A" : "Result"; for (const EnumPropertyItem *item = rna_enum_ramp_blend_items; item->identifier != nullptr; - item++) { + item++) + { if (item->name != nullptr && item->identifier[0] != '\0') { params.add_item(IFACE_(item->name), SocketSearchOp{socket_name, item->value}, weight); } diff --git a/source/blender/nodes/texture/nodes/node_texture_common.cc b/source/blender/nodes/texture/nodes/node_texture_common.cc index d74caef9a9679c1cedf454a041296dec729edee7..31ac984d4bd8666b6dbb98e644ece00090999504 100644 --- a/source/blender/nodes/texture/nodes/node_texture_common.cc +++ b/source/blender/nodes/texture/nodes/node_texture_common.cc @@ -70,7 +70,8 @@ static void group_copy_inputs(bNode *gnode, bNodeStack **in, bNodeStack *gstack) LISTBASE_FOREACH (bNode *, node, &ngroup->nodes) { if (node->type == NODE_GROUP_INPUT) { for (sock = static_cast<bNodeSocket *>(node->outputs.first), a = 0; sock; - sock = sock->next, a++) { + sock = sock->next, a++) + { if (in[a]) { /* shouldn't need to check this #36694. */ ns = node_get_socket_stack(gstack, sock); if (ns) { diff --git a/source/blender/nodes/texture/nodes/node_texture_output.cc b/source/blender/nodes/texture/nodes/node_texture_output.cc index acece4e18ee9f7e9f210e938c1f8db001a1642af..3c4c4806ae2f262562a43d041b1ceb7468557bfa 100644 --- a/source/blender/nodes/texture/nodes/node_texture_output.cc +++ b/source/blender/nodes/texture/nodes/node_texture_output.cc @@ -65,7 +65,8 @@ static void unique_name(bNode *node) } for (; i; i = i->next) { if (i == node || i->type != TEX_NODE_OUTPUT || - !STREQ(name, ((TexNodeOutput *)(i->storage))->name)) { + !STREQ(name, ((TexNodeOutput *)(i->storage))->name)) + { continue; } diff --git a/source/blender/python/generic/idprop_py_api.cc b/source/blender/python/generic/idprop_py_api.cc index 01745568a4628bbe7d1b6222aaf37f0aeb9fc29c..db8c2c673fecf134fbd2f9e1ef01bf71f23b8701 100644 --- a/source/blender/python/generic/idprop_py_api.cc +++ b/source/blender/python/generic/idprop_py_api.cc @@ -1418,7 +1418,8 @@ PyObject *BPy_Wrap_GetValues(ID *id, IDProperty *prop) int i; for (i = 0, loop = static_cast<IDProperty *>(prop->data.group.first); loop; - loop = loop->next, i++) { + loop = loop->next, i++) + { PyList_SET_ITEM(list, i, BPy_IDGroup_WrapData(id, loop, prop)); } @@ -1439,7 +1440,8 @@ PyObject *BPy_Wrap_GetItems(ID *id, IDProperty *prop) int i; for (i = 0, loop = static_cast<IDProperty *>(prop->data.group.first); loop; - loop = loop->next, i++) { + loop = loop->next, i++) + { PyObject *item = PyTuple_New(2); PyTuple_SET_ITEMS( item, PyUnicode_FromString(loop->name), BPy_IDGroup_WrapData(id, loop, prop)); diff --git a/source/blender/python/gpu/gpu_py_element.cc b/source/blender/python/gpu/gpu_py_element.cc index 21c1e9eeb1a2709a877b926cc32640ef63e5236c..67b10e030ef77ba44effc2eef4c2a27f22bb8233 100644 --- a/source/blender/python/gpu/gpu_py_element.cc +++ b/source/blender/python/gpu/gpu_py_element.cc @@ -48,7 +48,8 @@ static PyObject *pygpu_IndexBuf__tp_new(PyTypeObject * /*type*/, PyObject *args, nullptr, }; if (!_PyArg_ParseTupleAndKeywordsFast( - args, kwds, &_parser, PyC_ParseStringEnum, &prim_type, &seq)) { + args, kwds, &_parser, PyC_ParseStringEnum, &prim_type, &seq)) + { return nullptr; } diff --git a/source/blender/python/gpu/gpu_py_framebuffer.cc b/source/blender/python/gpu/gpu_py_framebuffer.cc index 1ea1748c26f3d914892e557d34b191b69acf00eb..d224f79315b022a633e692553a998e004784d8fd 100644 --- a/source/blender/python/gpu/gpu_py_framebuffer.cc +++ b/source/blender/python/gpu/gpu_py_framebuffer.cc @@ -446,7 +446,8 @@ static PyObject *pygpu_framebuffer_clear(BPyGPUFrameBuffer *self, PyObject *args if (py_col && py_col != Py_None) { if (mathutils_array_parse(col, 3, 4, py_col, "GPUFrameBuffer.clear(), invalid 'color' arg") == - -1) { + -1) + { return nullptr; } buffers |= GPU_COLOR_BIT; diff --git a/source/blender/python/gpu/gpu_py_shader.cc b/source/blender/python/gpu/gpu_py_shader.cc index 43a5a006e69d7f9f6bc688f13928b631ae3027ca..433324241171216b8116250a9ac6781f1c2829e5 100644 --- a/source/blender/python/gpu/gpu_py_shader.cc +++ b/source/blender/python/gpu/gpu_py_shader.cc @@ -271,7 +271,8 @@ static PyObject *pygpu_shader_uniform_vector_float(BPyGPUShader *self, PyObject Py_buffer pybuffer; if (!pygpu_shader_uniform_vector_impl( - args, sizeof(float), &location, &length, &count, &pybuffer)) { + args, sizeof(float), &location, &length, &count, &pybuffer)) + { return nullptr; } @@ -594,7 +595,8 @@ static PyObject *pygpu_shader_uniform_block(BPyGPUShader *self, PyObject *args) const char *name; BPyGPUUniformBuf *py_ubo; if (!PyArg_ParseTuple( - args, "sO!:GPUShader.uniform_block", &name, &BPyGPUUniformBuf_Type, &py_ubo)) { + args, "sO!:GPUShader.uniform_block", &name, &BPyGPUUniformBuf_Type, &py_ubo)) + { return nullptr; } diff --git a/source/blender/python/gpu/gpu_py_shader_create_info.cc b/source/blender/python/gpu/gpu_py_shader_create_info.cc index de424477e06d01e8c9be8747a0745e2a3c4089dc..689542632ba597ae0a58fa56e0f1b4dabf6ffbfe 100644 --- a/source/blender/python/gpu/gpu_py_shader_create_info.cc +++ b/source/blender/python/gpu/gpu_py_shader_create_info.cc @@ -757,7 +757,8 @@ static PyObject *pygpu_shader_info_sampler(BPyGPUShaderCreateInfo *self, PyObjec const char *name; if (!PyArg_ParseTuple( - args, "iO&s:sampler", &slot, PyC_ParseStringEnum, &pygpu_samplertype, &name)) { + args, "iO&s:sampler", &slot, PyC_ParseStringEnum, &pygpu_samplertype, &name)) + { return nullptr; } diff --git a/source/blender/python/intern/bpy_app_timers.cc b/source/blender/python/intern/bpy_app_timers.cc index 6fc2e8216ba2373408ac14d10091a05f1d54c270..decd0a838ecc57a2f7ce834ed4e4677bd2eff521 100644 --- a/source/blender/python/intern/bpy_app_timers.cc +++ b/source/blender/python/intern/bpy_app_timers.cc @@ -107,7 +107,8 @@ static PyObject *bpy_app_timers_register(PyObject * /*self*/, PyObject *args, Py nullptr, }; if (!_PyArg_ParseTupleAndKeywordsFast( - args, kw, &_parser, &function, &first_interval, &persistent)) { + args, kw, &_parser, &function, &first_interval, &persistent)) + { return nullptr; } diff --git a/source/blender/python/intern/bpy_app_translations.cc b/source/blender/python/intern/bpy_app_translations.cc index 6943f495594520d6e9b3df09ec2a34f7daf283da..eb74714d6111e72e4c4d71beec4b296e22b6e25e 100644 --- a/source/blender/python/intern/bpy_app_translations.cc +++ b/source/blender/python/intern/bpy_app_translations.cc @@ -859,7 +859,8 @@ PyObject *BPY_app_translations_struct() /* We really populate the contexts' fields here! */ for (ctxt = _contexts, desc = app_translations_contexts_desc.fields; ctxt->c_id; - ctxt++, desc++) { + ctxt++, desc++) + { desc->name = ctxt->py_id; desc->doc = nullptr; } diff --git a/source/blender/python/intern/bpy_driver.cc b/source/blender/python/intern/bpy_driver.cc index ad039a162bfb5fc796e3148ab9607399ae862580..615f957893e0e45c1631880a753bf26d4ae0003b 100644 --- a/source/blender/python/intern/bpy_driver.cc +++ b/source/blender/python/intern/bpy_driver.cc @@ -689,7 +689,8 @@ float BPY_driver_exec(PathResolvedRNA *anim_rna, PyTuple_SET_ITEM(((PyObject *)driver_orig->expr_comp), 1, expr_vars); for (dvar = static_cast<DriverVar *>(driver_orig->variables.first), i = 0; dvar; - dvar = dvar->next) { + dvar = dvar->next) + { PyTuple_SET_ITEM(expr_vars, i++, PyUnicode_FromString(dvar->name)); } diff --git a/source/blender/python/intern/bpy_library_write.cc b/source/blender/python/intern/bpy_library_write.cc index 84e988f6ff0ce9f7cd58aa5bcd6255c6a0611ac7..3888432d07fa4ef383a198f99d3f6b4d4063c81d 100644 --- a/source/blender/python/intern/bpy_library_write.cc +++ b/source/blender/python/intern/bpy_library_write.cc @@ -135,7 +135,7 @@ static PyObject *bpy_lib_write(BPy_PropertyRNA *self, PyObject *args, PyObject * /* original values */ short id_flag; short id_us; - } * id_store_array, *id_store; + } *id_store_array, *id_store; int id_store_len = 0; PyObject *ret; diff --git a/source/blender/python/intern/bpy_rna_gizmo.cc b/source/blender/python/intern/bpy_rna_gizmo.cc index 4a737f21aaf865d041a176e44b3e00b87ea026d7..67fce3c6a1824fde63a6631210e988c3d457a18c 100644 --- a/source/blender/python/intern/bpy_rna_gizmo.cc +++ b/source/blender/python/intern/bpy_rna_gizmo.cc @@ -276,7 +276,8 @@ static void py_rna_gizmo_handler_range_get_cb(const wmGizmo * /*gz*/, float range[2]; for (int i = 0; i < 2; i++) { if (((range[i] = PyFloat_AsDouble(PyTuple_GET_ITEM(ret, i))) == -1.0f && PyErr_Occurred()) == - 0) { + 0) + { /* pass */ } else { diff --git a/source/blender/python/mathutils/mathutils_bvhtree.cc b/source/blender/python/mathutils/mathutils_bvhtree.cc index 48ad5f7fce6b6b1e93885cd95e084976cddebd81..6df910d31d07eba8ca56e84079cc21b098b0e55e 100644 --- a/source/blender/python/mathutils/mathutils_bvhtree.cc +++ b/source/blender/python/mathutils/mathutils_bvhtree.cc @@ -359,7 +359,8 @@ static PyObject *py_bvhtree_ray_cast(PyBVHTree *self, PyObject *args) /* may fail if the mesh has no faces, in that case the ray-cast misses */ if (self->tree) { if (BLI_bvhtree_ray_cast(self->tree, co, direction, 0.0f, &hit, py_bvhtree_raycast_cb, self) != - -1) { + -1) + { return py_bvhtree_raycast_to_py(&hit); } } @@ -403,7 +404,8 @@ static PyObject *py_bvhtree_find_nearest(PyBVHTree *self, PyObject *args) /* may fail if the mesh has no faces, in that case the ray-cast misses */ if (self->tree) { if (BLI_bvhtree_find_nearest(self->tree, co, &nearest, py_bvhtree_nearest_point_cb, self) != - -1) { + -1) + { return py_bvhtree_nearest_to_py(&nearest); } } diff --git a/source/blender/python/mathutils/mathutils_kdtree.cc b/source/blender/python/mathutils/mathutils_kdtree.cc index d1ff41a069a1ba436c534316ee8c7629927da691..24bd3a968b50554290a0455d9e9f7911e2745342 100644 --- a/source/blender/python/mathutils/mathutils_kdtree.cc +++ b/source/blender/python/mathutils/mathutils_kdtree.cc @@ -211,7 +211,8 @@ static PyObject *py_kdtree_find(PyKDTree *self, PyObject *args, PyObject *kwargs const char *keywords[] = {"co", "filter", nullptr}; if (!PyArg_ParseTupleAndKeywords( - args, kwargs, "O|$O:find", (char **)keywords, &py_co, &py_filter)) { + args, kwargs, "O|$O:find", (char **)keywords, &py_co, &py_filter)) + { return nullptr; } diff --git a/source/blender/python/mathutils/mathutils_noise.cc b/source/blender/python/mathutils/mathutils_noise.cc index f901d1984033912d5184b9c0e1a796b53d3d73bf..395341f42eaee15302f562c8425d4f265135c576 100644 --- a/source/blender/python/mathutils/mathutils_noise.cc +++ b/source/blender/python/mathutils/mathutils_noise.cc @@ -50,8 +50,8 @@ #define MATRIX_A 0x9908b0dfUL /* constant vector a */ #define UMASK 0x80000000UL /* most significant w-r bits */ #define LMASK 0x7fffffffUL /* least significant r bits */ -#define MIXBITS(u, v) (((u)&UMASK) | ((v)&LMASK)) -#define TWIST(u, v) ((MIXBITS(u, v) >> 1) ^ ((v)&1UL ? MATRIX_A : 0UL)) +#define MIXBITS(u, v) (((u) & UMASK) | ((v) & LMASK)) +#define TWIST(u, v) ((MIXBITS(u, v) >> 1) ^ ((v) & 1UL ? MATRIX_A : 0UL)) static ulong state[N]; /* The array for the state vector. */ static int left = 1; @@ -869,7 +869,8 @@ static PyObject *M_Noise_hybrid_multi_fractal(PyObject * /*self*/, PyObject *arg } if (mathutils_array_parse(vec, 3, 3, value, "hybrid_multi_fractal: invalid 'position' arg") == - -1) { + -1) + { return nullptr; } @@ -932,7 +933,8 @@ static PyObject *M_Noise_ridged_multi_fractal(PyObject * /*self*/, PyObject *arg } if (mathutils_array_parse(vec, 3, 3, value, "ridged_multi_fractal: invalid 'position' arg") == - -1) { + -1) + { return nullptr; } diff --git a/source/blender/render/intern/engine.cc b/source/blender/render/intern/engine.cc index ddb5c7356534b8d25fc28655998a1f920fd45245..272fd226579c1a25cbfd92aa2b79ae79a6b8908f 100644 --- a/source/blender/render/intern/engine.cc +++ b/source/blender/render/intern/engine.cc @@ -649,7 +649,8 @@ static void engine_depsgraph_init(RenderEngine *engine, ViewLayer *view_layer) /* Reuse depsgraph from persistent data if possible. */ if (engine->depsgraph) { if (DEG_get_bmain(engine->depsgraph) != bmain || - DEG_get_input_scene(engine->depsgraph) != scene) { + DEG_get_input_scene(engine->depsgraph) != scene) + { /* If bmain or scene changes, we need a completely new graph. */ engine_depsgraph_free(engine); } diff --git a/source/blender/render/intern/pipeline.cc b/source/blender/render/intern/pipeline.cc index 786e3e05b84b037db62099bcbce54522db808280..00511f90b56708b6bbfed92ee84cd22a26e48c5d 100644 --- a/source/blender/render/intern/pipeline.cc +++ b/source/blender/render/intern/pipeline.cc @@ -660,7 +660,8 @@ void RE_FreeUnusedGPUResources() * race condition here because we are on the main thread and new jobs can only * be started from the main thread. */ if (WM_jobs_test(wm, scene, WM_JOB_TYPE_RENDER) || - WM_jobs_test(wm, scene, WM_JOB_TYPE_COMPOSITE)) { + WM_jobs_test(wm, scene, WM_JOB_TYPE_COMPOSITE)) + { do_free = false; break; } @@ -1175,7 +1176,8 @@ static void do_render_compositor_scenes(Render *re) if (node->id && node->id != (ID *)re->scene) { Scene *scene = (Scene *)node->id; if (!BLI_gset_haskey(scenes_rendered, scene) && - render_scene_has_layers_to_render(scene, nullptr)) { + render_scene_has_layers_to_render(scene, nullptr)) + { do_render_compositor_scene(re, scene, cfra); BLI_gset_add(scenes_rendered, scene); node->typeinfo->updatefunc(restore_scene->nodetree, node); @@ -1674,7 +1676,8 @@ bool RE_is_rendering_allowed(Scene *scene, if (scene->r.mode & R_BORDER) { if (scene->r.border.xmax <= scene->r.border.xmin || - scene->r.border.ymax <= scene->r.border.ymin) { + scene->r.border.ymax <= scene->r.border.ymin) + { BKE_report(reports, RPT_ERROR, "No border area selected"); return false; } diff --git a/source/blender/render/intern/render_result.cc b/source/blender/render/intern/render_result.cc index be57c21cd0013de9762ac2f72a2ccebdeeba47be..5e70e2a41866909183c7cc4011b887372b844740 100644 --- a/source/blender/render/intern/render_result.cc +++ b/source/blender/render/intern/render_result.cc @@ -785,7 +785,8 @@ void render_result_merge(RenderResult *rr, RenderResult *rrpart) continue; } if (rpass->ibuf->float_buffer.data == nullptr || - rpassp->ibuf->float_buffer.data == nullptr) { + rpassp->ibuf->float_buffer.data == nullptr) + { continue; } /* Render-result have all passes, render-part only the active view's passes. */ diff --git a/source/blender/render/intern/texture_margin.cc b/source/blender/render/intern/texture_margin.cc index 3c7bcb543b599be9560b2a1c852d417942e110d9..1dc6605f305f652c72822cf45398e052b3cbd84f 100644 --- a/source/blender/render/intern/texture_margin.cc +++ b/source/blender/render/intern/texture_margin.cc @@ -147,8 +147,8 @@ class TextureMarginMap { */ #define PackDijkstraPixel(dist, dir) (0x80000000 + ((dist) << 4) + (dir)) #define DijkstraPixelGetDistance(dp) (((dp) ^ 0x80000000) >> 4) -#define DijkstraPixelGetDirection(dp) ((dp)&0xF) -#define IsDijkstraPixel(dp) ((dp)&0x80000000) +#define DijkstraPixelGetDirection(dp) ((dp) & 0xF) +#define IsDijkstraPixel(dp) ((dp) & 0x80000000) #define DijkstraPixelIsUnset(dp) ((dp) == 0xFFFFFFFF) /** diff --git a/source/blender/render/intern/texture_pointdensity.cc b/source/blender/render/intern/texture_pointdensity.cc index c992080e7812dcc81130ed4d2f2e7b87b7d855cc..c62577713e6ff419974520486db6cc4bc2f0f0ea 100644 --- a/source/blender/render/intern/texture_pointdensity.cc +++ b/source/blender/render/intern/texture_pointdensity.cc @@ -74,7 +74,8 @@ static int point_data_used(PointDensity *pd) if (ELEM(pd->ob_color_source, TEX_PD_COLOR_VERTCOL, TEX_PD_COLOR_VERTWEIGHT, - TEX_PD_COLOR_VERTNOR)) { + TEX_PD_COLOR_VERTNOR)) + { pd_bitflag |= POINT_DATA_COLOR; } } diff --git a/source/blender/sequencer/intern/render.cc b/source/blender/sequencer/intern/render.cc index 767e2a13c50317ed0d19baa663e2e4647386386d..da392aec4047f23ec61ec02e40c0ec8a3178ef58 100644 --- a/source/blender/sequencer/intern/render.cc +++ b/source/blender/sequencer/intern/render.cc @@ -698,7 +698,8 @@ static ImBuf *seq_render_preprocess_ibuf(const SeqRenderData *context, const bool is_proxy_image) { if (context->is_proxy_render == false && - (ibuf->x != context->rectx || ibuf->y != context->recty)) { + (ibuf->x != context->rectx || ibuf->y != context->recty)) + { use_preprocess = true; } diff --git a/source/blender/sequencer/intern/strip_retiming.cc b/source/blender/sequencer/intern/strip_retiming.cc index 10efa10f934c92f27b67cf53f2aecaa7314b9cb5..dc7017619c3eee4f30394f0f6fba4be20171e1fa 100644 --- a/source/blender/sequencer/intern/strip_retiming.cc +++ b/source/blender/sequencer/intern/strip_retiming.cc @@ -530,7 +530,8 @@ SeqRetimingKey *SEQ_retiming_add_transition(const Scene *scene, SeqRetimingKey *prev_key = key - 1; if ((key->flag & SEQ_SPEED_TRANSITION_IN) != 0 || - (prev_key->flag & SEQ_SPEED_TRANSITION_IN) != 0) { + (prev_key->flag & SEQ_SPEED_TRANSITION_IN) != 0) + { return nullptr; } diff --git a/source/blender/simulation/intern/SIM_mass_spring.cc b/source/blender/simulation/intern/SIM_mass_spring.cc index cfe68e5dc9c6aa6ae8887732885dc436cc298d18..06fe75ba111cb7b6366a66f3a3f13a8f23099162 100644 --- a/source/blender/simulation/intern/SIM_mass_spring.cc +++ b/source/blender/simulation/intern/SIM_mass_spring.cc @@ -1178,7 +1178,8 @@ static void cloth_solve_collisions( int i; if (!(clmd->coll_parms->flags & - (CLOTH_COLLSETTINGS_FLAG_ENABLED | CLOTH_COLLSETTINGS_FLAG_SELF))) { + (CLOTH_COLLSETTINGS_FLAG_ENABLED | CLOTH_COLLSETTINGS_FLAG_SELF))) + { return; } diff --git a/source/blender/simulation/intern/implicit.h b/source/blender/simulation/intern/implicit.h index 21d7cf1b61eb948c64077c8892a084b1b65072fd..6b9b739a899a2cc478447d934d67c902b092bce2 100644 --- a/source/blender/simulation/intern/implicit.h +++ b/source/blender/simulation/intern/implicit.h @@ -18,7 +18,7 @@ extern "C" { #endif -//#define IMPLICIT_SOLVER_EIGEN +// #define IMPLICIT_SOLVER_EIGEN #define IMPLICIT_SOLVER_BLENDER #define CLOTH_ROOT_FRAME /* enable use of root frame coordinate transform */ @@ -31,9 +31,9 @@ extern "C" { // #define CLOTH_FORCE_SPRING_GOAL /* UNUSED. */ // #define CLOTH_FORCE_EFFECTORS /* UNUSED. */ -//#define IMPLICIT_PRINT_SOLVER_INPUT_OUTPUT +// #define IMPLICIT_PRINT_SOLVER_INPUT_OUTPUT -//#define IMPLICIT_ENABLE_EIGEN_DEBUG +// #define IMPLICIT_ENABLE_EIGEN_DEBUG struct Implicit_Data; diff --git a/source/blender/simulation/intern/implicit_blender.cc b/source/blender/simulation/intern/implicit_blender.cc index 769d96d21527837f95d738f3ec0c4319d9bb7142..670d86a4470a8496a113bcd1debf57fb1411420d 100644 --- a/source/blender/simulation/intern/implicit_blender.cc +++ b/source/blender/simulation/intern/implicit_blender.cc @@ -36,7 +36,7 @@ # define CLOTH_OPENMP_LIMIT 512 # endif -//#define DEBUG_TIME +// #define DEBUG_TIME # ifdef DEBUG_TIME # include "PIL_time.h" @@ -179,7 +179,7 @@ DO_INLINE float dot_lfvector(float (*fLongVectorA)[3], float (*fLongVectorB)[3], * due to non-commutative nature of floating point ops this makes the sim give * different results each time you run it! * schedule(guided, 2) */ - //#pragma omp parallel for reduction(+: temp) if (verts > CLOTH_OPENMP_LIMIT) + // #pragma omp parallel for reduction(+: temp) if (verts > CLOTH_OPENMP_LIMIT) for (i = 0; i < long(verts); i++) { temp += dot_v3v3(fLongVectorA[i], fLongVectorB[i]); } diff --git a/source/blender/simulation/intern/implicit_eigen.cc b/source/blender/simulation/intern/implicit_eigen.cc index 04482c7688b94253b58a007cc811e39107d7304f..eb49a4eb16c00f26cbec063a4979eda1ade73c09 100644 --- a/source/blender/simulation/intern/implicit_eigen.cc +++ b/source/blender/simulation/intern/implicit_eigen.cc @@ -10,13 +10,13 @@ #ifdef IMPLICIT_SOLVER_EIGEN -//#define USE_EIGEN_CORE +// #define USE_EIGEN_CORE # define USE_EIGEN_CONSTRAINED_CG # ifdef __GNUC__ # pragma GCC diagnostic push /* XXX suppress verbose warnings in eigen */ -//# pragma GCC diagnostic ignored "-Wlogical-op" +// # pragma GCC diagnostic ignored "-Wlogical-op" # endif # ifndef IMPLICIT_ENABLE_EIGEN_DEBUG diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.cc b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.cc index f1c3a3ee793b9d8cf6ad87691844a1418ee94647..83e72e45a16ae993987108391762d97593108a5d 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.cc +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.cc @@ -284,7 +284,8 @@ void WM_gizmo_group_remove_by_tool(bContext *C, if (gzmap && gzmap->type == gzmap_type) { wmGizmoGroup *gzgroup, *gzgroup_next; for (gzgroup = static_cast<wmGizmoGroup *>(gzmap->groups.first); gzgroup; - gzgroup = gzgroup_next) { + gzgroup = gzgroup_next) + { gzgroup_next = gzgroup->next; if (gzgroup->type == gzgt) { BLI_assert(gzgroup->parent_gzmap == gzmap); @@ -1046,7 +1047,8 @@ void WM_gizmomaptype_group_unlink(bContext *C, if (gzmap && gzmap->type == gzmap_type) { wmGizmoGroup *gzgroup, *gzgroup_next; for (gzgroup = static_cast<wmGizmoGroup *>(gzmap->groups.first); gzgroup; - gzgroup = gzgroup_next) { + gzgroup = gzgroup_next) + { gzgroup_next = gzgroup->next; if (gzgroup->type == gzgt) { BLI_assert(gzgroup->parent_gzmap == gzmap); diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.cc b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.cc index f56db7c17be18829fabfb82aa56d0b8088935118..1d8985168aa442fed5b07bb219105361bf3c4ce6 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.cc +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.cc @@ -769,7 +769,8 @@ wmGizmo *wm_gizmomap_highlight_find(wmGizmoMap *gzmap, } else if (step == WM_GIZMOMAP_DRAWSTEP_2D) { if ((gz = wm_gizmogroup_find_intersected_gizmo( - wm, gzgroup, C, event->modifier, mval, r_part))) { + wm, gzgroup, C, event->modifier, mval, r_part))) + { break; } } @@ -1229,7 +1230,8 @@ wmGizmoMapType *WM_gizmomaptype_find(const wmGizmoMapType_Params *gzmap_params) { LISTBASE_FOREACH (wmGizmoMapType *, gzmap_type, &gizmomaptypes) { if (gzmap_type->spaceid == gzmap_params->spaceid && - gzmap_type->regionid == gzmap_params->regionid) { + gzmap_type->regionid == gzmap_params->regionid) + { return gzmap_type; } } diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.cc b/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.cc index 1eb52210a4e9191c273761f49380b9aad45a6144..ecbd643c361f1e8324354eee876a6720cc4a613d 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.cc +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.cc @@ -134,7 +134,8 @@ static void gizmotype_unlink(bContext *C, Main *bmain, wmGizmoType *gzt) if (gzmap) { LISTBASE_FOREACH (wmGizmoGroup *, gzgroup, &gzmap->groups) { for (wmGizmo *gz = static_cast<wmGizmo *>(gzgroup->gizmos.first), *gz_next; gz; - gz = gz_next) { + gz = gz_next) + { gz_next = gz->next; BLI_assert(gzgroup->parent_gzmap == gzmap); if (gz->type == gzt) { diff --git a/source/blender/windowmanager/intern/wm_event_system.cc b/source/blender/windowmanager/intern/wm_event_system.cc index 16b35b5ab3c59b678be7f14662e00bf100caf5c4..d7cb5a191c2db4eb8d3f4f20a2b690e640bb03ef 100644 --- a/source/blender/windowmanager/intern/wm_event_system.cc +++ b/source/blender/windowmanager/intern/wm_event_system.cc @@ -606,7 +606,8 @@ void wm_event_do_notifiers(bContext *C) } if (note->window == win || - (note->window == nullptr && ELEM(note->reference, nullptr, scene))) { + (note->window == nullptr && ELEM(note->reference, nullptr, scene))) + { if (note->category == NC_SCENE) { if (note->data == ND_FRAME) { do_anim = true; @@ -640,7 +641,8 @@ void wm_event_do_notifiers(bContext *C) /* The notifiers are sent without context, to keep it clean. */ while ( - const wmNotifier *note = static_cast<const wmNotifier *>(BLI_pophead(&wm->notifier_queue))) { + const wmNotifier *note = static_cast<const wmNotifier *>(BLI_pophead(&wm->notifier_queue))) + { if (wm_notifier_is_clear(note)) { MEM_freeN((void *)note); continue; @@ -3193,7 +3195,8 @@ static eHandlerActionFlag wm_handlers_do_gizmo_handler(bContext *C, LISTBASE_FOREACH (wmKeyMapItem *, kmi, &keymap->items) { if ((kmi->flag & KMI_INACTIVE) == 0) { if (wm_eventmatch(&event_test_click, kmi) || - wm_eventmatch(&event_test_click_drag, kmi)) { + wm_eventmatch(&event_test_click_drag, kmi)) + { wmOperatorType *ot = WM_operatortype_find(kmi->idname, false); if (WM_operator_poll_context(C, ot, WM_OP_INVOKE_DEFAULT)) { is_event_handle_all = true; @@ -6233,7 +6236,8 @@ void WM_window_cursor_keymap_status_refresh(bContext *C, wmWindow *win) { bToolRef *tref = nullptr; if ((region->regiontype == RGN_TYPE_WINDOW) && - ((1 << area->spacetype) & WM_TOOLSYSTEM_SPACE_MASK)) { + ((1 << area->spacetype) & WM_TOOLSYSTEM_SPACE_MASK)) + { const Scene *scene = WM_window_get_active_scene(win); ViewLayer *view_layer = WM_window_get_active_view_layer(win); WorkSpace *workspace = WM_window_get_active_workspace(win); @@ -6355,7 +6359,8 @@ bool WM_window_modal_keymap_status_draw(bContext *C, wmWindow *win, uiLayout *la continue; } if ((keymap->poll_modal_item != nullptr) && - (keymap->poll_modal_item(op, items[i].value) == false)) { + (keymap->poll_modal_item(op, items[i].value) == false)) + { continue; } diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc index 124bea5fc6e538137c75fdc8cdd3fc93bfb2e10d..cfd2041a066be0eb3a46dc3c229a40ffbe82dd88 100644 --- a/source/blender/windowmanager/intern/wm_files.cc +++ b/source/blender/windowmanager/intern/wm_files.cc @@ -3156,7 +3156,8 @@ static int wm_recover_last_session_invoke(bContext *C, wmOperator *op, const wmE wm_open_init_use_scripts(op, false); if (wm_operator_close_file_dialog_if_needed( - C, op, wm_recover_last_session_after_dialog_callback)) { + C, op, wm_recover_last_session_after_dialog_callback)) + { return OPERATOR_INTERFACE; } return wm_recover_last_session_exec(C, op); diff --git a/source/blender/windowmanager/intern/wm_files_link.cc b/source/blender/windowmanager/intern/wm_files_link.cc index 1d7f7648f190640fbc2e82a58dc6d993ec98335c..4dfdf31abac9bf5aed704955dd3e34f96de732c5 100644 --- a/source/blender/windowmanager/intern/wm_files_link.cc +++ b/source/blender/windowmanager/intern/wm_files_link.cc @@ -765,7 +765,8 @@ static int wm_lib_relocate_exec_do(bContext *C, wmOperator *op, bool do_reload) BLI_path_join(filepath, sizeof(filepath), root, relname); if (BLI_path_cmp(filepath, lib->filepath_abs) == 0 || - !BKE_blendfile_extension_check(relname)) { + !BKE_blendfile_extension_check(relname)) + { continue; } diff --git a/source/blender/windowmanager/intern/wm_gesture.cc b/source/blender/windowmanager/intern/wm_gesture.cc index ff1b1042f17efff229c19105e9effd1a57d5f528..e1c3005b2f2065e8bc26b532d1bc68946ddc9d0a 100644 --- a/source/blender/windowmanager/intern/wm_gesture.cc +++ b/source/blender/windowmanager/intern/wm_gesture.cc @@ -56,7 +56,8 @@ wmGesture *WM_gesture_new(wmWindow *window, const ARegion *region, const wmEvent WM_GESTURE_RECT, WM_GESTURE_CROSS_RECT, WM_GESTURE_CIRCLE, - WM_GESTURE_STRAIGHTLINE)) { + WM_GESTURE_STRAIGHTLINE)) + { rcti *rect = static_cast<rcti *>(MEM_callocN(sizeof(rcti), "gesture rect new")); gesture->customdata = rect; diff --git a/source/blender/windowmanager/intern/wm_operator_type.cc b/source/blender/windowmanager/intern/wm_operator_type.cc index 058de4e993b8190764ad9622b6429e304bcff135..c0bc64df23bea7da83749b6a15a80b3496ce25cb 100644 --- a/source/blender/windowmanager/intern/wm_operator_type.cc +++ b/source/blender/windowmanager/intern/wm_operator_type.cc @@ -428,7 +428,8 @@ static int wm_macro_modal(bContext *C, wmOperator *op, const wmEvent *event) const rcti *wrap_region = nullptr; if ((op->opm->flag & OP_IS_MODAL_GRAB_CURSOR) || - (op->opm->type->flag & OPTYPE_GRAB_CURSOR_XY)) { + (op->opm->type->flag & OPTYPE_GRAB_CURSOR_XY)) + { wrap = WM_CURSOR_WRAP_XY; } else if (op->opm->type->flag & OPTYPE_GRAB_CURSOR_X) { diff --git a/source/blender/windowmanager/intern/wm_playanim.cc b/source/blender/windowmanager/intern/wm_playanim.cc index 0d9e664321abef726aee764c08385108a81b344f..e14e28046e2810e74f54fe9485c6a62d743a3c26 100644 --- a/source/blender/windowmanager/intern/wm_playanim.cc +++ b/source/blender/windowmanager/intern/wm_playanim.cc @@ -920,7 +920,8 @@ static void build_pict_list_from_image_sequence(ListBase *picsbase, void *mem = nullptr; size_t size = -1; if (!buffer_from_filepath( - filepath, g_playanim.from_disk ? nullptr : &mem, &size, &error_message)) { + filepath, g_playanim.from_disk ? nullptr : &mem, &size, &error_message)) + { has_error = true; size = 0; } diff --git a/source/blender/windowmanager/xr/intern/wm_xr_session.cc b/source/blender/windowmanager/xr/intern/wm_xr_session.cc index e50f24a380dc61d98519eda46bf2108a24711527..3e937a36e681b6292a91ca9fd7b0707cfc2ea3f0 100644 --- a/source/blender/windowmanager/xr/intern/wm_xr_session.cc +++ b/source/blender/windowmanager/xr/intern/wm_xr_session.cc @@ -1158,7 +1158,8 @@ static void wm_xr_session_events_dispatch(wmXrData *xr, action->active_modal_path)); if ((val != KM_NOTHING) && - (!modal || (is_active_modal_action && is_active_modal_subaction))) { + (!modal || (is_active_modal_action && is_active_modal_subaction))) + { const GHOST_XrPose *aim_pose = wm_xr_session_controller_aim_pose_find( session_state, action->subaction_paths[subaction_idx]); const GHOST_XrPose *aim_pose_other = nullptr; diff --git a/source/creator/creator_args.cc b/source/creator/creator_args.cc index f635dbb4649d7934fca965d169c8697c1f6f2baf..de39b451ce4918ca1f9ed13545147c25dedf2d40 100644 --- a/source/creator/creator_args.cc +++ b/source/creator/creator_args.cc @@ -250,7 +250,8 @@ static bool parse_int_range_relative_clamp(const char *str, const char **r_err_msg) { if (parse_int_range_relative( - str, str_end_range, str_end_test, pos, neg, r_value_range, r_err_msg)) { + str, str_end_range, str_end_test, pos, neg, r_value_range, r_err_msg)) + { CLAMP(r_value_range[0], min, max); CLAMP(r_value_range[1], min, max); return true; @@ -942,7 +943,7 @@ static const char arg_handle_log_show_backtrace_set_doc[] = static int arg_handle_log_show_backtrace_set(int /*argc*/, const char ** /*argv*/, void * /*data*/) { /* Ensure types don't become incompatible. */ - void (*fn)(FILE * fp) = BLI_system_backtrace; + void (*fn)(FILE *fp) = BLI_system_backtrace; CLG_backtrace_fn_set((void (*)(void *))fn); return 0; } diff --git a/tools/utils_maintenance/clang_format_paths.py b/tools/utils_maintenance/clang_format_paths.py index 45300c91c408a5d37441aea00f4edd79c663d2b7..14beb5fdd12a4783937ae8e58469d8cb1c59ec4e 100755 --- a/tools/utils_maintenance/clang_format_paths.py +++ b/tools/utils_maintenance/clang_format_paths.py @@ -25,8 +25,8 @@ from typing import ( Tuple, ) -VERSION_MIN = (8, 0, 0) -VERSION_MAX_RECOMMENDED = (12, 0, 0) +VERSION_MIN = (17, 0, 0) +VERSION_MAX_RECOMMENDED = (17, 0, 0) CLANG_FORMAT_CMD = "clang-format" BASE_DIR = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))