diff --git a/intern/locale/osx_user_locale.mm b/intern/locale/osx_user_locale.mm index ea84ba58522..c5edd26292e 100644 --- a/intern/locale/osx_user_locale.mm +++ b/intern/locale/osx_user_locale.mm @@ -14,7 +14,7 @@ static char *user_locale = NULL; -// get current locale +/* Get current locale. */ const char *osx_user_locale() { ::free(user_locale); @@ -24,8 +24,8 @@ const char *osx_user_locale() NSLocale *myNSLocale = (NSLocale *)myCFLocale; [myNSLocale autorelease]; - // This produces gettext-invalid locale in recent macOS versions (11.4), - // like `ko-Kore_KR` instead of `ko_KR`. See #88877. + /* This produces gettext-invalid locale in recent macOS versions (11.4), + * like `ko-Kore_KR` instead of `ko_KR`. See #88877. */ // NSString *nsIdentifier = [myNSLocale localeIdentifier]; NSString *nsIdentifier = myNSLocale.languageCode; diff --git a/scripts/startup/bl_operators/anim.py b/scripts/startup/bl_operators/anim.py index 3297cadf148..ce4a1332de2 100644 --- a/scripts/startup/bl_operators/anim.py +++ b/scripts/startup/bl_operators/anim.py @@ -682,7 +682,7 @@ class ANIM_OT_slot_new_for_id(Operator): @classmethod def poll(cls, context): - animated_id = getattr(context, 'animated_id', None) + animated_id = getattr(context, "animated_id", None) if not animated_id: return False if not animated_id.animation_data or not animated_id.animation_data.action: @@ -694,7 +694,7 @@ class ANIM_OT_slot_new_for_id(Operator): return True def execute(self, context): - animated_id = getattr(context, 'animated_id', None) + animated_id = getattr(context, "animated_id", None) action = animated_id.animation_data.action slot = action.slots.new(for_id=animated_id) @@ -706,7 +706,7 @@ class ANIM_OT_slot_unassign_from_id(Operator): """Un-assign the assigned Action Slot from an ID. Note that _which_ ID should get this slot unassigned must be set in the - 'animated_id' context pointer, using: + "animated_id" context pointer, using: >>> layout.context_pointer_set("animated_id", animated_id) """ @@ -717,7 +717,7 @@ class ANIM_OT_slot_unassign_from_id(Operator): @classmethod def poll(cls, context): - animated_id = getattr(context, 'animated_id', None) + animated_id = getattr(context, "animated_id", None) if not animated_id: return False if not animated_id.animation_data or not animated_id.animation_data.action_slot: @@ -726,7 +726,7 @@ class ANIM_OT_slot_unassign_from_id(Operator): return True def execute(self, context): - animated_id = getattr(context, 'animated_id', None) + animated_id = getattr(context, "animated_id", None) animated_id.animation_data.action_slot = None return {'FINISHED'} diff --git a/scripts/startup/bl_operators/image_as_planes.py b/scripts/startup/bl_operators/image_as_planes.py index bcaabd50915..4a4ae265e85 100644 --- a/scripts/startup/bl_operators/image_as_planes.py +++ b/scripts/startup/bl_operators/image_as_planes.py @@ -326,11 +326,11 @@ class MaterialProperties_MixIn: header, body = layout.panel("import_image_plane_material", default_closed=False) header.label(text="Material") if body: - body.prop(self, 'shader') + body.prop(self, "shader") if self.shader == 'EMISSION': body.prop(self, "emit_strength") - body.prop(self, 'render_method') + body.prop(self, "render_method") if self.render_method == 'BLENDED': body.prop(self, "show_transparent_back") @@ -395,8 +395,8 @@ class TextureProperties_MixIn: header, body = layout.panel("import_image_plane_texture", default_closed=False) header.label(text="Texture") if body: - body.prop(self, 'interpolation') - body.prop(self, 'extension') + body.prop(self, "interpolation") + body.prop(self, "extension") row = body.row(align=False, heading="Alpha") row.prop(self, "use_transparency", text="") diff --git a/scripts/startup/bl_operators/object.py b/scripts/startup/bl_operators/object.py index 0b23151e8e2..1117573fc56 100644 --- a/scripts/startup/bl_operators/object.py +++ b/scripts/startup/bl_operators/object.py @@ -516,7 +516,7 @@ class JoinUVs(Operator): nbr_loops = len(mesh.loops) # seems to be the fastest way to create an array - uv_array = array.array('f', [0.0] * 2) * nbr_loops + uv_array = array.array("f", [0.0] * 2) * nbr_loops mesh.uv_layers.active.data.foreach_get("uv", uv_array) objects = context.selected_editable_objects[:] diff --git a/scripts/startup/bl_ui/properties_data_camera.py b/scripts/startup/bl_ui/properties_data_camera.py index b28737172e8..6a75226758b 100644 --- a/scripts/startup/bl_ui/properties_data_camera.py +++ b/scripts/startup/bl_ui/properties_data_camera.py @@ -555,7 +555,7 @@ class DATA_PT_camera_animation(CameraButtonsPanel, PropertiesAnimationMixin, Pro 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH', } - _animated_id_context_property = 'camera' + _animated_id_context_property = "camera" class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, Panel): diff --git a/source/blender/animrig/intern/bone_collections_test.cc b/source/blender/animrig/intern/bone_collections_test.cc index 57fe9b60de3..e8c1dbfe852 100644 --- a/source/blender/animrig/intern/bone_collections_test.cc +++ b/source/blender/animrig/intern/bone_collections_test.cc @@ -961,7 +961,7 @@ TEST_F(ArmatureBoneCollections, bcoll_move_to_parent__root_unroot) EXPECT_EQ(1, arm.collection_array[4]->child_count); EXPECT_EQ(0, arm.collection_array[5]->child_count); - // TODO: test with circular parenthood. + /* TODO: test with circular parenthood. */ } TEST_F(ArmatureBoneCollections, bcoll_move_to_parent__within_siblings) diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.h b/source/blender/compositor/intern/COM_MemoryBuffer.h index e3c1c06a153..4f724cf09f8 100644 --- a/source/blender/compositor/intern/COM_MemoryBuffer.h +++ b/source/blender/compositor/intern/COM_MemoryBuffer.h @@ -428,7 +428,7 @@ class MemoryBuffer { MemoryBufferExtend extend_x = MemoryBufferExtend::Clip, MemoryBufferExtend extend_y = MemoryBufferExtend::Clip) const { - // Extend is completely ignored for constants. This may need to be fixed in the future. + /* Extend is completely ignored for constants. This may need to be fixed in the future. */ if (is_a_single_elem_) { memcpy(result, buffer_, get_elem_bytes_len()); return; @@ -446,7 +446,7 @@ class MemoryBuffer { const float w = get_width(); const float h = get_height(); - // compute (linear interpolation) intersection with Clip + /* Compute (linear interpolation) intersection with Clip. */ float mult = 1.0f; if (extend_x == MemoryBufferExtend::Clip) { mult = std::min(x + 1.0f, w - x); @@ -460,7 +460,7 @@ class MemoryBuffer { } if (sampler == PixelSampler::Bilinear) { - // Sample using Extend or Repeat + /* Sample using Extend or Repeat. */ math::interpolate_bilinear_wrap_fl(buffer_, result, w, @@ -471,12 +471,12 @@ class MemoryBuffer { extend_x == MemoryBufferExtend::Repeat, extend_y == MemoryBufferExtend::Repeat); } - else { // PixelSampler::Bicubic - // Sample using Extend (Repeat is not implemented by interpolate_cubic_bspline) + else { /* #PixelSampler::Bicubic */ + /* Sample using Extend (Repeat is not implemented by `interpolate_cubic_bspline`). */ math::interpolate_cubic_bspline_fl(buffer_, result, w, h, num_channels_, x, y); } - // Multiply by Clip intersection + /* Multiply by Clip intersection. */ if (mult < 1.0f) { for (int i = 0; i < num_channels_; ++i) { result[i] *= mult; diff --git a/source/blender/gpu/vulkan/vk_framebuffer.cc b/source/blender/gpu/vulkan/vk_framebuffer.cc index 5a3934512a8..20af0ed87d5 100644 --- a/source/blender/gpu/vulkan/vk_framebuffer.cc +++ b/source/blender/gpu/vulkan/vk_framebuffer.cc @@ -285,17 +285,17 @@ static void set_load_store(VkRenderingAttachmentInfo &r_rendering_attachment, void VKFrameBuffer::subpass_transition_impl(const GPUAttachmentState depth_attachment_state, Span color_attachment_states) { - // TODO: this is a fallback implementation. We should also provide support for - // `VK_EXT_dynamic_rendering_local_read`. This extension is only supported on Windows - // platforms (2024Q2), but would reduce the rendering synchronization overhead. + /* TODO: this is a fallback implementation. We should also provide support for + * `VK_EXT_dynamic_rendering_local_read`. This extension is only supported on Windows + * platforms (2024Q2), but would reduce the rendering synchronization overhead. */ VKContext &context = *VKContext::get(); if (is_rendering_) { rendering_end(context); - // TODO: this might need a better implementation: - // READ -> DONTCARE - // WRITE -> LOAD, STORE based on previous value. - // IGNORE -> DONTCARE -> IGNORE + /* TODO: this might need a better implementation: + * READ -> DONTCARE + * WRITE -> LOAD, STORE based on previous value. + * IGNORE -> DONTCARE -> IGNORE */ load_stores.fill(default_load_store()); } @@ -618,9 +618,9 @@ void VKFrameBuffer::rendering_ensure(VKContext &context) depth_image_view = depth_texture.image_view_get(image_view_info).vk_handle(); } - // TODO: we should be able to use a single attachment info and only set the - // pDepthAttachment/pStencilAttachment to the same struct. But perhaps the stencil clear op - // might be different. + /* TODO: we should be able to use a single attachment info and only set the + * #pDepthAttachment/#pStencilAttachment to the same struct. + * But perhaps the stencil clear op might be different. */ { VkRenderingAttachmentInfo &attachment_info = begin_rendering.node_data.depth_attachment; attachment_info.sType = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO; diff --git a/source/blender/gpu/vulkan/vk_pipeline_pool.cc b/source/blender/gpu/vulkan/vk_pipeline_pool.cc index 13c566a1389..36fef01a242 100644 --- a/source/blender/gpu/vulkan/vk_pipeline_pool.cc +++ b/source/blender/gpu/vulkan/vk_pipeline_pool.cc @@ -515,7 +515,7 @@ VkPipeline VKPipelinePool::get_or_create_graphics_pipeline(VKGraphicsInfo &graph /* Common values */ vk_graphics_pipeline_create_info_.layout = graphics_info.vk_pipeline_layout; - // TODO: based on `vk_pipeline_base` we should update the flags. + /* TODO: based on `vk_pipeline_base` we should update the flags. */ vk_graphics_pipeline_create_info_.basePipelineHandle = vk_pipeline_base; /* Build pipeline. */ diff --git a/source/blender/gpu/vulkan/vk_pipeline_pool.hh b/source/blender/gpu/vulkan/vk_pipeline_pool.hh index 21c5d1c4907..975679d4b48 100644 --- a/source/blender/gpu/vulkan/vk_pipeline_pool.hh +++ b/source/blender/gpu/vulkan/vk_pipeline_pool.hh @@ -101,7 +101,7 @@ struct VKGraphicsInfo { bool operator==(const FragmentShader &other) const { - // TODO: Do not use hash. + /* TODO: Do not use hash. */ return vk_fragment_module == other.vk_fragment_module && hash() == other.hash(); } diff --git a/source/blender/gpu/vulkan/vk_shader.hh b/source/blender/gpu/vulkan/vk_shader.hh index 29dd23be03f..664ed9c46c3 100644 --- a/source/blender/gpu/vulkan/vk_shader.hh +++ b/source/blender/gpu/vulkan/vk_shader.hh @@ -40,8 +40,8 @@ class VKShader : public Shader { * the shader. In case for compute shaders without specialization constants this handle is also * used as an early exit. In this case there is only 1 variation. */ - // TODO: Should be refactored to stor the vk_pipeline_base_. What is the reason to store the last - // pipeline. + /* TODO: Should be refactored to store the `vk_pipeline_base_`. + * What is the reason to store the last pipeline. */ VkPipeline vk_pipeline_ = VK_NULL_HANDLE; public: diff --git a/source/blender/gpu/vulkan/vk_texture.cc b/source/blender/gpu/vulkan/vk_texture.cc index 33e6e4951bc..f428e976424 100644 --- a/source/blender/gpu/vulkan/vk_texture.cc +++ b/source/blender/gpu/vulkan/vk_texture.cc @@ -594,8 +594,8 @@ VkExtent3D VKTexture::vk_extent_3d(int mip_level) const const VKImageView &VKTexture::image_view_get(const VKImageViewInfo &info) { if (is_texture_view()) { - // TODO: API should be improved as we don't support image view specialization. - // In the current API this is still possible to setup when using attachments. + /* TODO: API should be improved as we don't support image view specialization. + * In the current API this is still possible to setup when using attachments. */ return image_view_get(info.arrayed); } for (const VKImageView &image_view : image_views_) { diff --git a/source/blender/gpu/vulkan/vk_vertex_attribute_object.hh b/source/blender/gpu/vulkan/vk_vertex_attribute_object.hh index 2f27455637f..d4c46b313b3 100644 --- a/source/blender/gpu/vulkan/vk_vertex_attribute_object.hh +++ b/source/blender/gpu/vulkan/vk_vertex_attribute_object.hh @@ -24,10 +24,10 @@ class VKImmediate; using AttributeMask = uint16_t; -// TODO: VKVertexAttributeObject should not contain any reference to VBO's. This should make the -// API be compatible with both VKBatch and VKImmediate. -// TODO: In steam of storing the bindings/attributes we should add a data structure that can store -// them. Building the bindings/attributes should be done inside VKPipelinePool. +/* TODO: VKVertexAttributeObject should not contain any reference to VBO's. This should make the + * API be compatible with both #VKBatch and #VKImmediate. */ +/* TODO: In steam of storing the bindings/attributes we should add a data structure that can store + * them. Building the bindings/attributes should be done inside #VKPipelinePool. */ class VKVertexAttributeObject { public: bool is_valid = false; diff --git a/source/blender/io/usd/intern/usd_utils.cc b/source/blender/io/usd/intern/usd_utils.cc index 547b45677f4..92fbb0aadbf 100644 --- a/source/blender/io/usd/intern/usd_utils.cc +++ b/source/blender/io/usd/intern/usd_utils.cc @@ -25,7 +25,7 @@ std::string make_safe_name(const std::string &name, [[maybe_unused]] bool allow_ } std::string buf; - buf.resize(name.size()); // We won't be exceeding the size of the incoming string + buf.resize(name.size()); /* We won't be exceeding the size of the incoming string. */ bool first = true; size_t offset = 0; diff --git a/source/blender/io/usd/intern/usd_writer_transform.cc b/source/blender/io/usd/intern/usd_writer_transform.cc index de8e9c0796b..cea0d3bfde1 100644 --- a/source/blender/io/usd/intern/usd_writer_transform.cc +++ b/source/blender/io/usd/intern/usd_writer_transform.cc @@ -26,8 +26,8 @@ pxr::UsdGeomXformable USDTransformWriter::create_xformable() const { pxr::UsdGeomXform xform; - // If prim exists, cast to UsdGeomXform (Solves merge transform and shape issue for animated - // exports) + /* If prim exists, cast to #UsdGeomXform + * (Solves merge transform and shape issue for animated exports). */ pxr::UsdPrim existing_prim = usd_export_context_.stage->GetPrimAtPath( usd_export_context_.usd_path); if (existing_prim.IsValid() && existing_prim.IsA()) { @@ -73,7 +73,7 @@ void USDTransformWriter::do_write(HierarchyContext &context) return; } - float parent_relative_matrix[4][4]; // The object matrix relative to the parent. + float parent_relative_matrix[4][4]; /* The object matrix relative to the parent. */ if (should_apply_root_xform(context)) { float matrix_world[4][4]; diff --git a/tests/python/sequencer_render_tests.py b/tests/python/sequencer_render_tests.py index 9747451f07b..fa511d72bd3 100644 --- a/tests/python/sequencer_render_tests.py +++ b/tests/python/sequencer_render_tests.py @@ -33,7 +33,7 @@ def create_argparse(): parser.add_argument("-testdir", nargs=1) parser.add_argument("-outdir", nargs=1) parser.add_argument("-oiiotool", nargs=1) - parser.add_argument('--batch', default=False, action='store_true') + parser.add_argument("--batch", default=False, action="store_true") return parser @@ -49,11 +49,11 @@ def main(): from modules import render_report report = render_report.Report("Sequencer", output_dir, oiiotool) report.set_pixelated(True) - # default error tolerances are quite large, lower them + # Default error tolerances are quite large, lower them. report.set_fail_threshold(1.0 / 255.0) - if os.path.basename(test_dir) == 'effects': - # effects test uses input images with nan/inf values on purpose, - # and they have slightly more variance between platforms + if os.path.basename(test_dir) == "effects": + # Effects test uses input images with nan/inf values on purpose, + # and they have slightly more variance between platforms. report.set_fail_threshold(2.0 / 255.0) report.set_fail_percent(0.01) report.set_reference_dir("reference")