diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-03-24 18:45:16 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-03-24 18:51:05 +0300 |
commit | 5ae815cbc321dcc1c60224293ded7849940052a7 (patch) | |
tree | 8d3cc00893cb7514684d633005c632d663d2cc2c /rigify/rigs/limbs/super_finger.py | |
parent | 51ceed0bfbd22e8270028b593c6832505d4c49e1 (diff) |
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.
Diffstat (limited to 'rigify/rigs/limbs/super_finger.py')
-rw-r--r-- | rigify/rigs/limbs/super_finger.py | 10 |
1 files changed, 2 insertions, 8 deletions
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): |