diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2021-01-17 17:52:23 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2021-01-18 12:31:09 +0300 |
commit | f1ed616a28ad5f4cae46a63893752bc3238c58e0 (patch) | |
tree | 6f722754d393f916ca14c65cd14c1781b8f12935 | |
parent | 25c81824e45b28910cf93a9997e6629dc162f4e7 (diff) |
Rigify: make properties overridable when copying.
Normally properties are copied to controls and made accessible
in the rig UI, so they should be overridable. Properties created
via make_property are already marked as such.
-rw-r--r-- | rigify/utils/mechanism.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rigify/utils/mechanism.py b/rigify/utils/mechanism.py index 234caaaf..6335514b 100644 --- a/rigify/utils/mechanism.py +++ b/rigify/utils/mechanism.py @@ -420,7 +420,7 @@ def reactivate_custom_properties(obj): fcu.mute = False -def copy_custom_properties(src, dest, *, prefix='', dest_prefix='', link_driver=False): +def copy_custom_properties(src, dest, *, prefix='', dest_prefix='', link_driver=False, overridable=True): """Copy custom properties with filtering by prefix. Optionally link using drivers.""" res = [] exclude = {'_RNA_UI', 'rigify_parameters', 'rigify_type'} @@ -442,6 +442,9 @@ def copy_custom_properties(src, dest, *, prefix='', dest_prefix='', link_driver= if link_driver: make_driver(src, quote_property(key), variables=[(dest.id_data, dest, new_key)]) + if overridable: + dest.property_overridable_library_set(quote_property(new_key), True) + res.append((key, new_key, value, info)) return res |