diff options
author | Demeter Dzadik <demeterdzadik@gmail.com> | 2020-11-04 14:48:27 +0300 |
---|---|---|
committer | Demeter Dzadik <demeterdzadik@gmail.com> | 2020-11-04 15:02:07 +0300 |
commit | 8e02b43628efe466a5cbffc724ecab7a0750a44b (patch) | |
tree | 8d0ff2aeef918ecedfffaa426e76861321031ab4 /rigify/rig_ui_template.py | |
parent | 5a1e3d5023c0605885d7de52856ad97114dbd35f (diff) |
Rigify: Remove pass_index driver hack in favor of Custom Property to attach rig script
In days of old, Custom Properties couldn't store datablock pointers, so a driver variable was used to reference the script datablock, thereby keeping it attached to the rig when the rig is linked or appended. This can now be achieved much more elegantly with one short line of code.
Reviewed By: angavrilov
Differential Revision: https://developer.blender.org/D9082
Diffstat (limited to 'rigify/rig_ui_template.py')
-rw-r--r-- | rigify/rig_ui_template.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/rigify/rig_ui_template.py b/rigify/rig_ui_template.py index 4f0ba936..642b5110 100644 --- a/rigify/rig_ui_template.py +++ b/rigify/rig_ui_template.py @@ -23,7 +23,6 @@ import bpy from collections import OrderedDict from .utils.animation import SCRIPT_REGISTER_BAKE, SCRIPT_UTILITIES_BAKE -from .utils.rig import attach_persistent_script from . import base_generate @@ -1242,4 +1241,4 @@ class ScriptGenerator(base_generate.GeneratorPlugin): exec(script.as_string(), {}) # Attach the script to the rig - attach_persistent_script(self.obj, script) + self.obj['rig_ui'] = script |