[Bf-extensions-cvs] [f1ed616a] blender-v2.92-release master: Rigify: make properties overridable when copying.
Alexander Gavrilov
noreply at git.blender.org
Mon Jan 18 11:27:18 CET 2021
Commit: f1ed616a28ad5f4cae46a63893752bc3238c58e0
Author: Alexander Gavrilov
Date: Sun Jan 17 17:52:23 2021 +0300
Branches: blender-v2.92-release master
https://developer.blender.org/rBAf1ed616a28ad5f4cae46a63893752bc3238c58e0
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.
===================================================================
M rigify/utils/mechanism.py
===================================================================
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
More information about the Bf-extensions-cvs
mailing list