[Bf-blender-cvs] [c536791f36b] master: Cleanup: remove unused variables, redundant assignments

Campbell Barton noreply at git.blender.org
Wed May 18 10:08:49 CEST 2022


Commit: c536791f36b7b175a188b615ffcc5e366b833da4
Author: Campbell Barton
Date:   Wed May 18 17:40:19 2022 +1000
Branches: master
https://developer.blender.org/rBc536791f36b7b175a188b615ffcc5e366b833da4

Cleanup: remove unused variables, redundant assignments

===================================================================

M	doc/python_api/sphinx_doc_gen.py
M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M	release/scripts/startup/bl_ui/properties_paint_common.py
M	release/scripts/startup/bl_ui/space_view3d.py
M	release/scripts/startup/bl_ui/space_view3d_toolbar.py
M	source/blender/modifiers/intern/MOD_screw.c

===================================================================

diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 1c52bb3e57d..1949d77a50b 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -1210,7 +1210,6 @@ def pycontext2sphinx(basepath):
     for ctx_str, ctx_members in sorted(context_member_map.items()):
         subsection = "%s Context" % ctx_str.split("_")[0].title()
         fw("\n%s\n%s\n\n" % (subsection, (len(subsection) * '-')))
-        i = 0
         for member in ctx_members:
             unique_all_len = len(unique)
             unique.add(member)
@@ -1231,7 +1230,6 @@ def pycontext2sphinx(basepath):
                     "Error: context key %r not found in context_type_map; update %s" %
                     (member, __file__)) from None
             fw("   :type: %s :class:`bpy.types.%s`\n\n" % ("sequence of " if is_seq else "", member_type))
-            i += 1
 
     # generate typemap...
     # for member in sorted(unique_context_strings):
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 189210d8540..6b55683ee89 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -49,7 +49,7 @@ class GreasePencilSculptAdvancedPanel:
         layout.use_property_decorate = False
 
         tool_settings = context.scene.tool_settings
-        brush = context.tool_settings.gpencil_sculpt_paint.brush
+        brush = tool_settings.gpencil_sculpt_paint.brush
         tool = brush.gpencil_sculpt_tool
         gp_settings = brush.gpencil_settings
 
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index b8136f26e90..d5b106635ab 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -797,7 +797,6 @@ def brush_settings(layout, context, brush, popover=False):
             col = layout.column()
             col.active = not brush.curves_sculpt_settings.interpolate_point_count
             col.prop(brush.curves_sculpt_settings, "points_per_curve")
-            use_frontface = True
         elif brush.curves_sculpt_tool == 'GROW_SHRINK':
             layout.prop(brush.curves_sculpt_settings, "scale_uniform")
             layout.prop(brush.curves_sculpt_settings, "minimum_length")
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 995b2afebf0..bcc5976fb59 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -5689,7 +5689,7 @@ class VIEW3D_PT_object_type_visibility(Panel):
     # Allows derived classes to pass view data other than context.space_data.
     # This is used by the official VR add-on, which passes XrSessionSettings
     # since VR has a 3D view that only exists for the duration of the VR session.
-    def draw_ex(self, context, view, show_select):
+    def draw_ex(self, _context, view, show_select):
         layout = self.layout
         layout.use_property_split = True
         layout.use_property_decorate = False
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 3e1754fd908..1b714a40d03 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -276,7 +276,7 @@ class VIEW3D_PT_tools_posemode_options(View3DPanel, Panel):
 
 
 class TEXTURE_UL_texpaintslots(UIList):
-    def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname, _index):
+    def draw_item(self, _context, layout, _data, item, _icon, _active_data, _active_propname, _index):
         # mat = data
 
         if self.layout_type in {'DEFAULT', 'COMPACT'}:
diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c
index 4157acf8bac..0e22f59c2fb 100644
--- a/source/blender/modifiers/intern/MOD_screw.c
+++ b/source/blender/modifiers/intern/MOD_screw.c
@@ -881,10 +881,8 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
       /* set normal */
       if (vert_connect) {
         if (do_normal_create) {
-          /* set the normal now its transformed */
-          float nor_tx[3];
-          mul_v3_m3v3(nor_tx, mat3, vert_connect[j].no);
-          copy_v3_v3(vert_normals_new[mv_new - mvert_new], nor_tx);
+          /* Set the normal now its transformed. */
+          mul_v3_m3v3(vert_normals_new[mv_new - mvert_new], mat3, vert_connect[j].no);
         }
       }



More information about the Bf-blender-cvs mailing list