Cleanup: unused argument, variable warnings
This commit is contained in:
parent
f89ea052f7
commit
0bd6b3e5a0
|
@ -726,7 +726,7 @@ class pyDiffusion2Shader(StrokeShader):
|
|||
self._curvatureInfo = Curvature2DAngleF0D()
|
||||
|
||||
def shade(self, stroke):
|
||||
for i in range(1, self._nbIter):
|
||||
for _i in range(1, self._nbIter):
|
||||
it = Interface0DIterator(stroke)
|
||||
for svert in it:
|
||||
svert.point += self._normalInfo(it) * self._lambda * self._curvatureInfo(it)
|
||||
|
@ -911,7 +911,7 @@ class pyBluePrintCirclesShader(StrokeShader):
|
|||
|
||||
it = iter(stroke)
|
||||
|
||||
for j in range(self.__turns):
|
||||
for _j in range(self.__turns):
|
||||
prev_radius = radius
|
||||
prev_center = center
|
||||
radius += randint(-R, R)
|
||||
|
@ -952,7 +952,7 @@ class pyBluePrintEllipsesShader(StrokeShader):
|
|||
# for description of the line below, see pyBluePrintCirclesShader
|
||||
directions = phase_to_direction(sv_nb)
|
||||
it = iter(stroke)
|
||||
for j in range(self.__turns):
|
||||
for _j in range(self.__turns):
|
||||
prev_radius = radius
|
||||
prev_center = center
|
||||
radius = radius + Vector((randint(-R, R), randint(-R, R)))
|
||||
|
@ -1030,7 +1030,7 @@ class pyBluePrintSquaresShader(StrokeShader):
|
|||
|
||||
it = iter(stroke)
|
||||
verticesToRemove = list()
|
||||
for j in range(self.__turns):
|
||||
for _j in range(self.__turns):
|
||||
for i, svert in zip(range(num_segments), it):
|
||||
if i < first:
|
||||
svert.point = points[0] + old_vecs[0] * i / (first - 1)
|
||||
|
@ -1125,7 +1125,7 @@ class pyBluePrintDirectedSquaresShader(StrokeShader):
|
|||
|
||||
it = iter(stroke)
|
||||
verticesToRemove = list()
|
||||
for j in range(self.__turns):
|
||||
for _j in range(self.__turns):
|
||||
for i, svert in zip(range(num_segments), it):
|
||||
if i < first:
|
||||
svert.point = points[0] + old_vecs[0] * i / (first - 1)
|
||||
|
|
|
@ -151,7 +151,7 @@ def normal_at_I0D(it: Interface0DIterator) -> Vector:
|
|||
# this case sometimes has a small difference with Normal2DF0D (1e-3 -ish)
|
||||
it.decrement()
|
||||
a = it.object
|
||||
curr, b = next(it), next(it)
|
||||
_curr, b = next(it), next(it)
|
||||
# give iterator back in original state
|
||||
it.decrement()
|
||||
return (b.point - a.point).orthogonal().normalized()
|
||||
|
@ -229,8 +229,6 @@ def simplifyDouglasPeucker(points, tolerance):
|
|||
first_stack = []
|
||||
last_stack = []
|
||||
|
||||
new_points = []
|
||||
|
||||
markers[first] = 1
|
||||
markers[last] = 1
|
||||
|
||||
|
|
|
@ -1028,7 +1028,7 @@ class DashedLineShader(StrokeShader):
|
|||
it = stroke.stroke_vertices_begin(sampling)
|
||||
pattern_cycle = cycle(self.pattern)
|
||||
pattern = next(pattern_cycle)
|
||||
for svert in it:
|
||||
for _svert in it:
|
||||
pos = it.t # curvilinear abscissa
|
||||
|
||||
if pos - start + sampling > pattern:
|
||||
|
|
|
@ -3013,7 +3013,7 @@ def km_sequencerpreview(params):
|
|||
return keymap
|
||||
|
||||
|
||||
def km_sequencer_channels(params):
|
||||
def km_sequencer_channels(_params):
|
||||
items = []
|
||||
keymap = (
|
||||
"Sequencer Channels",
|
||||
|
|
|
@ -130,7 +130,7 @@ class NodeAddOperator:
|
|||
return result
|
||||
|
||||
@classmethod
|
||||
def description(cls, context, properties):
|
||||
def description(cls, _context, properties):
|
||||
nodetype = properties["type"]
|
||||
bl_rna = bpy.types.Node.bl_rna_get_subclass(nodetype)
|
||||
if bl_rna is not None:
|
||||
|
|
|
@ -77,12 +77,12 @@ class CURVES_MT_add_attribute(Menu):
|
|||
|
||||
|
||||
class CURVES_UL_attributes(UIList):
|
||||
def filter_items(self, context, data, property):
|
||||
def filter_items(self, _context, data, property):
|
||||
attributes = getattr(data, property)
|
||||
flags = []
|
||||
indices = [i for i in range(len(attributes))]
|
||||
|
||||
for index, item in enumerate(attributes):
|
||||
for item in attributes:
|
||||
flags.append(self.bitflag_filter_item if item.is_internal else 0)
|
||||
|
||||
return flags, indices
|
||||
|
|
|
@ -70,7 +70,7 @@ class MESH_MT_color_attribute_context_menu(Menu):
|
|||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
|
||||
props = layout.operator(
|
||||
layout.operator(
|
||||
"geometry.color_attribute_duplicate",
|
||||
icon='DUPLICATE',
|
||||
)
|
||||
|
@ -507,12 +507,12 @@ class MESH_UL_attributes(UIList):
|
|||
'CORNER': "Face Corner",
|
||||
}
|
||||
|
||||
def filter_items(self, context, data, property):
|
||||
def filter_items(self, _context, data, property):
|
||||
attributes = getattr(data, property)
|
||||
flags = []
|
||||
indices = [i for i in range(len(attributes))]
|
||||
|
||||
for index, item in enumerate(attributes):
|
||||
for item in attributes:
|
||||
flags.append(self.bitflag_filter_item if item.is_internal else 0)
|
||||
|
||||
return flags, indices
|
||||
|
@ -596,7 +596,7 @@ class ColorAttributesListBase():
|
|||
'CORNER': "Face Corner",
|
||||
}
|
||||
|
||||
def filter_items(self, context, data, property):
|
||||
def filter_items(self, _context, data, property):
|
||||
attrs = getattr(data, property)
|
||||
ret = []
|
||||
idxs = []
|
||||
|
|
|
@ -65,12 +65,12 @@ class POINTCLOUD_MT_add_attribute(Menu):
|
|||
|
||||
|
||||
class POINTCLOUD_UL_attributes(UIList):
|
||||
def filter_items(self, context, data, property):
|
||||
def filter_items(self, _context, data, property):
|
||||
attributes = getattr(data, property)
|
||||
flags = []
|
||||
indices = [i for i in range(len(attributes))]
|
||||
|
||||
for index, item in enumerate(attributes):
|
||||
for item in attributes:
|
||||
flags.append(self.bitflag_filter_item if item.is_internal else 0)
|
||||
|
||||
return flags, indices
|
||||
|
|
|
@ -151,7 +151,7 @@ class NLA_MT_marker(Menu):
|
|||
class NLA_MT_marker_select(Menu):
|
||||
bl_label = 'Select'
|
||||
|
||||
def draw(self, context):
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("marker.select_all", text="All").action = 'SELECT'
|
||||
|
|
Loading…
Reference in New Issue