Rigify: Clean up imports
Just removing some unused imports. I tested generating every built-in metarig to make sure I didn't remove any imports that were actually used. I also tested installing and using a feature-set. Reviewed By: angavrilov Differential Revision: https://developer.blender.org/D8026
This commit is contained in:
parent
0e9e40f5e4
commit
81ed542cea
|
@ -32,7 +32,6 @@ bl_info = {
|
|||
import importlib
|
||||
import sys
|
||||
import bpy
|
||||
import os
|
||||
|
||||
|
||||
# The order in which core modules of the addon are loaded and reloaded.
|
||||
|
|
|
@ -18,10 +18,6 @@
|
|||
|
||||
# <pep8 compliant>
|
||||
|
||||
import bpy
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
from .utils.errors import RaiseErrorMixin
|
||||
from .utils.bones import BoneDict, BoneUtilityMixin
|
||||
from .utils.mechanism import MechanismUtilityMixin
|
||||
|
|
|
@ -21,17 +21,14 @@
|
|||
import bpy
|
||||
import re
|
||||
import time
|
||||
import traceback
|
||||
import sys
|
||||
from rna_prop_ui import rna_idprop_ui_prop_get
|
||||
|
||||
from .utils.errors import MetarigError
|
||||
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
|
||||
from .utils.widgets import WGT_PREFIX
|
||||
from .utils.widgets_special import create_root_widget
|
||||
from .utils.misc import copy_attributes, gamma_correct, select_object
|
||||
from .utils.misc import gamma_correct, select_object
|
||||
from .utils.collections import ensure_widget_collection, list_layer_collections, filter_layer_collections_by_object
|
||||
|
||||
from . import base_generate
|
||||
|
|
|
@ -18,10 +18,8 @@
|
|||
|
||||
# <pep8 compliant>
|
||||
import bpy
|
||||
from ....utils import MetarigError
|
||||
from ....utils import create_widget, copy_bone
|
||||
from ....utils import strip_org
|
||||
from .limb_utils import *
|
||||
from ....utils import copy_bone
|
||||
from .limb_utils import get_bone_name, make_constraint
|
||||
from ..super_widgets import create_hand_widget
|
||||
|
||||
from .....utils.mechanism import make_property
|
||||
|
|
|
@ -18,12 +18,11 @@
|
|||
|
||||
# <pep8 compliant>
|
||||
import bpy, math
|
||||
from ....utils import MetarigError, connected_children_names
|
||||
from ....utils import create_widget, copy_bone, create_circle_widget
|
||||
from ....utils import strip_org, flip_bone, put_bone
|
||||
from ....utils import connected_children_names, create_circle_widget
|
||||
from ....utils import copy_bone, flip_bone, put_bone
|
||||
from rna_prop_ui import rna_idprop_ui_prop_get
|
||||
from ..super_widgets import create_foot_widget, create_ballsocket_widget
|
||||
from .limb_utils import *
|
||||
from .limb_utils import orient_bone, make_constraint, get_bone_name
|
||||
|
||||
from .....utils.mechanism import make_property
|
||||
|
||||
|
|
|
@ -18,12 +18,11 @@
|
|||
|
||||
# <pep8 compliant>
|
||||
import bpy
|
||||
from ....utils import MetarigError, connected_children_names
|
||||
from ....utils import create_widget, copy_bone, create_circle_widget
|
||||
from ....utils import strip_org, flip_bone
|
||||
from ....utils import connected_children_names, create_circle_widget
|
||||
from ....utils import copy_bone, flip_bone
|
||||
from rna_prop_ui import rna_idprop_ui_prop_get
|
||||
from ..super_widgets import create_foot_widget, create_ballsocket_widget
|
||||
from .limb_utils import *
|
||||
from .limb_utils import orient_bone, make_constraint, get_bone_name
|
||||
|
||||
from .....utils.mechanism import make_property
|
||||
|
||||
|
|
|
@ -3,12 +3,10 @@ from .arm import create_arm
|
|||
from .leg import create_leg
|
||||
from .paw import create_paw
|
||||
from .ui import create_script
|
||||
from .limb_utils import *
|
||||
from .limb_utils import orient_bone, make_constraint, get_bone_name
|
||||
from mathutils import Vector
|
||||
from ....utils import copy_bone, flip_bone, put_bone, create_cube_widget
|
||||
from ....utils import strip_org, make_deformer_name, create_widget
|
||||
from ....utils import copy_bone, put_bone, strip_org
|
||||
from ....utils import create_circle_widget, create_sphere_widget
|
||||
from ....utils import MetarigError, make_mechanism_name, org
|
||||
from ....utils import create_limb_widget, connected_children_names
|
||||
from ..super_widgets import create_ikarrow_widget
|
||||
from math import trunc
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
import bpy
|
||||
from ...utils import copy_bone
|
||||
from ...utils import strip_org, make_deformer_name, connected_children_names
|
||||
from ...utils import make_mechanism_name, put_bone, create_sphere_widget
|
||||
from ...utils import create_widget, create_circle_widget
|
||||
from ...utils import put_bone, create_sphere_widget
|
||||
from ...utils import create_circle_widget
|
||||
from ...utils import MetarigError
|
||||
from rna_prop_ui import rna_idprop_ui_prop_get
|
||||
|
||||
class Rig:
|
||||
|
||||
|
|
|
@ -2,8 +2,7 @@ import bpy, re
|
|||
from mathutils import Vector
|
||||
from ...utils import copy_bone, flip_bone
|
||||
from ...utils import org, strip_org, make_deformer_name, connected_children_names, make_mechanism_name
|
||||
from ...utils import create_circle_widget, create_sphere_widget, create_widget, create_cube_widget
|
||||
from ...utils import MetarigError
|
||||
from ...utils import create_widget
|
||||
from .super_widgets import create_face_widget, create_eye_widget, create_eyes_widget, create_ear_widget, create_jaw_widget, create_teeth_widget
|
||||
|
||||
from ....utils.mechanism import make_property
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
import bpy
|
||||
from mathutils import Vector
|
||||
from ...utils import copy_bone, flip_bone
|
||||
from ...utils import strip_org, make_deformer_name, connected_children_names, make_mechanism_name
|
||||
from ...utils import create_circle_widget, create_sphere_widget, create_widget
|
||||
from ...utils import MetarigError
|
||||
from ...utils import MetarigError, create_circle_widget, create_widget
|
||||
|
||||
from ....utils.mechanism import make_property
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import bpy
|
||||
from mathutils import Vector
|
||||
from ...utils import copy_bone, flip_bone, put_bone, org
|
||||
from ...utils import copy_bone, put_bone, org
|
||||
from ...utils import strip_org, make_deformer_name, connected_children_names
|
||||
from ...utils import create_circle_widget, create_sphere_widget, create_widget
|
||||
from ...utils import create_circle_widget, create_sphere_widget
|
||||
from ...utils import MetarigError, make_mechanism_name, create_cube_widget
|
||||
|
||||
from ....utils.mechanism import make_property
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
import bpy
|
||||
import importlib
|
||||
import importlib
|
||||
from ...utils import create_widget
|
||||
|
||||
MODULE_NAME = "super_widgets" # Windows/Mac blender is weird, so __package__ doesn't work
|
||||
|
|
|
@ -23,7 +23,6 @@ import bpy
|
|||
from collections import OrderedDict
|
||||
|
||||
from .utils.animation import SCRIPT_REGISTER_BAKE, SCRIPT_UTILITIES_BAKE
|
||||
from .utils.layers import get_layers
|
||||
from .utils.rig import attach_persistent_script
|
||||
|
||||
from . import base_generate
|
||||
|
|
|
@ -21,13 +21,7 @@
|
|||
import bpy
|
||||
|
||||
from ..chain_rigs import SimpleChainRig
|
||||
|
||||
from ...utils.errors import MetarigError
|
||||
from ...utils.rig import connected_children_names
|
||||
from ...utils.naming import make_derived_name
|
||||
from ...utils.widgets_basic import create_bone_widget
|
||||
|
||||
from ...base_rig import BaseRig, stage
|
||||
from ...base_rig import stage
|
||||
|
||||
|
||||
class Rig(SimpleChainRig):
|
||||
|
|
|
@ -5,7 +5,6 @@ from ...utils import strip_org, make_deformer_name, connected_children_names
|
|||
from ...utils import create_chain_widget
|
||||
from ...utils import make_mechanism_name
|
||||
from ...utils import ControlLayersOption
|
||||
from rna_prop_ui import rna_idprop_ui_prop_get
|
||||
from ..limbs.limb_utils import get_bone_name
|
||||
|
||||
|
||||
|
|
|
@ -2,8 +2,7 @@ import bpy, re
|
|||
from mathutils import Vector
|
||||
from ...utils import copy_bone, flip_bone
|
||||
from ...utils import org, strip_org, make_deformer_name, connected_children_names, make_mechanism_name
|
||||
from ...utils import create_circle_widget, create_sphere_widget, create_widget, create_cube_widget
|
||||
from ...utils import MetarigError
|
||||
from ...utils import create_widget
|
||||
from ...utils.mechanism import make_property
|
||||
from ..widgets import create_face_widget, create_eye_widget, create_eyes_widget, create_ear_widget, create_jaw_widget, create_teeth_widget
|
||||
|
||||
|
|
|
@ -20,12 +20,10 @@
|
|||
|
||||
import bpy
|
||||
|
||||
from itertools import count
|
||||
from mathutils import Matrix
|
||||
|
||||
from ...utils.bones import put_bone, compute_chain_x_axis, align_bone_x_axis, align_bone_z_axis
|
||||
from ...utils.naming import make_derived_name
|
||||
from ...utils.misc import map_list
|
||||
from ...utils.widgets import adjust_widget_transform_mesh
|
||||
|
||||
from ..widgets import create_hand_widget
|
||||
|
|
|
@ -21,14 +21,13 @@
|
|||
import bpy
|
||||
import math
|
||||
|
||||
from itertools import count
|
||||
from mathutils import Vector, Matrix
|
||||
|
||||
from ...utils.rig import is_rig_base_bone
|
||||
from ...utils.bones import align_chain_x_axis, align_bone_x_axis, align_bone_y_axis, align_bone_z_axis
|
||||
from ...utils.bones import align_bone_to_axis, flip_bone, put_bone, align_bone_orientation
|
||||
from ...utils.bones import align_chain_x_axis, align_bone_x_axis, align_bone_z_axis
|
||||
from ...utils.bones import put_bone, align_bone_orientation
|
||||
from ...utils.naming import make_derived_name
|
||||
from ...utils.misc import map_list, matrix_from_axis_roll, matrix_from_axis_pair
|
||||
from ...utils.misc import matrix_from_axis_roll, matrix_from_axis_pair
|
||||
from ...utils.widgets import adjust_widget_transform_mesh
|
||||
|
||||
from ..widgets import create_foot_widget, create_ballsocket_widget
|
||||
|
|
|
@ -23,7 +23,7 @@ import json
|
|||
|
||||
from ...utils.animation import add_generic_snap_fk_to_ik, add_fk_ik_snap_buttons
|
||||
from ...utils.rig import connected_children_names
|
||||
from ...utils.bones import BoneDict, put_bone, compute_chain_x_axis, align_bone_orientation, set_bone_widget_transform
|
||||
from ...utils.bones import BoneDict, put_bone, align_bone_orientation, set_bone_widget_transform
|
||||
from ...utils.naming import strip_org, make_derived_name
|
||||
from ...utils.layers import ControlLayersOption
|
||||
from ...utils.misc import pairwise_nozip, padnone, map_list
|
||||
|
@ -38,7 +38,7 @@ from ..widgets import create_gear_widget, create_ikarrow_widget
|
|||
from ...rig_ui_template import UTILITIES_FUNC_COMMON_IKFK
|
||||
|
||||
from math import pi
|
||||
from itertools import count, repeat, chain
|
||||
from itertools import count, chain
|
||||
from mathutils import Vector
|
||||
from collections import namedtuple
|
||||
|
||||
|
|
|
@ -19,17 +19,11 @@
|
|||
# <pep8 compliant>
|
||||
|
||||
import bpy
|
||||
import math
|
||||
|
||||
from itertools import count
|
||||
from mathutils import Vector
|
||||
|
||||
from ...utils.bones import compute_chain_x_axis, align_bone_x_axis, align_bone_y_axis, align_bone_z_axis
|
||||
from ...utils.bones import align_bone_to_axis, flip_bone, put_bone, align_bone_orientation
|
||||
from ...utils.bones import compute_chain_x_axis, align_bone_x_axis, align_bone_z_axis
|
||||
from ...utils.bones import align_bone_to_axis, flip_bone
|
||||
from ...utils.naming import make_derived_name
|
||||
from ...utils.misc import map_list
|
||||
|
||||
from ...utils.widgets_basic import create_circle_widget
|
||||
from ..widgets import create_foot_widget, create_ballsocket_widget
|
||||
|
||||
from ...base_rig import stage
|
||||
|
|
|
@ -25,7 +25,6 @@ from itertools import count
|
|||
from ...utils.bones import align_chain_x_axis
|
||||
from ...utils.widgets_basic import create_circle_widget
|
||||
from ...utils.layers import ControlLayersOption
|
||||
from ...utils.misc import map_list
|
||||
|
||||
from ...base_rig import stage
|
||||
|
||||
|
|
|
@ -19,12 +19,10 @@
|
|||
# <pep8 compliant>
|
||||
|
||||
import bpy
|
||||
import re
|
||||
import json
|
||||
|
||||
from itertools import count
|
||||
|
||||
from ...utils.errors import MetarigError
|
||||
from ...utils.bones import put_bone, flip_bone, align_chain_x_axis, set_bone_widget_transform
|
||||
from ...utils.naming import make_derived_name
|
||||
from ...utils.widgets import create_widget
|
||||
|
|
|
@ -24,9 +24,8 @@ import math
|
|||
from itertools import count, repeat
|
||||
from mathutils import Matrix
|
||||
|
||||
from ...utils.errors import MetarigError
|
||||
from ...utils.layers import ControlLayersOption
|
||||
from ...utils.naming import strip_org, make_deformer_name, make_mechanism_name, make_derived_name
|
||||
from ...utils.naming import strip_org, make_mechanism_name, make_derived_name
|
||||
from ...utils.bones import BoneDict, put_bone, align_bone_to_axis, align_bone_orientation, set_bone_widget_transform
|
||||
from ...utils.widgets import adjust_widget_transform_mesh
|
||||
from ...utils.widgets_basic import create_circle_widget
|
||||
|
|
|
@ -23,15 +23,12 @@ import bpy
|
|||
from itertools import count
|
||||
|
||||
from ...utils.naming import strip_org, make_derived_name
|
||||
from ...utils.bones import put_bone, flip_bone, is_same_position, connect_bbone_chain_handles
|
||||
from ...utils.bones import align_bone_orientation, set_bone_widget_transform
|
||||
from ...utils.bones import put_bone, set_bone_widget_transform
|
||||
from ...utils.widgets_basic import create_circle_widget
|
||||
from ...utils.layers import ControlLayersOption
|
||||
from ...utils.misc import map_list
|
||||
|
||||
from ...base_rig import stage
|
||||
|
||||
from ..chain_rigs import TweakChainRig, SimpleChainRig
|
||||
from ..widgets import create_ballsocket_widget
|
||||
|
||||
from .spine_rigs import BaseHeadTailRig
|
||||
|
|
|
@ -24,7 +24,7 @@ from itertools import count
|
|||
|
||||
from ...utils.naming import make_derived_name
|
||||
from ...utils.bones import align_bone_orientation
|
||||
from ...utils.widgets_basic import create_circle_widget, create_cube_widget
|
||||
from ...utils.widgets_basic import create_circle_widget
|
||||
from ...utils.widgets_special import create_neck_bend_widget, create_neck_tweak_widget
|
||||
from ...utils.switch_parent import SwitchParentBuilder
|
||||
from ...utils.misc import map_list
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
import bpy
|
||||
import importlib
|
||||
import importlib
|
||||
from mathutils import Matrix
|
||||
from ..utils import create_widget
|
||||
|
||||
|
|
Loading…
Reference in New Issue