[Bf-extensions-cvs] [2fe1c5a6] master: Rigify: reduce the number of suppressed spell check tags.
Alexander Gavrilov
noreply at git.blender.org
Tue Nov 22 13:42:16 CET 2022
Commit: 2fe1c5a69395cbd6024002918ddfd634c864f557
Author: Alexander Gavrilov
Date: Mon Nov 21 17:38:17 2022 +0200
Branches: master
https://developer.blender.org/rBA2fe1c5a69395cbd6024002918ddfd634c864f557
Rigify: reduce the number of suppressed spell check tags.
A combination of fixing naming, and adding words to local dictionary.
Also, BlIdLowercase should be disabled in the editor.
===================================================================
M rigify/__init__.py
M rigify/feature_set_list.py
M rigify/generate.py
M rigify/metarig_menu.py
M rigify/operators/action_layers.py
M rigify/operators/generic_ui_list.py
M rigify/rig_ui_template.py
M rigify/rigs/face/skin_eye.py
M rigify/rigs/faces/super_face.py
M rigify/rigs/limbs/leg.py
M rigify/rigs/limbs/limb_rigs.py
M rigify/rigs/limbs/paw.py
M rigify/rigs/limbs/super_finger.py
M rigify/rigs/skin/basic_chain.py
M rigify/rigs/skin/skin_nodes.py
M rigify/rigs/skin/skin_parents.py
M rigify/rigs/skin/stretchy_chain.py
M rigify/rigs/spines/basic_tail.py
M rigify/rigs/spines/spine_rigs.py
M rigify/rigs/widgets.py
M rigify/rot_mode.py
M rigify/ui.py
M rigify/utils/action_layers.py
M rigify/utils/animation.py
M rigify/utils/mechanism.py
M rigify/utils/rig.py
M rigify/utils/switch_parent.py
M rigify/utils/widgets.py
===================================================================
diff --git a/rigify/__init__.py b/rigify/__init__.py
index 42fde50d..7a0219e8 100644
--- a/rigify/__init__.py
+++ b/rigify/__init__.py
@@ -152,7 +152,7 @@ class RigifyFeatureSets(bpy.types.PropertyGroup):
)
-# noinspection PyPep8Naming, SpellCheckingInspection
+# noinspection PyPep8Naming
class RIGIFY_UL_FeatureSets(bpy.types.UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, _index=0, _flag=0):
# rigify_prefs: RigifyPreferences = data
@@ -409,12 +409,11 @@ def format_property_spec(spec):
class RigifyParameterValidator(object):
- # noinspection GrazieInspection
"""
A wrapper around RigifyParameters that verifies properties
defined from rigs for incompatible redefinitions using a table.
- Relies on the implementation details of bpy.props return values:
+ Relies on the implementation details of bpy.props.* return values:
specifically, they just return a tuple containing the real define
function, and a dictionary with parameters. This allows comparing
parameters before the property is actually defined.
@@ -464,7 +463,6 @@ class RigifyParameterValidator(object):
self.__prop_table[name] = (self.__rig_name, new_def)
-# noinspection SpellCheckingInspection
class RigifyArmatureLayer(bpy.types.PropertyGroup):
def get_group(self):
if 'group_prop' in self.keys():
@@ -483,6 +481,7 @@ class RigifyArmatureLayer(bpy.types.PropertyGroup):
name: StringProperty(name="Layer Name", default=" ")
row: IntProperty(name="Layer Row", default=1, min=1, max=32,
description='UI row for this layer')
+ # noinspection SpellCheckingInspection
selset: BoolProperty(name="Selection Set", default=False,
description='Add Selection Set for this layer')
group: IntProperty(name="Bone Group", default=0, min=0, max=32,
diff --git a/rigify/feature_set_list.py b/rigify/feature_set_list.py
index f901bb4c..ae24457a 100644
--- a/rigify/feature_set_list.py
+++ b/rigify/feature_set_list.py
@@ -258,7 +258,6 @@ class DATA_OT_rigify_remove_feature_set(bpy.types.Operator):
def invoke(self, context, event):
return context.window_manager.invoke_confirm(self, event)
- # noinspection GrazieInspection
def execute(self, context):
from . import RigifyPreferences
addon_prefs = RigifyPreferences.get_instance()
@@ -266,7 +265,7 @@ class DATA_OT_rigify_remove_feature_set(bpy.types.Operator):
active_idx = addon_prefs.active_feature_set_index
active_fs: 'RigifyFeatureSets' = feature_set_list[active_idx]
- # Call the unregister callback of the set being removed.
+ # Call the 'unregister' callback of the set being removed.
if active_fs.enabled:
call_register_function(active_fs.module_name, do_register=False)
diff --git a/rigify/generate.py b/rigify/generate.py
index adbfec10..2102c9d1 100644
--- a/rigify/generate.py
+++ b/rigify/generate.py
@@ -11,7 +11,7 @@ from .utils.bones import new_bone
from .utils.layers import ORG_LAYER, MCH_LAYER, DEF_LAYER, ROOT_LAYER
from .utils.naming import (ORG_PREFIX, MCH_PREFIX, DEF_PREFIX, ROOT_NAME, make_original_name,
change_name_side, get_name_side, Side)
-from .utils.widgets import WGT_PREFIX
+from .utils.widgets import WGT_PREFIX, WGT_GROUP_PREFIX
from .utils.widgets_special import create_root_widget
from .utils.mechanism import refresh_all_drivers
from .utils.misc import gamma_correct, select_object, ArmatureObject, verify_armature_obj
@@ -127,8 +127,7 @@ class Generator(base_generate.BaseGenerator):
"""For backwards comp, matching by name to find a legacy collection.
(For before there was a Widget Collection PointerProperty)
"""
- # noinspection SpellCheckingInspection
- widgets_group_name = "WGTS_" + self.obj.name
+ widgets_group_name = WGT_GROUP_PREFIX + self.obj.name
old_collection = bpy.data.collections.get(widgets_group_name)
if old_collection and old_collection.library:
@@ -155,8 +154,7 @@ class Generator(base_generate.BaseGenerator):
if not self.widget_collection:
self.widget_collection = self.__find_legacy_collection()
if not self.widget_collection:
- # noinspection SpellCheckingInspection
- widgets_group_name = "WGTS_" + self.obj.name.replace("RIG-", "")
+ widgets_group_name = WGT_GROUP_PREFIX + self.obj.name.replace("RIG-", "")
self.widget_collection = ensure_collection(
self.context, widgets_group_name, hidden=True)
diff --git a/rigify/metarig_menu.py b/rigify/metarig_menu.py
index c40119fe..5eb11944 100644
--- a/rigify/metarig_menu.py
+++ b/rigify/metarig_menu.py
@@ -155,7 +155,6 @@ def create_menu_funcs():
menu_funcs += [make_metarig_menu_func(mop.bl_idname, text)]
-# noinspection BlIdLowercase
def create_armature_submenus(dic: dict | None = None):
if dic is None:
dic = metarigs
diff --git a/rigify/operators/action_layers.py b/rigify/operators/action_layers.py
index 6e6375ef..b17a5221 100644
--- a/rigify/operators/action_layers.py
+++ b/rigify/operators/action_layers.py
@@ -296,7 +296,6 @@ class RIGIFY_UL_action_slots(UIList):
row.label(text=text, icon=icon)
- # noinspection SpellCheckingInspection
icon = 'CHECKBOX_HLT' if action_slot.enabled else 'CHECKBOX_DEHLT'
row.enabled = action_slot.enabled
diff --git a/rigify/operators/generic_ui_list.py b/rigify/operators/generic_ui_list.py
index 2c07ac7e..ae67745f 100644
--- a/rigify/operators/generic_ui_list.py
+++ b/rigify/operators/generic_ui_list.py
@@ -147,7 +147,6 @@ def draw_ui_list(
col.separator()
if menu_class_name != '':
- # noinspection SpellCheckingInspection
col.menu(menu_class_name, icon='DOWNARROW_HLT', text="")
col.separator()
diff --git a/rigify/rig_ui_template.py b/rigify/rig_ui_template.py
index 4c83b8c1..10d035ec 100644
--- a/rigify/rig_ui_template.py
+++ b/rigify/rig_ui_template.py
@@ -13,7 +13,7 @@ from rna_prop_ui import rna_idprop_quote_path
from .utils.rig import get_rigify_layers
-# noinspection SpellCheckingInspection
+
UI_IMPORTS = [
'import bpy',
'import math',
@@ -97,8 +97,7 @@ def ternarySearch(f, left, right, absolutePrecision):
right = rightThird
'''
-# noinspection SpellCheckingInspection
-UTILITIES_FUNC_COMMON_IKFK = ['''
+UTILITIES_FUNC_COMMON_IK_FK = ['''
#########################################
## "Visual Transform" helper functions ##
#########################################
@@ -209,10 +208,10 @@ def correct_rotation(view_layer, bone_ik, target_matrix, *, ctrl_ik=None):
start_angle = ctrl_ik.rotation_euler[1]
- alfarange = find_min_range(distance, start_angle)
- alfamin = ternarySearch(distance, alfarange[0], alfarange[1], pi / 180)
+ alpha_range = find_min_range(distance, start_angle)
+ alpha_min = ternarySearch(distance, alpha_range[0], alpha_range[1], pi / 180)
- ctrl_ik.rotation_euler[1] = alfamin
+ ctrl_ik.rotation_euler[1] = alpha_min
view_layer.update()
@@ -259,10 +258,10 @@ def match_pole_target(view_layer, ik_first, ik_last, pole, match_bone_matrix, le
from the arm center line.
"""
# Translate pvi into armature space
- ploc = a + (ikv/2) + pvi
+ pole_loc = a + (ikv/2) + pvi
# Set pole target to location
- mat = get_pose_matrix_in_other_space(Matrix.Translation(ploc), pole)
+ mat = get_pose_matrix_in_other_space(Matrix.Translation(pole_loc), pole)
set_pose_translation(pole, mat)
view_layer.update()
@@ -790,7 +789,7 @@ class Rigify_Rot2PoleSwitch(bpy.types.Operator):
REGISTER_RIG_OLD_ARM = REGISTER_OP_OLD_ARM_FKIK + REGISTER_OP_OLD_POLE
UTILITIES_RIG_OLD_ARM = [
- *UTILITIES_FUNC_COMMON_IKFK,
+ *UTILITIES_FUNC_COMMON_IK_FK,
*UTILITIES_FUNC_OLD_ARM_FKIK,
*UTILITIES_FUNC_OLD_POLE,
*UTILITIES_OP_OLD_ARM_FKIK,
@@ -800,7 +799,7 @@ UTILITIES_RIG_OLD_ARM = [
REGISTER_RIG_OLD_LEG = REGISTER_OP_OLD_LEG_FKIK + REGISTER_OP_OLD_POLE
UTILITIES_RIG_OLD_LEG = [
- *UTILITIES_FUNC_COMMON_IKFK,
+ *UTILITIES_FUNC_COMMON_IK_FK,
*UTILITIES_FUNC_OLD_LEG_FKIK,
*UTILITIES_FUNC_OLD_POLE,
*UTILITIES_OP_OLD_LEG_FKIK,
@@ -819,7 +818,6 @@ UI_REGISTER = [
UI_UTILITIES = [
]
-# noinspection SpellCheckingInspection
UI_SLIDERS = '''
###################
## Rig UI Panels ##
@@ -868,7 +866,6 @@ class RigUI(bpy.types.Panel):
UI_REGISTER_BAKE_SETTINGS = ['RigBakeSettings']
-# noinspection SpellCheckingInspection
UI_BAKE_SETTINGS = '''
class RigBakeSettings(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
@@ -890,7 +887,6 @@ def layers_ui(layers, layout):
""" Turn a list of booleans + a list of names into a layer UI.
"""
- # noinspection SpellCheckingInspection
code = '''
class RigLayers(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
diff --git a/rigify/rigs/face/skin_eye.py b/rigify/rigs/face/skin_eye.py
index b02fc9f0..53f1dae3 100644
--- a/rigify/rigs/face/skin_eye.py
+++ b/rigify/rigs/face/skin_eye.py
@@ -199,7 +199,6 @@ class Rig(BaseSkinRig):
# If Limit Distance on the control can be disabled, add another one to the mch
if self.params.eyelid_detach_option:
- # noinspection SpellCheckingInspection
parent.add_limit_distance(
self.bones.org,
distance=(node.point - self.center).length,
@@ -215,7 +214,6 @@ class Rig(BaseSkinRig):
def extend_control_node_rig(self, node: ControlBoneNode):
if self.is_eye_control_node(node):
# Add Limit Distance to enforce following the surface of the eye to the control
- # noinspection SpellCheckingInspection
con = self.make_constraint(
node.control_bone, 'LIMIT_DISTANCE', self.bones.org,
distance=(node.point - self.center).length,
diff --git a/rigify/rigs/faces/super_face.py b/rigify/rigs/faces/super_face.py
index 9c2d709d..8
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list