def make_master_control_widget(self): if self.make_control: ctrl = self.bones.ctrl.master radius = self.params.skin_elastic_scale_radius bone = self.get_bone(ctrl) create_circle_widget(self.obj, ctrl, radius=radius/self.get_bone(ctrl).length)
def make_main_control_widget(self, ctrl, subtype, index): if subtype == 0 and index == 0: if len(self.start_control_poslist) > 0: create_twist_widget(self.obj, ctrl, size=1, head_tail=0.25) else: self.make_twist_control_widget(ctrl, self.bones.org[0], head_tail=0.25) elif self.use_tip and subtype == 0 and index == self.num_main_controls - 1: create_circle_widget(self.obj, ctrl, radius=0.5, head_tail=0.25) else: create_sphere_widget(self.obj, ctrl)
def generate_ik_tweak_widget(self, i, ctrl, wgt_mch): set_bone_widget_transform(self.obj, ctrl, wgt_mch) obj = create_circle_widget(self.obj, ctrl, head_tail=0.0, with_line=False) adjust_widget_transform_mesh(obj, Matrix.Diagonal((1.1, 1, 0.9, 1)), local=True)
def make_end_control_widget(self, ctrl, wgt_mch): shape_bone = self.get_bone(wgt_mch) is_animal = abs(shape_bone.z_axis.normalized().y) < 0.7 self.get_bone(ctrl).custom_shape_transform = shape_bone obj = create_circle_widget( self.obj, ctrl, radius=1.2 if is_animal else 1.1, head_tail=0.0, head_tail_x=1.0, with_line=False, ) if is_animal: # Tilt the widget toward the ground for horizontal spines angle = math.copysign(28, shape_bone.x_axis.x) rotmat = Matrix.Rotation(math.radians(angle), 4, 'X') adjust_widget_transform_mesh(obj, rotmat, local=True)
def make_control_widget(self, i, ctrl): create_circle_widget(self.obj, ctrl, radius=0.3, head_tail=0.5)
def make_control_widget(self, ctrl, is_hip): obj = create_circle_widget(self.obj, ctrl, radius=1.0, head_tail=0.5) if is_hip: adjust_widget_transform_mesh(obj, Matrix.Diagonal((1, -1, 1, 1)), local=True)
def make_master_control_widget(self): ctrl = self.bones.ctrl.master create_circle_widget(self.obj, ctrl, radius=1, head_tail=0.25)
def make_mouth_control_widget(self): ctrl = self.bones.ctrl.mouth create_circle_widget(self.obj, ctrl, radius=0.6, head_tail=0.1)
def make_master_control_widget(self): if self.use_master_control: create_circle_widget(self.obj, self.bones.ctrl.master, radius=1.0, head_tail=0.5)