diff --git a/__init__.py b/__init__.py index 8cfc3aa..30ebb22 100644 --- a/__init__.py +++ b/__init__.py @@ -34,7 +34,7 @@ bl_info = { 'name': 'BlenRig 5', 'author': 'Juan Pablo Bouza', - 'version': (1,0), + 'version': (1,001), 'blender': (2, 76, 0), 'location': 'Armature, Object and Lattice properties, View3d tools panel, Armature Add menu', 'description': 'BlenRig 5 rigging system', diff --git a/blenrig_biped/blenrig_biped.blend b/blenrig_biped/blenrig_biped.blend index dd28a5b..3dd2a8e 100644 Binary files a/blenrig_biped/blenrig_biped.blend and b/blenrig_biped/blenrig_biped.blend differ diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 0000000..2f419b1 --- /dev/null +++ b/changelog.txt @@ -0,0 +1,2 @@ +BlenRig 5 V1.001 +_rig update to 1.001, fix IK torso bug diff --git a/updates/update_biped_rig_to_1_001.py b/updates/update_biped_rig_to_1_001.py new file mode 100644 index 0000000..3386f84 --- /dev/null +++ b/updates/update_biped_rig_to_1_001.py @@ -0,0 +1,135 @@ +##### BlenRig 5 biped rig update to 1.001 #### +# Fixes bug in IK torso + +# Run this script with BlenRig armature selected + + +import bpy + +arm = bpy.context.active_object +arm_data = arm.data +pbones = arm.pose.bones + +if arm_data['rig_version'] == 1.0: + for b in pbones: + if b.name == 'spine_2_ik_ctrl': + for C in b.constraints: + if C.name == 'Transformation_torso_ik_ctrl': + b.constraints.remove(C) + + if b.name == 'spine_2_ik': + for C in b.constraints: + b.constraints.remove(C) + cnst = pbones['spine_2_ik'].constraints.new('COPY_ROTATION') + cnst.name = 'Copy Rotation' + cnst.influence = 1.0 + cnst.mute = False + cnst.invert_x = False + cnst.invert_y = False + cnst.invert_z = False + cnst.owner_space = 'WORLD' + cnst.subtarget = 'spine_2_ik_ctrl' + cnst.target = bpy.context.active_object + cnst.target_space = 'WORLD' + cnst.use_offset = False + cnst.use_x = True + cnst.use_y = True + cnst.use_z = True + cnst = pbones['spine_2_ik'].constraints.new('TRANSFORM') + cnst.name = 'Transformation_torso_ik_ctrl' + cnst.influence = 1.0 + cnst.mute = False + cnst.from_max_x = 0.0 + cnst.from_max_x_rot = 0.0 + cnst.from_max_x_scale = 0.0 + cnst.from_max_y = 0.0 + cnst.from_max_y_rot = 0.01745329238474369 + cnst.from_max_y_scale = 0.0 + cnst.from_max_z = 0.0 + cnst.from_max_z_rot = 0.0 + cnst.from_max_z_scale = 0.0 + cnst.from_min_x = 0.0 + cnst.from_min_x_rot = 0.0 + cnst.from_min_x_scale = 0.0 + cnst.from_min_y = 0.0 + cnst.from_min_y_rot = 0.0 + cnst.from_min_y_scale = 0.0 + cnst.from_min_z = 0.0 + cnst.from_min_z_rot = 0.0 + cnst.from_min_z_scale = 0.0 + cnst.map_to = 'ROTATION' + cnst.map_to_x_from = 'X' + cnst.name = 'Transformation_torso_ik_ctrl' + cnst.map_to_y_from = 'Y' + cnst.map_to_z_from = 'Z' + cnst.map_from = 'ROTATION' + cnst.owner_space = 'LOCAL' + cnst.subtarget = 'torso_ik_ctrl' + cnst.target = bpy.context.active_object + cnst.target_space = 'LOCAL' + cnst.to_max_x = 0.0 + cnst.to_max_x_rot = 0.0 + cnst.to_max_x_scale = 0.0 + cnst.to_max_y = 0.0 + cnst.to_max_y_rot = 0.008726646192371845 + cnst.to_max_y_scale = 0.0 + cnst.to_max_z = 0.0 + cnst.to_max_z_rot = 0.0 + cnst.to_max_z_scale = 0.0 + cnst.to_min_x = 0.0 + cnst.to_min_x_rot = 0.0 + cnst.to_min_x_scale = 0.0 + cnst.to_min_y = 0.0 + cnst.to_min_y_rot = 0.0 + cnst.to_min_y_scale = 0.0 + cnst.to_min_z = 0.0 + cnst.to_min_z_rot = 0.0 + cnst.to_min_z_scale = 0.0 + cnst.use_motion_extrapolate = True + cnst = pbones['spine_2_ik'].constraints.new('COPY_SCALE') + cnst.name = 'Copy Scale' + cnst.influence = 1.0 + cnst.mute = False + cnst.owner_space = 'POSE' + cnst.subtarget = 'master_torso_pivot' + cnst.target = bpy.context.active_object + cnst.target_space = 'POSE' + cnst.use_offset = True + cnst.use_x = True + cnst.use_y = True + cnst.use_z = True + cnst = pbones['spine_2_ik'].constraints.new('DAMPED_TRACK') + cnst.name = 'Damped Track' + cnst.influence = 1.0 + cnst.mute = False + cnst.owner_space = 'WORLD' + cnst.subtarget = 'spine_3_inv_ik' + cnst.target = bpy.context.active_object + cnst.target_space = 'WORLD' + cnst.head_tail = 1.0 + cnst.track_axis = 'TRACK_Y' + cnst = pbones['spine_2_ik'].constraints.new('STRETCH_TO') + cnst.name = 'Stretch To_REPROP' + cnst.influence = 1.0 + cnst.mute = True + cnst.owner_space = 'WORLD' + cnst.subtarget = 'spine_3_ik_ctrl' + cnst.target = bpy.context.active_object + cnst.target_space = 'WORLD' + cnst.head_tail = 0.0 + cnst.keep_axis = 'PLANE_X' + cnst.rest_length = 0.1161453053355217 + cnst.volume = 'NO_VOLUME' + cnst.bulge = 1.0 + cnst.bulge_max = 1.0 + cnst.bulge_min = 1.0 + cnst.bulge_smooth = 0.0 + cnst.use_bulge_max = False + cnst.use_bulge_min = False + arm_data['rig_version'] = 1.001 + print('BlenRig updated') +else: + print('BlenRig already up to date') + + +