Cleanup: remove unused variables

This commit is contained in:
Campbell Barton
2024-12-14 23:17:48 +11:00
parent ebfbc7757b
commit c1951f6508
3 changed files with 1 additions and 6 deletions

View File

@@ -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'

View File

@@ -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

View File

@@ -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;