From 5ae815cbc321dcc1c60224293ded7849940052a7 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sun, 24 Mar 2019 18:45:16 +0300 Subject: Rigify: properly set custom property defaults and overridable flags. Refactor rigs to use the new make_property utility function, and implement new 2.8 specific settings using it. The default value is now important for NLA evaluation, and the override flag will be used by the upcoming static override feature. Default can be backported to 2.79 for 2.8 forward compatibility. --- rigify/rigs/limbs/super_finger.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'rigify/rigs/limbs/super_finger.py') diff --git a/rigify/rigs/limbs/super_finger.py b/rigify/rigs/limbs/super_finger.py index 378216e3..081dca7a 100644 --- a/rigify/rigs/limbs/super_finger.py +++ b/rigify/rigs/limbs/super_finger.py @@ -3,7 +3,7 @@ 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_widget from ...utils import MetarigError, align_bone_x_axis -from rna_prop_ui import rna_idprop_ui_prop_get +from ...utils.mechanism import make_property script = """ controls = [%s] @@ -173,13 +173,7 @@ class Rig: pb[tip_name].lock_rotation = True, True, True pb[tip_name].lock_rotation_w = True - pb_master['finger_curve'] = 0.0 - prop = rna_idprop_ui_prop_get(pb_master, 'finger_curve') - prop["min"] = 0.0 - prop["max"] = 1.0 - prop["soft_min"] = 0.0 - prop["soft_max"] = 1.0 - prop["description"] = "Rubber hose finger cartoon effect" + make_property(pb_master, 'finger_curve', 0.0, description="Rubber hose finger cartoon effect") # Pose settings for org, ctrl, deform, mch, mch_drv in zip(self.org_bones, ctrl_chain, def_chain, mch_chain, mch_drv_chain): -- cgit v1.2.3