diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-02-19 21:02:03 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-02-19 21:43:08 +0300 |
commit | 29a359840ea722c9f2f631b113f53e43380c39ce (patch) | |
tree | 3b84ea7c84f973e9f89b984589f149fb641643df /rigify | |
parent | b1320f3af626210555df43494733ffc295d2aeda (diff) |
Fix T61711: Rigify fails to complete generate if no rigs create drivers.
The code attaching the UI script to the rig didn't check
that animation_data exists before accessing it.
Diffstat (limited to 'rigify')
-rw-r--r-- | rigify/generate.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rigify/generate.py b/rigify/generate.py index d726f14a..5b5f0e98 100644 --- a/rigify/generate.py +++ b/rigify/generate.py @@ -598,6 +598,9 @@ def create_persistent_rig_ui(obj, script): skip = False driver = None + if not obj.animation_data: + obj.animation_data_create() + for fcurve in obj.animation_data.drivers: if fcurve.data_path == 'pass_index': driver = fcurve.driver |