Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2019-03-24 18:45:16 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2019-03-24 18:51:05 +0300
commit5ae815cbc321dcc1c60224293ded7849940052a7 (patch)
tree8d3cc00893cb7514684d633005c632d663d2cc2c /rigify/rigs/spines
parent51ceed0bfbd22e8270028b593c6832505d4c49e1 (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/spines')
-rw-r--r--rigify/rigs/spines/super_spine.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/rigify/rigs/spines/super_spine.py b/rigify/rigs/spines/super_spine.py
index d1b7593f..85169ca6 100644
--- a/rigify/rigs/spines/super_spine.py
+++ b/rigify/rigs/spines/super_spine.py
@@ -6,7 +6,7 @@ from ...utils import create_circle_widget, create_sphere_widget, create_neck_ben
from ..widgets import create_ballsocket_widget
from ...utils import MetarigError, make_mechanism_name, create_cube_widget
from ...utils import ControlLayersOption
-from rna_prop_ui import rna_idprop_ui_prop_get
+from ...utils.mechanism import make_property
script = """
controls = [%s]
@@ -766,16 +766,11 @@ class Rig:
for prop in props:
if prop == 'neck_follow':
- torso[prop] = 0.5
+ defval = 0.5
else:
- torso[prop] = 0.0
-
- prop = rna_idprop_ui_prop_get(torso, prop, create=True)
- prop["min"] = 0.0
- prop["max"] = 1.0
- prop["soft_min"] = 0.0
- prop["soft_max"] = 1.0
- prop["description"] = prop
+ defval = 0.0
+
+ make_property(torso, prop, defval)
# driving the follow rotation switches for neck and head
for bone, prop, in zip(owners, props):