Rig Regular
Rig Regular
import math
import json
import collections
import traceback
from math import pi
from [Link] import StringProperty
from mathutils import Euler, Matrix, Quaternion, Vector
from rna_prop_ui import rna_idprop_quote_path
rig_id = "oeujyfjmc8c1f286"
############################
## Math utility functions ##
############################
def perpendicular_vector(v):
""" Returns a vector that is perpendicular to the one given.
The returned vector is _not_ guaranteed to be normalized.
"""
# Create a vector that is not aligned with v.
# It doesn't matter what vector. Just any vector
# that's guaranteed to not be pointing in the same
# direction.
if abs(v[0]) < abs(v[1]):
tv = Vector((1,0,0))
else:
tv = Vector((0,1,0))
def find_min_range(f,start_angle,delta=pi/8):
""" finds the range where lies the minimum of function f applied on bone_ik and bone_fk
at a certain angle.
"""
angle = start_angle
while (angle > (start_angle - 2*pi)) and (angle < (start_angle + 2*pi)):
l_dist = f(angle-delta)
c_dist = f(angle)
r_dist = f(angle+delta)
if min((l_dist,c_dist,r_dist)) == c_dist:
return (angle-delta,angle+delta)
else:
angle=angle+delta
def flatten_children(iterable):
"""Enumerate the iterator items as well as their children in the tree order."""
for item in iterable:
yield item
yield from flatten_children([Link])
######################
## Keyframing tools ##
######################
def get_keying_flags(context):
"Retrieve the general keyframing flags from user preferences."
prefs = [Link]
ts = [Link].tool_settings
flags = set()
# Not adding INSERTKEY_VISUAL
if [Link].use_keyframe_insert_needed:
[Link]('INSERTKEY_NEEDED')
if ts.use_keyframe_cycle_aware:
[Link]('INSERTKEY_CYCLE_AWARE')
return flags
def get_4d_rot_lock(bone):
"Retrieve the lock status for 4D rotation."
if bone.lock_rotations_4d:
return [bone.lock_rotation_w, *bone.lock_rotation]
else:
return [all(bone.lock_rotation)] * 4
if not no_rot:
if bone.rotation_mode == 'QUATERNION':
keyframe_channels('rotation_quaternion', get_4d_rot_lock(bone))
elif bone.rotation_mode == 'AXIS_ANGLE':
keyframe_channels('rotation_axis_angle', get_4d_rot_lock(bone))
else:
keyframe_channels('rotation_euler', bone.lock_rotation)
if not no_scale:
keyframe_channels('scale', bone.lock_scale)
######################
## Constraint tools ##
######################
def get_constraint_target_matrix(con):
target = [Link]
if target:
if [Link] == 'ARMATURE' and [Link]:
if [Link] in [Link]:
bone = [Link][[Link]]
return target.convert_space(
pose_bone=bone, matrix=[Link], from_space='POSE',
to_space=con.target_space)
else:
return target.convert_space(matrix=target.matrix_world,
from_space='WORLD', to_space=con.target_space)
return [Link](4)
tgt_matrix = get_constraint_target_matrix(con)
tgt_scale = tgt_matrix.to_scale()
use = [con.use_x, con.use_y, con.use_z]
if con.use_make_uniform:
if con.use_x and con.use_y and con.use_z:
total = tgt_matrix.determinant()
else:
total = 1
for i, use in enumerate(use):
if use:
total *= tgt_scale[i]
tgt_scale = [abs(total)**(1./3.)]*3
else:
for i, use in enumerate(use):
if not use:
tgt_scale[i] = 1
scale_delta = [
1 / (1 + ([Link](x, [Link]) - 1) * inf)
for x in tgt_scale
]
return old_matrix @ [Link]([*scale_delta, 1])
###############################
## Assign and keyframe tools ##
###############################
if undo_copy_scale:
matrix = undo_copy_scale_constraints(obj, bone, matrix)
bone.matrix_basis = matrix
if bone.rotation_mode == 'QUATERNION':
restore_channels('rotation_quaternion', old_rot_quat, get_4d_rot_lock(bone), no_rot)
bone.rotation_axis_angle = old_rot_axis
bone.rotation_euler = old_rot_euler
elif bone.rotation_mode == 'AXIS_ANGLE':
bone.rotation_quaternion = old_rot_quat
restore_channels('rotation_axis_angle', old_rot_axis, get_4d_rot_lock(bone), no_rot)
bone.rotation_euler = old_rot_euler
else:
bone.rotation_quaternion = old_rot_quat
bone.rotation_axis_angle = old_rot_axis
restore_channels('rotation_euler', old_rot_euler, bone.lock_rotation, no_rot)
# Keyframe properties
if keyflags is not None:
keyframe_transform_properties(
obj, bone_name, keyflags, ignore_locks=ignore_locks,
no_loc=no_loc, no_rot=no_rot, no_scale=no_scale
)
def flatten_curve_set(curves):
"Iterate over all FCurves inside a set of nested lists and dictionaries."
if curves is None:
pass
elif isinstance(curves, [Link]):
yield curves
elif isinstance(curves, dict):
for sub in [Link]():
yield from flatten_curve_set(sub)
else:
for sub in curves:
yield from flatten_curve_set(sub)
def find_action(action):
if isinstance(action, [Link]):
action = action.animation_data
if isinstance(action, [Link]):
action = [Link]
if isinstance(action, [Link]):
return action
else:
return None
def clean_action_empty_curves(action):
"Delete completely empty curves from the given action."
action = find_action(action)
for curve in list([Link]):
if curve.is_empty:
[Link](curve)
action.update_tag()
TRANSFORM_PROPS_LOCATION = frozenset(['location'])
TRANSFORM_PROPS_ROTATION = frozenset(['rotation_euler', 'rotation_quaternion',
'rotation_axis_angle'])
TRANSFORM_PROPS_SCALE = frozenset(['scale'])
TRANSFORM_PROPS_ALL = frozenset(TRANSFORM_PROPS_LOCATION |
TRANSFORM_PROPS_ROTATION | TRANSFORM_PROPS_SCALE)
class FCurveTable(object):
"Table for efficient lookup of FCurves by properties."
def __init__(self):
self.curve_map = [Link](dict)
class ActionCurveTable(FCurveTable):
"Table for efficient lookup of Action FCurves by properties."
class DriverCurveTable(FCurveTable):
"Table for efficient lookup of Driver FCurves by properties."
##################################
# Common bake operator settings ##
##################################
[Link].rigify_transfer_use_all_keys = [Link](
name="Bake All Keyed Frames",
description="Bake on every frame that has a key for any of the bones, as opposed to just the
relevant ones",
default=False
)
[Link].rigify_transfer_use_frame_range = [Link](
name="Limit Frame Range", description="Only bake keyframes in a certain frame range",
default=False
)
[Link].rigify_transfer_start_frame = [Link](
name="Start", description="First frame to transfer", default=0, min=0
)
[Link].rigify_transfer_end_frame = [Link](
name="End", description="Last frame to transfer", default=0, min=0
)
class RIGIFY_OT_get_frame_range([Link]):
bl_idname = "rigify.get_frame_range" + ('_'+rig_id if rig_id else '')
bl_label = "Get Frame Range"
bl_description = "Set start and end frame from scene"
bl_options = {'INTERNAL'}
@staticmethod
def get_range(context):
id_store = context.window_manager
if not id_store.rigify_transfer_use_frame_range:
return None
else:
return (id_store.rigify_transfer_start_frame,
id_store.rigify_transfer_end_frame)
@classmethod
def draw_range_ui(self, context, layout):
id_store = context.window_manager
row = [Link](align=True)
[Link](id_store, 'rigify_transfer_use_frame_range', icon='PREVIEW_RANGE',
text='')
row = [Link](align=True)
[Link] = id_store.rigify_transfer_use_frame_range
[Link](id_store, 'rigify_transfer_start_frame')
[Link](id_store, 'rigify_transfer_end_frame')
[Link](self.bl_idname, icon='TIME', text='')
#######################################
# Keyframe baking operator framework ##
#######################################
class RigifyOperatorMixinBase:
bl_options = {'UNDO', 'INTERNAL'}
class RigifyBakeKeyframesMixin(RigifyOperatorMixinBase):
"""Basic framework for an operator that updates a set of keyed frames."""
# Utilities
def nla_from_raw(self, frames):
"Convert frame(s) from inner action time to scene time."
return nla_tweak_to_scene(self.bake_anim, frames)
[Link] = get_keying_flags(context)
self.keyflags_switch = None
if context.window_manager.rigify_transfer_use_all_keys:
self.bake_add_curve_frames(self.bake_curve_table.curve_map)
def bake_add_frames_done(self):
"Computes and sets the final set of frames to bake."
frames = self.nla_from_raw(self.bake_frames_raw)
self.bake_frames = sorted(set(map(round, frames)))
def is_bake_empty(self):
return len(self.bake_frames_raw) == 0
def report_bake_empty(self):
self.bake_add_frames_done()
if self.is_bake_empty():
[Link]({'WARNING'}, 'No keys to bake.')
return True
return False
def get_bake_range(self):
"Returns the frame range that is being baked."
if self.bake_frame_range:
return self.bake_frame_range
else:
frames = self.bake_frames
return (frames[0], frames[-1])
def get_bake_range_pair(self):
"Returns the frame range that is being baked, both in scene and action time."
range = self.get_bake_range()
return range, self.nla_to_raw(range)
try:
self.before_save_state(context, rig)
finally:
self.after_save_state(context, rig)
[Link].frame_set(range[0])
delete_curve_keys_in_range(curves, range_raw)
@staticmethod
def draw_common_bake_ui(context, layout):
[Link](context.window_manager, 'rigify_transfer_use_all_keys')
RIGIFY_OT_get_frame_range.draw_range_ui(context, layout)
@classmethod
def poll(cls, context):
return find_action(context.active_object) is not None
if self.report_bake_empty():
return {'CANCELLED'}
try:
self.bake_save_state(context)
self.bake_apply_state(context)
except Exception as e:
traceback.print_exc()
[Link]({'ERROR'}, 'Exception: ' + str(e))
return {'FINISHED'}
if hasattr(self, 'draw'):
return context.window_manager.invoke_props_dialog(self)
else:
return context.window_manager.invoke_confirm(self, event)
class RigifySingleUpdateMixin(RigifyOperatorMixinBase):
"""Basic framework for an operator that updates only the current frame."""
try:
try:
self.before_save_state(context, obj)
state = self.save_frame_state(context, obj)
finally:
self.after_save_state(context, obj)
except Exception as e:
traceback.print_exc()
[Link]({'ERROR'}, 'Exception: ' + str(e))
return {'FINISHED'}
if hasattr(self, 'draw'):
return context.window_manager.invoke_props_popup(self, event)
else:
return [Link](context)
#############################
## Generic Snap (FK to IK) ##
#############################
class RigifyGenericSnapBase:
input_bones: StringProperty(name="Input Chain")
output_bones: StringProperty(name="Output Chain")
ctrl_bones: StringProperty(name="Input Controls")
@classmethod
def description(cls, context, props):
return "Snap " + [Link] + " on the current frame"
@classmethod
def description(cls, context, props):
return "Apply snap " + [Link] + " to keyframes"
#############################
## Generic Clear Keyframes ##
#############################
class POSE_OT_rigify_clear_keyframes([Link]):
bl_idname = "pose.rigify_clear_keyframes_" + rig_id
bl_label = "Clear Keyframes And Transformation"
bl_options = {'UNDO', 'INTERNAL'}
bl_description = "Remove all keyframes for the relevant bones and reset transformation"
@classmethod
def poll(cls, context):
return find_action(context.active_object) is not None
curve_table = ActionCurveTable(context.active_object)
curves = list(curve_table.list_all_prop_curves(bone_list,
TRANSFORM_PROPS_ALL))
key_range = RIGIFY_OT_get_frame_range.get_range(context)
range_raw = nla_tweak_to_scene(obj.animation_data, key_range, invert=True)
delete_curve_keys_in_range(curves, range_raw)
clean_action_empty_curves(obj)
obj.update_tag(refresh={'TIME'})
return {'FINISHED'}
#########################################
## "Visual Transform" helper functions ##
#########################################
def get_local_pose_matrix(pose_bone):
""" Returns the local transform matrix of the given pose bone.
"""
return get_pose_matrix_in_other_space(pose_bone.matrix, pose_bone)
if pose_bone.rotation_mode == 'QUATERNION':
pose_bone.rotation_quaternion = q
elif pose_bone.rotation_mode == 'AXIS_ANGLE':
pose_bone.rotation_axis_angle[0] = [Link]
pose_bone.rotation_axis_angle[1] = [Link][0]
pose_bone.rotation_axis_angle[2] = [Link][1]
pose_bone.rotation_axis_angle[3] = [Link][2]
else:
pose_bone.rotation_euler = q.to_euler(pose_bone.rotation_mode)
##############################
## IK/FK snapping functions ##
##############################
axis = target_matrix.to_3x3().col[1].normalized()
ctrl_ik = ctrl_ik or bone_ik
def distance(angle):
# Rotate the bone and return the actual angle between bones
ctrl_ik.rotation_euler[1] = angle
view_layer.update()
return -(bone_ik.[Link]().dot(axis))
start_angle = ctrl_ik.rotation_euler[1]
ctrl_ik.rotation_euler[1] = alpha_min
view_layer.update()
for i in range(3):
cur_scale = bone_ik.matrix.to_scale()
ctrl_ik.scale = [
v * i / c for v, i, c in zip(bone_ik.scale, input_scale, cur_scale)
]
view_layer.update()
def set_pole(pvi):
""" Set pole target's position based on a vector
from the arm center line.
"""
# Translate pvi into armature space
pole_loc = a + (ikv/2) + pvi
view_layer.update()
set_pole(pv)
##########
## Misc ##
##########
def parse_bone_names(names_string):
if names_string[0] == '[' and names_string[-1] == ']':
return eval(names_string)
else:
return names_string
########################
## Limb Snap IK to FK ##
########################
class RigifyLimbIk2FkBase:
prop_bone: StringProperty(name="Settings Bone")
pole_prop: StringProperty(name="Pole target switch", default="pole_vector")
fk_bones: StringProperty(name="FK Bone Chain")
ik_bones: StringProperty(name="IK Result Bone Chain")
ctrl_bones: StringProperty(name="IK Controls")
tail_bones: StringProperty(name="Tail IK Controls", default="[]")
extra_ctrls: StringProperty(name="Extra IK Controls")
else:
correct_rotation(context.view_layer, ik_bones[0], matrices[0],
ctrl_ik=ctrl_bones[0])
matrices = all_matrices[0:len(ik_bones)]
tail_matrices = all_matrices[len(ik_bones):]
use_pole = self.get_use_pole(obj)
context.view_layer.update()
set_transform_from_matrix(
obj, self.ctrl_bone_list[-1], end_mat, keyflags=[Link],
undo_copy_scale=True,
)
set_transform_from_matrix(
obj, self.ctrl_bone_list[0], matrices[0],
no_scale=True, no_rot=use_pole,
)
# Keyframe controls
if [Link] is not None:
if use_pole:
keyframe_transform_properties(
obj, self.ctrl_bone_list[1], [Link],
no_rot=True, no_scale=True,
)
keyframe_transform_properties(
obj, self.ctrl_bone_list[0], [Link],
no_rot=use_pole,
)
####################
## Toggle IK Pole ##
####################
class RigifyLimbTogglePoleBase(RigifyLimbIk2FkBase):
use_pole: [Link](name="Use Pole Vector")
# Keyframe controls
if [Link] is not None:
if self.use_pole:
keyframe_transform_properties(
obj, self.ctrl_bone_list[1], [Link],
no_rot=True, no_scale=True,
)
else:
keyframe_transform_properties(
obj, self.ctrl_bone_list[0], [Link],
no_loc=True, no_scale=True,
)
class POSE_OT_rigify_limb_toggle_pole_bake(RigifyLimbTogglePoleBase,
RigifyBakeKeyframesMixin, [Link]):
bl_idname = "pose.rigify_limb_toggle_pole_bake_" + rig_id
bl_label = "Apply Toggle Pole To Keyframes"
bl_description = "Switch the IK chain between pole and rotation over a frame range"
rot_curves = self.bake_get_all_bone_curves(self.ctrl_bone_list[0],
TRANSFORM_PROPS_ROTATION)
pole_curves = self.bake_get_all_bone_curves(self.ctrl_bone_list[1],
TRANSFORM_PROPS_LOCATION)
return rot_curves + pole_curves
#######################
## Leg Snap IK to FK ##
#######################
class RigifyLegRollIk2FkBase(RigifyLimbIk2FkBase):
heel_control: StringProperty(name="Heel")
use_roll: [Link](
name="Use Roll", size=3, default=(True, True, False),
description="Specifies which rotation axes of the heel roll control to use"
)
MODES = {
'ZXY': ((0, 2), (1, 0, 2)),
'XZY': ((2, 0), (2, 0, 1)),
}
if any(self.use_roll):
foot_matrix = all_matrices[len(ik_bones) - 1]
ctrl_matrix = all_matrices[len(self.fk_bone_list)]
heel_bone = [Link][self.heel_control]
foot_bone = ctrl_bones[-1]
# If the last rotation (yaw) is unused, move it to be first for better result
if not use_roll[turn]:
rot_mode = rot_mode[1:] + rot_mode[0:1]
heel_bone.rotation_euler = [
(val if use else 0) for val, use in zip(local_rot, use_roll)
]
set_custom_property_value(
obj, heel_bone.name, 'Toe_Roll', val, keyflags=[Link])
class POSE_OT_rigify_leg_roll_ik2fk(
RigifyLegRollIk2FkBase, RigifySingleUpdateMixin, [Link]):
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
bl_idname = "pose.rigify_leg_roll_ik2fk_" + rig_id
bl_label = "Snap IK->FK With Roll"
bl_description = "Snap the IK chain to FK result, using foot roll to preserve the current IK "
"control orientation as much as possible"
class POSE_OT_rigify_leg_roll_ik2fk_bake(
RigifyLegRollIk2FkBase, RigifyBakeKeyframesMixin, [Link]):
bl_idname = "pose.rigify_leg_roll_ik2fk_bake_" + rig_id
bl_label = "Apply Snap IK->FK To Keyframes"
bl_description = "Snap the IK chain keyframes to FK result, using foot roll to preserve the "
"current IK control orientation as much as possible"
################################
## Switchable Parent operator ##
################################
class RigifySwitchParentBase:
bone: StringProperty(name="Control Bone")
prop_bone: StringProperty(name="Property Bone")
prop_id: StringProperty(name="Property")
parent_names: StringProperty(name="Parent Names")
locks: [Link](name="Locked", size=3,
default=[False,False,False])
parent_items = [('0','None','None')]
selected: [Link](
name='Selected Parent',
items=lambda s,c: RigifySwitchParentBase.parent_items
)
context.view_layer.update()
parents = [Link](self.parent_names)
parent_items = [(str(i), name, name) for i, name in enumerate(parents)]
RigifySwitchParentBase.parent_items = parent_items
[Link] = str([Link][self.prop_bone][self.prop_id])
class POSE_OT_rigify_switch_parent(RigifySwitchParentBase, RigifySingleUpdateMixin,
[Link]):
bl_idname = "pose.rigify_switch_parent_" + rig_id
bl_label = "Switch Parent (Keep Transform)"
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
bl_description = "Switch parent, preserving the bone position and orientation"
# ---------------------------------------------
# Helper: Snap bone using temporary constraint
def snap_bone_with_constraint(obj, snap_bone, source_bone_name):
constraint = snap_bone.[Link](type='COPY_TRANSFORMS')
[Link] = "TempSnap"
[Link] = obj
[Link] = source_bone_name
[Link].view_layer.update()
[Link].select_all(action='DESELECT')
snap_bone.[Link] = True
[Link] = snap_bone.bone
[Link].visual_transform_apply()
snap_bone.[Link](constraint)
# ---------------------------------------------
# Base Operator
class SnapBoneListOperator([Link]):
bl_options = {'REGISTER', 'UNDO'}
bl_idname = "object.snap_bone_list"
bl_label = "Snap Bone List"
bl_description = "Snap bones based on two parallel lists"
prop_bone: [Link](default="")
prop_name: [Link](default="")
prop_value: [Link](default="")
def get_target_bones(self):
return []
def get_snap_bones(self):
return []
pose_bones = [Link]
# Set custom property and key it
if self.prop_bone and self.prop_name:
try:
prop_bone = pose_bones[self.prop_bone]
except KeyError:
[Link]({'ERROR'}, f"Bone '{self.prop_bone}' not found")
return {'CANCELLED'}
existing_value = prop_bone.get(self.prop_name)
if existing_value is None:
[Link]({'ERROR'}, f"Property '{self.prop_name}' not found on
bone '{self.prop_bone}'")
return {'CANCELLED'}
prop_bone[self.prop_name] = new_value
prop_bone.keyframe_insert(data_path=f'["{self.prop_name}"]',
group=self.prop_bone)
# Snap bones
target_bones = self.get_target_bones()
snap_bones = self.get_snap_bones()
if len(target_bones) != len(snap_bones):
[Link]({'ERROR'}, "Bone list lengths do not match")
return {'CANCELLED'}
if snap.rotation_mode == 'QUATERNION':
path = f'[Link]["{snap_name}"].rotation_quaternion'
if any(f.data_path == path for f in [Link]):
snap.keyframe_insert(data_path="rotation_quaternion",
group=snap_name)
else:
path = f'[Link]["{snap_name}"].rotation_euler'
if any(f.data_path == path for f in [Link]):
snap.keyframe_insert(data_path="rotation_euler",
group=snap_name)
class POSE_OT_finger_index_L_ik_to_fk(SnapBoneListOperator):
bl_idname = "pose.finger_index_l_ik_to_fk"
bl_label = "Finger index.L IK to FK"
bl_description = "Snap f_index.L from IK to FK"
def get_target_bones(self):
return ["MCH-REF-f_index.03IK.L", "MCH-REF-f_index.pole.L"]
def get_snap_bones(self):
return ["f_index.03IK.L", "f_index.pole.L"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_index.L_IK_FK")
prop_value: [Link](default=0)
class POSE_OT_finger_index_L_fk_to_ik(SnapBoneListOperator):
bl_idname = "pose.finger_index_l_fk_to_ik"
bl_label = "Finger index.L FK to IK"
bl_description = "Snap f_index.L from FK to IK"
def get_target_bones(self):
return ["MCH-f_index.01IK.L", "MCH-f_index.02IK.L","MCH-f_index.03IK.L"]
def get_snap_bones(self):
return ["f_index.01FK.L", "f_index.02FK.L","f_index.03FK.L"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_index.L_IK_FK")
prop_value: [Link](default=1)
class POSE_OT_finger_index_R_ik_to_fk(SnapBoneListOperator):
bl_idname = "pose.finger_index_r_ik_to_fk"
bl_label = "Finger index.R IK to FK"
bl_description = "Snap f_index.R from IK to FK"
def get_target_bones(self):
return ["MCH-REF-f_index.03IK.R", "MCH-REF-f_index.pole.R"]
def get_snap_bones(self):
return ["f_index.03IK.R", "f_index.pole.R"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_index.R_IK_FK")
prop_value: [Link](default=0)
class POSE_OT_finger_index_R_fk_to_ik(SnapBoneListOperator):
bl_idname = "pose.finger_index_r_fk_to_ik"
bl_label = "Finger index.R FK to IK"
bl_description = "Snap f_index.R from FK to IK"
def get_target_bones(self):
return ["MCH-f_index.01IK.R", "MCH-f_index.02IK.R","MCH-f_index.03IK.R"]
def get_snap_bones(self):
return ["f_index.01FK.R", "f_index.02FK.R","f_index.03FK.R"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_index.R_IK_FK")
prop_value: [Link](default=1)
class POSE_OT_finger_middle_L_ik_to_fk(SnapBoneListOperator):
bl_idname = "pose.finger_middle_l_ik_to_fk"
bl_label = "Finger middle.L IK to FK"
bl_description = "Snap f_middle.L from IK to FK"
def get_target_bones(self):
return ["MCH-REF-f_middle.03IK.L", "MCH-REF-f_middle.pole.L"]
def get_snap_bones(self):
return ["f_middle.03IK.L", "f_middle.pole.L"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_middle.L_IK_FK")
prop_value: [Link](default=0)
class POSE_OT_finger_middle_L_fk_to_ik(SnapBoneListOperator):
bl_idname = "pose.finger_middle_l_fk_to_ik"
bl_label = "Finger middle.L FK to IK"
bl_description = "Snap f_middle.L from FK to IK"
def get_target_bones(self):
return ["MCH-f_middle.01IK.L", "MCH-f_middle.02IK.L","MCH-
f_middle.03IK.L"]
def get_snap_bones(self):
return ["f_middle.01FK.L", "f_middle.02FK.L","f_middle.03FK.L"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_middle.L_IK_FK")
prop_value: [Link](default=1)
class POSE_OT_finger_middle_R_ik_to_fk(SnapBoneListOperator):
bl_idname = "pose.finger_middle_r_ik_to_fk"
bl_label = "Finger middle.R IK to FK"
bl_description = "Snap f_middle.R from IK to FK"
def get_target_bones(self):
return ["MCH-REF-f_middle.03IK.R", "MCH-REF-f_middle.pole.R"]
def get_snap_bones(self):
return ["f_middle.03IK.R", "f_middle.pole.R"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_middle.R_IK_FK")
prop_value: [Link](default=0)
class POSE_OT_finger_middle_R_fk_to_ik(SnapBoneListOperator):
bl_idname = "pose.finger_middle_r_fk_to_ik"
bl_label = "Finger middle.R FK to IK"
bl_description = "Snap f_middle.R from FK to IK"
def get_target_bones(self):
return ["MCH-f_middle.01IK.R", "MCH-f_middle.02IK.R","MCH-
f_middle.03IK.R"]
def get_snap_bones(self):
return ["f_middle.01FK.R", "f_middle.02FK.R","f_middle.03FK.R"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_middle.R_IK_FK")
prop_value: [Link](default=1)
class POSE_OT_finger_ring_L_ik_to_fk(SnapBoneListOperator):
bl_idname = "pose.finger_ring_l_ik_to_fk"
bl_label = "Finger ring.L IK to FK"
bl_description = "Snap f_ring.L from IK to FK"
def get_target_bones(self):
return ["MCH-REF-f_ring.03IK.L", "MCH-REF-f_ring.pole.L"]
def get_snap_bones(self):
return ["f_ring.03IK.L", "f_ring.pole.L"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_ring.L_IK_FK")
prop_value: [Link](default=0)
class POSE_OT_finger_ring_L_fk_to_ik(SnapBoneListOperator):
bl_idname = "pose.finger_ring_l_fk_to_ik"
bl_label = "Finger ring.L FK to IK"
bl_description = "Snap f_ring.L from FK to IK"
def get_target_bones(self):
return ["MCH-f_ring.01IK.L", "MCH-f_ring.02IK.L","MCH-f_ring.03IK.L"]
def get_snap_bones(self):
return ["f_ring.01FK.L", "f_ring.02FK.L","f_ring.03FK.L"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_ring.L_IK_FK")
prop_value: [Link](default=1)
class POSE_OT_finger_ring_R_ik_to_fk(SnapBoneListOperator):
bl_idname = "pose.finger_ring_r_ik_to_fk"
bl_label = "Finger ring.R IK to FK"
bl_description = "Snap f_ring.R from IK to FK"
def get_target_bones(self):
return ["MCH-REF-f_ring.03IK.R", "MCH-REF-f_ring.pole.R"]
def get_snap_bones(self):
return ["f_ring.03IK.R", "f_ring.pole.R"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_ring.R_IK_FK")
prop_value: [Link](default=0)
class POSE_OT_finger_ring_R_fk_to_ik(SnapBoneListOperator):
bl_idname = "pose.finger_ring_r_fk_to_ik"
bl_label = "Finger ring.R FK to IK"
bl_description = "Snap f_ring.R from FK to IK"
def get_target_bones(self):
return ["MCH-f_ring.01IK.R", "MCH-f_ring.02IK.R","MCH-f_ring.03IK.R"]
def get_snap_bones(self):
return ["f_ring.01FK.R", "f_ring.02FK.R","f_ring.03FK.R"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_ring.R_IK_FK")
prop_value: [Link](default=1)
class POSE_OT_finger_pinky_L_ik_to_fk(SnapBoneListOperator):
bl_idname = "pose.finger_pinky_l_ik_to_fk"
bl_label = "Finger pinky.L IK to FK"
bl_description = "Snap f_pinky.L from IK to FK"
def get_target_bones(self):
return ["MCH-REF-f_pinky.03IK.L", "MCH-REF-f_pinky.pole.L"]
def get_snap_bones(self):
return ["f_pinky.03IK.L", "f_pinky.pole.L"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_pinky.L_IK_FK")
prop_value: [Link](default=0)
class POSE_OT_finger_pinky_L_fk_to_ik(SnapBoneListOperator):
bl_idname = "pose.finger_pinky_l_fk_to_ik"
bl_label = "Finger pinky.L FK to IK"
bl_description = "Snap f_pinky.L from FK to IK"
def get_target_bones(self):
return ["MCH-f_pinky.01IK.L", "MCH-f_pinky.02IK.L","MCH-f_pinky.03IK.L"]
def get_snap_bones(self):
return ["f_pinky.01FK.L", "f_pinky.02FK.L","f_pinky.03FK.L"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_pinky.L_IK_FK")
prop_value: [Link](default=1)
class POSE_OT_finger_pinky_R_ik_to_fk(SnapBoneListOperator):
bl_idname = "pose.finger_pinky_r_ik_to_fk"
bl_label = "Finger pinky.R IK to FK"
bl_description = "Snap f_pinky.R from IK to FK"
def get_target_bones(self):
return ["MCH-REF-f_pinky.03IK.R", "MCH-REF-f_pinky.pole.R"]
def get_snap_bones(self):
return ["f_pinky.03IK.R", "f_pinky.pole.R"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_pinky.R_IK_FK")
prop_value: [Link](default=0)
class POSE_OT_finger_pinky_R_fk_to_ik(SnapBoneListOperator):
bl_idname = "pose.finger_pinky_r_fk_to_ik"
bl_label = "Finger pinky.R FK to IK"
bl_description = "Snap f_pinky.R from FK to IK"
def get_target_bones(self):
return ["MCH-f_pinky.01IK.R", "MCH-f_pinky.02IK.R","MCH-f_pinky.03IK.R"]
def get_snap_bones(self):
return ["f_pinky.01FK.R", "f_pinky.02FK.R","f_pinky.03FK.R"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_pinky.R_IK_FK")
prop_value: [Link](default=1)
class POSE_OT_finger_thumb_L_ik_to_fk(SnapBoneListOperator):
bl_idname = "pose.finger_thumb_l_ik_to_fk"
bl_label = "Finger thumb.L IK to FK"
bl_description = "Snap f_thumb.L from IK to FK"
def get_target_bones(self):
return ["MCH-REF-thumb.03IK.L", "MCH-REF-f_thumb.pole.L"]
def get_snap_bones(self):
return ["f_thumb.03IK.L", "f_thumb.pole.L"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_thumb.L_IK_FK")
prop_value: [Link](default=0)
class POSE_OT_finger_thumb_L_fk_to_ik(SnapBoneListOperator):
bl_idname = "pose.finger_thumb_l_fk_to_ik"
bl_label = "Finger thumb.L FK to IK"
bl_description = "Snap f_thumb.L from FK to IK"
def get_target_bones(self):
return ["MCH-thumb.01IK.L", "MCH-thumb.02IK.L","MCH-thumb.03IK.L"]
def get_snap_bones(self):
return ["f_thumb.01FK.L", "f_thumb.02FK.L","f_thumb.03FK.L"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_thumb.L_IK_FK")
prop_value: [Link](default=1)
class POSE_OT_finger_thumb_R_ik_to_fk(SnapBoneListOperator):
bl_idname = "pose.finger_thumb_r_ik_to_fk"
bl_label = "Finger thumb.R IK to FK"
bl_description = "Snap f_thumb.R from IK to FK"
def get_target_bones(self):
return ["MCH-REF-thumb.03IK.R", "MCH-REF-f_thumb.pole.R"]
def get_snap_bones(self):
return ["f_thumb.03IK.R", "f_thumb.pole.R"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_thumb.R_IK_FK")
prop_value: [Link](default=0)
class POSE_OT_finger_thumb_R_fk_to_ik(SnapBoneListOperator):
bl_idname = "pose.finger_thumb_r_fk_to_ik"
bl_label = "Finger thumb.R FK to IK"
bl_description = "Snap f_thumb.R from FK to IK"
def get_target_bones(self):
return ["MCH-thumb.01IK.R", "MCH-thumb.02IK.R","MCH-thumb.03IK.R"]
def get_snap_bones(self):
return ["f_thumb.01FK.R", "f_thumb.02FK.R","f_thumb.03FK.R"]
prop_bone: [Link](default="PROPERTIES")
prop_name: [Link](default="f_thumb.R_IK_FK")
prop_value: [Link](default=1)
###################
## Rig UI Panels ##
###################
class RigUI([Link]):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_label = "P2M Regular Rig Main Properties"
bl_idname = "VIEW3D_PT_rig_ui_" + rig_id
bl_category = 'Item'
@classmethod
def poll(self, context):
if [Link] != 'POSE':
return False
try:
return (context.active_object.[Link]("rig_id") == rig_id)
except (AttributeError, KeyError, TypeError):
return False
def is_selected(names):
# Returns whether any of the named bones are selected.
if isinstance(names, list) or isinstance(names, set):
return not selected_bones.isdisjoint(names)
elif names in selected_bones:
return True
return False
num_rig_separators = [-1]
def emit_rig_separator():
if num_rig_separators[0] >= 0:
[Link]()
num_rig_separators[0] += 1
if is_selected({'PROPERTIES'}):
emit_rig_separator()
[Link](pose_bones['PROPERTIES'], '["P2design_logo"]', text='P2design
logo', slider=False)
[Link](pose_bones['PROPERTIES'], '["Smooth"]', text='Smooth',
slider=False)
[Link](pose_bones['PROPERTIES'], '["Subdiv"]', text='Subdiv',
slider=False)
[Link](pose_bones['PROPERTIES'], '["color_1_RGB"]', text='color 1
RGB', slider=False)
[Link](pose_bones['PROPERTIES'], '["color_2_RGB"]', text='color 2
RGB', slider=False)
if
is_selected({'f_thumb.pole.L','f_thumb.01FK.L','f_thumb.02FK.L','f_thumb.03FK.L','f_thumb.03IK
.L'}):
emit_rig_separator()
[Link](text="Finger snap")
[Link]("pose.finger_thumb_l_ik_to_fk", text="f_thumb.L IK->FK",
icon = 'SNAP_ON')
[Link]("pose.finger_thumb_l_fk_to_ik", text="f_thumb.L FK->IK",
icon = 'SNAP_ON')
[Link](pose_bones['PROPERTIES'], '["f_thumb.L_IK_FK"]', text='f
thumb L IK FK', slider=True)
if
is_selected({'f_thumb.pole.R','f_thumb.01FK.R','f_thumb.02FK.R','f_thumb.03FK.R','f_thumb.03I
K.R'}):
emit_rig_separator()
[Link](text="Finger snap")
[Link]("pose.finger_thumb_r_ik_to_fk", text="f_thumb.R IK->FK",
icon = 'SNAP_ON')
[Link]("pose.finger_thumb_r_fk_to_ik", text="f_thumb.R FK->IK",
icon = 'SNAP_ON')
[Link](pose_bones['PROPERTIES'], '["f_thumb.R_IK_FK"]', text='f
thumb R IK FK', slider=True)
if
is_selected({'f_index.pole.L','f_index.01FK.L','f_index.02FK.L','f_index.03FK.L','f_index.03IK.L'}
):
emit_rig_separator()
[Link](text="Finger snap")
[Link]("pose.finger_index_l_ik_to_fk", text="f_index.L IK->FK",
icon = 'SNAP_ON')
[Link]("pose.finger_index_l_fk_to_ik", text="f_index.L FK->IK",
icon = 'SNAP_ON')
[Link](pose_bones['PROPERTIES'], '["f_index.L_IK_FK"]', text='f
index L IK FK', slider=True)
if
is_selected({'f_index.pole.R','f_index.01FK.R','f_index.02FK.R','f_index.03FK.R','f_index.03IK.R'
}):
emit_rig_separator()
[Link](text="Finger snap")
[Link]("pose.finger_index_r_ik_to_fk", text="f_index.R IK->FK",
icon = 'SNAP_ON')
[Link]("pose.finger_index_r_fk_to_ik", text="f_index.R FK->IK",
icon = 'SNAP_ON')
[Link](pose_bones['PROPERTIES'], '["f_index.R_IK_FK"]', text='f
index R IK FK', slider=True)
if
is_selected({'f_middle.pole.L','f_middle.01FK.L','f_middle.02FK.L','f_middle.03FK.L','f_middle.03
IK.L'}):
emit_rig_separator()
[Link](text="Finger snap")
[Link]("pose.finger_middle_l_ik_to_fk", text="f_middle.L IK->FK",
icon = 'SNAP_ON')
[Link]("pose.finger_middle_l_fk_to_ik", text="f_middle.L FK->IK",
icon = 'SNAP_ON')
[Link](pose_bones['PROPERTIES'], '["f_middle.L_IK_FK"]', text='f
middle L IK FK', slider=True)
if
is_selected({'f_middle.pole.R','f_middle.01FK.R','f_middle.02FK.R','f_middle.03FK.R','f_middle.0
3IK.R'}):
emit_rig_separator()
[Link](text="Finger snap")
[Link]("pose.finger_middle_r_ik_to_fk", text="f_middle.R IK-
>FK", icon = 'SNAP_ON')
[Link]("pose.finger_middle_r_fk_to_ik", text="f_middle.R FK-
>IK", icon = 'SNAP_ON')
[Link](pose_bones['PROPERTIES'], '["f_middle.R_IK_FK"]', text='f
middle R IK FK', slider=True)
if
is_selected({'f_ring.pole.L','f_ring.01FK.L','f_ring.02FK.L','f_ring.03FK.L','f_ring.03IK.L'}):
emit_rig_separator()
[Link](text="Finger snap")
[Link]("pose.finger_ring_l_ik_to_fk", text="f_ring.L IK->FK", icon
= 'SNAP_ON')
[Link]("pose.finger_ring_l_fk_to_ik", text="f_ring.L FK->IK", icon
= 'SNAP_ON')
[Link](pose_bones['PROPERTIES'], '["f_ring.L_IK_FK"]', text='f ring L
IK FK', slider=True)
if
is_selected({'f_ring.pole.R','f_ring.01FK.R','f_ring.02FK.R','f_ring.03FK.R','f_ring.03IK.R'}):
emit_rig_separator()
[Link](text="Finger snap")
[Link]("pose.finger_ring_r_ik_to_fk", text="f_ring.R IK->FK", icon
= 'SNAP_ON')
[Link]("pose.finger_ring_r_fk_to_ik", text="f_ring.R FK->IK", icon
= 'SNAP_ON')
[Link](pose_bones['PROPERTIES'], '["f_ring.R_IK_FK"]', text='f ring
R IK FK', slider=True)
if
is_selected({'f_pinky.pole.L','f_pinky.01FK.L','f_pinky.02FK.L','f_pinky.03FK.L','f_pinky.03IK.L'}
):
emit_rig_separator()
[Link](text="Finger snap")
[Link]("pose.finger_pinky_l_ik_to_fk", text="f_pinky.L IK->FK",
icon = 'SNAP_ON')
[Link]("pose.finger_pinky_l_fk_to_ik", text="f_pinky.L FK->IK",
icon = 'SNAP_ON')
[Link](pose_bones['PROPERTIES'], '["f_pinky.L_IK_FK"]', text='f
pinky L IK FK', slider=True)
if
is_selected({'f_pinky.pole.R','f_pinky.01FK.R','f_pinky.02FK.R','f_pinky.03FK.R','f_pinky.03IK.R'}
):
emit_rig_separator()
[Link](text="Finger snap")
[Link]("pose.finger_pinky_r_ik_to_fk", text="f_pinky.R IK->FK",
icon = 'SNAP_ON')
[Link]("pose.finger_pinky_r_fk_to_ik", text="f_pinky.R FK->IK",
icon = 'SNAP_ON')
[Link](pose_bones['PROPERTIES'], '["f_pinky.R_IK_FK"]', text='f
pinky R IK FK', slider=True)
if is_selected({'Prop_Slot.L'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (Prop_Slot.L)', icon='DOWNARROW_HLT')
[Link] = 'Prop_Slot.L'
props.prop_bone = 'Prop_Slot.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L"]'
[Link] = (False, False, False)
[Link](pose_bones['Prop_Slot.L'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'Prop_Slot.L'
props.prop_bone = 'Prop_Slot.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L"]'
[Link] = (False, False, False)
if is_selected({'finger_IK_parent.L'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (finger_IK_parent.L)', icon='DOWNARROW_HLT')
[Link] = 'finger_IK_parent.L'
props.prop_bone = 'finger_IK_parent.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L"]'
[Link] = (False, False, False)
[Link](pose_bones['finger_IK_parent.L'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'finger_IK_parent.L'
props.prop_bone = 'finger_IK_parent.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L"]'
[Link] = (False, False, False)
if is_selected({'f_index.03IK.L'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_index.03IK.L)', icon='DOWNARROW_HLT')
[Link] = 'f_index.03IK.L'
props.prop_bone = 'f_index.03IK.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "finger_IK_parent.L"]'
[Link] = (False, False, False)
[Link](pose_bones['f_index.03IK.L'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_index.03IK.L'
props.prop_bone = 'f_index.03IK.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "finger_IK_parent.L"]'
[Link] = (False, False, False)
if is_selected({'f_index.pole.L'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_index.pole.L)', icon='DOWNARROW_HLT')
[Link] = 'f_index.pole.L'
props.prop_bone = 'f_index.pole.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "f_index.03IK.L"]'
[Link] = (False, False, False)
[Link](pose_bones['f_index.pole.L'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_index.pole.L'
props.prop_bone = 'f_index.pole.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "f_index.03IK.L"]'
[Link] = (False, False, False)
if is_selected({'f_middle.03IK.L'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_middle.03IK.L)', icon='DOWNARROW_HLT')
[Link] = 'f_middle.03IK.L'
props.prop_bone = 'f_middle.03IK.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "finger_IK_parent.L"]'
[Link] = (False, False, False)
[Link](pose_bones['f_middle.03IK.L'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_middle.03IK.L'
props.prop_bone = 'f_middle.03IK.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "finger_IK_parent.L"]'
[Link] = (False, False, False)
if is_selected({'f_middle.pole.L'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_middle.pole.L)', icon='DOWNARROW_HLT')
[Link] = 'f_middle.pole.L'
props.prop_bone = 'f_middle.pole.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "f_middle.03IK.L"]'
[Link] = (False, False, False)
[Link](pose_bones['f_middle.pole.L'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_middle.pole.L'
props.prop_bone = 'f_middle.pole.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "f_middle.03IK.L"]'
[Link] = (False, False, False)
if is_selected({'f_pinky.03IK.L'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_pinky.03IK.L)', icon='DOWNARROW_HLT')
[Link] = 'f_pinky.03IK.L'
props.prop_bone = 'f_pinky.03IK.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "finger_IK_parent.L"]'
[Link] = (False, False, False)
[Link](pose_bones['f_pinky.03IK.L'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_pinky.03IK.L'
props.prop_bone = 'f_pinky.03IK.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "finger_IK_parent.L"]'
[Link] = (False, False, False)
if is_selected({'f_pinky.pole.L'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_pinky.pole.L)', icon='DOWNARROW_HLT')
[Link] = 'f_pinky.pole.L'
props.prop_bone = 'f_pinky.pole.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "f_pinky.03IK.L"]'
[Link] = (False, False, False)
[Link](pose_bones['f_pinky.pole.L'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_pinky.pole.L'
props.prop_bone = 'f_pinky.pole.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "f_pinky.03IK.L"]'
[Link] = (False, False, False)
if is_selected({'f_ring.03IK.L'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_ring.03IK.L)', icon='DOWNARROW_HLT')
[Link] = 'f_ring.03IK.L'
props.prop_bone = 'f_ring.03IK.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "finger_IK_parent.L"]'
[Link] = (False, False, False)
[Link](pose_bones['f_ring.03IK.L'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_ring.03IK.L'
props.prop_bone = 'f_ring.03IK.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "finger_IK_parent.L"]'
[Link] = (False, False, False)
if is_selected({'f_ring.pole.L'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_ring.pole.L)', icon='DOWNARROW_HLT')
[Link] = 'f_ring.pole.L'
props.prop_bone = 'f_ring.pole.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "f_ring.03IK.L"]'
[Link] = (False, False, False)
[Link](pose_bones['f_ring.pole.L'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_ring.pole.L'
props.prop_bone = 'f_ring.pole.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "f_ring.03IK.L"]'
[Link] = (False, False, False)
if is_selected({'f_thumb.03IK.L'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_thumb.03IK.L)', icon='DOWNARROW_HLT')
[Link] = 'f_thumb.03IK.L'
props.prop_bone = 'f_thumb.03IK.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "finger_IK_parent.L"]'
[Link] = (False, False, False)
[Link](pose_bones['f_thumb.03IK.L'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_thumb.03IK.L'
props.prop_bone = 'f_thumb.03IK.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "finger_IK_parent.L"]'
[Link] = (False, False, False)
if is_selected({'f_thumb.pole.L'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_thumb.pole.L)', icon='DOWNARROW_HLT')
[Link] = 'f_thumb.pole.L'
props.prop_bone = 'f_thumb.pole.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "f_thumb.03IK.L"]'
[Link] = (False, False, False)
[Link](pose_bones['f_thumb.pole.L'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_thumb.pole.L'
props.prop_bone = 'f_thumb.pole.L'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].L", "hand_ik.L", "hand.L", "f_thumb.03IK.L"]'
[Link] = (False, False, False)
if is_selected({'Prop_Slot.R'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (Prop_Slot.R)', icon='DOWNARROW_HLT')
[Link] = 'Prop_Slot.R'
props.prop_bone = 'Prop_Slot.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R"]'
[Link] = (False, False, False)
[Link](pose_bones['Prop_Slot.R'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'Prop_Slot.R'
props.prop_bone = 'Prop_Slot.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R"]'
[Link] = (False, False, False)
if is_selected({'finger_IK_parent.R'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (finger_IK_parent.R)', icon='DOWNARROW_HLT')
[Link] = 'finger_IK_parent.R'
props.prop_bone = 'finger_IK_parent.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R"]'
[Link] = (False, False, False)
[Link](pose_bones['finger_IK_parent.R'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'finger_IK_parent.R'
props.prop_bone = 'finger_IK_parent.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R"]'
[Link] = (False, False, False)
if is_selected({'f_index.03IK.R'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_index.03IK.R)', icon='DOWNARROW_HLT')
[Link] = 'f_index.03IK.R'
props.prop_bone = 'f_index.03IK.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "finger_IK_parent.R"]'
[Link] = (False, False, False)
[Link](pose_bones['f_index.03IK.R'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_index.03IK.R'
props.prop_bone = 'f_index.03IK.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "finger_IK_parent.R"]'
[Link] = (False, False, False)
if is_selected({'f_index.pole.R'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_index.pole.R)', icon='DOWNARROW_HLT')
[Link] = 'f_index.pole.R'
props.prop_bone = 'f_index.pole.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "f_index.03IK.R"]'
[Link] = (False, False, False)
[Link](pose_bones['f_index.pole.R'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_index.pole.R'
props.prop_bone = 'f_index.pole.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "f_index.03IK.R"]'
[Link] = (False, False, False)
if is_selected({'f_middle.03IK.R'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_middle.03IK.R)', icon='DOWNARROW_HLT')
[Link] = 'f_middle.03IK.R'
props.prop_bone = 'f_middle.03IK.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "finger_IK_parent.R"]'
[Link] = (False, False, False)
[Link](pose_bones['f_middle.03IK.R'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_middle.03IK.R'
props.prop_bone = 'f_middle.03IK.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "finger_IK_parent.R"]'
[Link] = (False, False, False)
if is_selected({'f_middle.pole.R'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_middle.pole.R)', icon='DOWNARROW_HLT')
[Link] = 'f_middle.pole.R'
props.prop_bone = 'f_middle.pole.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "f_middle.03IK.R"]'
[Link] = (False, False, False)
[Link](pose_bones['f_middle.pole.R'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_middle.pole.R'
props.prop_bone = 'f_middle.pole.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "f_middle.03IK.R"]'
[Link] = (False, False, False)
if is_selected({'f_pinky.03IK.R'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_pinky.03IK.R)', icon='DOWNARROW_HLT')
[Link] = 'f_pinky.03IK.R'
props.prop_bone = 'f_pinky.03IK.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "finger_IK_parent.R"]'
[Link] = (False, False, False)
[Link](pose_bones['f_pinky.03IK.R'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_pinky.03IK.R'
props.prop_bone = 'f_pinky.03IK.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "finger_IK_parent.R"]'
[Link] = (False, False, False)
if is_selected({'f_pinky.pole.R'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_pinky.pole.R)', icon='DOWNARROW_HLT')
[Link] = 'f_pinky.pole.R'
props.prop_bone = 'f_pinky.pole.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "f_pinky.03IK.R"]'
[Link] = (False, False, False)
[Link](pose_bones['f_pinky.pole.R'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_pinky.pole.R'
props.prop_bone = 'f_pinky.pole.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "f_pinky.03IK.R"]'
[Link] = (False, False, False)
if is_selected({'f_ring.03IK.R'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_ring.03IK.R)', icon='DOWNARROW_HLT')
[Link] = 'f_ring.03IK.R'
props.prop_bone = 'f_ring.03IK.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "finger_IK_parent.R"]'
[Link] = (False, False, False)
[Link](pose_bones['f_ring.03IK.R'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_ring.03IK.R'
props.prop_bone = 'f_ring.03IK.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "finger_IK_parent.R"]'
[Link] = (False, False, False)
if is_selected({'f_ring.pole.R'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_ring.pole.R)', icon='DOWNARROW_HLT')
[Link] = 'f_ring.pole.R'
props.prop_bone = 'f_ring.pole.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "f_ring.03IK.R"]'
[Link] = (False, False, False)
[Link](pose_bones['f_ring.pole.R'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_ring.pole.R'
props.prop_bone = 'f_ring.pole.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "f_ring.03IK.R"]'
[Link] = (False, False, False)
if is_selected({'f_thumb.03IK.R'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_thumb.03IK.R)', icon='DOWNARROW_HLT')
[Link] = 'f_thumb.03IK.R'
props.prop_bone = 'f_thumb.03IK.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "finger_IK_parent.R"]'
[Link] = (False, False, False)
[Link](pose_bones['f_thumb.03IK.R'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_thumb.03IK.R'
props.prop_bone = 'f_thumb.03IK.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "finger_IK_parent.R"]'
[Link] = (False, False, False)
if is_selected({'f_thumb.pole.R'}):
emit_rig_separator()
group1 = [Link](align=True)
group2 = [Link](factor=0.65, align=True)
props = [Link]('pose.rigify_switch_parent_oeujyfjmc8c1f286',
text='Parent (f_thumb.pole.R)', icon='DOWNARROW_HLT')
[Link] = 'f_thumb.pole.R'
props.prop_bone = 'f_thumb.pole.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "f_thumb.03IK.R"]'
[Link] = (False, False, False)
[Link](pose_bones['f_thumb.pole.R'], '["parent_switch"]', text='')
props = [Link]('pose.rigify_switch_parent_bake_oeujyfjmc8c1f286',
text='', icon='ACTION_TWEAK')
[Link] = 'f_thumb.pole.R'
props.prop_bone = 'f_thumb.pole.R'
props.prop_id = 'parent_switch'
props.parent_names = '["None", "Root", "Torso", "Hips", "Chest", "Head",
"[Link].R", "hand_ik.R", "hand.R", "f_thumb.03IK.R"]'
[Link] = (False, False, False)
class RigBakeSettings([Link]):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_label = "Rig Bake Settings"
bl_idname = "VIEW3D_PT_rig_bake_settings_" + rig_id
bl_category = 'Item'
@classmethod
def poll(self, context):
return [Link](context) and find_action(context.active_object) is not None
@classmethod
def poll(self, context):
try:
return (context.active_object.[Link]("rig_id") == rig_id)
except (AttributeError, KeyError, TypeError):
return False
@classmethod
def poll(self, context):
try:
return (context.active_object.[Link]("rig_id") == rig_id)
except (AttributeError, KeyError, TypeError):
return False
################################################################################
######
#Exposing modifiers
class P2MRegular_PT_vis_props([Link]):
bl_label = "Visibility Properties"
bl_idname = "P2MRegular_PT_vis_props"
bl_space_type = 'VIEW_3D'
bl_parent_id = "P2MRegular_PT_customprops"
bl_region_type = 'UI'
bl_options = {'DEFAULT_CLOSED'}
my_object = None
# character modifiers use modifier names (if you change modifier names it you will
have to change these too). Here we have an edxample with mask modifiers.
# creating a variable to source the modifier (name_of_the_variable =
my_object.modifiers["exact_modifier_name"])
mask_arms = my_object.modifiers["Mask_Arms"]
mask_legs = my_object.modifiers["Mask_Legs"]
mask_torso = my_object.modifiers["Mask_Torso"]
mask_half_L = my_object.modifiers["Mask_Half.L"]
mask_half_R = my_object.modifiers["Mask_Half.R"]
# character modifiers
# if I didn't break it down above the code would be: (kinda messy)
# [Link]([Link]['my_object'].modifiers["MASK-TORSO"],
'show_viewport', text="", toggle = True, icon='HIDE_ON', emboss=False)
# here we use Blender's eye/hide icon
box = [Link]()
col = [Link](align=True)
row = [Link]()
[Link](text='Torso', translate=False)
[Link](mask_torso, 'show_viewport', text="", icon='HIDE_ON',
invert_checkbox=True, emboss=False)
row = [Link]()
[Link](text='Arms', translate=False)
[Link](mask_arms, 'show_viewport', text="", icon='HIDE_ON',
invert_checkbox=True, emboss=False)
class P2MRegular_PT_render_props([Link]):
bl_label = "Render Properties"
bl_idname = "P2MRegular_PT_render_props"
bl_space_type = 'VIEW_3D'
bl_parent_id = "P2MRegular_PT_customprops" # this is the same for all it points to the
main panel name
bl_region_type = 'UI'
bl_options = {'DEFAULT_CLOSED'} # you may not want this? delete if not
row = [Link]()
split = [Link](align=True, factor=split_size)
row = [Link](align=True)
# this is just the label you could call it anything
[Link](text='Smooth', translate=False)
row = [Link](align=True)
# this is the property > format is important
[Link](bone, '["Smooth"]', text = "", slider=True)
row = [Link]()
split = [Link](align=True, factor=split_size)
row = [Link](align=True)
# this is just the label you could call it anything
[Link](text='Subdiv', translate=False)
row = [Link](align=True)
# this is the property > format is important
[Link](bone, '["Subdiv"]', text = "")
row = [Link]()
split = [Link](align=True, factor=split_size)
row = [Link](align=True)
# this is just the label you could call it anything
[Link](text='color_1_RGB', translate=False)
row = [Link](align=True)
# this is the property > format is important
[Link](bone, '["color_1_RGB"]', text = "", slider=True)
row = [Link]()
split = [Link](align=True, factor=split_size)
row = [Link](align=True)
# this is just the label you could call it anything
[Link](text='color_2_RGB', translate=False)
row = [Link](align=True)
# this is the property > format is important
[Link](bone, '["color_2_RGB"]', text = "", slider=True)
# -----------------------------------------------------------
# Registration
classes = (
RigBakeSettings,
P2M_Regular_RigLayers,
RigUI,
POSE_OT_finger_index_L_ik_to_fk,
POSE_OT_finger_index_L_fk_to_ik,
POSE_OT_finger_index_R_ik_to_fk,
POSE_OT_finger_index_R_fk_to_ik,
POSE_OT_finger_middle_L_ik_to_fk,
POSE_OT_finger_middle_L_fk_to_ik,
POSE_OT_finger_middle_R_ik_to_fk,
POSE_OT_finger_middle_R_fk_to_ik,
POSE_OT_finger_ring_L_ik_to_fk,
POSE_OT_finger_ring_L_fk_to_ik,
POSE_OT_finger_ring_R_ik_to_fk,
POSE_OT_finger_ring_R_fk_to_ik,
POSE_OT_finger_pinky_L_ik_to_fk,
POSE_OT_finger_pinky_L_fk_to_ik,
POSE_OT_finger_pinky_R_ik_to_fk,
POSE_OT_finger_pinky_R_fk_to_ik,
POSE_OT_finger_thumb_L_ik_to_fk,
POSE_OT_finger_thumb_L_fk_to_ik,
POSE_OT_finger_thumb_R_ik_to_fk,
POSE_OT_finger_thumb_R_fk_to_ik,
RIGIFY_OT_get_frame_range,
POSE_OT_rigify_generic_snap,
POSE_OT_rigify_generic_snap_bake,
POSE_OT_rigify_clear_keyframes,
POSE_OT_rigify_limb_ik2fk,
POSE_OT_rigify_limb_ik2fk_bake,
POSE_OT_rigify_limb_toggle_pole,
POSE_OT_rigify_limb_toggle_pole_bake,
POSE_OT_rigify_leg_roll_ik2fk,
POSE_OT_rigify_leg_roll_ik2fk_bake,
POSE_OT_rigify_switch_parent,
POSE_OT_rigify_switch_parent_bake,
P2MRegular_PT_customprops,
P2MRegular_PT_vis_props,
P2MRegular_PT_render_props,
)
def register():
for cls in classes:
[Link].register_class(cls)
def unregister():
for cls in reversed(classes):
[Link].unregister_class(cls)
if __name__ == "__main__":
register()