Changeset View
Changeset View
Standalone View
Standalone View
rigify/rigs/limbs/rear_paw.py
| import bpy | import bpy | ||||
| from .paw import Rig as pawRig | from .paw import Rig as pawRig | ||||
| from .paw import parameters_ui | |||||
| from .paw import add_parameters | |||||
| IMPLEMENTATION = True # Include and set True if Rig is just an implementation for a wrapper class | IMPLEMENTATION = True # Include and set True if Rig is just an implementation for a wrapper class | ||||
| # add_parameters and parameters_ui are unused for implementation classes | # add_parameters and parameters_ui are unused for implementation classes | ||||
| class Rig(pawRig): | class Rig(pawRig): | ||||
| pass | |||||
| def __init__(self, obj, bone_name, params): | |||||
| super(Rig, self).__init__(obj, bone_name, params) | |||||
| def create_sample(obj): | def create_sample(obj): | ||||
| # generated by rigify.utils.write_metarig | # generated by rigify.utils.write_metarig | ||||
| bpy.ops.object.mode_set(mode='EDIT') | bpy.ops.object.mode_set(mode='EDIT') | ||||
| arm = obj.data | arm = obj.data | ||||
| bones = {} | bones = {} | ||||
| ▲ Show 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | def create_sample(obj): | ||||
| bone.tail[:] = 0.0494, 0.1351, 0.0032 | bone.tail[:] = 0.0494, 0.1351, 0.0032 | ||||
| bone.roll = -0.8965 | bone.roll = -0.8965 | ||||
| bone.use_connect = True | bone.use_connect = True | ||||
| bone.parent = arm.edit_bones[bones['r_pinky.001.L']] | bone.parent = arm.edit_bones[bones['r_pinky.001.L']] | ||||
| bones['r_pinky.002.L'] = bone.name | bones['r_pinky.002.L'] = bone.name | ||||
| bpy.ops.object.mode_set(mode='OBJECT') | bpy.ops.object.mode_set(mode='OBJECT') | ||||
| pbone = obj.pose.bones[bones['thigh.L']] | pbone = obj.pose.bones[bones['thigh.L']] | ||||
| pbone.rigify_type = 'limbs.super_limb' | pbone.rigify_type = 'limbs.paw' | ||||
| pbone.lock_location = (False, False, False) | pbone.lock_location = (False, False, False) | ||||
| pbone.lock_rotation = (False, False, False) | pbone.lock_rotation = (False, False, False) | ||||
| pbone.lock_rotation_w = False | pbone.lock_rotation_w = False | ||||
| pbone.lock_scale = (False, False, False) | pbone.lock_scale = (False, False, False) | ||||
| pbone.rotation_mode = 'QUATERNION' | pbone.rotation_mode = 'QUATERNION' | ||||
| try: | try: | ||||
| pbone.rigify_parameters.limb_type = "paw" | pbone.rigify_parameters.limb_type = "paw" | ||||
| except AttributeError: | except AttributeError: | ||||
| ▲ Show 20 Lines • Show All 157 Lines • Show Last 20 Lines | |||||