From c1951f6508d192bc2fdb11159f8965618e1c4c29 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 14 Dec 2024 23:17:48 +1100 Subject: [PATCH] Cleanup: remove unused variables --- scripts/startup/bl_ui/properties_data_modifier.py | 1 - scripts/startup/bl_ui/properties_material_gpencil.py | 1 - source/blender/blenkernel/intern/vfont_curve.cc | 5 +---- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/startup/bl_ui/properties_data_modifier.py b/scripts/startup/bl_ui/properties_data_modifier.py index 8c121f37928..b64b33816eb 100644 --- a/scripts/startup/bl_ui/properties_data_modifier.py +++ b/scripts/startup/bl_ui/properties_data_modifier.py @@ -274,7 +274,6 @@ class AddModifierMenu(Operator): @classmethod def poll(cls, context): # NOTE: This operator only exists to add a poll to the add modifier shortcut in the property editor. - object = context.object space = context.space_data return space and space.type == 'PROPERTIES' and space.context == 'MODIFIER' diff --git a/scripts/startup/bl_ui/properties_material_gpencil.py b/scripts/startup/bl_ui/properties_material_gpencil.py index 13a7fd52e02..c458615ff5e 100644 --- a/scripts/startup/bl_ui/properties_material_gpencil.py +++ b/scripts/startup/bl_ui/properties_material_gpencil.py @@ -91,7 +91,6 @@ class MATERIAL_PT_gpencil_slots(GreasePencilMaterialsPanel, Panel): @classmethod def poll(cls, context): - ob = context.object ma = context.material return ma and ma.grease_pencil diff --git a/source/blender/blenkernel/intern/vfont_curve.cc b/source/blender/blenkernel/intern/vfont_curve.cc index 6099f4b599e..3f70977fa22 100644 --- a/source/blender/blenkernel/intern/vfont_curve.cc +++ b/source/blender/blenkernel/intern/vfont_curve.cc @@ -591,7 +591,7 @@ static bool vfont_to_curve(Object *ob, CharTrans *chartransdata = nullptr, *ct; TempLineInfo *lineinfo; float xof, yof, xtrax, linedist; - float twidth = 0, maxlen = 0; + float twidth = 0; int i, slen, j; int curbox; /* These values are only set to the selection range when `selboxes` is non-null. */ @@ -867,15 +867,12 @@ static bool vfont_to_curve(Object *ob, lineinfo[lnr].char_nr = cnr; lineinfo[lnr].wspace_nr = wsnr; - CLAMP_MIN(maxlen, lineinfo[lnr].x_min); - if (tb_bounds_for_cursor != nullptr) { tb_bounds_for_cursor[curbox].char_index_last = i; } if ((tb_scale.h != 0.0f) && (-(yof - tb_scale.y) > (tb_scale.h - linedist) - yof_scale)) { if (cu->totbox > (curbox + 1)) { - maxlen = 0; curbox++; i_textbox_array[curbox] = i + 1;